Commit 43a360c3 authored by Benjamin "Ziirish" SANS's avatar Benjamin "Ziirish" SANS
Browse files

add: direct link to filtered monitor

parent 8adc3811
......@@ -22,6 +22,7 @@
<th>{{ _('Name') }}</th>
<th class="desktop">{{ _('State') }}</th>
<th class="desktop">{{ _('Last Backup') }}</th>
<th class="desktop">{{ _('Monitor') }}</th>
</tr>
</thead>
<tbody>
......
......@@ -11,7 +11,7 @@ var __status = {
"{{ _('client crashed') }}": 'danger',
"{{ _('server crashed') }}": 'danger',
"{{ _('running') }}": 'info',
"{{ _('idle') }}": undefined, // hack to manage translation
"{{ _('idle') }}": 'idle', // hack to manage translation
};
/***
......@@ -19,7 +19,7 @@ var __status = {
*/
var __date = {
"{{ _('never') }}": 'warning',
"{{ _('now') }}": undefined, // hack to manage translation
"{{ _('now') }}": 'now', // hack to manage translation
};
/***
......@@ -94,6 +94,22 @@ var _clients_table = $('#table-clients').dataTable( {
return '<span data-toggle="tooltip" title="'+data.last+'">'+moment(data.last, moment.ISO_8601).format({{ g.date_format|tojson }})+'</span>';
return data.last
}
},
{
data: null,
render: function (data, type, row ) {
var cls = '';
var link_start = '';
var link_end = '';
var label = '';
if (__date[data.last] == 'now' && __status[data.state] != 'idle') {
cls = 'blink';
link_start = '<a href="{{ url_for("view.live_monitor", server=server) }}?name='+data.name+'">';
link_end = '</a>';
label = '&nbsp;{{ _("view") }}';
}
return link_start + '<span class="fa-stack" style="color: #000; text-align: center;"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-terminal fa-stack-1x fa-inverse ' + cls + '"></i></span>' + label + link_end;
}
}
]
});
......
......@@ -35,9 +35,7 @@
<link href="{{ url_for('bower.static', filename='fullcalendar/dist/fullcalendar.min.css') }}" rel="stylesheet">
<link href="{{ url_for('bower.static', filename='fullcalendar/dist/fullcalendar.print.min.css') }}" media="print" rel="stylesheet">
{% endif -%}
{% if me or about or tree -%}
<link href="{{ url_for('bower.static', filename='components-font-awesome/css/font-awesome.min.css') }}" rel="stylesheet">
{% endif -%}
<!-- Custom styles for this template -->
<link href="{{ url_for('static', filename='dashboard.css') }}" rel="stylesheet">
......
......@@ -13,40 +13,40 @@
<ul class="nav navbar-nav navbar-right">
<li class="detail {% if about %}active{% endif %}">
<a href="{{ url_for('view.about') }}">
<span class="glyphicon glyphicon-question-sign"></span><span class="dtl">&nbsp;{{ _('About') }}</span>
<i class="fa fa-question-circle" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('About') }}</span>
</a>
</li>
{% if not login -%}
{% if not config.STANDALONE -%}
<li class="detail {% if not server and not about and not me and not admin %}active{% endif %}">
<a href="{{ url_for('view.home') }}">
<span class="glyphicon glyphicon-hdd"></span><span class="dtl">&nbsp;{{ _('Servers') }}</span>
<span class="glyphicon glyphicon-hdd" aria-hidden="true"></span><span class="dtl">&nbsp;{{ _('Servers') }}</span>
</a>
</li>
{% if server -%}
<li class="detail {% if clients %}active{% endif %}">
<a href="{{ url_for('view.clients', server=server) }}">
<span class="glyphicon glyphicon-tasks"></span><span class="dtl">&nbsp;Clients</span>
<i class="fa fa-tasks" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('Clients') }}</span>
</a>
</li>
{% endif -%}
{% else -%}
<li class="detail {% if clients %}active{% endif %}">
<a href="{{ url_for('view.home') }}">
<span class="glyphicon glyphicon-tasks"></span><span class="dtl">&nbsp;Clients</span>
<i class="fa fa-tasks" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('Clients') }}</span>
</a>
</li>
{% endif -%}
{% if config.STANDALONE or server or me -%}
<li class="detail {% if settings %}active{% endif %}">
<a href="{{ url_for('view.settings', server=server) }}">
<span class="glyphicon glyphicon-wrench"></span><span class="dtl">&nbsp;{{ _('Settings') }}</span>
<i class="fa fa-wrench" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('Settings') }}</span>
</a>
</li>
{% endif -%}
<li class="detail {% if live %}active{% endif %}">
<a href="{{ url_for('view.live_monitor', server=server) }}">
<span id="toblink" class="glyphicon glyphicon-screenshot"></span><span class="dtl">&nbsp;{{ _('Live monitor') }}</span>
<i class="fa fa-terminal" id="toblink" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('Live monitor') }}</span>
</a>
</li>
{% if current_user and current_user.is_authenticated -%}
......@@ -54,25 +54,25 @@
<!--
<li class="detail {% if admin %}active{% endif %}">
<a href="{{ url_for('view.admin') }}">
<span class="glyphicon glyphicon-cog"></span><span class="dtl">&nbsp;{{ _('Administration') }}</span>
<i class="fa fa-cogs" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('Administration') }}</span>
</a>
</li>
-->
{% endif -%}
<li class="detail {% if me %}active{% endif %}">
<a href="{{ url_for('view.me') }}">
<span class="glyphicon glyphicon-user"></span><span class="dtl">&nbsp;{{ _('User settings') }}</span>
<i class="fa fa-user-circle" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('User settings') }}</span>
</a>
</li>
<li class="detail">
<a href="{{ url_for('view.logout') }}">
<span class="glyphicon glyphicon-log-out"></span><span class="dtl">&nbsp;{{ _('Logout') }}<small>({{ current_user.name }})</small></span>
<i class="fa fa-sign-out" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('Logout') }}{% if 'login' in session %}&nbsp;<small>({{ session['login'] }})</small>{% endif %}</span>
</a>
</li>
{% endif -%}
<li {% if live %}ng-click="refresh"{% endif %}>
<a id="refresh" href="#">
<span class="glyphicon glyphicon-refresh"></span><span class="hidden-md hidden-lg">&nbsp;{{ _('Refresh') }}</span>
<a id="refresh" href="#" title="{{ _('Refresh') }}">
<i class="fa fa-refresh" aria-hidden="true"></i><span class="hidden-md hidden-lg">&nbsp;{{ _('Refresh') }}</span>
</a>
</li>
{% endif -%}
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2017-03-07 11:27+0100\n"
"POT-Creation-Date: 2017-04-20 08:39+0200\n"
"PO-Revision-Date: 2016-08-25 15:19+0200\n"
"Last-Translator: Ziirish <hi+burpui@ziirish.me>\n"
"Language: fr\n"
......@@ -18,11 +18,11 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.3.4\n"
#: burpui/app.py:546
#: burpui/app.py:537
msgid "Please log in to access this page."
msgstr "Veuillez vous authentifier pour accéder à cette page."
#: burpui/app.py:549
#: burpui/app.py:540
msgid "Please reauthenticate to access this page."
msgstr "Veuillez vous ré-authentifier pour accéder à cette page."
......@@ -43,23 +43,23 @@ msgstr "Langue"
msgid "Remember me"
msgstr "Rester connecté"
#: burpui/routes.py:188 burpui/routes.py:195
#: burpui/routes.py:189 burpui/routes.py:196
msgid "Sorry, there are no running backups"
msgstr "Désolé, il n&#39;y a pas de backups"
msgstr "Désolé, il n'y a pas de backups"
#: burpui/routes.py:215 burpui/routes.py:253
#: burpui/routes.py:216 burpui/routes.py:254
msgid "Sorry, there are no restore file found for this client"
msgstr "Désolé, il n&#39;y a pas restoration prévue pour ce client"
#: burpui/routes.py:414
#: burpui/routes.py:417
msgid "Logged in successfully"
msgstr "Connecté avec succès"
#: burpui/routes.py:424
#: burpui/routes.py:427
msgid "Wrong username or password"
msgstr "Mauvais nom d&#39;utilisateur ou mot de passe"
#: burpui/routes.py:426
#: burpui/routes.py:429
msgid "Wrong CSRF token, please try again"
msgstr "Mauvais token CSRF, veuillez réessayer"
......@@ -1358,6 +1358,10 @@ msgstr "État"
msgid "Last Backup"
msgstr "Dernière sauvegarde"
#: burpui/templates/clients.html:25
msgid "Monitor"
msgstr "Moniteur"
#: burpui/templates/live-monitor.html:6 burpui/templates/topbar.html:49
msgid "Live monitor"
msgstr "Moniteur temps réél"
......@@ -1734,6 +1738,10 @@ msgstr "jamais"
msgid "now"
msgstr "maintenant"
#: burpui/templates/js/clients.js:110
msgid "view"
msgstr ""
#: burpui/templates/js/settings.js:203 burpui/templates/js/user.js:61
msgid "Saving..."
msgstr "Sauvegarde..."
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment