Pavel Loginov 5 years ago
parent
commit
cb135de852
  1. 7
      app/templates/ajax/overivewWaf.html
  2. 2
      app/templates/ajax/overviewServers.html
  3. 4
      app/templates/base.html
  4. 12
      app/templates/hapservers.html
  5. 28
      app/templates/include/admin_user.html
  6. 3
      app/templates/include/admin_users.html
  7. 2
      app/templates/metrics.html
  8. 24
      app/templates/ovw.html
  9. 6
      app/templates/waf.html
  10. BIN
      image/haproxy-wi-admin-area.png
  11. BIN
      image/haproxy-wi-config-show.png
  12. BIN
      image/haproxy-wi-overview.png
  13. 41
      inc/awesome.css
  14. 6
      inc/fa-solid.min.js
  15. 6
      inc/fontawesome.min.js
  16. BIN
      inc/images/compare.png
  17. BIN
      inc/images/edit.png
  18. BIN
      inc/images/favicon.ico
  19. BIN
      inc/images/map.png
  20. BIN
      inc/images/show.png
  21. BIN
      inc/images/start.png
  22. BIN
      inc/images/stop.png
  23. BIN
      inc/images/update.png
  24. 14
      inc/overview.js
  25. 3
      inc/script.js
  26. 2
      inc/style.css
  27. 3
      inc/waf.js

7
app/templates/ajax/overivewWaf.html

@ -13,13 +13,13 @@
<td>
{% if role <= 1 %}
<a id="{{ service.1 }}" class="start-waf" title="Start WAF service">
<img src=/inc/images/start.png alt="start" class="icon" style="margin-bottom: -4px;">
<span class="service-start" onclick="confirmAjaxAction('start', 'waf', '{{service.1}}')"></span>
</a>
<a id="{{ service.1 }}" class="stop-waf" title="Stop WAF service">
<img src=/inc/images/stop.png alt="start" class="icon" width="17px">
<span class="service-stop" onclick="confirmAjaxAction('stop', 'waf', '{{service.1}}')"></span>
</a>
<a id="{{ service.1 }}" class="restart-waf" title="Restart WAF service">
<img src=/inc/images/update.png alt="restart" class="icon">
<span class="service-reload" onclick="confirmAjaxAction('restart', 'restart', '{{service.1}}')"></span>
</a>
{% endif %}
</td>
@ -76,4 +76,5 @@
</script>
<style>
.ui-selectmenu-button.ui-button {width: 10em;}
.fa-play, .fa-stop, .fa-sync-alt { margin-bottom: -1px; }
</style>

2
app/templates/ajax/overviewServers.html

@ -10,7 +10,7 @@
</div>
<div class="update-icon">
<a onclick="showOverviewServer('{{ service.0 }}', '{{ service.1 }}', '{{id}}')" title="Refresh">
<img src="/inc/images/update.png" alt="restart" class="icon">
<span class="service-reload"></span>
</a>
</div>
</div>

4
app/templates/base.html

@ -130,8 +130,8 @@
<span class="auto-refresh">
<a onclick="pauseAutoRefresh()" class="auto-refresh-pause" style="display: none; margin-top: 4px;"></a>
<a onclick="pauseAutoResume()" class="auto-refresh-resume" style="display: none; margin-top: 4px;"></a>
<a id="0"><img src="/inc/images/update.png" alt="restart" class="icon"> Auto-refresh</a>
<a id="1" style="display: none;"><img src="/inc/images/update.png" alt="restart" class="icon"> Auto-refresh</a>
<a id="0"><span class="service-reload"></span> Auto-refresh</a>
<a id="1" style="display: none;"><span class="service-reload"></span> Auto-refresh</a>
</span>
{% endif %}
</h2>

12
app/templates/hapservers.html

