pref: debug toolbar 太费时间 先禁用 (#8528)

* perf: 修改主题色

* pref: debug toolbar 太费时间 先禁用

* perf: 修改颜色

* perf: 优化 interface

* perf: 修改 avartar

* perf: css color

Co-authored-by: ibuler <ibuler@qq.com>
pull/8539/head
fit2bot 2022-07-05 14:43:56 +08:00 committed by GitHub
parent bbcf992531
commit 001e5d857f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 192 additions and 509 deletions

View File

@ -5,9 +5,9 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" href="{{ FAVICON_URL }}" type="image/x-icon">
<link rel="shortcut icon" href="{{ INTERFACE.favicon }}" type="image/x-icon">
<title>
{{ JMS_TITLE }}
{{ INTERFACE.login_title }}
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% include '_head_css_js.html' %}
@ -183,7 +183,7 @@
<div class="login-content extra-fields-{{ extra_fields_count }}">
<div class="right-image-box">
<a href="{% if not XPACK_ENABLED %}https://github.com/jumpserver/jumpserver.git{% endif %}">
<img src="{{ LOGIN_IMAGE_URL }}" class="right-image" alt="screen-image"/>
<img src="{{ INTERFACE.login_image }}" class="right-image" alt="screen-image"/>
</a>
</div>
<div class="left-form-box {% if not form.challenge and not form.captcha %} no-captcha-challenge {% endif %}">
@ -206,7 +206,7 @@
</li>
</ul>
<div class="jms-title">
<span style="">{{ JMS_TITLE }}</span>
<span style="">{{ INTERFACE.login_title }}</span>
</div>
<div class="contact-form col-md-10 col-md-offset-1">
<form id="login-form" action="" method="post" role="form" novalidate="novalidate">
@ -300,9 +300,6 @@
$('#password-hidden').val(passwordEncrypted); //返回给密码输入input
$('#login-form').submit(); //post提交
}
$(document).ready(function () {
})
</script>
</html>

View File

@ -6,7 +6,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="{{ FAVICON_URL }}" type="image/x-icon">
<link rel="shortcut icon" href="{{ INTERFACE.favicon }}" type="image/x-icon">
<title>{{ title }}</title>
{% include '_head_css_js.html' %}
<link href="{% static "css/jumpserver.css" %}" rel="stylesheet">
@ -20,9 +20,9 @@
<div class="col-md-12">
<div class="ibox-content">
<div>
<img src="{{ LOGO_URL }}" style="margin: auto" width="82" height="82">
<img src="{{ INTERFACE.logo_logout }}" style="margin: auto" width="82" height="82">
<h2 style="display: inline">
{{ JMS_TITLE }}
{{ INTERFACE.login_title }}
</h2>
</div>
<p></p>

View File

@ -413,7 +413,6 @@ class Config(dict):
'FORGOT_PASSWORD_URL': '',
'HEALTH_CHECK_TOKEN': '',
}
@staticmethod

View File

