Merge branch 'pam' of github.com:jumpserver/jumpserver into pam

pull/14806/head
ibuler 2025-01-13 11:18:33 +08:00
commit 39f266eb71
7 changed files with 898 additions and 460 deletions

View File

@ -37,41 +37,54 @@ class PamDashboardApi(APIView):
return result
def get(self, request, *args, **kwargs):
data = {}
monday_time = local_monday()
query_params = self.request.query_params
account_stats = Account.objects.aggregate(
total_count=Count('id'),
privileged_count=Count('id', filter=Q(privileged=True)),
connectivity_ok_count=Count('id', filter=Q(connectivity='ok')),
secret_reset_count=Count('id', filter=Q(secret_reset=True)),
unavailable_count=Count('id', filter=Q(is_active=False)),
week_add_count=Count('id', filter=Q(date_created__gte=monday_time)),
)
_all = query_params.get('all')
if _all or query_params.get('total_accounts'):
data['total_accounts'] = account_stats['total_count']
agg_map = {
'total_accounts': (
'total_count',
Count('id')
),
'total_privileged_accounts': (
'privileged_count',
Count('id', filter=Q(privileged=True))
),
'total_connectivity_ok_accounts': (
'connectivity_ok_count',
Count('id', filter=Q(connectivity='ok'))
),
'total_secret_reset_accounts': (
'secret_reset_count',
Count('id', filter=Q(secret_reset=True))
),
'total_unavailable_accounts': (
'unavailable_count',
Count('id', filter=Q(is_active=False))
),
'total_week_add_accounts': (
'week_add_count',
Count('id', filter=Q(date_created__gte=monday_time))
),
}
if _all or query_params.get('total_week_add_accounts'):
data['total_week_add_accounts'] = account_stats['week_add_count']
aggregations = {}
for param_key, (agg_key, agg_expr) in agg_map.items():
if _all or query_params.get(param_key):
aggregations[agg_key] = agg_expr
if _all or query_params.get('total_privileged_accounts'):
data['total_privileged_accounts'] = account_stats['privileged_count']
data = {}
if aggregations:
account_stats = Account.objects.aggregate(**aggregations)
for param_key, (agg_key, __) in agg_map.items():
if agg_key in account_stats:
data[param_key] = account_stats[agg_key]
if _all or query_params.get('total_connectivity_ok_accounts'):
data['total_connectivity_ok_accounts'] = account_stats['connectivity_ok_count']
if _all or query_params.get('total_secret_reset_accounts'):
data['total_secret_reset_accounts'] = account_stats['secret_reset_count']
if _all or query_params.get('total_ordinary_accounts'):
data['total_ordinary_accounts'] = account_stats['total_count'] - account_stats['privileged_count']
if _all or query_params.get('total_unavailable_accounts'):
data['total_unavailable_accounts'] = account_stats['unavailable_count']
if (_all or query_params.get('total_ordinary_accounts')):
if 'total_count' in account_stats and 'privileged_count' in account_stats:
data['total_ordinary_accounts'] = \
account_stats['total_count'] - account_stats['privileged_count']
if _all or query_params.get('total_unmanaged_accounts'):
data['total_unmanaged_accounts'] = Account.get_risks(
@ -89,6 +102,14 @@ class PamDashboardApi(APIView):
data['total_long_time_change_password_accounts'] = Account.get_risks(
risk_type=RiskChoice.long_time_password).count()
if _all or query_params.get('total_leaked_password_accounts'):
data['total_leaked_password_accounts'] = Account.get_risks(
risk_type=RiskChoice.leaked_password).count()
if _all or query_params.get('total_repeated_password_accounts'):
data['total_repeated_password_accounts'] = Account.get_risks(
risk_type=RiskChoice.repeated_password).count()
if _all or query_params.get('total_count_type_to_accounts'):
data.update({
'total_count_type_to_accounts': self.get_type_to_accounts(),

View File

@ -47,6 +47,8 @@ def migrate_account_backup(apps, schema_editor):
automation_id = backup_id_old_new_map.get(str(execution.plan_id))
if not automation_id:
continue
snapshot = execution.snapshot
snapshot['type'] = "backup_account"
data = {
'automation_id': automation_id,
'date_start': execution.date_start,

View File

@ -1,18 +1,21 @@
{% load i18n %}
<div class='summary'>
<p>{% trans 'The following is a summary of account backup tasks, please review and handle them' %}</p>
<table>
<div class="report-container">
<div class="summary-section">
<h2>
{% trans 'The following is a summary of account backup tasks, please review and handle them' %}
</h2>
<table class="summary-table">
<caption></caption>
<thead>
<tr>
<th colspan='2'>任务汇总:</th>
<th colspan="2">{% trans 'Task Summary' %}:</th>
</tr>
</thead>
<tbody>
<tr>
<td>{% trans 'Task name' %}:</td>
<td>{{ execution.automation.name }} </td>
<td>{{ execution.automation.name }}</td>
</tr>
<tr>
<td>{% trans 'Date start' %}:</td>
@ -36,43 +39,75 @@
</tr>
</tbody>
</table>
</div>
</div>
<style>
.report-container {
max-width: 1200px;
margin: 20px auto;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, sans-serif;
}
h2,
h3 {
color: #2c3e50;
margin-bottom: 20px;
}
.section-header {
display: flex;
align-items: center;
margin-bottom: 15px;
}
table {
width: 100%;
border-collapse: collapse;
max-width: 100%;
text-align: left;
margin-top: 10px;
padding: 20px;
margin-bottom: 30px;
background-color: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.summary-table td:first-child {
width: 30%;
font-weight: 500;
}
th {
background: #f2f2f2;
font-size: 14px;
padding: 5px;
border: 1px solid #ddd;
}
tr :first-child {
width: 30%;
background-color: #f8f9fa;
padding: 12px 15px;
text-align: left;
font-weight: 600;
color: #2c3e50;
border-bottom: 2px solid #eee;
}
td {
border: 1px solid #ddd;
padding: 5px;
font-size: 12px;
padding: 12px 15px;
border-bottom: 1px solid #eee;
color: #34495e;
}
.result {
margin-top: 20px;
tr:last-child td {
border-bottom: none;
}
.result tr :first-child {
width: 10%;
tr:hover {
background-color: #f8f9fa;
}
@media (max-width: 768px) {
.report-container {
padding: 10px;
}
td,
th {
padding: 8px;
}
}
</style>

View File

@ -1,18 +1,21 @@
{% load i18n %}
<div class='summary'>
<p>{% trans 'The following is a summary of account change secret tasks, please read and process' %}</p>
<table>
<div class="report-container">
<div class="summary-section">
<h2>
{% trans 'The following is a summary of account change secret tasks, please read and process' %}
</h2>
<table class="summary-table">
<caption></caption>
<thead>
<tr>
<th colspan='2'>任务汇总:</th>
<th colspan="2">{% trans 'Task Summary' %}:</th>
</tr>
</thead>
<tbody>
<tr>
<td>{% trans 'Task name' %}:</td>
<td>{{ execution.automation.name }} </td>
<td>{{ execution.automation.name }}</td>
</tr>
<tr>
<td>{% trans 'Date start' %}:</td>
@ -32,24 +35,29 @@
</tr>
<tr>
<td>{% trans 'Asset success count' %}:</td>
<td>{{ summary.ok_assets }}</td>
<td class="success">{{ summary.ok_assets }}</td>
</tr>
<tr>
<td>{% trans 'Asset failed count' %}:</td>
<td>{{ summary.fail_assets }}</td>
<td class="error">{{ summary.fail_assets }}</td>
</tr>
<tr>
<td>{% trans 'Asset not support count' %}:</td>
<td>{{ summary.error_assets }}</td>
<td class="warning">{{ summary.error_assets }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class='result'>
<div class="result-section">
{% if summary.ok_accounts %}
<p>{% trans 'Success accounts' %}: {{ summary.ok_accounts }}</p>
<table>
<div class="section-header">
<h3>
{% trans 'Success accounts' %}:
<span class="badge badge-success">{{ summary.ok_accounts }}</span>
</h3>
</div>
<table class="data-table">
<caption></caption>
<thead>
<tr>
@ -69,11 +77,17 @@
</tbody>
</table>
{% endif %}
</div>
<div class='result'>
</div>
<div class="result-section">
{% if summary.fail_accounts %}
<p>{% trans 'Failed accounts' %}: {{ summary.fail_accounts }}</p>
<table>
<div class="section-header">
<h3>
{% trans 'Failed accounts' %}:
<span class="badge badge-error">{{ summary.fail_accounts }}</span>
</h3>
</div>
<table class="data-table">
<caption></caption>
<thead>
<tr>
@ -93,41 +107,115 @@
</tbody>
</table>
{% endif %}
</div>
</div>
<style>
.report-container {
max-width: 1200px;
margin: 20px auto;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, sans-serif;
}
h2,
h3 {
color: #2c3e50;
margin-bottom: 20px;
}
.section-header {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.badge {
background-color: #3498db;
color: white;
padding: 3px 10px;
border-radius: 12px;
font-size: 14px;
margin-left: 10px;
}
.badge-success {
background-color: #27ae60;
}
.badge-error {
background-color: #e74c3c;
}
table {
width: 100%;
border-collapse: collapse;
max-width: 100%;
text-align: left;
margin-top: 10px;
padding: 20px;
margin-bottom: 30px;
background-color: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.summary-table td:first-child {
width: 30%;
font-weight: 500;
}
.data-table td:first-child {
width: 80px;
}
th {
background: #f2f2f2;
font-size: 14px;
padding: 5px;
border: 1px solid #ddd;
}
tr :first-child {
width: 30%;
background-color: #f8f9fa;
padding: 12px 15px;
text-align: left;
font-weight: 600;
color: #2c3e50;
border-bottom: 2px solid #eee;
}
td {
border: 1px solid #ddd;
padding: 5px;
font-size: 12px;
padding: 12px 15px;
border-bottom: 1px solid #eee;
color: #34495e;
}
.result {
margin-top: 20px;
tr:last-child td {
border-bottom: none;
}
.result tr :first-child {
width: 10%;
.success {
color: #27ae60;
font-weight: 500;
}
.error {
color: #e74c3c;
font-weight: 500;
}
.warning {
color: #f39c12;
font-weight: 500;
}
.result-section {
margin-top: 30px;
}
tr:hover {
background-color: #f8f9fa;
}
@media (max-width: 768px) {
.report-container {
padding: 10px;
}
td,
th {
padding: 8px;
}
}
</style>

View File

@ -1,18 +1,21 @@
{% load i18n %}
<div class='summary'>
<p>{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}</p>
<table>
<div class="report-container">
<div class="summary-section">
<h2>
{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}
</h2>
<table class="summary-table">
<caption></caption>
<thead>
<tr>
<th colspan='2'>任务汇总:</th>
<th colspan="2">{% trans 'Task Summary' %}:</th>
</tr>
</thead>
<tbody>
<tr>
<td>{% trans 'Task name' %}:</td>
<td>{{ execution.automation.name }} </td>
<td>{{ execution.automation.name }}</td>
</tr>
<tr>
<td>{% trans 'Date start' %}:</td>
@ -28,42 +31,46 @@
</tr>
<tr>
<td>{% trans 'Assets count' %}:</td>
<td>{{ summary.assets }}</td>
<td><span class="badge">{{ summary.assets }}</span></td>
</tr>
<tr>
<td>{% trans 'Asset success count' %}:</td>
<td>{{ summary.ok_assets }}</td>
<td class="success">{{ summary.ok_assets }}</td>
</tr>
<tr>
<td>{% trans 'Asset failed count' %}:</td>
<td>{{ summary.fail_assets }}</td>
<td class="error">{{ summary.fail_assets }}</td>
</tr>
<tr>
<td>{% trans 'Asset not support count' %}:</td>
<td>{{ summary.error_assets }}</td>
<td class="warning">{{ summary.error_assets }}</td>
</tr>
<tr>
<td>{% trans 'Account count' %}:</td>
<td>{{ summary.accounts }}</td>
<td><span class="badge">{{ summary.accounts }}</span></td>
</tr>
<tr>
<td>{% trans 'Ok count' %}:</td>
<td>{{ summary.ok }}</td>
<td class="success">{{ summary.ok }}</td>
</tr>
<tr>
<td>{% trans 'No password count' %}:</td>
<td>{{ summary.no_secret }}</td>
<td class="warning">{{ summary.no_secret }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class='result'>
<div class="result-section">
{% if summary.weak_password %}
<p>{% trans 'Week password' %}: {{ summary.weak_password }}</p>
<p>{% trans 'Account check details' %}:</p>
<table>
<div class="section-header">
<h3>
{% trans 'Week password' %}:
<span class="badge badge-error">{{ summary.weak_password }}</span>
</h3>
</div>
<p class="section-desc">{% trans 'Account check details' %}:</p >
<table class="data-table">
<caption></caption>
<thead>
<tr>
@ -79,46 +86,132 @@
<td>{{ forloop.counter }}</td>
<td>{{ account.asset }}</td>
<td>{{ account.username }}</td>
<td style="color: red">{% trans 'Week password' %}</td>
<td class="error">{% trans 'Week password' %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>{% trans 'No weak password' %}</p>
<p class="no-data">{% trans 'No weak password' %}</p >
{% endif %}
</div>
</div>
<style>
.report-container {
max-width: 1200px;
margin: 20px auto;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, sans-serif;
}
h2,
h3 {
color: #2c3e50;
margin-bottom: 20px;
}
.section-header {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.section-desc {
color: #7f8c8d;
margin-bottom: 15px;
}
.badge {
background-color: #3498db;
color: white;
padding: 3px 10px;
border-radius: 12px;
font-size: 14px;
margin-left: 10px;
}
.badge-error {
background-color: #e74c3c;
}
table {
width: 100%;
border-collapse: collapse;
max-width: 100%;
text-align: left;
margin-top: 20px;
padding: 20px;
margin-bottom: 30px;
background-color: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.summary-table td:first-child {
width: 30%;
font-weight: 500;
}
.data-table td:first-child {
width: 80px;
}
th {
background: #f2f2f2;
font-size: 14px;
padding: 5px;
border: 1px solid #ddd;
}
tr :first-child {
width: 30%;
background-color: #f8f9fa;
padding: 12px 15px;
text-align: left;
font-weight: 600;
color: #2c3e50;
border-bottom: 2px solid #eee;
}
td {
border: 1px solid #ddd;
padding: 5px;
font-size: 12px;
padding: 12px 15px;
border-bottom: 1px solid #eee;
color: #34495e;
}
.result tr :first-child {
width: 10%;
tr:last-child td {
border-bottom: none;
}
.success {
color: #27ae60;
font-weight: 500;
}
.error {
color: #e74c3c;
font-weight: 500;
}
.warning {
color: #f39c12;
font-weight: 500;
}
.no-data {
text-align: center;
color: #7f8c8d;
padding: 20px;
background-color: #f8f9fa;
border-radius: 8px;
}
.result-section {
margin-top: 30px;
}
tr:hover {
background-color: #f8f9fa;
}
@media (max-width: 768px) {
.report-container {
padding: 10px;
}
td,
th {
padding: 8px;
}
}
</style>

View File

@ -1,18 +1,21 @@
{% load i18n %}
<div class='summary'>
<p>{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}</p>
<table>
<div class="report-container">
<div class="summary-section">
<h2>
{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}
</h2>
<table class="summary-table">
<caption></caption>
<thead>
<tr>
<th colspan='2'>任务汇总:</th>
<th colspan="2">{% trans 'Task Summary' %}:</th>
</tr>
</thead>
<tbody>
<tr>
<td>{% trans 'Task name' %}:</td>
<td>{{ execution.automation.name }} </td>
<td>{{ execution.automation.name }}</td>
</tr>
<tr>
<td>{% trans 'Date start' %}:</td>
@ -32,24 +35,29 @@
</tr>
<tr>
<td>{% trans 'Asset success count' %}:</td>
<td>{{ summary.ok_assets }}</td>
<td class="success">{{ summary.ok_assets }}</td>
</tr>
<tr>
<td>{% trans 'Asset failed count' %}:</td>
<td>{{ summary.fail_assets }}</td>
<td class="error">{{ summary.fail_assets }}</td>
</tr>
<tr>
<td>{% trans 'Asset not support count' %}:</td>
<td>{{ summary.error_assets }}</td>
<td class="warning">{{ summary.error_assets }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class='result'>
<div class="result-section">
{% if summary.new_accounts %}
<p>{% trans 'New found accounts' %}: {{ summary.new_accounts }}</p>
<table>
<div class="section-header">
<h3>
{% trans 'New found accounts' %}:
<span class="badge">{{ summary.new_accounts }}</span>
</h3>
</div>
<table class="data-table">
<caption></caption>
<thead>
<tr>
@ -69,13 +77,19 @@
</tbody>
</table>
{% else %}
<p>{% trans 'No new accounts found' %}</p>
<p class="no-data">{% trans 'No new accounts found' %}</p >
{% endif %}
</div>
<div class='result'>
</div>
<div class="result-section">
{% if summary.lost_accounts %}
<p>{% trans 'Lost accounts' %}: {{ summary.lost_accounts }}</p>
<table>
<div class="section-header">
<h3>
{% trans 'Lost accounts' %}:
<span class="badge">{{ summary.lost_accounts }}</span>
</h3>
</div>
<table class="data-table">
<caption></caption>
<thead>
<tr>
@ -95,70 +109,115 @@
</tbody>
</table>
{% endif %}
</div>
</div>
{#<div class='result'>#}
{# <p>{% trans 'New found risks' %}: {{ summary.new_risks }}</p>#}
{# {% if summary.new_risks %}#}
{# <table>#}
{# <caption></caption>#}
{# <thead>#}
{# <tr>#}
{# <th>{% trans 'No.' %}</th>#}
{# <th>{% trans 'Asset' %}</th>#}
{# <th>{% trans 'Username' %}</th>#}
{# <th>{% trans 'Result' %}</th>#}
{# </tr>#}
{# </thead>#}
{# <tbody>#}
{# {% for risk in result.risks %}#}
{# <tr>#}
{# <td>{{ forloop.counter }}</td>#}
{# <td>{{ risk.asset }}</td>#}
{# <td>{{ risk.username }}</td>#}
{# <td>{{ risk.risk }}</td>#}
{# </tr>#}
{# {% endfor %}#}
{# </tbody>#}
{# </table>#}
{# {% endif %}#}
{#</div>#}
<style>
.report-container {
max-width: 1200px;
margin: 20px auto;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, sans-serif;
}
h2,
h3 {
color: #2c3e50;
margin-bottom: 20px;
}
.section-header {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.badge {
background-color: #3498db;
color: white;
padding: 3px 10px;
border-radius: 12px;
font-size: 14px;
margin-left: 10px;
}
table {
width: 100%;
border-collapse: collapse;
max-width: 100%;
text-align: left;
margin-top: 10px;
padding: 20px;
margin-bottom: 30px;
background-color: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.summary-table td:first-child {
width: 30%;
font-weight: 500;
}
.data-table td:first-child {
width: 80px;
}
th {
background: #f2f2f2;
font-size: 14px;
padding: 5px;
border: 1px solid #ddd;
}
tr :first-child {
width: 30%;
background-color: #f8f9fa;
padding: 12px 15px;
text-align: left;
font-weight: 600;
color: #2c3e50;
border-bottom: 2px solid #eee;
}
td {
border: 1px solid #ddd;
padding: 5px;
font-size: 12px;
padding: 12px 15px;
border-bottom: 1px solid #eee;
color: #34495e;
}
.result {
margin-top: 20px;
tr:last-child td {
border-bottom: none;
}
.result tr :first-child {
width: 10%;
.success {
color: #27ae60;
font-weight: 500;
}
.error {
color: #e74c3c;
font-weight: 500;
}
.warning {
color: #f39c12;
font-weight: 500;
}
.no-data {
text-align: center;
color: #7f8c8d;
padding: 20px;
background-color: #f8f9fa;
border-radius: 8px;
}
.result-section {
margin-top: 30px;
}
tr:hover {
background-color: #f8f9fa;
}
@media (max-width: 768px) {
.report-container {
padding: 10px;
}
td,
th {
padding: 8px;
}
}
</style>

View File

@ -1,18 +1,21 @@
{% load i18n %}
<div class='summary'>
<p>{% trans 'The following is a summary of account push tasks, please read and process' %}</p>
<table>
<div class="report-container">
<div class="summary-section">
<h2>
{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}
</h2>
<table class="summary-table">
<caption></caption>
<thead>
<tr>
<th colspan='2'>任务汇总:</th>
<th colspan="2">{% trans 'Task Summary' %}:</th>
</tr>
</thead>
<tbody>
<tr>
<td>{% trans 'Task name' %}:</td>
<td>{{ execution.automation.name }} </td>
<td>{{ execution.automation.name }}</td>
</tr>
<tr>
<td>{% trans 'Date start' %}:</td>
@ -28,50 +31,187 @@
</tr>
<tr>
<td>{% trans 'Assets count' %}:</td>
<td>{{ summary.total_assets }}</td>
<td><span class="badge">{{ summary.assets }}</span></td>
</tr>
<tr>
<td>{% trans 'Asset success count' %}:</td>
<td>{{ summary.ok_assets }}</td>
<td class="success">{{ summary.ok_assets }}</td>
</tr>
<tr>
<td>{% trans 'Asset failed count' %}:</td>
<td>{{ summary.fail_assets }}</td>
<td class="error">{{ summary.fail_assets }}</td>
</tr>
<tr>
<td>{% trans 'Asset not support count' %}:</td>
<td>{{ summary.error_assets }}</td>
<td class="warning">{{ summary.error_assets }}</td>
</tr>
<tr>
<td>{% trans 'Account count' %}:</td>
<td><span class="badge">{{ summary.accounts }}</span></td>
</tr>
<tr>
<td>{% trans 'Ok count' %}:</td>
<td class="success">{{ summary.ok }}</td>
</tr>
<tr>
<td>{% trans 'No password count' %}:</td>
<td class="warning">{{ summary.no_secret }}</td>
</tr>
</tbody>
</table>
</div>
<div class="result-section">
{% if summary.weak_password %}
<div class="section-header">
<h3>
{% trans 'Week password' %}:
<span class="badge badge-error">{{ summary.weak_password }}</span>
</h3>
</div>
<p class="section-desc">{% trans 'Account check details' %}:</p>
<table class="data-table">
<caption></caption>
<thead>
<tr>
<th>{% trans 'No.' %}</th>
<th>{% trans 'Asset' %}</th>
<th>{% trans 'Username' %}</th>
<th>{% trans 'Result' %}</th>
</tr>
</thead>
<tbody>
{% for account in result.weak_password %}
<tr>
<td>{{ forloop.counter }}</td>
<td>{{ account.asset }}</td>
<td>{{ account.username }}</td>
<td class="error">{% trans 'Week password' %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="no-data">{% trans 'No weak password' %}</p>
{% endif %}
</div>
</div>
<style>
.report-container {
max-width: 1200px;
margin: 20px auto;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, sans-serif;
}
h2,
h3 {
color: #2c3e50;
margin-bottom: 20px;
}
.section-header {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.section-desc {
color: #7f8c8d;
margin-bottom: 15px;
}
.badge {
background-color: #3498db;
color: white;
padding: 3px 10px;
border-radius: 12px;
font-size: 14px;
margin-left: 10px;
}
.badge-error {
background-color: #e74c3c;
}
table {
width: 100%;
border-collapse: collapse;
max-width: 100%;
text-align: left;
margin-top: 10px;
padding: 20px;
margin-bottom: 30px;
background-color: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.summary-table td:first-child {
width: 30%;
font-weight: 500;
}
.data-table td:first-child {
width: 80px;
}
th {
background: #f2f2f2;
font-size: 14px;
padding: 5px;
border: 1px solid #ddd;
}
tr :first-child {
width: 30%;
background-color: #f8f9fa;
padding: 12px 15px;
text-align: left;
font-weight: 600;
color: #2c3e50;
border-bottom: 2px solid #eee;
}
td {
border: 1px solid #ddd;
padding: 5px;
font-size: 12px;
padding: 12px 15px;
border-bottom: 1px solid #eee;
color: #34495e;
}
tr:last-child td {
border-bottom: none;
}
.success {
color: #27ae60;
font-weight: 500;
}
.error {
color: #e74c3c;
font-weight: 500;
}
.warning {
color: #f39c12;
font-weight: 500;
}
.no-data {
text-align: center;
color: #7f8c8d;
padding: 20px;
background-color: #f8f9fa;
border-radius: 8px;
}
.result-section {
margin-top: 30px;
}
tr:hover {
background-color: #f8f9fa;
}
@media (max-width: 768px) {
.report-container {
padding: 10px;
}
td,
th {
padding: 8px;
}
}
</style>