{% extends "base.html" %}
{% block title %}{{ lang.menu_links.monitoring.smon.dashboard }}{% endblock %}
{% block h2 %}{{ lang.menu_links.monitoring.smon.dashboard }}{% endblock %}
{% block content %}
<script src="/inc/smon.js"></script>
<script src="/inc/users.js"></script>
<script src="/inc/fontawesome.min.js"></script>
<script src="/inc/jquery.timeago.js" type="text/javascript"></script>
{% if user_status == 0 %}
	{% include 'include/no_sub.html' %}
{% elif smon_error != '' %}
<div style="text-align: center;">
	<br />
	<h3>{{lang.smon_page.desc.not_installed}}</h3>.
	<img src="{{ url_for('static', filename='images/no_servers.png')}}" alt="There is no server">
	<h4>{{lang.words.read|title()}} <a href="https://roxy-wi.org/services/smon" title="Simple monitoring network ports with alerting via Telegram and WEB panel" target="_blank">{{lang.words.here}}</a>
		{{lang.phrases.how_to_install}} SMON {{lang.words.service}}.</h4>
</div>
{% elif smon_status.0 == 'failed' or smon_status.0 == 'inactive' %}
<div style="text-align: center;">
	<br />
	<h3>{{lang.smon_page.desc.smon_is_not_run}}</h3>
	<img src="{{ url_for('static', filename='images/no_servers.png')}}" alt="There is no server">
	<h4>{{lang.smon_page.desc.run_smon}} <a href="/app/users/services" title="Roxy-WI services" target="_blank">{{lang.words.here}}</a> {{lang.smon_page.desc.before_use}}</h4>
</div>
{% elif smon|length == 0 %}
<div style="text-align: center;">
	<br />
	<h3>{{lang.smon_page.desc.not_added}}</h3>
	<img src="{{ url_for('static', filename='images/no_servers.png')}}" alt="There is no server">
		<h4>{{lang.smon_page.desc.create_server}} <a href="/app/smon/admin" title="Roxy-WI SMON" target="_blank">{{lang.words.here}}</a> {{lang.smon_page.desc.before_use}}</h4>
	<br />
</div>
{% else %}
    <div class="main" id="smon_dashboard">
		{% include 'ajax/smon/smon_dashboard.html' %}
	</div>
{% endif %}
{% endblock %}