@ -4,34 +4,32 @@ from django.templatetags.static import static
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
default_interface = dict((
('logo_logout', static('img/logo.png')),
('logo_index', static('img/logo_text.png')),
('login_image', static('img/login_image.jpg')),
('favicon', static('img/facio.ico')),
('login_title', _('JumpServer Open Source Bastion Host')),
('theme', 'classic'),
('primary_color', '#1ab394'),
))
default_context = {
'DEFAULT_PK': '00000000-0000-0000-0000-000000000000',
'LOGO_URL': static('img/logo.png'),
'LOGO_TEXT_URL': static('img/logo_text.png'),
'LOGIN_IMAGE_URL': static('img/login_image.jpg'),
'FAVICON_URL': static('img/facio.ico'),
'LOGIN_CAS_LOGO_URL': static('img/login_cas_logo.png'),
'LOGIN_WECOM_LOGO_URL': static('img/login_wecom_logo.png'),
'LOGIN_DINGTALK_LOGO_URL': static('img/login_dingtalk_logo.png'),
'LOGIN_FEISHU_LOGO_URL': static('img/login_feishu_logo.png'),
'JMS_TITLE': _('JumpServer Open Source Bastion Host'),
}
default_interface = {
'login_title': default_context['JMS_TITLE'],
'logo_logout': default_context['LOGO_URL'],
'logo_index': default_context['LOGO_TEXT_URL'],
'login_image': default_context['LOGIN_IMAGE_URL'],
'favicon': default_context['FAVICON_URL'],
'LOGIN_CAS_logo_logout': static('img/login_cas_logo.png'),
'LOGIN_WECOM_logo_logout': static('img/login_wecom_logo.png'),
'LOGIN_DINGTALK_logo_logout': static('img/login_dingtalk_logo.png'),
'LOGIN_FEISHU_logo_logout': static('img/login_feishu_logo.png'),
'COPYRIGHT': 'FIT2CLOUD 飞致云' + ' © 2014-2022',
'INTERFACE': default_interface,
}
def jumpserver_processor(request):
# Setting default pk
context = default_context
context = {**default_context}
context.update({
'VERSION': settings.VERSION,
'COPYRIGHT': 'FIT2CLOUD 飞致云' + ' © 2014-2022',
'SECURITY_COMMAND_EXECUTION': settings.SECURITY_COMMAND_EXECUTION,
'SECURITY_MFA_VERIFY_TTL': settings.SECURITY_MFA_VERIFY_TTL,
'FORCE_SCRIPT_NAME': settings.FORCE_SCRIPT_NAME,

View File

@ -310,23 +310,9 @@ DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
# For Debug toolbar
INTERNAL_IPS = ["127.0.0.1"]
if DEBUG_DEV:
INSTALLED_APPS = ['debug_toolbar', 'pympler'] + INSTALLED_APPS
MIDDLEWARE.insert(0, 'debug_toolbar.middleware.DebugToolbarMiddleware')
if os.environ.get('DEBUG_TOOLBAR', False):
INSTALLED_APPS = ['debug_toolbar'] + INSTALLED_APPS
MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware')
DEBUG_TOOLBAR_PANELS = [
'debug_toolbar.panels.history.HistoryPanel',
'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
'debug_toolbar.panels.profiling.ProfilingPanel',
'pympler.panels.MemoryPanel',
]

View File

@ -20,7 +20,6 @@ REST_FRAMEWORK = {
'rest_framework.renderers.JSONRenderer',
'common.drf.renders.CSVFileRenderer',
'common.drf.renders.ExcelFileRenderer',
),
'DEFAULT_PARSER_CLASSES': (
'rest_framework.parsers.JSONParser',

View File

@ -6,7 +6,7 @@
<script src="{% static 'js/plugins/xterm/xterm.js' %}"></script>
<script src="{% static 'js/plugins/xterm/addons/fit/fit.js' %}"></script>
<link rel="stylesheet" href="{% static 'js/plugins/xterm/xterm.css' %}" />
<link rel="shortcut icon" href="{{ FAVICON_URL }}" type="image/x-icon">
<link rel="shortcut icon" href="{{ INTERFACE.favicon }}" type="image/x-icon">
<style>
body {
background-color: black;

View File

@ -3,9 +3,9 @@ from rest_framework.permissions import AllowAny, IsAuthenticated
from django.conf import settings
from jumpserver.utils import has_valid_xpack_license, get_xpack_license_info
from common.utils import get_logger
from common.utils import get_logger, lazyproperty
from .. import serializers
from ..utils import get_interface_setting
from ..utils import get_interface_setting_or_default
logger = get_logger(__name__)
@ -16,22 +16,14 @@ class OpenPublicSettingApi(generics.RetrieveAPIView):
permission_classes = (AllowAny,)
serializer_class = serializers.PublicSettingSerializer
@staticmethod
def get_logo_urls():
interface = get_interface_setting()
keys = ['logo_logout', 'logo_index', 'login_image', 'favicon']
return {k: interface[k] for k in keys}
@staticmethod
def get_login_title():
interface = get_interface_setting()
return interface['login_title']
@lazyproperty
def interface_setting(self):
return get_interface_setting_or_default()
def get_object(self):
return {
"XPACK_ENABLED": settings.XPACK_ENABLED,
"LOGIN_TITLE": self.get_login_title(),
"LOGO_URLS": self.get_logo_urls(),
"INTERFACE": self.interface_setting
}

View File

@ -8,8 +8,7 @@ __all__ = ['PublicSettingSerializer', 'PrivateSettingSerializer']
class PublicSettingSerializer(serializers.Serializer):
XPACK_ENABLED = serializers.BooleanField()
LOGIN_TITLE = serializers.CharField()
LOGO_URLS = serializers.DictField()
INTERFACE = serializers.DictField()
class PrivateSettingSerializer(PublicSettingSerializer):

View File

@ -3,24 +3,7 @@ from jumpserver.context_processor import default_interface
from django.conf import settings
class ObjectDict(dict):
def __getattr__(self, name):
if name in self:
return self[name]
else:
raise AttributeError("No such attribute: " + name)
def __setattr__(self, name, value):
self[name] = value
def __delattr__(self, name):
if name in self:
del self[name]
else:
raise AttributeError("No such attribute: " + name)
def get_interface_setting():
def get_interface_setting_or_default():
if not settings.XPACK_ENABLED:
return default_interface
from xpack.plugins.interface.models import Interface
@ -28,4 +11,4 @@ def get_interface_setting():
def get_login_title():
return get_interface_setting()['login_title']
return get_interface_setting_or_default()['login_title']

View File

@ -13,11 +13,11 @@
.primary-panel .ibox-title {
color: #ffffff;
background-color: #1AB394;
background-color: var(--primary-color);
}
.primary-panel .ibox-content {
border: 1px solid #1AB394;
border: 1px solid var(--primary-color);
}
.info-panel .ibox-title {
@ -34,7 +34,7 @@ th a {
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: #1ab394 !important;
background-color: var(--primary-color) !important;
/*color: #333 !important;*/
}
@ -45,7 +45,7 @@ th a {
}
.select2-container--forcus {
border: 1px solid #1AB394 !important;
border: 1px solid var(--primary-color) !important;
}
.select2-selection__choice,
@ -64,7 +64,7 @@ th a {
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
border: 1px solid #1ab394 !important;
border: 1px solid var(--primary-color) !important;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3) !important;
}
@ -79,7 +79,7 @@ th a {
}
table.dataTable tbody > tr.selected, table.dataTable tbody > tr > .selected {
background-color: #1ab394 !important;
background-color: var(--primary-color) !important;
}
table.dataTable tbody tr.selected a,
@ -358,7 +358,7 @@ div.dataTables_wrapper div.dataTables_filter {
width: 150px;
float: left;
font-size: 22px;
color: #1ab394;
color: var(--primary-color);
}
.logo-element {

View File

@ -272,14 +272,14 @@ fieldset[disabled] .btn-login.active {
.btn-transparent {
color: #fff;
border: 1px solid #1ab394;
border: 1px solid var(--primary-color);
display: inline-block;
font-size: 13px;
letter-spacing: 1px;
padding: 10px 30px;
text-transform: uppercase;
border-radius: 5px;
background: #259980;
background: var(--primary-color);
width: 100%;
}

View File

@ -41,7 +41,7 @@ header div:nth-child(2){
padding-top: 20px;
}
header div:nth-child(2) a:hover{
color:#1ab394;
color:var(--primary-color);
}
/*article样式*/
@ -81,7 +81,7 @@ article ul li:last-child{
margin-left:-15px;
}
.active{
color:#1ab394;
color:var(--primary-color);
}
.clearfix:after {
content:"";
@ -131,7 +131,7 @@ article ul li:last-child{
display: block;
width: 214px;
line-height: 34px;
background: #1ab394;
background: var(--primary-color);
text-align: center;
border-radius: 6px;
color: white;

View File

@ -111,7 +111,7 @@
.wizard > .steps .current a:hover,
.wizard > .steps .current a:active
{
background: #1AB394;
background: var(--primary-color);
color: #fff;
cursor: default;
}
@ -250,7 +250,7 @@
.wizard > .actions a:hover,
.wizard > .actions a:active
{
background: #1AB394;
background: var(--primary-color);
color: #fff;
display: block;
padding: 0.5em 1em;

View File

@ -271,7 +271,7 @@ body.mini-navbar .navbar-default .nav > li > .nav-second-level li a {
left: 65px;
}
.navbar-default .special_link a {
background: #1ab394;
background: var(--primary-color);
color: white;
}
.navbar-default .special_link a:hover {
@ -280,14 +280,14 @@ body.mini-navbar .navbar-default .nav > li > .nav-second-level li a {
}
.navbar-default .special_link a span.label {
background: #fff;
color: #1ab394;
color: var(--primary-color);
}
.navbar-default .landing_link a {
background: #1cc09f;
color: white;
}
.navbar-default .landing_link a:hover {
background: #1ab394 !important;
background: var(--primary-color) !important;
color: white;
}
.navbar-default .landing_link a span.label {
@ -381,7 +381,7 @@ body.canvas-menu .logo-element {
}
body.mini-navbar .nav-header {
padding: 0;
background-color: #1ab394;
background-color: var(--primary-color);
}
body.canvas-menu .nav-header {
padding: 33px 25px;
@ -480,7 +480,7 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
}
.top-navigation .navbar-nav .dropdown-menu > .active > a {
background: white;
color: #1ab394;
color: var(--primary-color);
font-weight: bold;
}
.white-bg .navbar-fixed-top,
@ -497,14 +497,14 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
.top-navigation .nav > li a:hover,
.top-navigation .nav > li a:focus {
background: #fff;
color: #1ab394;
color: var(--primary-color);
}
.top-navigation .nav > li.active {
background: #fff;
border: none;
}
.top-navigation .nav > li.active > a {
color: #1ab394;
color: var(--primary-color);
}
.top-navigation .navbar-right {
margin-right: 10px;
@ -521,7 +521,7 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
margin-top: 0;
}
.top-navigation .navbar-brand {
background: #1ab394;
background: var(--primary-color);
color: #fff;
padding: 15px 25px;
}
@ -550,7 +550,7 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
padding: 40px 0 40px 0;
}
.navbar-toggle {
background-color: #1ab394;
background-color: var(--primary-color);
color: #fff;
padding: 6px 12px;
font-size: 14px;
@ -597,7 +597,7 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
min-width: 120px;
}
.btn-primary.btn-outline {
color: #1ab394;
color: var(--primary-color);
}
.btn-success.btn-outline {
color: #1c84c6;
@ -619,8 +619,8 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
color: #fff;
}
.btn-primary {
background-color: #1ab394;
border-color: #1ab394;
background-color: var(--primary-color);
border-color: var(--primary-color);
color: #FFFFFF;
}
.btn-primary:hover,
@ -632,8 +632,8 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
.btn-primary:active:hover,
.btn-primary.active:hover,
.btn-primary.active:focus {
background-color: #18a689;
border-color: #18a689;
background-color: var(--primary-color);
border-color: var(--primary-color);
color: #FFFFFF;
}
.btn-primary:active,
@ -870,7 +870,7 @@ fieldset[disabled] .btn-danger.active {
.btn-link:active,
.btn-link.active,
.open .dropdown-toggle.btn-link {
color: #1ab394;
color: var(--primary-color);
text-decoration: none;
}
.btn-link:active,
@ -1056,7 +1056,7 @@ button.dim:active:before {
}
.label-primary,
.badge-primary {
background-color: #1ab394;
background-color: var(--primary-color);
color: #FFFFFF;
}
.label-success,
@ -1114,7 +1114,7 @@ button.dim:active:before {
display: block;
overflow: hidden;
cursor: pointer;
border: 2px solid #1ab394;
border: 2px solid var(--primary-color);
border-radius: 2px;
}
.onoffswitch-inner {
@ -1143,7 +1143,7 @@ button.dim:active:before {
.onoffswitch-inner:before {
content: "ON";
padding-left: 10px;
background-color: #1ab394;
background-color: var(--primary-color);
color: #FFFFFF;
}
.onoffswitch-inner:after {
@ -1157,7 +1157,7 @@ button.dim:active:before {
width: 20px;
margin: 0;
background: #FFFFFF;
border: 2px solid #1ab394;
border: 2px solid var(--primary-color);
border-radius: 2px;
position: absolute;
top: 0;
@ -1187,7 +1187,6 @@ button.dim:active:before {
background: #ffffff;
box-shadow: none;
-moz-box-sizing: border-box;
background-color: #FFFFFF;
border: 1px solid #CBD5DD;
border-radius: 2px;
cursor: text;
@ -1306,8 +1305,8 @@ button.dim:active:before {
white-space: nowrap;
}
.fc-state-active {
background-color: #1ab394;
border-color: #1ab394;
background-color: var(--primary-color);
border-color: var(--primary-color);
color: #ffffff;
}
.fc-header-title h2 {
@ -1340,9 +1339,9 @@ button.dim:active:before {
.fc-agenda .fc-event-time,
.fc-event a {
padding: 4px 6px;
background-color: #1ab394;
background-color: var(--primary-color);
/* background color */
border-color: #1ab394;
border-color: var(--primary-color);
/* border color */
}
.fc-event-time,
@ -1441,8 +1440,8 @@ button.dim:active:before {
a.list-group-item.active,
a.list-group-item.active:hover,
a.list-group-item.active:focus {
background-color: #1ab394;
border-color: #1ab394;
background-color: var(--primary-color);
border-color: var(--primary-color);
color: #FFFFFF;
z-index: 2;
}
@ -1717,7 +1716,7 @@ div.dt-button-info {
display: none;
}
.pace .pace-progress {
background: #1ab394;
background: var(--primary-color);
position: fixed;
z-index: 2040;
top: 0;
@ -1851,10 +1850,10 @@ div.dt-button-info {
}
.form-control:focus,
.single-line:focus {
border-color: #1ab394 !important;
border-color: var(--primary-color) !important;
}
.has-success .form-control {
border-color: #1ab394;
border-color: var(--primary-color);
}
.has-warning .form-control {
border-color: #f8ac59;
@ -1863,7 +1862,7 @@ div.dt-button-info {
border-color: #ed5565;
}
.has-success .control-label {
color: #1ab394;
color: var(--primary-color);
}
.has-warning .control-label {
color: #f8ac59;
@ -1889,7 +1888,7 @@ div.dt-button-info {
width: 20%;
}
.noUi-connect {
background: none repeat scroll 0 0 #1ab394;
background: none repeat scroll 0 0 var(--primary-color);
box-shadow: none;
}
.slider_red .noUi-connect {
@ -1923,7 +1922,7 @@ div.dt-button-info {
display: block;
overflow: hidden;
cursor: pointer;
border: 2px solid #1AB394;
border: 2px solid var(--primary-color);
border-radius: 3px;
}
.onoffswitch-inner {
@ -1954,7 +1953,7 @@ div.dt-button-info {
.onoffswitch-inner:before {
content: "ON";
padding-left: 7px;
background-color: #1AB394;
background-color: var(--primary-color);
color: #FFFFFF;
}
.onoffswitch-inner:after {
@ -1969,7 +1968,7 @@ div.dt-button-info {
width: 18px;
margin: 0;
background: #FFFFFF;
border: 2px solid #1AB394;
border: 2px solid var(--primary-color);
border-radius: 3px;
position: absolute;
top: 0;
@ -2450,10 +2449,10 @@ label.error {
cursor: pointer;
}
.toast {
background-color: #1ab394;
background-color: var(--primary-color);
}
.toast-success {
background-color: #1ab394;
background-color: var(--primary-color);
}
.toast-error {
background-color: #ed5565;
@ -2491,7 +2490,7 @@ label.error {
border-left: 6px solid #ed5565;
}
.inspinia-notify.alert-info {
border-left: 6px solid #1ab394;
border-left: 6px solid var(--primary-color);
}
/* Image cropper style */
.img-container,
@ -2605,10 +2604,10 @@ a.forum-item-title:hover {
color: #9b9b9b;
}
.forum-item.active .fa {
color: #1ab394;
color: var(--primary-color);
}
.forum-item.active a.forum-item-title {
color: #1ab394;
color: var(--primary-color);
}
@media (max-width: 992px) {
.forum-info {
@ -2773,7 +2772,7 @@ a.forum-item-title:hover {
font-weight: 500;
}
.vertical-date small {
color: #1ab394;
color: var(--primary-color);
font-weight: 400;
}
.vertical-timeline-content::before {
@ -3001,7 +3000,7 @@ a.forum-item-title:hover {
position: absolute;
left: 10px;
border-radius: 3px;
background: #1ab394;
background: var(--primary-color);
padding: 3px;
color: white;
cursor: pointer;
@ -3093,7 +3092,7 @@ a.forum-item-title:hover {
/*Slick Carousel */
.slick-prev:before,
.slick-next:before {
color: #1ab394 !important;
color: var(--primary-color) !important;
}
/* Payments */
.payment-card {
@ -3680,7 +3679,7 @@ img.circle-border {
font-weight: 600;
padding: 17px 20px;
text-align: center;
background-color: #1ab394;
background-color: var(--primary-color);
}
.login-panel {
margin-top: 25%;
@ -3855,7 +3854,7 @@ table.table-mail tr td {
background-color: #ffffff;
}
.navy-bg {
background-color: #1ab394;
background-color: var(--primary-color);
color: #ffffff;
}
.blue-bg {
@ -3878,11 +3877,11 @@ table.table-mail tr td {
background-color: #262626;
}
.panel-primary {
border-color: #1ab394;
border-color: var(--primary-color);
}
.panel-primary > .panel-heading {
background-color: #1ab394;
border-color: #1ab394;
background-color: var(--primary-color);
border-color: var(--primary-color);
}
.panel-success {
border-color: #1c84c6;
@ -3917,7 +3916,7 @@ table.table-mail tr td {
color: #ffffff;
}
.progress-bar {
background-color: #1ab394;
background-color: var(--primary-color);
}
.progress-small,
.progress-small .progress-bar {
@ -3959,7 +3958,7 @@ table.table-mail tr td {
}
/* COLORS */
.text-navy {
color: #1ab394;
color: var(--primary-color);
}
.text-primary {
color: inherit;
@ -4690,7 +4689,7 @@ ul.notes li div {
color: #3d4d5d;
}
.category-list li a .text-navy {
color: #1ab394;
color: var(--primary-color);
}
.category-list li a .text-primary {
color: #1c84c6;
@ -4855,7 +4854,7 @@ a.compose-mail {
color: inherit;
}
.file-list li a:hover {
color: #1ab394;
color: var(--primary-color);
}
.user-friends img {
width: 42px;
@ -4963,7 +4962,7 @@ dd.project-people {
.faq-question {
font-size: 18px;
font-weight: 600;
color: #1ab394;
color: var(--primary-color);
display: block;
}
.faq-question:hover {
@ -5164,7 +5163,7 @@ dd.project-people {
}
/* ISSUE TRACKER */
.issue-tracker .btn-link {
color: #1ab394;
color: var(--primary-color);
}
table.issue-tracker tbody tr td {
vertical-align: middle;
@ -5218,7 +5217,7 @@ table.issue-tracker tbody tr td {
border-left: 3px solid #1c84c6;
}
.agile-list li.success-element {
border-left: 3px solid #1ab394;
border-left: 3px solid var(--primary-color);
}
.agile-detail {
margin-top: 5px;
@ -5300,13 +5299,13 @@ table.shoping-cart-table tr td:last-child {
}
.product-name:hover,
.product-name:focus {
color: #1ab394;
color: var(--primary-color);
}
.product-price {
font-size: 14px;
font-weight: 600;
color: #ffffff;
background-color: #1ab394;
background-color: var(--primary-color);
padding: 6px 12px;
position: absolute;
top: -32px;
@ -5422,7 +5421,7 @@ table.shoping-cart-table tr td:last-child {
text-align: center;
}
.vote-actions a {
color: #1ab394;
color: var(--primary-color);
font-weight: 600;
}
.vote-actions {
@ -5453,7 +5452,7 @@ table.shoping-cart-table tr td:last-child {
margin-right: 10px;
}
.vote-info a:hover {
color: #1ab394;
color: var(--primary-color);
}
.vote-icon {
text-align: right;
@ -5462,7 +5461,7 @@ table.shoping-cart-table tr td:last-child {
color: #e8e9ea;
}
.vote-icon.active {
color: #1ab394;
color: var(--primary-color);
}
body.body-small .vote-icon {
display: none;
@ -5488,7 +5487,7 @@ body.body-small .vote-icon {
height: 38px;
width: 38px;
display: block;
background: #1ab394;
background: var(--primary-color);
padding: 9px 8px;
text-align: center;
color: #fff;
@ -5496,7 +5495,7 @@ body.body-small .vote-icon {
}
.open-small-chat:hover {
color: white;
background: #1ab394;
background: var(--primary-color);
}
.small-chat-box {
display: none;
@ -5551,7 +5550,7 @@ body.body-small .vote-icon {
margin-bottom: 10px;
}
.small-chat-box .content .chat-message.active {
background: #1ab394;
background: var(--primary-color);
color: #fff;
}
.small-chat-box .content .left {
@ -5643,7 +5642,7 @@ body.body-small .vote-icon {
.sk-spinner-rotating-plane.sk-spinner {
width: 30px;
height: 30px;
background-color: #1ab394;
background-color: var(--primary-color);
margin: 0 auto;
-webkit-animation: sk-rotatePlane 1.2s infinite ease-in-out;
animation: sk-rotatePlane 1.2s infinite ease-in-out;
@ -5696,7 +5695,7 @@ body.body-small .vote-icon {
width: 100%;
height: 100%;
border-radius: 50%;
background-color: #1ab394;
background-color: var(--primary-color);
opacity: 0.6;
position: absolute;
top: 0;
@ -5750,7 +5749,7 @@ body.body-small .vote-icon {
font-size: 10px;
}
.sk-spinner-wave div {
background-color: #1ab394;
background-color: var(--primary-color);
height: 100%;
width: 6px;
display: inline-block;
@ -5814,7 +5813,7 @@ body.body-small .vote-icon {
}
.sk-spinner-wandering-cubes .sk-cube1,
.sk-spinner-wandering-cubes .sk-cube2 {
background-color: #1ab394;
background-color: var(--primary-color);
width: 10px;
height: 10px;
position: absolute;
@ -5883,7 +5882,7 @@ body.body-small .vote-icon {
width: 40px;
height: 40px;
margin: 0 auto;
background-color: #1ab394;
background-color: var(--primary-color);
border-radius: 100%;
-webkit-animation: sk-pulseScaleOut 1s infinite ease-in-out;
animation: sk-pulseScaleOut 1s infinite ease-in-out;
@ -5935,7 +5934,7 @@ body.body-small .vote-icon {
display: inline-block;
position: absolute;
top: 0;
background-color: #1ab394;
background-color: var(--primary-color);
border-radius: 100%;
-webkit-animation: sk-chasingDotsBounce 2s infinite ease-in-out;
animation: sk-chasingDotsBounce 2s infinite ease-in-out;
@ -5998,7 +5997,7 @@ body.body-small .vote-icon {
.sk-spinner-three-bounce div {
width: 18px;
height: 18px;
background-color: #1ab394;
background-color: var(--primary-color);
border-radius: 100%;
display: inline-block;
-webkit-animation: sk-threeBounceDelay 1.4s infinite ease-in-out;
@ -6077,7 +6076,7 @@ body.body-small .vote-icon {
margin: 0 auto;
width: 20%;
height: 20%;
background-color: #1ab394;
background-color: var(--primary-color);
border-radius: 100%;
-webkit-animation: sk-circleBounceDelay 1.2s infinite ease-in-out;
animation: sk-circleBounceDelay 1.2s infinite ease-in-out;
@ -6240,7 +6239,7 @@ body.body-small .vote-icon {
.sk-spinner-cube-grid .sk-cube {
width: 33%;
height: 33%;
background-color: #1ab394;
background-color: var(--primary-color);
float: left;
-webkit-animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out;
animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out;
@ -6314,7 +6313,7 @@ body.body-small .vote-icon {
*
*/
.sk-spinner-wordpress.sk-spinner {
background-color: #1ab394;
background-color: var(--primary-color);
width: 30px;
height: 30px;
border-radius: 30px;
@ -6391,7 +6390,7 @@ body.body-small .vote-icon {
margin: 0 auto;
width: 18%;
height: 18%;
background-color: #1ab394;
background-color: var(--primary-color);
border-radius: 100%;
-webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out;
animation: sk-circleFadeDelay 1.2s infinite ease-in-out;
@ -6567,13 +6566,13 @@ body.landing-page {
-------------------------------------------------- */
}
.landing-page span.navy {
color: #1ab394;
color: var(--primary-color);
}
.landing-page p.text-color {
color: #676a6c;
}
.landing-page a.navy-link {
color: #1ab394;
color: var(--primary-color);
text-decoration: none;
}
.landing-page a.navy-link:hover {
@ -6595,7 +6594,7 @@ body.landing-page {
width: 60px;
height: 1px;
margin: 60px auto 0;
border-bottom: 2px solid #1ab394;
border-bottom: 2px solid var(--primary-color);
}
.landing-page .navbar-wrapper {
position: fixed;
@ -6638,11 +6637,11 @@ body.landing-page {
.landing-page .navbar-default .navbar-nav > .active > a:hover {
background: transparent;
color: #fff;
border-top: 6px solid #1ab394;
border-top: 6px solid var(--primary-color);
}
.landing-page .navbar-default .navbar-nav > li > a:hover,
.landing-page .navbar-default .navbar-nav > li > a:focus {
color: #1ab394;
color: var(--primary-color);
background: inherit;
}
.landing-page .navbar-default .navbar-nav > .active > a:focus {
@ -6667,7 +6666,7 @@ body.landing-page {
height: auto;
display: block;
font-size: 14px;
background: #1ab394;
background: var(--primary-color);
padding: 15px 20px 15px 20px;
border-radius: 0 0 5px 5px;
font-weight: 700;
@ -6677,7 +6676,7 @@ body.landing-page {
color: #676a6c;
}
.landing-page .navbar-scroll.navbar-default .nav li a:hover {
color: #1ab394;
color: var(--primary-color);
}
.landing-page .navbar-wrapper .navbar.navbar-scroll {
padding-top: 0;
@ -6697,7 +6696,7 @@ body.landing-page {
}
.landing-page .navbar-default .navbar-nav > .active > a,
.landing-page .navbar-default .navbar-nav > .active > a:hover {
border-top: 6px solid #1ab394;
border-top: 6px solid var(--primary-color);
}
.landing-page .navbar-fixed-top {
border: none !important;
@ -6838,7 +6837,7 @@ body.landing-page {
margin-top: 40px;
}
.landing-page .features small {
color: #1ab394;
color: var(--primary-color);
}
.landing-page .features h2 {
font-size: 18px;
@ -6851,12 +6850,12 @@ body.landing-page {
font-weight: 200;
}
.landing-page .features-icon {
color: #1ab394;
color: var(--primary-color);
font-size: 40px;
}
.landing-page .navy-section {
margin-top: 60px;
background: #1ab394;
background: var(--primary-color);
color: #fff;
padding: 20px 0;
}
@ -6871,7 +6870,7 @@ body.landing-page {
margin: auto;
}
.landing-page .social-icon a {
background: #1ab394;
background: var(--primary-color);
color: #fff;
padding: 4px 8px;
height: 28px;
@ -6902,7 +6901,7 @@ body.landing-page {
}
.landing-page .pricing-plan .pricing-price span {
font-weight: 700;
color: #1ab394;
color: var(--primary-color);
}
.landing-page li.pricing-desc {
font-size: 13px;
@ -6910,7 +6909,7 @@ body.landing-page {
padding: 20px 16px;
}
.landing-page li.pricing-title {
background: #1ab394;
background: var(--primary-color);
color: #fff;
padding: 10px;
border-radius: 4px 4px 0 0;
@ -6920,14 +6919,14 @@ body.landing-page {
.landing-page .testimonials {
padding-top: 80px;
padding-bottom: 90px;
background-color: #1ab394;
background-color: var(--primary-color);
background-image: url('../img/landing/avatar_all.png');
}
.landing-page .big-icon {
font-size: 56px !important;
}
.landing-page .features .big-icon {
color: #1ab394 !important;
color: var(--primary-color) !important;
}
.landing-page .contact {
background-image: url('../img/landing/word_map.png');
@ -6986,8 +6985,8 @@ body.landing-page {
color: #fff;
}
.landing-page .btn-primary {
background-color: #1ab394;
border-color: #1ab394;
background-color: var(--primary-color);
border-color: var(--primary-color);
color: #FFFFFF;
font-size: 14px;
padding: 10px 20px;
@ -7084,7 +7083,7 @@ body.landing-page {
color: #676a6c;
}
.landing-page .navbar-default .nav li a:hover {
color: #1ab394;
color: var(--primary-color);
}
.landing-page .navbar-wrapper .navbar {
padding-top: 0;
@ -7377,7 +7376,7 @@ body.rtls.top-navigation .footer.fixed {
margin-right: 0;
}
.spin-icon {
background: #1ab394;
background: var(--primary-color);
position: absolute;
padding: 7px 10px 7px 13px;
border-radius: 20px 0 0 20px;
@ -7906,7 +7905,7 @@ body.md-skin {
.md-skin .nav .open > a,
.md-skin .nav .open > a:hover,
.md-skin .nav .open > a:focus {
background: #1ab394;
background: var(--primary-color);
}
.md-skin .navbar-top-links li {
display: inline-table;
@ -7974,7 +7973,7 @@ body.md-skin {
}
.md-skin .navbar-fixed-top,
.md-skin .navbar-static-top {
background-color: #1ab394 !important;
background-color: var(--primary-color) !important;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
.md-skin .navbar-static-side {
@ -8061,7 +8060,7 @@ body.md-skin {
.md-skin.landing-page .navbar-default .navbar-nav > li > a:hover,
.md-skin.landing-page .navbar-default .navbar-nav > li > a:focus {
background: inherit;
color: #1ab394;
color: var(--primary-color);
}
.md-skin.landing-page.body-small .nav.navbar-right > li > a {
color: #676a6c;
@ -8092,11 +8091,11 @@ body.md-skin {
.md-skin.top-navigation .nav .open > a,
.md-skin.top-navigation .nav .open > a:hover,
.md-skin.top-navigation .nav .open > a:focus {
color: #1ab394;
color: var(--primary-color);
background: #ffffff;
}
.md-skin.top-navigation .nav > li.active a {
color: #1ab394;
color: var(--primary-color);
background: #ffffff;
}
.md-skin.fixed-nav #wrapper.top-navigation #page-wrapper {

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@ -6,7 +6,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="{{ FAVICON_URL }}" type="image/x-icon">
<link rel="shortcut icon" href="{{ INTERFACE.favicon }}" type="image/x-icon">
<title>{% block html_title %}{% endblock %}</title>
{% include '_head_css_js.html' %}

View File

@ -6,7 +6,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="{{ FAVICON_URL }}" type="image/x-icon">
<link rel="shortcut icon" href="{{ INTERFACE.favicon }}" type="image/x-icon">
<title>{% block html_title %}{% endblock %}</title>
{% include '_head_css_js.html' %}
@ -27,7 +27,7 @@
<div class="row">
<div class="col-md-12">
<div class="ibox-content">
<img src="{{ LOGO_URL }}" style="margin: auto" width="50" height="50">
<img src="{{ INTERFACE.logo_logout }}" style="margin: auto" width="50" height="50">
<h2 class="font-bold" style="display: inline">{% block title %}{% endblock %}</h2>
<h1></h1>
{% block content %} {% endblock %}

View File

@ -15,5 +15,12 @@
<script src="{% static 'js/plugins/datatables/datatables.min.js' %}"></script>
<script src="{% url 'javascript-catalog' %}"></script>
<link href="{% static 'css/plugins/select2/select2.min.css' %}" rel="stylesheet">
<style>
:root {
--primary-color: #1ab394;
}
</style>
<script>
document.documentElement.style.setProperty('--primary-color', "{{ PRIMARY_COLOR }}");
</script>

View File

@ -5,8 +5,8 @@
<html>
<head>
<meta charset="UTF-8">
<title> {{ JMS_TITLE }} </title>
<link rel="shortcut icon" href="{{ FAVICON_URL }}" type="image/x-icon">
<title> {{ INTERFACE.login_title }} </title>
<link rel="shortcut icon" href="{{ INTERFACE.favicon }}" type="image/x-icon">
{% include '_head_css_js.html' %}
<link href="{% static 'css/jumpserver.css' %}" rel="stylesheet">
<link href="{% static 'css/style.css' %}" rel="stylesheet">
@ -18,9 +18,9 @@
<header>
<div class="logo">
<a href="{% url 'index' %}">
<img src="{{ LOGO_URL }}" alt="" width="50px" height="50px"/>
<img src="{{ INTERFACE.logo_logout }}" alt="" width="50px" height="50px"/>
</a>
<span style="font-size: 18px; line-height: 50px">{{ JMS_TITLE }}</span>
<span style="font-size: 18px; line-height: 50px">{{ INTERFACE.login_title }}</span>
</div>
<div>
<a href="{% url 'index' %}">{% trans 'Home page' %}</a>

View File

@ -5,11 +5,16 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<title>{{ JMS_TITLE }}</title>
<link rel="shortcut icon" href="{{ FAVICON_URL }}" type="image/x-icon">
<title>{{ INTERFACE.login_title }}</title>
<link rel="shortcut icon" href="{{ INTERFACE.favicon }}" type="image/x-icon">
{% include '_head_css_js.html' %}
<link href="{% static 'css/jumpserver.css' %}" rel="stylesheet">
{% block custom_head_css_js %} {% endblock %}
<style>
:root {
--primary-color: var(--primary-color);
}
</style>
</head>
<body>
<div id="wrapper">
@ -47,5 +52,6 @@ $(document).ready(function () {
var pathKey = getMessagePathKey();
window.localStorage.setItem(pathKey, '1')
})
</script>
</html>

View File

@ -5,17 +5,20 @@
{% block title %} {{ title }}{% endblock %}
{% block content %}
<style>
.alert.alert-msg {
background: #F5F5F7;
}
</style>
<div>
<p>
<div class="alert alert-msg" id="messages">
{% if error %}
<div class="alert alert-danger" id="messages">
{{ error }}
</div>
{% else %}
<div class="alert alert-success" id="messages">
{{ message|safe }}
</div>
{% endif %}
</div>
</p>
<div class="row">

View File

@ -1,285 +0,0 @@
{% load staticfiles %}
{% load i18n %}
{% load rest_framework %}
<!DOCTYPE html>
<html>
<head>
{% block head %}
{% block meta %}
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="robots" content="NONE,NOARCHIVE" />
{% endblock %}
<title>{% block title %}{% if name %}{{ name }} {% endif %}Django REST framework{% endblock %}</title>
{% block style %}
{% block bootstrap_theme %}
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap.min.css" %}"/>
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap-tweaks.css" %}"/>
{% endblock %}
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/prettify.css" %}"/>
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/default.css" %}"/>
{% endblock %}
{% endblock %}
</head>
{% block body %}
<body class="{% block bodyclass %}{% endblock %}">
<div class="wrapper">
{% block navbar %}
<div class="navbar navbar-static-top {% block bootstrap_navbar_variant %}navbar-inverse{% endblock %}">
<div class="container">
<span>
{% block branding %}
<a class='navbar-brand' rel="nofollow" href='http://www.django-rest-framework.org'>
Django REST framework
</a>
{% endblock %}
</span>
<ul class="nav navbar-nav pull-right">
{% block userlinks %}
{% if user.is_authenticated %}
{% optional_logout request user %}
{% else %}
{% optional_login request %}
{% endif %}
{% endblock %}
</ul>
</div>
</div>
{% endblock %}
<div class="container">
{% block breadcrumbs %}
<ul class="breadcrumb">
{% for breadcrumb_name, breadcrumb_url in breadcrumblist %}
{% if forloop.last %}
<li class="active"><a href="{{ breadcrumb_url }}">{{ breadcrumb_name }}</a></li>
{% else %}
<li><a href="{{ breadcrumb_url }}">{{ breadcrumb_name }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endblock %}
<!-- Content -->
<div id="content">
{% if 'GET' in allowed_methods %}
<form id="get-form" class="pull-right">
<fieldset>
{% if api_settings.URL_FORMAT_OVERRIDE %}
<div class="btn-group format-selection">
<a class="btn btn-primary js-tooltip" href="{{ request.get_full_path }}" rel="nofollow" title="Make a GET request on the {{ name }} resource">GET</a>
<button class="btn btn-primary dropdown-toggle js-tooltip" data-toggle="dropdown" title="Specify a format for the GET request">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{% for format in available_formats %}
<li>
<a class="js-tooltip format-option" href="{% add_query_param request api_settings.URL_FORMAT_OVERRIDE format %}" rel="nofollow" title="Make a GET request on the {{ name }} resource with the format set to `{{ format }}`">{{ format }}</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
<a class="btn btn-primary js-tooltip" href="{{ request.get_full_path }}" rel="nofollow" title="Make a GET request on the {{ name }} resource">GET</a>
{% endif %}
</fieldset>
</form>
{% endif %}
{% if options_form %}
<form class="button-form" action="{{ request.get_full_path }}" data-method="OPTIONS">
<button class="btn btn-primary js-tooltip" title="Make an OPTIONS request on the {{ name }} resource">OPTIONS</button>
</form>
{% endif %}
{% if delete_form %}
<button class="btn btn-danger button-form js-tooltip" title="Make a DELETE request on the {{ name }} resource" data-toggle="modal" data-target="#deleteModal">DELETE</button>
<!-- Delete Modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<h4 class="text-center">Are you sure you want to delete this {{ name }}?</h4>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<form class="button-form" action="{{ request.get_full_path }}" data-method="DELETE">
<button class="btn btn-danger">Delete</button>
</form>
</div>
</div>
</div>
</div>
{% endif %}
{% if filter_form %}
<button style="float: right; margin-right: 10px" data-toggle="modal" data-target="#filtersModal" class="btn btn-default">
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
{% trans "Filters" %}
</button>
{% endif %}
<div class="content-main">
<div class="page-header">
<h1>{{ name }}</h1>
</div>
<div style="float:left">
{% block description %}
{{ description }}
{% endblock %}
</div>
{% if paginator %}
<nav style="float: right">
{% get_pagination_html paginator %}
</nav>
{% endif %}
<div class="request-info" style="clear: both" >
<pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre>
</div>
<div class="response-info">
<pre class="prettyprint"><span class="meta nocode"><b>HTTP {{ response.status_code }} {{ response.status_text }}</b>{% autoescape off %}
{% for key, val in response_headers.items %}<b>{{ key }}:</b> <span class="lit">{{ val|break_long_headers|urlize_quoted_links }}</span>
{% endfor %}
</span>{{ content|urlize_quoted_links }}</pre>{% endautoescape %}
</div>
</div>
{% if display_edit_forms %}
{% if post_form or raw_data_post_form %}
<div {% if post_form %}class="tabbable"{% endif %}>
{% if post_form %}
<ul class="nav nav-tabs form-switcher">
<li>
<a name='html-tab' href="#post-object-form" data-toggle="tab">HTML form</a>
</li>
<li>
<a name='raw-tab' href="#post-generic-content-form" data-toggle="tab">Raw data</a>
</li>
</ul>
{% endif %}
<div class="well tab-content">
{% if post_form %}
<div class="tab-pane" id="post-object-form">
{% with form=post_form %}
<form action="{{ request.get_full_path }}" method="POST" enctype="multipart/form-data" class="form-horizontal" novalidate>
<fieldset>
{% csrf_token %}
{{ post_form }}
<div class="form-actions">
<button class="btn btn-primary" title="Make a POST request on the {{ name }} resource">POST</button>
</div>
</fieldset>
</form>
{% endwith %}
</div>
{% endif %}
<div {% if post_form %}class="tab-pane"{% endif %} id="post-generic-content-form">
{% with form=raw_data_post_form %}
<form action="{{ request.get_full_path }}" method="POST" class="form-horizontal">
<fieldset>
{% include "rest_framework/raw_data_form.html" %}
<div class="form-actions">
<button class="btn btn-primary" title="Make a POST request on the {{ name }} resource">POST</button>
</div>
</fieldset>
</form>
{% endwith %}
</div>
</div>
</div>
{% endif %}
{% if put_form or raw_data_put_form or raw_data_patch_form %}
<div {% if put_form %}class="tabbable"{% endif %}>
{% if put_form %}
<ul class="nav nav-tabs form-switcher">
<li>
<a name='html-tab' href="#put-object-form" data-toggle="tab">HTML form</a>
</li>
<li>
<a name='raw-tab' href="#put-generic-content-form" data-toggle="tab">Raw data</a>
</li>
</ul>
{% endif %}
<div class="well tab-content">
{% if put_form %}
<div class="tab-pane" id="put-object-form">
<form action="{{ request.get_full_path }}" data-method="PUT" enctype="multipart/form-data" class="form-horizontal" novalidate>
<fieldset>
{{ put_form }}
<div class="form-actions">
<button class="btn btn-primary js-tooltip" title="Make a PUT request on the {{ name }} resource">PUT</button>
</div>
</fieldset>
</form>
</div>
{% endif %}
<div {% if put_form %}class="tab-pane"{% endif %} id="put-generic-content-form">
{% with form=raw_data_put_or_patch_form %}
<form action="{{ request.get_full_path }}" data-method="PUT" class="form-horizontal">
<fieldset>
{% include "rest_framework/raw_data_form.html" %}
<div class="form-actions">
{% if raw_data_put_form %}
<button class="btn btn-primary js-tooltip" title="Make a PUT request on the {{ name }} resource">PUT</button>
{% endif %}
{% if raw_data_patch_form %}
<button data-method="PATCH" class="btn btn-primary js-tooltip" title="Make a PATCH request on the {{ name }} resource">PATCH</button>
{% endif %}
</div>
</fieldset>
</form>
{% endwith %}
</div>
</div>
</div>
{% endif %}
{% endif %}
</div><!-- /.content -->
</div><!-- /.container -->
</div><!-- ./wrapper -->
{% if filter_form %}
{{ filter_form }}
{% endif %}
{% block script %}
<script>
window.drf = {
csrfHeaderName: "{{ csrf_header_name|default:'X-CSRFToken' }}",
csrfCookieName: "{{ csrf_cookie_name|default:'csrftoken' }}"
};
</script>
<script src="{% static "rest_framework/js/jquery-1.12.4.min.js" %}"></script>
<script src="{% static "rest_framework/js/ajax-form.js" %}"></script>
<script src="{% static "rest_framework/js/csrf.js" %}"></script>
<script src="{% static "rest_framework/js/bootstrap.min.js" %}"></script>
<script src="{% static "rest_framework/js/prettify-min.js" %}"></script>
<script src="{% static "rest_framework/js/default.js" %}"></script>
<script>
$(document).ready(function() {
$('form').ajaxForm();
});
</script>
{% endblock %}
</body>
{% endblock %}
</html>

View File

@ -25,7 +25,7 @@
</div>
<div class="col-lg-6">
<div class="ibox-content">
<img src="{{ LOGO_URL }}" style="margin: auto" width="50" height="50">
<img src="{{ INTERFACE.logo_logout }}" style="margin: auto" width="50" height="50">
<h2 class="font-bold" style="display: inline">{% trans 'Ticket approval' %}</h2>
<h1></h1>
<div class="ibox-content">

View File

@ -30,8 +30,8 @@
<script>
$('.change-color li:eq(1) i').css('color', '#1ab394');
$('.change-color li:eq(2) i').css('color', '#1ab394');
$('.change-color li:eq(1) i').css('color', '{{ INTERFACE.primary_color }}');
$('.change-color li:eq(2) i').css('color', '{{ INTERFACE.primary_color }}');
function submitForm() {
$('#bind-form').submit()

View File

@ -30,7 +30,7 @@
<script>
$(function(){
$('.change-color li:eq(1) i').css('color', '#1ab394')
$('.change-color li:eq(1) i').css('color', '{{ INTERFACE.primary_color }}')
})
</script>