Pavel Loginov 2021-02-26 20:41:18 +06:00
parent 3096b28dec
commit 718758282f
4 changed files with 55 additions and 66 deletions

View File

@ -22,30 +22,17 @@
} );
</script>
<table class="overview hover order-column display compact" id="alerts_table">
<thead>
<tr class="overviewHead">
<th class="padding10" style="width: 10%; padding-left: 10px;">
Level
</th>
<th>
Host
</th>
{% if action != "checker_history" %}
<th>
Port
</th>
{% endif %}
<th>
Alert
</th>
<th>
Date
</th>
<th>
Time
</th>
</tr>
<tr class="overviewHead">
<th class="padding10" style="width: 10%; padding-left: 10px;">Level</th>
<th>Host</th>
{% if action != "checker_history" %}
<th>Port</th>
{% endif %}
<th>Alert</th>
<th>Date</th>
<th>Time</th>
</tr>
</thead>
<tbody>
{% if smon != '' %}
@ -59,27 +46,18 @@
{% endif %}
<span style="color: {{color}};"><b>{{t.1 |upper}}</b></span>
</td>
<td>
{{t.2}}
</td>
<td>{{t.2}}</td>
{% if action != "checker_history" %}
<td>
{{t.3}}
</td>
<td>{{t.3}}</td>
{% endif %}
<td>
{{t.0}}
</td>
<td>
{{t.4.split(' ')[0]}}
</td>
<td>
{{t.4.split(' ')[1]}}
<td>{{t.0}}</td>
<td>{{t.4.split(' ')[0]}}
</td>
<td>{{t.4.split(' ')[1]}}</td>
</tr>
{% endfor %}
{% else %}
<span class="alert alert-warning" style="margin-bottom: 0px;">Table is empty</span>
{% endif %}
</tbody>
</table>
</table>

View File

@ -1,7 +1,8 @@
{% if service != 'nginx' %}
<div class="bin_bout" id="show_bin_bout">
<div class="server-name">
Bytes in
<span class="update-icon">
<span class="update-icon" style="font-size: 13px; margin-top: 8px;">
<a onclick="showBytes('{{ serv }}')" title="Refresh">
<span class="service-reload"></span>
</a>
@ -37,9 +38,17 @@
{{total|round(2)}} {{metric}}
</div>
</div>
{% endif %}
<div id="sessions" class="bin_bout">
<div class="server-name">
Current ses
{% if service == 'nginx' %}
<span class="update-icon" style="font-size: 13px; margin-top: 8px;">
<a onclick="showNginxConnections('{{ serv }}')" title="Refresh">
<span class="service-reload"></span>
</a>
</span>
{% endif %}
</div>
<div class="bytes" id="cur_sess">
{{bin_bout.2}}

View File

@ -8,6 +8,7 @@
<a style="color: #000; cursor: pointer;">
{% if new_ver_without_dots > current_ver_without_dots and new_ver != "Sorry cannot get current version" %}
<span id="show-updates-button" class="new-version-exists">v{{current_ver}} </span>
<script defer src="/inc/fontawesome.min.js"></script>
{% else %}
<a href="/app/users.py#updatehapwi" title="Update center" style="color: black;">v{{current_ver}}</a>
{% endif %}

View File

@ -622,6 +622,32 @@ function viewLogs() {
}
}
$( function() {
$.ajax( {
url: "options.py",
data: {
show_versions: 1,
token: $('#token').val()
},
type: "POST",
success: function( data ) {
$('#version').html(data);
var showUpdates = $( "#show-updates" ).dialog({
autoOpen: false,
width: 600,
modal: true,
title: 'There is a new version HAProxy-WI',
buttons: {
Close: function() {
$( this ).dialog( "close" );
clearTips();
}
}
});
$('#show-updates-button').click(function() {
showUpdates.dialog('open');
});
}
} );
$('a').click(function(e) {
try {
var cur_path = window.location.pathname;
@ -838,33 +864,6 @@ $( function() {
}
return false;
});
$.ajax( {
url: "options.py",
data: {
show_versions: 1,
token: $('#token').val()
},
type: "POST",
success: function( data ) {
$('#version').html(data);
}
} );
var showUpdates = $( "#show-updates" ).dialog({
autoOpen: false,
width: 600,
modal: true,
title: 'There is a new version HAProxy-WI',
buttons: {
Close: function() {
$( this ).dialog( "close" );
clearTips();
}
}
});
$('#show-updates-button').click(function() {
showUpdates.dialog('open');
});
var showUserSettings = $( "#show-user-settings" ).dialog({
autoOpen: false,
width: 600,
@ -955,6 +954,7 @@ $( function() {
$(this).children(".services").css('padding-left', '30px');
$(this).children(".services").css('border-left', '4px solid #5D9CEB');
});
loadServices();
$( "#tabs" ).tabs( "option", "active", 7 );
} );
$( ".updatehapwi" ).on( "click", function() {
@ -965,6 +965,7 @@ $( function() {
$(this).children(".updatehapwi").css('border-left', '4px solid #5D9CEB');
});
$( "#tabs" ).tabs( "option", "active", 8 );
loadupdatehapwi();
} );
} else {
$( ".runtime" ).on( "click", function() {