vigiboard / vigiboard / templates / vigiboard.html @ 8484b8bd
History | View | Annotate | Download (4.22 KB)
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
---|---|
2 |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml" |
4 |
xmlns:py="http://genshi.edgewall.org/" |
5 |
xmlns:xi="http://www.w3.org/2001/XInclude"> |
6 |
|
7 |
<xi:include href="vigiboard_event_table.html" /> |
8 |
|
9 |
<head>
|
10 |
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> |
11 |
<title>Vigiboard</title> |
12 |
<link rel="stylesheet" type="text/css" href="${tg.url('/css/vigiboard_style.css')}" /> |
13 |
</head>
|
14 |
|
15 |
<body style="font-size:${tg.session.get('fontsize',tg.config['vigiboard_font.size'])}"> |
16 |
|
17 |
<table class="table_top" summary="Toolbar"> |
18 |
<tr>
|
19 |
<td>
|
20 |
<a py:if="tg.config.get('vigiboard_links.logo')" href="${tg.config['vigiboard_links.logo']}"><img alt="" src="${tg.url('/images/vigilo.png')}" style="width:58px;"/></a> |
21 |
<a py:if="not tg.config.get('vigiboard_links.logo')" href="${tg.url('/')}"><img alt="" src="${tg.url('/images/vigilo.png')}" style="width:58px;"/></a> |
22 |
v${tg.config['vigiboard_version']} |
23 |
</td>
|
24 |
|
25 |
<td style="margin-left: 30px; float: right"> |
26 |
<a href="${tg.url('/')}"> |
27 |
<img src="${tg.url('/images/home.gif')}" alt="Home" title="Home" /> |
28 |
</a>
|
29 |
<a id="SearchLien" href="javascript:vigiboard_searchdialog()"> |
30 |
<img src="${tg.url('/images/filter.png')}" alt="Filter display" title="Filter display"/> |
31 |
</a>
|
32 |
<a href="${tg.url('/logout_handler')}"> |
33 |
<img src="${tg.url('/images/logout.png')}" alt="Log out" title="Log out"/> |
34 |
</a>
|
35 |
</td>
|
36 |
|
37 |
<td style="margin-left: 30px; margin-top: 4px; float: right"> |
38 |
<a href="javascript:change_fontsize('5px')"><img alt="Default font size" title="Default font size" src="${tg.url('/images/icn_text_sm.png')}" /></a> |
39 |
<a href="javascript:change_fontsize('10px')"><img alt="Medium font size" title="Medium font size" src="${tg.url('/images/icn_text_md.png')}" /></a> |
40 |
<a href="javascript:change_fontsize('25px')"><img alt="Large font size" title="Large font size" src="${tg.url('/images/icn_text_lg.png')}" /></a> |
41 |
</td>
|
42 |
|
43 |
<td style="margin-left: 30px; float: right"> |
44 |
<select id="refresh_time" class="refresh_select"> |
45 |
<option value="0">Never</option> |
46 |
<option value="30000">30 Secondes</option> |
47 |
<option value="60000">1 Minute</option> |
48 |
<option value="300000">5 Minutes</option> |
49 |
<option value="600000">10 Minutes</option> |
50 |
</select>
|
51 |
<input type="button" id="refresh_button" class="refresh_button" onclick="javascript:change_refresh($('#refresh_time').val())" value="[${_('Start')}]" /> |
52 |
</td>
|
53 |
|
54 |
<td style="margin-top: 8px; float: right"> |
55 |
<span py:if="search['host'] or search['service'] or search['output'] or search['tt']" style="color: rgb(70, 130, 180)"> |
56 |
<a href="${tg.url('/')}" style="color:rgb(70, 130, 180); text-decoration: underline;">${_('You are in Search mode, click here to return to the initial mode.')}</a> |
57 |
</span>
|
58 |
</td>
|
59 |
</tr>
|
60 |
</table>
|
61 |
|
62 |
<py:with vars="flash=tg.flash_obj.render('flash', use_js=False)"> |
63 |
<div py:if="flash" py:content="XML(flash)" /> |
64 |
</py:with>
|
65 |
<div class="main_content"> |
66 |
${event_table(events,page,pages,rows_info,event_edit_status_options,history,hist_error,search)} |
67 |
</div>
|
68 |
<script type="text/javascript"> |
69 |
$("#flash").show("slow",function(){
|
70 |
setTimeout('$("#flash").hide("slow")',5000);
|
71 |
});
|
72 |
function change_fontsize(size) {
|
73 |
document.body.style.fontSize = size;
|
74 |
$.getJSON("${tg.url('/set_fontsize')}",{'fontsize':size},function(json){
|
75 |
if (json.ret == 'fail')
|
76 |
alert("${_('Unable to save preferences')}");
|
77 |
})
|
78 |
}
|
79 |
var refresh_timeout;
|
80 |
function change_refresh_rate(timeout) {
|
81 |
if (timeout != 0) {
|
82 |
if (refresh_timeout) {
|
83 |
clearTimeout(refresh_timeout);
|
84 |
refresh_timeout = null;
|
85 |
$('#refresh_time').removeAttr('disabled');
|
86 |
$('#refresh_button').attr('value','[Start]');
|
87 |
} else {
|
88 |
refresh_timeout = setTimeout('window.location.reload(true)',timeout);
|
89 |
$('#refresh_time').attr("disabled", "disabled");
|
90 |
$('#refresh_button').attr('value','[${_('Stop')}]');
|
91 |
}
|
92 |
}
|
93 |
}
|
94 |
function change_refresh(timeout) {
|
95 |
$.getJSON("${tg.url('/set_refresh')}",{'refresh':timeout},function(json){});
|
96 |
change_refresh_rate(timeout);
|
97 |
}
|
98 |
<py:if test="tg.session.get('refresh','0') != '0'">
|
99 |
change_refresh_rate(${tg.session.get('refresh',0)});
|
100 |
</py:if>
|
101 |
</script>
|
102 |
</body>
|
103 |
</html>
|