@ -89,13 +89,13 @@
{% set action_service = 'hap' %}
{% endif %}
<a id="start-{{ s.2 }}" class="start" title="Start HAProxy service">
<img src=/inc/images/start.png alt="start" class="icon-hapservs" style="margin-bottom: -2px;" onclick="confirmAjaxAction('start', '{{action_service}}', '{{s.2}}')">
<span class="service-start" onclick="confirmAjaxAction('start', '{{action_service}}', '{{s.2}}')"></span>
</a>
<a id="stop-{{ s.2 }}" class="stop" title="Stop HAProxy service">
<img src=/inc/images/stop.png alt="stop" class="icon-hapservs" width="17px" onclick="confirmAjaxAction('stop', '{{action_service}}', '{{s.2}}')">
<span class="service-stop" onclick="confirmAjaxAction('stop', '{{action_service}}', '{{s.2}}')"></span>
</a>
<a id="restart-{{ s.2 }}" class="restart" title="Restart HAProxy service" onclick="confirmAjaxAction('restart', '{{action_service}}', '{{s.2}}')">
<img src=/inc/images/update.png alt="restart" class="icon-hapservs">
<a id="restart-{{ s.2 }}" class="restart" title="Restart HAProxy service">
<span class="service-reload" onclick="confirmAjaxAction('restart', '{{action_service}}', '{{s.2}}')"></span>
</a>
</span>
{% endif %}
@ -167,7 +167,7 @@
{% if serv %}
<div id="ajax-server-{{s.0}}" class="ajax-server"></div>
<div class="div-server div-backends">
<div class="server-name">
<div class="server-name backends">
Backends:
</div>
<div style="margin-top: 10px;" id="top-{{s.1}}"></div>
@ -178,7 +178,7 @@
</div>
{% if serv %}
<div id="refresh" style="text-align: right;margin-right: 105px;clear: both;display: block;padding-top: 20px;margin-bottom: -25px;" title="Refresh metrics" onclick="showMetrics()">
<img src="/inc/images/update.png" alt="Refresh" class="icon">
<span class="service-reload"></span>
</div>
{% for s in servers %}
<div class="chart-container" style="display: block; width: 90%; height: 300px;">

28
app/templates/include/admin_user.html

@ -1,28 +0,0 @@
<td class="padding10 first-collumn">
{% if user.6 == 1%}
<input type="text" id="login-{{user.0}}" value="{{user.1}}" class="form-control" readonly>
{% else %}
<input type="text" id="login-{{user.0}}" value="{{user.1}}" class="form-control">
{% endif %}
</td>
<td>
{% if user.6 != 1%}
<span title="Change password" style="cursor: pointer">
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px; padding-left: 15px;" onclick="openChangeUserPasswordDialog('{{user.0}}')" />
</span>
{% endif %}
</td>
<td class="checkbox">
{% if user.7 == 1 %}
<label for="activeuser-{{user.0}}"></label><input type="checkbox" id="activeuser-{{user.0}}" checked>
{% else %}
<label for="activeuser-{{user.0}}"></label><input type="checkbox" id="activeuser-{{user.0}}">
{% endif %}
</td>
<td>
{% if user.6 == 1%}
<input type="text" id="email-{{user.0}}" value="{{user.2}}" class="form-control" readonly>
{% else %}
<input type="text" id="email-{{user.0}}" value="{{user.2}}" class="form-control">
{% endif %}
</td>

3
app/templates/include/admin_users.html

@ -9,8 +9,7 @@
</td>
<td>
{% if user.6 != 1%}
<span title="Change password" style="cursor: pointer">
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px; padding-left: 15px;" onclick="openChangeUserPasswordDialog('{{user.0}}')" />
<span title="Change password" style="cursor: pointer; margin-left: 15px;" class="div-pic" onclick="openChangeUserPasswordDialog('{{user.0}}')">
</span>
{% endif %}
</td>

2
app/templates/metrics.html

