Revision d7d9e9eb
Respect du W3C, quelques changements de CSS, Changement du Info-Flash
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@529 b22e2e97-25c9-44ff-b637-2e5ceca36478
vigiboard/controllers/vigiboardrequest.py | ||
---|---|---|
274 | 274 |
|
275 | 275 |
# Liste des éléments pour la tête du tableau |
276 | 276 |
|
277 |
lst_title = [['',{}], [_('Date')+ '<span style="font-weight:normal">' + _('<br />[Duration]') + '</span>', {}], ['#',{'style':'text-align:center'}], [_('Host'),{}],
|
|
278 |
[_('Service Type<br />Service Name'),{}], [_('Output'),{}]]
|
|
277 |
lst_title = [['',{}], [_('Date')+ '<span style="font-weight:normal">' + _('<br />[Duration]') + '</span>', {'style':'text-align:left'}], ['#',{'title':_('Occurrence')}], [_('Host'),{'style':'text-align:left'}],
|
|
278 |
[_('Service Type<br />Service Name'),{'style':'text-align:left'}], [_('Output'),{'style':'text-align:left'}]]
|
|
279 | 279 |
lst_title.extend([[plug.name,plug.style] for plug in self.plugin]) |
280 |
lst_title.extend([['[TT]',{'style':'text-align:center'}], ['',{}]])
|
|
280 |
lst_title.extend([[_('[TT]'),{'title':_('Trouble Ticket')}], ['',{}]])
|
|
281 | 281 |
events = [lst_title] |
282 | 282 |
i = 0 |
283 | 283 |
class_tr = ['odd', 'even'] |
vigiboard/i18n/fr_FR/LC_MESSAGES/vigiboard.po | ||
---|---|---|
135 | 135 |
|
136 | 136 |
#: vigiboard/templates/vigiboard_event_table.html:123 |
137 | 137 |
msgid "Initial State:" |
138 |
msgstr "Statu initial:" |
|
138 |
msgstr "Statut initial:"
|
|
139 | 139 |
|
140 | 140 |
#: vigiboard/templates/vigiboard_event_table.html:124 |
141 | 141 |
msgid "Current State:" |
142 |
msgstr "Statu actuel:" |
|
142 |
msgstr "Statut actuel:"
|
|
143 | 143 |
|
144 | 144 |
#: vigiboard/templates/vigiboard_event_table.html:127 |
145 | 145 |
msgid "Detailed history for this event" |
vigiboard/public/css/style.css | ||
---|---|---|
269 | 269 |
background:#EEEEEE none repeat scroll 0% 0%; |
270 | 270 |
font-weight:bold; |
271 | 271 |
} |
272 |
#flash, .notice { |
|
273 |
font-size:120%; |
|
274 |
font-weight:bolder; |
|
275 |
margin:0pt auto 0.5em; |
|
276 |
width:680px; |
|
277 |
} |
|
278 |
#flash div, .notice { |
|
279 |
padding:20px 15px 20px 65px; |
|
280 |
} |
|
281 |
#flash .ok { |
|
282 |
background:#d8ecd8 url(../images/ok.png) no-repeat scroll 10px center; |
|
283 |
} |
|
284 |
#flash .warning { |
|
285 |
background:#fff483 url(../images/warning.png) no-repeat scroll 10px center; |
|
286 |
} |
|
287 |
#flash .error { |
|
288 |
background:#f9c5c1 url(../images/error.png) no-repeat scroll 10px center; |
|
289 |
} |
|
290 |
#flash .alert, |
|
291 |
#flash .info { |
|
292 |
background:#EEEEFF url(../images/info.png) no-repeat scroll 10px center; |
|
293 |
} |
|
294 |
.notice { |
|
295 |
background:#EEEEFF url(../images/info.png) no-repeat scroll 10px center; |
|
296 |
} |
|
297 |
.fielderror { |
|
298 |
color:red; |
|
299 |
font-weight:bold; |
|
300 |
} |
|
301 |
div.clearingdiv { |
|
302 |
clear:both; |
|
303 |
} |
vigiboard/public/css/vigiboard_style.css | ||
---|---|---|
20 | 20 |
border-collapse: collapse; |
21 | 21 |
} |
22 | 22 |
|
23 |
.vigitable thead { |
|
24 |
text-align: center; |
|
25 |
} |
|
26 |
|
|
23 | 27 |
.vigitable thead tr td { |
24 | 28 |
padding: 0px; |
29 |
background-color: #4682b4; |
|
30 |
color:white; |
|
31 |
} |
|
32 |
|
|
33 |
.vigitable thead tr th { |
|
34 |
padding: 4px 10px; |
|
35 |
background-color: #EBECF0; |
|
36 |
font-weight: bold; |
|
25 | 37 |
} |
26 | 38 |
|
27 | 39 |
.vigitable tbody tr { |
28 |
border-style: solid; |
|
29 |
border-width: 1px 1px 1px 1px; |
|
30 |
border-color: #FFFFFF; |
|
40 |
border: solid 1px white; |
|
31 | 41 |
empty-cells: show; |
32 | 42 |
} |
33 | 43 |
|
34 | 44 |
.vigitable tbody tr td { |
35 |
border-style: solid; |
|
36 |
border-width: 1px 1px 1px 1px; |
|
37 |
border-color: #FFFFFF; |
|
38 |
padding: 3px 10px 3px 10px; |
|
45 |
border: solid 1px white; |
|
46 |
padding: 3px 10px; |
|
39 | 47 |
empty-cells: show; |
40 | 48 |
} |
41 | 49 |
|
... | ... | |
94 | 102 |
margin: 0px; |
95 | 103 |
} |
96 | 104 |
|
105 |
#flash { |
|
106 |
display: none; |
|
107 |
} |
|
97 | 108 |
#flash, .notice { |
98 | 109 |
font-size:120%; |
99 | 110 |
font-weight:bolder; |
100 | 111 |
margin:0pt auto 0.5em; |
101 |
width:680px; |
|
112 |
margin-left: 26px; |
|
113 |
width:400px; |
|
114 |
position: absolute; |
|
102 | 115 |
} |
103 | 116 |
#flash div, .notice { |
104 |
padding:20px 15px 20px 65px;
|
|
117 |
padding:8px 7px 6px 40px;
|
|
105 | 118 |
} |
106 | 119 |
#flash .ok { |
107 |
background:#d8ecd8 url(../images/ok.png) no-repeat scroll 10px center;
|
|
120 |
background:#d8ecd8 url(../images/ok.png) no-repeat scroll 0px center; |
|
108 | 121 |
} |
109 | 122 |
#flash .warning { |
110 |
background:#fff483 url(../images/warning.png) no-repeat scroll 10px center;
|
|
123 |
background:#fff483 url(../images/warning.png) no-repeat scroll 0px center; |
|
111 | 124 |
} |
112 | 125 |
#flash .error { |
113 |
background:#f9c5c1 url(../images/error.png) no-repeat scroll 10px center;
|
|
126 |
background:#f9c5c1 url(../images/error.png) no-repeat scroll 0px center; |
|
114 | 127 |
} |
115 | 128 |
#flash .alert, |
116 | 129 |
#flash .info { |
117 |
background:#EEEEFF url(../images/info.png) no-repeat scroll 10px center;
|
|
130 |
background:#EEEEFF url(../images/info.png) no-repeat scroll 0px center; |
|
118 | 131 |
} |
119 | 132 |
.notice { |
120 |
background:#EEEEFF url(../images/info.png) no-repeat scroll 10px center;
|
|
133 |
background:#EEEEFF url(../images/info.png) no-repeat scroll 0px center; |
|
121 | 134 |
} |
122 | 135 |
.fielderror { |
123 | 136 |
color:red; |
vigiboard/templates/vigiboard.html | ||
---|---|---|
14 | 14 |
|
15 | 15 |
<body> |
16 | 16 |
|
17 |
<table class="table_top"> |
|
17 |
<table class="table_top" summary="Barre Outils">
|
|
18 | 18 |
<tr> |
19 | 19 |
<td style="width: 20%;text-align: left;"> |
20 |
<a py:if="tg.config['vigiboard_links.logo'] != ''" href="${tg.config['vigiboard_links.logo']}"><img alt="logo" src="${tg.url('/images/vigilo.png')}" style="width:58px;"/></a> |
|
21 |
<a py:if="tg.config['vigiboard_links.logo'] == ''" href="${tg.url('/')}"><img alt="logo" src="${tg.url('/images/vigilo.png')}" style="width:58px;"/></a> |
|
20 |
<a py:if="tg.config['vigiboard_links.logo'] != ''" href="${tg.config['vigiboard_links.logo']}"><img alt="logo" title="Logo" src="${tg.url('/images/vigilo.png')}" style="width:58px;"/></a>
|
|
21 |
<a py:if="tg.config['vigiboard_links.logo'] == ''" href="${tg.url('/')}"><img alt="logo" title="Logo" src="${tg.url('/images/vigilo.png')}" style="width:58px;"/></a>
|
|
22 | 22 |
v${tg.config['vigiboard_version']}</td> |
23 | 23 |
<td style="text-align: center"> |
24 | 24 |
<span py:if="search == 1" style="color:rgb(70, 130, 180)"> |
25 | 25 |
Mode recherche, <a href="${tg.url('/')}" style="color:rgb(70, 130, 180); text-decoration: underline;">cliquer ici</a> pour revenir au mode initial. |
26 | 26 |
</span> |
27 | 27 |
</td> |
28 |
<td style="width: 20%;text-align: right;"><a href="${tg.url('/')}">Accueil</a>
|
|
28 |
<td style="width: 20%;text-align: right;"><a href="${tg.url('/')}"><img alt="accueil" title="Accueil" src="${tg.url('/images/home.gif')}" /></a>
|
|
29 | 29 |
<a id="SearchLien" href="javascript:vigiboard_searchdialog()"> |
30 |
<img src="${tg.url('/images/filter.png')}" /> |
|
30 |
<img src="${tg.url('/images/filter.png')}" alt="filtrer" title="Filtrer"/>
|
|
31 | 31 |
</a> |
32 | 32 |
</td> |
33 | 33 |
</tr> |
... | ... | |
39 | 39 |
<div class="main_content"> |
40 | 40 |
${event_table(events,page,pages,id_first_row,id_last_row,total_row,event_edit_status_options,history,hist_error)} |
41 | 41 |
</div> |
42 |
|
|
42 |
<script type="text/javascript"> |
|
43 |
$("#flash").show("slow",function(){ |
|
44 |
setTimeout('$("#flash").hide("slow")',5000); |
|
45 |
}); |
|
46 |
</script> |
|
43 | 47 |
</body> |
44 | 48 |
</html> |
vigiboard/templates/vigiboard_event_table.html | ||
---|---|---|
9 | 9 |
<?python from genshi import HTML ?> |
10 | 10 |
|
11 | 11 |
<py:if test="len(events) > 1"> |
12 |
<table class="vigitable"> |
|
12 |
<table class="vigitable" summary="Tableau des évènements">
|
|
13 | 13 |
|
14 | 14 |
<thead> |
15 | 15 |
<tr > |
16 |
<td style="width:26px;background-color: rgb(70, 130, 180);">
|
|
17 |
<a py:if="page > pages[0]" href="${tg.url('/%d' % (page-1))}"><img src="${tg.url('/images/fleche_up.png')}" alt="" /></a>
|
|
18 |
<img py:if="page == pages[0]" src="${tg.url('/images/fleche_up.png')}" alt="" /> |
|
16 |
<td style="width:26px"> |
|
17 |
<a py:if="page > pages[0]" href="${tg.url('/%d' % (page-1))}"><img src="${tg.url('/images/fleche_up.png')}" alt="up" title="page précédente"/></a>
|
|
18 |
<img py:if="page == pages[0]" src="${tg.url('/images/fleche_up.png')}" alt="up" title="page précédente" />
|
|
19 | 19 |
</td> |
20 |
<td colspan="${8+len(events[1][6])}" style="width:100%;background-color:#4682B4;color:white;text-align:center">Showing rows ${id_first_row} to ${id_last_row} of ${total_row}<br />
|
|
20 |
<td colspan="${8+len(events[1][6])}">Showing rows ${id_first_row} to ${id_last_row} of ${total_row}<br /> |
|
21 | 21 |
Pages <py:for each="p in pages"> |
22 | 22 |
<a py:if="p != page" href="${tg.url('/%d' % p)}" py:content="p" /> |
23 | 23 |
<span py:if="p == page" py:replace="p" /> |
24 | 24 |
</py:for> |
25 | 25 |
</td> |
26 | 26 |
<td style="width:26px"> |
27 |
<a py:if="pages[-1] > page" href="${tg.url('/%d' % (page+1))}"><img src="${tg.url('/images/fleche_down.png')}" alt="" /></a>
|
|
28 |
<img py:if="page == pages[-1]" src="${tg.url('/images/fleche_down.png')}" alt="" />
|
|
27 |
<a py:if="pages[-1] > page" href="${tg.url('/%d' % (page+1))}"><img src="${tg.url('/images/fleche_down.png')}" alt="down" title="page suivante"/></a>
|
|
28 |
<img py:if="page == pages[-1]" src="${tg.url('/images/fleche_down.png')}" alt="down" title="page suivante" />
|
|
29 | 29 |
</td> |
30 | 30 |
</tr> |
31 | 31 |
|
32 |
<tr style="background-color:#F8F8F8;font-weight: bold">
|
|
32 |
<tr> |
|
33 | 33 |
<py:for each="(pname,pstyle) in events[0]"> |
34 |
<td style="padding: 5px;" py:attrs="pstyle">${HTML(pname)}</td>
|
|
34 |
<th style="padding: 5px;" py:attrs="pstyle">${HTML(pname)}</th>
|
|
35 | 35 |
</py:for> |
36 |
<td style="text-align: center;" ><a class="Edit_EventsLien" href="javascript:vigiboard_edit_eventdialog('all')"><img src="${tg.url('/images/icon_page_edit.png')}" /></a></td>
|
|
37 |
<td style="text-align: center;"><input id="vigiboard_checkall_checkbox" type="checkbox" onclick="javascript:vigiboard_checkall()" /></td>
|
|
36 |
<th><a class="Edit_EventsLien" href="javascript:vigiboard_edit_eventdialog('all')"><img src="${tg.url('/images/icon_page_edit.png')}" alt="edit_all" title="Editer tous les évènements sélectionnés"/></a></th>
|
|
37 |
<th style="padding:3px;"><input id="vigiboard_checkall_checkbox" type="checkbox" onclick="javascript:vigiboard_checkall()" /></th>
|
|
38 | 38 |
</tr> |
39 | 39 |
</thead> |
40 | 40 |
|
... | ... | |
42 | 42 |
|
43 | 43 |
<py:for each="(event,class_tr,class_td_severity,class_td_date,img_fleche,img_statu,plugin) in events[1:]"> |
44 | 44 |
<tr py:attrs="class_tr"> |
45 |
<td style="padding: 3px;" py:attrs="class_td_severity"><a href="javascript:vigiboard_historydialog('${event.idevent}')" class="HistoryLien"><img src="${tg.url(img_fleche['src'])}" style="width:20px"/></a></td> |
|
45 |
<td style="padding: 3px;" py:attrs="class_td_severity"><a href="javascript:vigiboard_historydialog('${event.idevent}')" class="HistoryLien"><img src="${tg.url(img_fleche['src'])}" style="width:20px" alt="detail" title="Détails sur l'évènement" /></a></td>
|
|
46 | 46 |
<td py:attrs="class_td_date"><span style="font-weight: bold;">${event.get_date('timestamp_active')}</span><br />[${event.get_since_date('timestamp_active')}]</td> |
47 | 47 |
<td py:attrs="class_td_date" style="text-align:center">${event.occurence}</td> |
48 | 48 |
<td>${event.hostname}</td> |
49 | 49 |
<td>${event.servicename}</td> |
50 | 50 |
<td>${event.output}</td> |
51 | 51 |
<td py:for="plug in plugin" py:attrs="plug[1]">${HTML(plug[0])}</td> |
52 |
<td style="text-align: center"><a href="${ |
|
52 |
<td style="text-align: center"><a py:if="event.trouble_ticket is not None" href="${
|
|
53 | 53 |
tg.config['vigiboard_links.tt'] % { |
54 | 54 |
'idevent' : event.idevent, |
55 | 55 |
'host' : event.hostname, |
56 | 56 |
'service' : event.servicename, |
57 |
'tt' : event.trouble_ticket }}">${event.trouble_ticket}</a></td>
|
|
58 |
<td style="text-align: center"><img py:attrs="img_statu" py:if="img_statu != None" /></td> |
|
59 |
<td py:attrs="class_td_date" style="text-align: center"><a class="Edit_EventsLien" href="javascript:vigiboard_edit_eventdialog('${event.idevent}')"><img src="${tg.url('/images/icon_page_edit.png')}" /></a></td> |
|
60 |
<td py:attrs="class_td_date" style="text-align: center"><input type="checkbox" class="Edit_EventsCheckBox" value="${event.idevent}"/></td> |
|
57 |
'tt' : event.trouble_ticket }}">[${event.trouble_ticket}]</a></td>
|
|
58 |
<td style="text-align: center"><img py:attrs="img_statu" py:if="img_statu != None" alt="statut" title="Statut de l'évènement"/></td>
|
|
59 |
<td py:attrs="class_td_date" style="text-align: center"><a class="Edit_EventsLien" href="javascript:vigiboard_edit_eventdialog('${event.idevent}')"><img src="${tg.url('/images/icon_page_edit.png')}" alt="edit" title="Editer cet élément"/></a></td>
|
|
60 |
<td py:attrs="class_td_date" style="padding: 3px;text-align: center"><input type="checkbox" class="Edit_EventsCheckBox" value="${event.idevent}"/></td>
|
|
61 | 61 |
|
62 | 62 |
</tr> |
63 | 63 |
<py:if test="hist_error == True"> |
... | ... | |
138 | 138 |
Initial State: <span id="HistoryDialog_initial_state" /><br /> |
139 | 139 |
Current State: <span id="HistoryDialog_current_state" /><br /> |
140 | 140 |
<ul> |
141 |
<li><a id="HistoryDialog_detailed_event" href="" >Detailed history for this event</a></li> |
|
142 |
<li><a id="HistoryDialog_detailed_host" href="" >Detailed history for this host/service</a></li> |
|
141 |
<li><a id="HistoryDialog_detailed_event" href="#" >Detailed history for this event</a></li>
|
|
142 |
<li><a id="HistoryDialog_detailed_host" href="#" >Detailed history for this host/service</a></li>
|
|
143 | 143 |
<li py:for="edname, edit in tg.config['vigiboard_links.eventdetails'].iteritems()"> |
144 |
<a href="" id="HistoryDialog_${edname}">${edit[0]}</a> |
|
144 |
<a href="#" id="HistoryDialog_${edname}">${edit[0]}</a>
|
|
145 | 145 |
</li> |
146 | 146 |
</ul> |
147 | 147 |
</div> |
... | ... | |
161 | 161 |
<thead> |
162 | 162 |
<tr > |
163 | 163 |
<td style="width:26px;background-color: rgb(70, 130, 180);"> |
164 |
<img src="${tg.url('/images/fleche_up.png')}" alt="" />
|
|
164 |
<img src="${tg.url('/images/fleche_up.png')}" alt="up" title="Page précédente"/>
|
|
165 | 165 |
</td> |
166 | 166 |
<td colspan="9" style="width:100%;background-color:#4682B4;color:white;text-align:center">Showing rows 0 to 0 of 0<br /> |
167 | 167 |
Page 0 |
168 | 168 |
</td> |
169 | 169 |
<td style="width:26px"> |
170 |
<img src="${tg.url('/images/fleche_down.png')}" alt="" /> |
|
170 |
<img src="${tg.url('/images/fleche_down.png')}" alt="down" title="Page suivante" />
|
|
171 | 171 |
</td> |
172 | 172 |
</tr> |
173 | 173 |
|
... | ... | |
175 | 175 |
<py:for each="(pname,pstyle) in events[0]"> |
176 | 176 |
<td py:attrs="pstyle">${HTML(pname)}</td> |
177 | 177 |
</py:for> |
178 |
<td style="text-align: center;"><img src="${tg.url('/images/icon_page_edit.png')}" /></td> |
|
178 |
<td style="text-align: center;"><img src="${tg.url('/images/icon_page_edit.png')}" alt="edit_all" title="Editer tous les évènements sélectionnés"/></td>
|
|
179 | 179 |
<td style="text-align: center;"><input id="vigiboard_checkall_checkbox" type="checkbox" /></td> |
180 | 180 |
</tr> |
181 | 181 |
</thead> |
vigiboard/templates/vigiboard_history_table.html | ||
---|---|---|
9 | 9 |
</p> |
10 | 10 |
|
11 | 11 |
<py:if test="history and len(history) > 0"> |
12 |
<table style="width: 100%;margin-bottom: 30px;"> |
|
12 |
<table style="width: 100%;margin-bottom: 30px;" summary="Historique de l'élément">
|
|
13 | 13 |
<thead> |
14 | 14 |
<tr style="background-color:#F8F8F8;font-weight:bold"> |
15 | 15 |
<td>Time</td> |
vigiboard/templates/vigiboard_plugin/shn.html | ||
---|---|---|
4 | 4 |
|
5 | 5 |
|
6 | 6 |
<div id="SHNDialog"> |
7 |
<ul id="SHNDialog_liste" /> |
|
7 |
<ul id="SHNDialog_liste"> |
|
8 |
<li>.</li> |
|
9 |
</ul> |
|
8 | 10 |
</div> |
9 | 11 |
|
10 | 12 |
<script type="text/javascript" src="${tg.url('/javascript/vigiboard_plugin/shn.js')}" ></script> |
vigiboard/widgets/edit_event.py | ||
---|---|---|
26 | 26 |
TextField('trouble_ticket',label_text=_('Touble Ticket')), |
27 | 27 |
SingleSelectField('status',options=edit_event_status_options) |
28 | 28 |
] |
29 |
|
|
30 | 29 |
submit_text = _('Apply') |
31 | 30 |
|
32 | 31 |
class SearchForm(TableForm): |
Also available in: Unified diff