Beautified

pull/703/head^2
TimZ99 2019-02-17 19:57:28 +01:00
parent 560dc8a9a5
commit 9eac461700
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
6 changed files with 86 additions and 68 deletions

View File

@ -2,12 +2,12 @@ function updateScale(chart, min, unit) {
chart.options.scales.xAxes[0].time.min = min;
chart.options.scales.xAxes[0].time.unit = unit;
// 0 to disable animation
chart.update(0);
chart.update(0);
}
$('input[name=timeframe_short]').change(function() {
$('input[name=timeframe_short]').change(function () {
updateScale(historyShort, parseInt($('input[name=timeframe_short]:checked').val()), $('input[name=timeframe_short]:checked')[0].id);
});
$('input[name=timeframe_long]').change(function() {
$('input[name=timeframe_long]').change(function () {
updateScale(historyLong, parseInt($('input[name=timeframe_long]:checked').val()), $('input[name=timeframe_long]:checked')[0].id);
});

View File

@ -32,8 +32,7 @@ $().ready(function () {
var $origin = $(this).data('modal-origin');
if ($origin.is('a')) {
window.location = $origin.attr('href');
}
else {
} else {
$origin.next('input[type=hidden]').attr('value', 1);
$origin.closest('form').submit();
}
@ -129,8 +128,7 @@ function psm_saveLayout(layout) {
$("#flow-layout").hide();
$("#block-layout").removeClass('active');
$("#table-layout").addClass('active');
}
else {
} else {
$("#list-layout").hide();
$("#flow-layout").show();
$("#block-layout").addClass('active');
@ -149,9 +147,9 @@ function psm_saveLayout(layout) {
if ($(".search_input").length > 0) {
$.getScript("static/js/search.js");
$('<link>')
.appendTo('head')
.appendTo('head')
.attr({
type: 'text/css',
type: 'text/css',
rel: 'stylesheet',
href: 'static/css/search.min.css'
});

View File

@ -6,31 +6,27 @@ $(".search_input").keyup(function () {
col2 = this.cells[1].innerText.toLowerCase().indexOf(searchTerm);
if (col1 >= 0) {
$(this).attr('visible', 'true');
}
else if (col2 >= 0) {
} else if (col2 >= 0) {
$(this).attr('visible', 'true');
}
else {
} else {
$(this).attr('visible', 'false');
}
});
var jobCount = $('table tbody tr[visible="true"]').length;
if($(".search_input").is(":placeholder-shown")){
if ($(".search_input").is(":placeholder-shown")) {
$('.search_icon i').show();
$('.search_icon p').hide();
}
else{
} else {
$('.search_icon i').hide();
$('.search_icon p').show();
}
$('.search_icon p').text(jobCount);
if (jobCount == '0') {
$('.no-result').show();
}
else {
} else {
$('.no-result').hide();
}
});

View File

@ -1,7 +1,5 @@
$theme-colors: (
"primary": #006AE0,
"success": #20883A
);
$theme-colors: ("primary": #006AE0,
"success": #20883A);
@import "../plugin/bootstrap/scss/_functions";
@import "../plugin/bootstrap/scss/functions";
@import "../plugin/bootstrap/scss/variables";

View File

@ -1,18 +1,19 @@
.search_input{
.search_input {
color: white;
border: 0;
outline: 0;
background: none;
max-width: 386px;
width: 0;
caret-color:transparent;
caret-color: transparent;
line-height: 44px;
transition: width 0.4s linear;
&:not(:placeholder-shown) {
padding: 0 10px;
width: 100%;
max-width: 450px;
caret-color:red;
caret-color: red;
transition: width 0.4s linear;
}
}
@ -23,23 +24,25 @@
background-color: #353b48;
border-radius: 40px;
padding: 10px;
&:hover {
> .search_icon{
>.search_icon {
background: white;
color: #e74c3c;
}
> .search_input{
>.search_input {
padding: 0 10px;
max-width: 450px;
width: 80%;
min-width: 100px;
caret-color:red;
caret-color: red;
transition: width 0.4s linear;
}
}
}
.search_icon{
.search_icon {
height: 44px;
width: 44px;
float: right;
@ -47,7 +50,8 @@
justify-content: center;
align-items: center;
border-radius: 50%;
color:white;
color: white;
p {
height: 0.6em;
font-weight: bold;

View File

@ -1,12 +1,15 @@
html {
position: relative;
min-height: 100%;
position: relative;
min-height: 100%;
}
html[dir='rtl'] {
#auto_refresh_servers,
#log_retention_period {
border-left-width: 0px
}
#auto_refresh_servers_input,
#log_retention_period_input {
border-top-left-radius: .25rem;
@ -15,80 +18,99 @@ html[dir='rtl'] {
border-bottom-right-radius: 0;
}
}
body {
padding-top: 4.5rem;
margin-bottom: 80px;
padding-top: 4.5rem;
margin-bottom: 80px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
line-height: 60px;
background-color: #f5f5f5;
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
line-height: 60px;
background-color: #f5f5f5;
}
.navbar-dark .navbar-nav .nav-link {
color: rgba(255,255,255,.64);
color: rgba(255, 255, 255, .64);
&:focus,
&:hover {
color: rgba(255,255,255,.85);
color: rgba(255, 255, 255, .85);
}
}
dl, dt, dd{
dl,
dt,
dd {
margin-bottom: 0;
}
footer .text-muted {
color: #4C5557!important;
color: #4C5557 !important;
}
a,
a,
button,
.nav-link {
min-height: 44px!important;
min-width: 44px!important;
min-height: 44px !important;
min-width: 44px !important;
}
a.icon {
text-decoration: none;
cursor: pointer;
padding-left: 10px;
}
#auto_refresh_servers,
#auto_refresh_servers,
#log_retention_period {
border-right-width: 0px
border-right-width: 0px
}
#auto_refresh_servers_input,
#auto_refresh_servers_input,
#log_retention_period_input {
border-top-right-radius: .25rem;
border-bottom-right-radius: .25rem;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-top-right-radius: .25rem;
border-bottom-right-radius: .25rem;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
form.form-signin input[type="text"],
form.form-signin input[type="text"],
form.form-reset input[type="text"] {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
form.form-signin input[type="password"] {
border-top-left-radius: 0;
border-top-right-radius: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
form.form-reset {
input#input-password {
input#input-password {
border-radius: 0;
}
input#input-password-repeat {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
form.form-signin,
form.form-forgot,
form.form-signin,
form.form-forgot,
form.form-reset {
margin: auto;
margin: auto;
}
table tr[visible='false'],
.no-result{
display:none;
.no-result {
display: none;
}
table tr[visible='true']{
display:table-row;
table tr[visible='true'] {
display: table-row;
}