@ -17,7 +17,7 @@ th, tr, td {
<script src="/inc/chart.min.js"></script>
<div id="table_metrics"></div>
<div id="refresh" style="text-align: right;margin-top: 20px;margin-right: 10px;" title="Refresh metrics" onclick="showMetrics()">
<img src="/inc/images/update.png" alt="Refresh" class="icon">
<span class="service-reload"></span>
</div>
{% for s in servers %}
<div class="chart-container">

24
app/templates/ovw.html

@ -10,6 +10,9 @@
hostnamea.push("{{s[1]}}")
{% endfor %}
</script>
<style>
.fa-sync-alt { margin-bottom: -1px; }
</style>
<table class="overview-wi">
<tr class="overviewHead">
<td class="padding10 first-collumn-wi">
@ -34,7 +37,9 @@
</a>
</td class="padding10">
<td>
<a onclick="showOverview(ip, hostnamea)" title="Refresh" style="float: right; margin-right: 25px;"><img src="/inc/images/update.png" alt="hostname" class="icon"></a>
<a onclick="showOverview(ip, hostnamea)" title="Refresh" style="float: right; margin-right: 25px;">
<span class="service-reload"></span>
</a>
</td>
</tr>
{% for s in servers %}
@ -53,7 +58,9 @@
{% endif %}
</td>
<td>
<a onclick="showOverviewHapWI()" title="Refresh" style="float: right; margin-right: 25px;"><img src="/inc/images/update.png" alt="restart" class="icon"></a>
<a onclick="showOverviewHapWI()" title="Refresh" style="float: right; margin-right: 25px;">
<span class="service-reload"></span>
</a>
</td>
</tr>
<tr>
@ -174,9 +181,9 @@
{% if counter <= 2 %}
<tr class="{{ loop.cycle('odd', 'even') }}">
<td class="padding10 first-collumn-wi">
<a href="users.py#users" title="Edit user" class="logs_link">
<a href="users.py#users" title="Edit user" class="logs_link div-pic">
{{ USER.1 }}
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px;" />
</a>
</td>
{% for group in groups %}
@ -189,9 +196,8 @@
{% else %}
<tr style="display: none;" class="show-users {{ loop.cycle('odd', 'even') }}">
<td class="padding10 first-collumn-wi">
<a href="users.py#users" title="Edit user" class="logs_link">
<a href="users.py#users" title="Edit user" class="logs_link div-pic">
{{ USER.1 }}
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px;" />
</a>
</td>
{% for group in groups %}
@ -223,9 +229,8 @@
{% if counter <= 2 %}
<tr class="{{ loop.cycle('odd', 'even') }}">
<td class="padding10 first-collumn-wi">
<a href="users.py#groups" title="Edit groups" class="logs_link">
<a href="users.py#groups" title="Edit groups" class="logs_link div-pic">
{{ group.1 }}
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px;" />
</a>
</td>
<td class="third-collumn-wi" colspan="2">{{ group.2 }}</td>
@ -233,9 +238,8 @@
{% else %}
<tr style="display: none;" class="show-groups {{ loop.cycle('odd', 'even') }}">
<td class="padding10 first-collumn-wi">
<a href="users.py#groups" title="Edit groups" class="logs_link">
<a href="users.py#groups" title="Edit groups" class="logs_link div-pic">
{{ group.1 }}
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px;" />
</a>
</td>
<td class="third-collumn-wi" colspan="2">{{ group.2 }}</td>

6
app/templates/waf.html

@ -32,7 +32,9 @@
Metrics
</td>
<td>
<a onclick="showOverviewWaf(ip, hostnamea)" title="Refresh" style="float: right; margin-right: 25px;"><img src="/inc/images/update.png" alt="Refresh" class="icon"></a>
<a onclick="showOverviewWaf(ip, hostnamea)" title="Refresh" style="float: right; margin-right: 25px;">
<span class="service-reload"></span>
</a>
</td>
</tr>
{% for s in servers_all %}
@ -46,7 +48,7 @@
<script src="/inc/chart.min.js"></script>
<script src="/inc/waf.js"></script>
<div id="refresh" style="text-align: right;margin-top: 20px;margin-right: 20px;" title="Refresh metrics" onclick="showWafMetrics()">
<img src="/inc/images/update.png" alt="Refresh" class="icon">
<span class="service-reload"></span>
</div>
{% for s in servers %}
<div class="chart-container">

BIN
image/haproxy-wi-admin-area.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 78 KiB

BIN
image/haproxy-wi-config-show.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 70 KiB

BIN
image/haproxy-wi-overview.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 109 KiB

41
inc/awesome.css

@ -50,7 +50,7 @@
.config-show::before {
display: none;
font-family: "Font Awesome 5 Solid";
content: "\f10a";
content: "\f6ff";
}
.compare::before {
display: none;
@ -190,4 +190,43 @@
font-family: "Font Awesome 5 Solid";
content: "\f093";
padding-left: 5px;
}
.backends::before {
display: none;
font-family: "Font Awesome 5 Solid";
content: "\f233";
padding-left: 5px;
}
.div-pic::after {
display: none;
font-family: "Font Awesome 5 Solid";
content: "\f303";
}
.fa-pencil-alt{
padding-left: 7px;
color: #5cb85c !important;
}
.service-start::after {
display: none;
font-family: "Font Awesome 5 Solid";
content: "\f04b";
}
.fa-play, .fa-stop, .fa-sync-alt {
width: 3px;
color: #a0d100 !important;
cursor: pointer;
margin-bottom: 3px;
}
.service-stop::after {
display: none;
font-family: "Font Awesome 5 Solid";
content: "\f04d";
}
.fa-stop {
color: red !important;
}
.service-reload::after {
display: none;
font-family: "Font Awesome 5 Solid";
content: "\f2f1";
}

6
inc/fa-solid.min.js vendored

File diff suppressed because one or more lines are too long

6
inc/fontawesome.min.js vendored

File diff suppressed because one or more lines are too long

BIN
inc/images/compare.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 832 B

BIN
inc/images/edit.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

BIN
inc/images/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 932 B

BIN
inc/images/map.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
inc/images/show.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 847 B

BIN
inc/images/start.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

BIN
inc/images/stop.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
inc/images/update.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

14
inc/overview.js

@ -42,7 +42,6 @@ function showHapserversCallBack(serv, hostnamea, service) {
} );
}
function overviewHapserverBackends(serv, hostnamea) {
console.log("#top-"+hostnamea)
$.ajax( {
url: "options.py",
data: {
@ -111,6 +110,7 @@ function showOverviewServer(name,ip,id) {
$(".div-pannel").css('height', '70px');
$("#div-pannel-"+id).insertBefore('#up-pannel')
$("#ajax-server-"+id).html(data);
$.getScript("/inc/fontawesome.min.js")
}
} );
}
@ -189,18 +189,6 @@ function ajaxActionWafServers(action, id) {
} );
}
$( function() {
$('.start-waf').click(function() {
var id = $(this).attr('id');
confirmAjaxAction("start", "waf", id);
});
$('.stop-waf').click(function() {
var id = $(this).attr('id');
confirmAjaxAction("stop", "waf", id);
});
$('.restart-waf').click(function() {
var id = $(this).attr('id');
confirmAjaxAction("restart", "waf", id);
});
$( "#show-all-users" ).click( function() {
$( ".show-users" ).show("fast");
$( "#show-all-users" ).text("Hide");

3
inc/script.js

@ -154,13 +154,14 @@ function setRefreshInterval(interval) {
if (interval == "0") {
Cookies.remove('auto-refresh');
pauseAutoRefresh();
$('.auto-refresh').prepend('<img src=/inc/images/update.png alt="restart" class="icon">');
$('.auto-refresh').prepend('<span class="service-reload"></span>');
$('.auto-refresh').css('margin-top', '-3px');
$('#1').text('Auto-refresh');
$('#0').text('Auto-refresh');
$('.auto-refresh-pause').css('display', 'none');
$('.auto-refresh-resume').css('display', 'none');
hideAutoRefreshDiv();
$.getScript("/inc/fontawesome.min.js")
} else {
clearInterval(intervalId);
Cookies.set('auto-refresh', interval, { expires: 365 });

2
inc/style.css

@ -293,7 +293,7 @@ pre {
margin-top: 15px;
}
.line {
background-color: #f5faf4;
background-color: #f3f8fb;
border: 1px solid #ddd;
}
.line, .line3 {

3
inc/waf.js

@ -1,3 +1,5 @@
var awesome = "/inc/fontawesome.min.js"
$( function() {
$( "#ajaxwafstatus input" ).change(function() {
var id = $(this).attr('id');
@ -32,6 +34,7 @@ function showOverviewWafCallBack(serv, hostnamea) {
$( "input[type=submit], button" ).button();
$( "input[type=checkbox]" ).checkboxradio();
$.getScript('/inc/overview.js');
$.getScript(awesome);
}
} );
}

Loading…
Cancel
Save