<div class="top-menu">
	<div class="LogoText">
		<span id="logo_text">
			<a href="https://roxy-wi.org" title="Roxy-WI site" target="_blank">
				<img src="{{ url_for('static', filename='images/logo_menu.png') }}" alt="logo" width="110" />
			</a>
		</span>
	</div>
	<div id="top-link" class="top-link">
		<nav id="menu">
			<ul class="menu">
				<li><a href="{{ url_for('overview.index') }}" title="{{lang.menu_links.overview.title}}" class="overview-link ">{{lang.menu_links.overview.link}}</a></li>
				{% if '1' in user_services %}
				<li class="p_menu">
					<a href="{{ url_for('service.services', service='haproxy') }}" title="{{lang.menu_links.hapservers.haproxy.title}}" class="config-show">HAProxy</a>
					<ul class="v_menu">
						<li><a href="{{ url_for('service.services', service='haproxy') }}" title="{{lang.menu_links.hapservers.haproxy.title}}" class="overview-link head-submenu">{{lang.menu_links.hapservers.link}}</a> </li>
						<li><a href="{{ url_for('config.config', service='haproxy') }}" title="{{lang.menu_links.config.haproxy.title}}" class="edit head-submenu">{{lang.menu_links.config.link}}</a></li>
						<li><a href="{{ url_for('main.stats', service='haproxy') }}" title="{{lang.menu_links.stats.haproxy.title}}" class="stats head-submenu">{{lang.menu_links.stats.link}}</a></li>
						<li><a href="{{ url_for('logs.logs', service='haproxy') }}" title="HAProxy {{lang.menu_links.logs.title}}" class="logs head-submenu">{{lang.menu_links.logs.link}}</a></li>
						<li><a href="{{ url_for('runtime.runtimeapi') }}" title="Runtime API" class="runtime head-submenu">Runtime API</a></li>
						<li><a href="{{ url_for('metric.metrics', service='haproxy') }}" title="HAProxy {{lang.menu_links.metrics.title}}" class="metrics head-submenu">{{lang.menu_links.metrics.link}}</a></li>
					{% if role <= 3 %}
						<li><a href="{{ url_for('add.add', service='haproxy') }}#proxy" title="{{lang.menu_links.add_proxy.title}}" class="add-proxy head-submenu" id="add1">{{lang.menu_links.add_proxy.link}}</a></li>
						<li><a href="{{ url_for('config.versions', service='haproxy') }}" title="{{lang.menu_links.versions.haproxy.title}}" class="version head-submenu">{{lang.menu_links.versions.link}}</a></li>
						<li><a href="{{ url_for('add.add', service='haproxy') }}#ssl" title="{{lang.menu_links.ssl.title}}" class="cert head-submenu" id="add3">{{lang.menu_links.ssl.link}}</a></li>
						<li><a href="{{ url_for('add.add', service='haproxy') }}#lists" title="{{lang.menu_links.lists.title}}" class="lists head-submenu" id="add7">{{lang.menu_links.lists.link}}</a></li>
						<li><a href="{{ url_for('waf.waf', service='haproxy') }}" title="Web application firewall" class="waf-menu head-submenu">WAF</a> </li>
					{% endif %}
					</ul>
				</li>
				{% endif %}
				{% if '2' in user_services %}
				<li class="p_menu">
					<a href="{{ url_for('service.services', service='nginx') }}" title="{{lang.menu_links.hapservers.nginx.title}}" class="nginx-menu">NGINX</a>
					<ul class="v_menu">
						<li><a href="{{ url_for('service.services', service='nginx') }}" title="{{lang.menu_links.hapservers.nginx.title}}" class="overview-link head-submenu">{{lang.menu_links.hapservers.link}}</a></li>
						<li><a href="{{ url_for('config.config', service='nginx') }}" title="{{lang.menu_links.config.nginx.title}}" class="edit head-submenu">{{lang.menu_links.config.link}}</a></li>
						<li><a href="{{ url_for('main.stats', service='nginx') }}" title="{{lang.menu_links.stats.nginx.title}}" class="stats head-submenu">{{lang.menu_links.stats.link}}</a></li>
						<li><a href="{{ url_for('logs.logs', service='nginx') }}" title="NGINX {{lang.menu_links.logs.title}}" class="logs head-submenu">{{lang.menu_links.logs.link}}</a></li>
						<li><a href="{{ url_for('metric.metrics', service='nginx') }}" title="NGINX {{lang.menu_links.metrics.title}}" class="metrics head-submenu">{{lang.menu_links.metrics.link}}</a></li>
						{% if role <= 3 %}
						<li><a href="{{ url_for('add.add', service='nginx') }}#proxy" title="{{lang.menu_links.add_proxy.title}}" class="add-proxy head-submenu">{{lang.menu_links.add_proxy.link}}</a></li>
						<li><a href="{{ url_for('config.versions', service='nginx') }}" title="{{lang.menu_links.versions.nginx.title}}" class="version head-submenu">{{lang.menu_links.versions.link}}</a></li>
						<li><a href="{{ url_for('add.add', service='haproxy') }}?service=nginx#ssl" title="{{lang.menu_links.ssl.title}}" class="cert head-submenu">{{lang.menu_links.ssl.link}}</a></li>
						<li><a href="{{ url_for('waf.waf', service='nginx') }}" title="Web application firewall" class="waf-menu head-submenu">WAF</a> </li>
						{% endif %}
					</ul>
				</li>
				{% endif %}
				{% if '4' in user_services %}
				<li class="p_menu">
					<a href="{{ url_for('service.services', service='apache') }}" title="{{lang.menu_links.hapservers.apache.title}}" class="apache-menu">Apache</a>
					<ul class="v_menu">
						<li><a href="{{ url_for('service.services', service='apache') }}" title="{{lang.menu_links.hapservers.apache.title}}" class="overview-link head-submenu">{{lang.menu_links.hapservers.link}}</a></li>
						<li><a href="{{ url_for('config.config', service='apache') }}" title="{{lang.menu_links.config.apache.title}}" class="edit head-submenu">{{lang.menu_links.config.link}}</a></li>
						<li><a href="{{ url_for('main.stats', service='apache') }}" title="{{lang.menu_links.stats.apache.title}}" class="stats head-submenu">{{lang.menu_links.stats.link}}</a></li>
						<li><a href="{{ url_for('logs.logs', service='apache') }}" title="Apache {{lang.menu_links.logs.title}}" class="logs head-submenu">{{lang.menu_links.logs.link}}</a></li>
						<li><a href="{{ url_for('metric.metrics', service='apache') }}" title="Apache {{lang.menu_links.metrics.title}}" class="metrics head-submenu">{{lang.menu_links.metrics.link}}</a></li>
						{% if role <= 3 %}
						<li><a href="{{ url_for('config.versions', service='apache') }}" title="{{lang.menu_links.versions.apache.title}}" class="version head-submenu">{{lang.menu_links.versions.link}}</a></li>
						<li><a href="{{ url_for('add.add', service='haproxy') }}?service=apache#ssl" title="{{lang.menu_links.ssl.title}}" class="cert head-submenu" id="add3">{{lang.menu_links.ssl.link}}</a></li>
						{% endif %}
					</ul>
				</li>
				{% endif %}
				{% if '3' in user_services %}
				{% if role <= 2 %}
				<li class="p_menu">
					<a href="{{ url_for('service.services', service='keepalived') }}" title="{{lang.menu_links.hapservers.keepalived.title}}" class="ha">Keepalived</a>
					<ul class="v_menu">
						<li><a href="{{ url_for('service.services', service='keepalived') }}" title="{{lang.menu_links.hapservers.keepalived.title}}" class="overview-link head-submenu">{{lang.menu_links.hapservers.link}}</a> </li>
						<li><a href="{{ url_for('config.config', service='keepalived') }}" title="{{lang.menu_links.config.keepalived.title}}" class="edit head-submenu">{{lang.menu_links.config.link}}</a></li>
						<li><a href="{{ url_for('logs.logs', service='keepalived') }}" title="Keepalived {{lang.menu_links.stats.title}}" class="logs head-submenu">{{lang.menu_links.logs.link}}</a></li>
						<li><a href="{{ url_for('config.versions', service='keepalived') }}" title="{{lang.menu_links.versions.keepalived.title}}" class="version head-submenu keepalived_versions">{{lang.menu_links.versions.link}}</a></li>
					</ul>
				</li>
				{% endif %}
				{% endif %}
				<li class="p_menu">
					<a href="{{ url_for('smon.smon') }}" title="{{lang.menu_links.monitoring.title}}" class="stats">{{lang.menu_links.monitoring.link}}</a>
					<ul class="v_menu">
						<li><a href="{{ url_for('smon.smon') }}" title="{{lang.menu_links.monitoring.smon.dashboard}}" class="overview-link head-submenu">{{lang.menu_links.monitoring.smon.dashboard}}</a></li>
						<li><a href="{{ url_for('smon.smon_history') }}" title="{{lang.menu_links.monitoring.smon.history}}" class="lists head-submenu">{{lang.menu_links.monitoring.smon.history}}</a></li>
						{% if role <= 3 %}
						<li><a href="{{ url_for('smon.smon_admin') }}" title="{{lang.menu_links.monitoring.smon.admin}}" class="edit head-submenu">{{lang.menu_links.monitoring.smon.admin}}</a></li>
						<li><a href="{{ url_for('checker.checker_settings') }}" title="Checker: {{lang.words.settings}}" class="checker head-submenu">Checker: {{lang.words.settings|title()}}</a></li>
						{% endif %}
						<li><a href="{{ url_for('checker.checker_history') }}" title="{{lang.menu_links.monitoring.checker_history}}" class="lists head-submenu">{{lang.menu_links.monitoring.checker_history}}</a></li>
						<li><a href="{{ url_for('portscanner.portscanner') }}" title="{{lang.menu_links.monitoring.port_scan}}" class="port-scanner head-submenu">{{lang.menu_links.monitoring.port_scan}}</a></li>
						<li><a href="{{ url_for('main.nettools') }}" title="{{lang.menu_links.monitoring.net_tools}}" class="net-tools head-submenu">{{lang.menu_links.monitoring.net_tools}}</a></li>
					</ul>
				</li>
				{% if role <= 2 %}
				<li class="p_menu">
					<a href="{{ url_for('install.install_monitoring') }}" title="{{lang.menu_links.servers.title}}" class="hap-menu">{{lang.words.installation|title()}}</a>
					<ul class="v_menu">
						{% if '3' in user_services %}
						<li><a href="{{ url_for('install.ha') }}" title="{{lang.menu_links.ha.title}}" class="keepalived head-submenu">HA {{lang.words.cluster}}</a></li>
						{% endif %}
						<li><a href="{{ url_for('install.install_monitoring') }}#service" title="{{lang.words.servers|title()}}: {{lang.words.proxy|title()}} {{lang.words.services}} {{lang.words.installation}}" class="hap-menu service installproxy head-submenu">{{lang.words.proxy|title()}} {{lang.words.services}}</a> </li>
						<li><a href="{{ url_for('install.install_monitoring') }}#monitoring" title="{{lang.words.servers|title()}}: {{lang.words.monitoring|title()}} {{lang.words.services}} {{lang.words.installation}}" class="hap-menu monitoring installmon head-submenu">{{lang.words.monitoring|title()}}</a> </li>
						<li><a href="{{ url_for('install.install_monitoring') }}#geolite2" title="{{lang.words.installation|title()}} GeoLite2" class="hap-menu geolite2 installgeo head-submenu">GeoLite2</a> </li>
					</ul>
				</li>
				<li class="p_menu">
					<a href="{{ url_for('main.servers') }}#users" title="{{lang.menu_links.servers.title}}" class="runtime">{{lang.menu_links.servers.link}}</a>
					<ul class="v_menu">
						<li><a href="{{ url_for('main.servers') }}#users" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} {{lang.words.users2}}" class="users head-submenu">{{lang.words.users|title()}}</a></li>
						<li><a href="{{ url_for('main.servers') }}#servers" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} {{lang.words.servers2}}" class="runtime servers head-submenu">{{lang.words.servers|title()}}</a></li>
						<li><a href="{{ url_for('main.servers') }}#ssh" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} SSH {{lang.words.creds2}}" class="admin ssh head-submenu">SSH {{lang.words.creds|title()}}</a></li>
						<li><a href="{{ url_for('main.servers') }}#settings" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} Roxy-WI {{lang.words.settings2}}" class="settings head-submenu">{{lang.words.settings|title()}}</a></li>
						<li><a href="{{ url_for('main.servers') }}#backup" title="{{lang.words.servers|title()}}: {{lang.words.backup|title()}} {{lang.words.configs2}}" class="backup head-submenu">{{lang.words.backup|title()}}</a> </li>
						<li><a href="{{ url_for('logs.logs_internal') }}?type=2" title="{{lang.words.servers|title()}}: {{lang.words.view|title()}} {{lang.words.internal2}} {{lang.words.logs2}}" class="logs head-submenu">{{lang.words.internal|title()}} {{lang.words.logs}}</a></li>
					</ul>
				</li>
				{% endif %}
				{% if role <= 1 %}
				<li class="p_menu" id="admin-area">
					<a href="{{ url_for('admin.admin') }}#users" title="{{lang.menu_links.admin_area.title}}" class="admin">{{lang.menu_links.admin_area.link}}</a>
					<ul class="v_menu">
						<li><a href="{{ url_for('admin.admin') }}#users" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} {{lang.words.users2}}" class="users head-submenu" id="admin-area-users">{{lang.words.users|title()}}</a></li>
						<li><a href="{{ url_for('admin.admin') }}#groups" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} {{lang.words.groups3}}" class="group groups head-submenu" id="admin-area-groups">{{lang.words.groups|title()}}</a></li>
						<li><a href="{{ url_for('admin.admin') }}#servers" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} {{lang.words.servers2}}" class="runtime servers head-submenu" id="admin-area-servers">{{lang.words.servers|title()}}</a></li>
						<li><a href="{{ url_for('admin.admin') }}#ssh" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} SSH {{lang.words.creds2}}" class="admin ssh head-submenu" id="admin-area-ssh">SSH {{lang.words.creds|title()}}</a></li>
						<li><a href="{{ url_for('admin.admin') }}#settings" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} Roxy-WI {{lang.words.settings2}}" class="settings head-submenu" id="admin-area-settings">{{lang.words.settings|title()}}</a></li>
						<li><a href="{{ url_for('admin.admin') }}#tools" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} Roxy-WI {{lang.words.tools}}" class="tools head-submenu" id="admin-area-services">{{lang.words.tools|title()}}</a></li>
						<li><a href="{{ url_for('logs.logs_internal') }}" title="{{lang.words.admin_area|title()}}: {{lang.words.view|title()}} {{lang.words.internal2}} {{lang.words.logs2}}" class="logs head-submenu" id="admin-area-logs">{{lang.words.internal|title()}} {{lang.words.logs}}</a></li>
						<li><a href="{{ url_for('admin.admin') }}#updatehapwi" title="{{lang.words.admin_area|title()}}: {{lang.words.w_update|title()}} Roxy-WI" class="upload updatehapwi head-submenu" id="admin-area-update">{{lang.words.w_update|title()}}</a></li>
					</ul>
				</li>
				{% endif %}
			</ul>
		</nav>
	</div>
</div>
