Pavel Loginov 2020-12-16 11:51:08 +06:00
parent 20518efd95
commit 6205aad381
3 changed files with 23 additions and 5 deletions

View File

@ -96,13 +96,14 @@
</li>
{% endif %}
<li class="p_menu">
<a title="Simple monitoring network ports" class="stats">SMON</a>
<a title="Simple monitoring network ports" class="stats">Monitoring</a>
<ul class="v_menu">
<li><a href="/app/smon.py?action=view" title="SMON Dashboard" class="overview-link head-submenu">Dashboard</a></li>
<li><a href="/app/smon.py?action=history" title="SMON History" class="lists head-submenu">History</a></li>
<li><a href="/app/smon.py?action=view" title="SMON Dashboard" class="overview-link head-submenu">SMON Dashboard</a></li>
<li><a href="/app/smon.py?action=history" title="SMON History" class="lists head-submenu">SMON History</a></li>
{% if role <= 3 %}
<li><a href="/app/smon.py?action=add" title="SMON admin panel" class="edit head-submenu">Admin panel</a></li>
<li><a href="/app/smon.py?action=add" title="SMON admin panel" class="edit head-submenu">SMON Admin panel</a></li>
{% endif %}
<li><a href="/app/smon.py?action=checker_history" title="Checker History" class="lists head-submenu">Checker History</a></li>
</ul>
</li>
{% if role <= 2 %}

View File

@ -15,13 +15,19 @@
<br />
<h3>SMON service is not run. Run the SMON service <a href="users.py#services" title="HAProxy-WI services" target="_blank">here</a> before use</h3>
</center>
{% elif smon|length == 0 and action != 'add' %}
{% elif smon|length == 0 and action != 'add' and action != 'history' %}
<center>
<br />
<h3>You do not have added servers in SMON service. Create you first server <a href="smon.py?action=add" title="HAProxy-WI SMON" target="_blank">here</a> before use</h3>
<br />
<iframe width="860" height="515" src="https://www.youtube.com/embed/bJtRJeHG5B0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</center>
{% elif smon|length == 0 and action != 'add' and action == 'history' %}
<center>
<br />
<h3>There are not any events yet. Check if there are any checks added <a href="smon.py?action=add" title="HAProxy-WI SMON" target="_blank">here</a></h3>
<br />
</center>
{% else %}
{% if action == 'add' %}
<table class="overview" id="ajax-smon">
@ -146,6 +152,8 @@
</tr>
</table>
{% include 'include/del_confirm.html' %}
{% elif action == 'history' or action == 'checker_history' %}
{% include 'ajax/alerts_history.html' %}
{% else %}
<div class="main" id="smon_dashboard">
{% include 'ajax/smon_dashboard.html' %}

View File

@ -112,6 +112,15 @@ $( function() {
$(this).parent().find('a').css('padding-left', '20px');
$(this).find('a').css('padding-left', '30px');
$(this).find('a').css('border-left', '4px solid #5D9CEB');
} else if(cur_url[0] == 'smon.py' && cur_url[1].split('&')[0] == 'action=checker_history' && link2 == 'smon.py?action=checker_history'){
$(this).parent().css('display', 'contents');
$(this).parent().css('font-size', '13px');
$(this).parent().css('top', '0');
$(this).parent().css('left', '0');
$(this).parent().children().css('margin-left', '-20px');
$(this).parent().find('a').css('padding-left', '20px');
$(this).find('a').css('padding-left', '30px');
$(this).find('a').css('border-left', '4px solid #5D9CEB');
} else if(cur_url[0] == 'add.py' && cur_url[1].split('&')[0] == 'service=nginx#ssl' && link2 == 'add.py?service=nginx#ssl'){
$(this).parent().css('display', 'contents');
$(this).parent().css('font-size', '13px');