forked from HappyFaceMonitoring/HappyFaceModules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Apel.html
46 lines (45 loc) · 1.79 KB
/
Apel.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
## -*- coding: utf-8 -*-
<%inherit file="/module_base.html" />
<%def name="content()">
% if not details:
<p>List empty! Last build date of the <a href=${source_html_link}>Apel web page</a>: ${module.dataset['last_build']}</p>
% else:
% if module.dataset['status'] == 1:
<p>All records are OK! Last build date of the <a href=${source_html_link}>Apel web page</a>: ${module.dataset['last_build']}</p>
% endif
<table class="TableData">
<tr class="TableHeader">
<td>Record Start</td>
<td>Record End</td>
<td>Count Database</td>
<td>Count Published</td>
<td>Synchronization Status</td>
</tr>
% for index, detail in enumerate(details):
% if index == 0:
% if (detail['sync_status'].lower())[0:2] == 'ok' and module.dataset['status'] == 1:
<tr bgcolor=#AAFFAA>
% elif (detail['sync_status'].lower())[0:4] == 'warn' or module.dataset['status'] == 0.5:
<tr bgcolor=#FFFF96>
% else:
<tr bgcolor=#FF6464>
% endif
% else:
% if (detail['sync_status'].lower())[0:2] == 'ok':
<tr bgcolor=#AAFFAA>
% elif (detail['sync_status'].lower())[0:4] == 'warn':
<tr bgcolor=#FFFF96>
% else:
<tr bgcolor=#FF6464>
% endif
% endif
<td>${detail['record_start'].strftime("%Y-%m-%d")}</td>
<td>${detail['record_end'].strftime("%Y-%m-%d")}</td>
<td>${detail['record_count_database']}</td>
<td>${detail['record_count_published']}</td>
<td>${detail['sync_status']}</td>
</tr>
% endfor
</table>
% endif
</%def>