mirror of https://github.com/jumpserver/jumpserver
Merge branch 'pam' of github.com:jumpserver/jumpserver into pam
commit
c9208d2cf7
|
@ -4,9 +4,10 @@ from rest_framework import serializers
|
||||||
from accounts.models import IntegrationApplication
|
from accounts.models import IntegrationApplication
|
||||||
from acls.serializers.rules import ip_group_child_validator, ip_group_help_text
|
from acls.serializers.rules import ip_group_child_validator, ip_group_help_text
|
||||||
from common.serializers.fields import JSONManyToManyField
|
from common.serializers.fields import JSONManyToManyField
|
||||||
|
from orgs.mixins.serializers import BulkOrgResourceModelSerializer
|
||||||
|
|
||||||
|
|
||||||
class IntegrationApplicationSerializer(serializers.ModelSerializer):
|
class IntegrationApplicationSerializer(BulkOrgResourceModelSerializer):
|
||||||
accounts = JSONManyToManyField(label=_('Account'))
|
accounts = JSONManyToManyField(label=_('Account'))
|
||||||
ip_group = serializers.ListField(
|
ip_group = serializers.ListField(
|
||||||
default=['*'], label=_('Access IP'), help_text=ip_group_help_text,
|
default=['*'], label=_('Access IP'), help_text=ip_group_help_text,
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
|
|
||||||
|
|
||||||
<div class="report-container">
|
<div class="report-container">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<img src="{% static 'img/JumpServer_white_logo.svg' %}" alt="Logo"/>
|
{% autoescape off %}
|
||||||
|
{{ logo }}
|
||||||
|
{% endautoescape %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="info-section">
|
<div class="info-section">
|
||||||
|
@ -48,155 +49,6 @@
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body,
|
{% include './css/report.css' %}
|
||||||
p {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container .header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
height: 4rem;
|
|
||||||
padding: 0.3rem 1rem;
|
|
||||||
background-color: #148f76;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container .header img {
|
|
||||||
height: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-section {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
height: 4rem;
|
|
||||||
padding: 0 1rem;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-section .info {
|
|
||||||
margin: unset;
|
|
||||||
font-size: 1.6rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section {
|
|
||||||
margin-top: 3rem;
|
|
||||||
padding: 0 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex: 1;
|
|
||||||
padding: 1rem 2rem;
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
border-radius: 8px;
|
|
||||||
height: 350px;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item h3 {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: flex-start;
|
|
||||||
height: 100%;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content p {
|
|
||||||
display: inline-flex;
|
|
||||||
width: 100%;
|
|
||||||
line-height: 1;
|
|
||||||
gap: 2rem;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content p .item-label {
|
|
||||||
width: 18rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content span {
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-execution-section h3 {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
color: #2c3e50;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header h3 {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
margin: 0;
|
|
||||||
color: #2c3e50;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header span {
|
|
||||||
background: #e8f5e9;
|
|
||||||
color: #2e7d32;
|
|
||||||
padding: 0.2rem 0.8rem;
|
|
||||||
border-radius: 1rem;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table th {
|
|
||||||
background: #f6f6f6;
|
|
||||||
color: #495057;
|
|
||||||
padding: 0.75rem;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
border-bottom: 2px solid #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table td {
|
|
||||||
padding: 0.75rem;
|
|
||||||
font-size: 14px;
|
|
||||||
border-bottom: 1px solid #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table tr:nth-child(even) {
|
|
||||||
background-color: #f6f6f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table tr:last-child td {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-accounts .section-header span {
|
|
||||||
background: #e8f5e9;
|
|
||||||
color: #2e7d32;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lost-accounts .section-header span {
|
|
||||||
background: #fbe9e7;
|
|
||||||
color: #d84315;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
|
|
||||||
<div class="report-container">
|
<div class="report-container">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<img src="{% static 'img/JumpServer_white_logo.svg' %}" alt="Logo"/>
|
{% autoescape off %}
|
||||||
|
{{ logo }}
|
||||||
|
{% endautoescape %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="info-section">
|
<div class="info-section">
|
||||||
|
@ -120,195 +122,6 @@
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body,
|
{% include './css/report.css' %}
|
||||||
p {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container .header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
height: 4rem;
|
|
||||||
padding: 0.3rem 1rem;
|
|
||||||
background-color: #148f76;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container .header img {
|
|
||||||
height: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-section {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
height: 4rem;
|
|
||||||
padding: 0 1rem;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-section .info {
|
|
||||||
margin: unset;
|
|
||||||
font-size: 1.6rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section {
|
|
||||||
margin-top: 3rem;
|
|
||||||
padding: 0 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex: 1;
|
|
||||||
padding: 1rem 2rem;
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
border-radius: 8px;
|
|
||||||
height: 350px;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item h3 {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: flex-start;
|
|
||||||
height: 100%;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content p {
|
|
||||||
display: inline-flex;
|
|
||||||
width: 100%;
|
|
||||||
line-height: 1;
|
|
||||||
gap: 2rem;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content p .item-label {
|
|
||||||
width: 18rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content span {
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-summery-section {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 2rem;
|
|
||||||
width: inherit;
|
|
||||||
margin-top: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-summery-section .result-section {
|
|
||||||
width: 100%;
|
|
||||||
padding: 1rem;
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-execution-section h3 {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
color: #2c3e50;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header {
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header h3 {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
margin: 0;
|
|
||||||
color: #2c3e50;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header span {
|
|
||||||
background: #e8f5e9;
|
|
||||||
color: #2e7d32;
|
|
||||||
padding: 0.2rem 0.8rem;
|
|
||||||
border-radius: 1rem;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table {
|
|
||||||
margin-bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table th {
|
|
||||||
background: #f6f6f6;
|
|
||||||
color: #495057;
|
|
||||||
padding: 0.75rem;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
border-bottom: 2px solid #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table td {
|
|
||||||
padding: 0.75rem;
|
|
||||||
font-size: 14px;
|
|
||||||
border-bottom: 1px solid #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table tr:nth-child(even) {
|
|
||||||
background-color: #f6f6f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table tr:last-child td {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-data {
|
|
||||||
text-align: center;
|
|
||||||
color: #6c757d;
|
|
||||||
padding: 2rem;
|
|
||||||
background: #f6f6f6;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin: 1rem 0;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-accounts .section-header span {
|
|
||||||
background: #e8f5e9;
|
|
||||||
color: #2e7d32;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lost-accounts .section-header span {
|
|
||||||
background: #fbe9e7;
|
|
||||||
color: #d84315;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
|
@ -1,11 +1,12 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
|
|
||||||
|
|
||||||
<div class="report-container">
|
<div class="report-container">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<img src="{% static 'img/JumpServer_white_logo.svg' %}" alt="Logo"/>
|
{% autoescape off %}
|
||||||
|
{{ logo }}
|
||||||
|
{% endautoescape %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="info-section">
|
<div class="info-section">
|
||||||
|
@ -100,194 +101,5 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body,
|
{% include './css/report.css' %}
|
||||||
p {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container .header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
height: 4rem;
|
|
||||||
padding: 0.3rem 1rem;
|
|
||||||
background-color: #148f76;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container .header img {
|
|
||||||
height: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-section {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
height: 4rem;
|
|
||||||
padding: 0 1rem;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-section .info {
|
|
||||||
margin: unset;
|
|
||||||
font-size: 1.6rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section {
|
|
||||||
margin-top: 3rem;
|
|
||||||
padding: 0 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex: 1;
|
|
||||||
padding: 1rem 2rem;
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
border-radius: 8px;
|
|
||||||
height: 350px;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item h3 {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: flex-start;
|
|
||||||
height: 100%;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content p {
|
|
||||||
display: inline-flex;
|
|
||||||
width: 100%;
|
|
||||||
line-height: 1;
|
|
||||||
gap: 2rem;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content p .item-label {
|
|
||||||
width: 18rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content span {
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-summery-section {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 2rem;
|
|
||||||
width: inherit;
|
|
||||||
margin-top: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-summery-section .result-section {
|
|
||||||
width: 100%;
|
|
||||||
padding: 1rem;
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-execution-section h3 {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
color: #2c3e50;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header {
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header h3 {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
margin: 0;
|
|
||||||
color: #2c3e50;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header span {
|
|
||||||
background: #e8f5e9;
|
|
||||||
color: #2e7d32;
|
|
||||||
padding: 0.2rem 0.8rem;
|
|
||||||
border-radius: 1rem;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table {
|
|
||||||
margin-bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table th {
|
|
||||||
background: #f6f6f6;
|
|
||||||
color: #495057;
|
|
||||||
padding: 0.75rem;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
border-bottom: 2px solid #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table td {
|
|
||||||
padding: 0.75rem;
|
|
||||||
font-size: 14px;
|
|
||||||
border-bottom: 1px solid #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table tr:nth-child(even) {
|
|
||||||
background-color: #f6f6f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table tr:last-child td {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-data {
|
|
||||||
text-align: center;
|
|
||||||
color: #6c757d;
|
|
||||||
padding: 2rem;
|
|
||||||
background: #f6f6f6;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin: 1rem 0;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-accounts .section-header span {
|
|
||||||
background: #e8f5e9;
|
|
||||||
color: #2e7d32;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lost-accounts .section-header span {
|
|
||||||
background: #fbe9e7;
|
|
||||||
color: #d84315;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,194 @@
|
||||||
|
html {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body,
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.report-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.report-container .header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
height: 4rem;
|
||||||
|
padding: 0.3rem 1rem;
|
||||||
|
background-color: #148f76;
|
||||||
|
}
|
||||||
|
|
||||||
|
.report-container .header svg {
|
||||||
|
height: 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-section {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
height: 4rem;
|
||||||
|
padding: 0 1rem;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-section .info {
|
||||||
|
margin: unset;
|
||||||
|
font-size: 1.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-section {
|
||||||
|
margin-top: 3rem;
|
||||||
|
padding: 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-section .synopsis-section {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-section .synopsis-section .synopsis-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1;
|
||||||
|
padding: 1rem 2rem;
|
||||||
|
border: 1px solid #e0e0e0;
|
||||||
|
border-radius: 8px;
|
||||||
|
height: 350px;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-section .synopsis-section .synopsis-item h3 {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-section .synopsis-section .synopsis-item .synopsis-item-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: flex-start;
|
||||||
|
height: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-section .synopsis-section .synopsis-item .synopsis-item-content p {
|
||||||
|
display: inline-flex;
|
||||||
|
width: 100%;
|
||||||
|
line-height: 1;
|
||||||
|
gap: 2rem;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-section .synopsis-section .synopsis-item .synopsis-item-content p .item-label {
|
||||||
|
width: 18rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-section .synopsis-section .synopsis-item .synopsis-item-content span {
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-section .tabel-summery-section {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 2rem;
|
||||||
|
width: inherit;
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-section .tabel-summery-section .result-section {
|
||||||
|
width: 100%;
|
||||||
|
padding: 1rem;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #e0e0e0;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-section .tabel-execution-section h3 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
color: #2c3e50;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-header {
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-header h3 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
margin: 0;
|
||||||
|
color: #2c3e50;
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-header span {
|
||||||
|
background: #e8f5e9;
|
||||||
|
color: #2e7d32;
|
||||||
|
padding: 0.2rem 0.8rem;
|
||||||
|
border-radius: 1rem;
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-table {
|
||||||
|
margin-bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-table th {
|
||||||
|
background: #f6f6f6;
|
||||||
|
color: #495057;
|
||||||
|
padding: 0.75rem;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
border-bottom: 2px solid #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-table td {
|
||||||
|
padding: 0.75rem;
|
||||||
|
font-size: 14px;
|
||||||
|
border-bottom: 1px solid #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-table tr:nth-child(even) {
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-table tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-data {
|
||||||
|
text-align: center;
|
||||||
|
color: #6c757d;
|
||||||
|
padding: 2rem;
|
||||||
|
background: #f6f6f6;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin: 1rem 0;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.new-accounts .section-header span {
|
||||||
|
background: #e8f5e9;
|
||||||
|
color: #2e7d32;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lost-accounts .section-header span {
|
||||||
|
background: #fbe9e7;
|
||||||
|
color: #d84315;
|
||||||
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="report-container">
|
<div class="report-container">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<img src="{% static 'img/JumpServer_white_logo.svg' %}" alt="Logo"/>
|
{% autoescape off %}
|
||||||
|
{{ logo }}
|
||||||
|
{% endautoescape %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="info-section">
|
<div class="info-section">
|
||||||
|
@ -123,193 +123,5 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body,
|
{% include './css/report.css' %}
|
||||||
p {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container .header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
height: 4rem;
|
|
||||||
padding: 0.3rem 1rem;
|
|
||||||
background-color: #148f76;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container .header img {
|
|
||||||
height: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-section {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
height: 4rem;
|
|
||||||
padding: 0 1rem;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-section .info {
|
|
||||||
margin: unset;
|
|
||||||
font-size: 1.6rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section {
|
|
||||||
margin-top: 3rem;
|
|
||||||
padding: 0 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex: 1;
|
|
||||||
padding: 1rem 2rem;
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
border-radius: 8px;
|
|
||||||
height: 350px;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item h3 {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: flex-start;
|
|
||||||
height: 100%;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content p {
|
|
||||||
display: inline-flex;
|
|
||||||
width: 100%;
|
|
||||||
line-height: 1;
|
|
||||||
gap: 2rem;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content p .item-label {
|
|
||||||
width: 18rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content span {
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-summery-section {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 2rem;
|
|
||||||
width: inherit;
|
|
||||||
margin-top: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-summery-section .result-section {
|
|
||||||
width: 100%;
|
|
||||||
padding: 1rem;
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-execution-section h3 {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
color: #2c3e50;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header {
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header h3 {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
margin: 0;
|
|
||||||
color: #2c3e50;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header span {
|
|
||||||
background: #e8f5e9;
|
|
||||||
color: #2e7d32;
|
|
||||||
padding: 0.2rem 0.8rem;
|
|
||||||
border-radius: 1rem;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table {
|
|
||||||
margin-bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table th {
|
|
||||||
background: #f6f6f6;
|
|
||||||
color: #495057;
|
|
||||||
padding: 0.75rem;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
border-bottom: 2px solid #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table td {
|
|
||||||
padding: 0.75rem;
|
|
||||||
font-size: 14px;
|
|
||||||
border-bottom: 1px solid #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table tr:nth-child(even) {
|
|
||||||
background-color: #f6f6f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table tr:last-child td {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-data {
|
|
||||||
text-align: center;
|
|
||||||
color: #6c757d;
|
|
||||||
padding: 2rem;
|
|
||||||
background: #f6f6f6;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin: 1rem 0;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-accounts .section-header span {
|
|
||||||
background: #e8f5e9;
|
|
||||||
color: #2e7d32;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lost-accounts .section-header span {
|
|
||||||
background: #fbe9e7;
|
|
||||||
color: #d84315;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
|
|
||||||
<div class="report-container">
|
<div class="report-container">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<img src="{% static 'img/JumpServer_white_logo.svg' %}" alt="Logo"/>
|
{% autoescape off %}
|
||||||
|
{{ logo }}
|
||||||
|
{% endautoescape %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="info-section">
|
<div class="info-section">
|
||||||
|
@ -122,193 +124,5 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body,
|
{% include './css/report.css' %}
|
||||||
p {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container .header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
height: 4rem;
|
|
||||||
padding: 0.3rem 1rem;
|
|
||||||
background-color: #148f76;
|
|
||||||
}
|
|
||||||
|
|
||||||
.report-container .header img {
|
|
||||||
height: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-section {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
height: 4rem;
|
|
||||||
padding: 0 1rem;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-section .info {
|
|
||||||
margin: unset;
|
|
||||||
font-size: 1.6rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section {
|
|
||||||
margin-top: 3rem;
|
|
||||||
padding: 0 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex: 1;
|
|
||||||
padding: 1rem 2rem;
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
border-radius: 8px;
|
|
||||||
height: 350px;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item h3 {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: flex-start;
|
|
||||||
height: 100%;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content p {
|
|
||||||
display: inline-flex;
|
|
||||||
width: 100%;
|
|
||||||
line-height: 1;
|
|
||||||
gap: 2rem;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content p .item-label {
|
|
||||||
width: 18rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .synopsis-section .synopsis-item .synopsis-item-content span {
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-summery-section {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 2rem;
|
|
||||||
width: inherit;
|
|
||||||
margin-top: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-summery-section .result-section {
|
|
||||||
width: 100%;
|
|
||||||
padding: 1rem;
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section .tabel-execution-section h3 {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
color: #2c3e50;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header {
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header h3 {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
margin: 0;
|
|
||||||
color: #2c3e50;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header span {
|
|
||||||
background: #e8f5e9;
|
|
||||||
color: #2e7d32;
|
|
||||||
padding: 0.2rem 0.8rem;
|
|
||||||
border-radius: 1rem;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table {
|
|
||||||
margin-bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table th {
|
|
||||||
background: #f6f6f6;
|
|
||||||
color: #495057;
|
|
||||||
padding: 0.75rem;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
border-bottom: 2px solid #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table td {
|
|
||||||
padding: 0.75rem;
|
|
||||||
font-size: 14px;
|
|
||||||
border-bottom: 1px solid #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table tr:nth-child(even) {
|
|
||||||
background-color: #f6f6f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-table tr:last-child td {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-data {
|
|
||||||
text-align: center;
|
|
||||||
color: #6c757d;
|
|
||||||
padding: 2rem;
|
|
||||||
background: #f6f6f6;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin: 1rem 0;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-accounts .section-header span {
|
|
||||||
background: #e8f5e9;
|
|
||||||
color: #2e7d32;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lost-accounts .section-header span {
|
|
||||||
background: #fbe9e7;
|
|
||||||
color: #d84315;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -134,12 +134,21 @@ class BaseManager:
|
||||||
return f"Automation {self.execution.id} finished"
|
return f"Automation {self.execution.id} finished"
|
||||||
|
|
||||||
def get_report_context(self):
|
def get_report_context(self):
|
||||||
|
logo = self.get_file_content("static/img/JumpServer_white_logo.svg")
|
||||||
return {
|
return {
|
||||||
"execution": self.execution,
|
"execution": self.execution,
|
||||||
"summary": self.execution.summary,
|
"summary": self.execution.summary,
|
||||||
"result": self.execution.result,
|
"result": self.execution.result,
|
||||||
|
"logo": logo,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_file_content(path):
|
||||||
|
file_path = os.path.join(settings.BASE_DIR, path)
|
||||||
|
with open(file_path, "r", encoding="utf-8") as f:
|
||||||
|
file_content = f.read()
|
||||||
|
return file_content
|
||||||
|
|
||||||
def send_report_if_need(self):
|
def send_report_if_need(self):
|
||||||
recipients = self.execution.recipients
|
recipients = self.execution.recipients
|
||||||
if not recipients:
|
if not recipients:
|
||||||
|
@ -147,7 +156,7 @@ class BaseManager:
|
||||||
print("Send report to: ", ",".join([str(u) for u in recipients]))
|
print("Send report to: ", ",".join([str(u) for u in recipients]))
|
||||||
|
|
||||||
report = self.gen_report()
|
report = self.gen_report()
|
||||||
report = transform(report)
|
report = transform(report, cssutils_logging_level="CRITICAL")
|
||||||
subject = self.get_report_subject()
|
subject = self.get_report_subject()
|
||||||
emails = [r.email for r in recipients if r.email]
|
emails = [r.email for r in recipients if r.email]
|
||||||
send_mail_async(subject, report, emails, html_message=report)
|
send_mail_async(subject, report, emails, html_message=report)
|
||||||
|
|
|
@ -76,6 +76,9 @@ class UserAllPermedAssetsApi(BaseUserPermedAssetsApi):
|
||||||
pagination_class = AllPermedAssetPagination
|
pagination_class = AllPermedAssetPagination
|
||||||
|
|
||||||
def get_assets(self):
|
def get_assets(self):
|
||||||
|
if self.user.is_superuser and self.request.query_params.get('id'):
|
||||||
|
return Asset.objects.filter(id=self.request.query_params.get('id'))
|
||||||
|
|
||||||
node_id = self.request.query_params.get('node_id')
|
node_id = self.request.query_params.get('node_id')
|
||||||
if is_uuid(node_id):
|
if is_uuid(node_id):
|
||||||
__, assets = self.query_asset_util.get_node_all_assets(node_id)
|
__, assets = self.query_asset_util.get_node_all_assets(node_id)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
from django.conf import settings
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
|
@ -5,7 +6,6 @@ from django_filters import rest_framework as filters
|
||||||
|
|
||||||
from common.drf.filters import BaseFilterSet
|
from common.drf.filters import BaseFilterSet
|
||||||
from common.utils import is_uuid
|
from common.utils import is_uuid
|
||||||
from jumpserver import settings
|
|
||||||
from rbac.models import Role, OrgRoleBinding, SystemRoleBinding
|
from rbac.models import Role, OrgRoleBinding, SystemRoleBinding
|
||||||
from users.models.user import User
|
from users.models.user import User
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class UserFilter(BaseFilterSet):
|
||||||
'id', 'username', 'email', 'name',
|
'id', 'username', 'email', 'name',
|
||||||
'groups', 'group_id', 'exclude_group_id',
|
'groups', 'group_id', 'exclude_group_id',
|
||||||
'source', 'org_roles', 'system_roles',
|
'source', 'org_roles', 'system_roles',
|
||||||
'is_active', 'is_first_login',
|
'is_active', 'is_first_login', 'mfa_level'
|
||||||
)
|
)
|
||||||
|
|
||||||
def filter_is_blocked(self, queryset, name, value):
|
def filter_is_blocked(self, queryset, name, value):
|
||||||
|
|
Loading…
Reference in New Issue