-
Notifications
You must be signed in to change notification settings - Fork 0
/
ct-covid-dash-business-cont.html
executable file
·194 lines (160 loc) · 7.96 KB
/
ct-covid-dash-business-cont.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>City of Cape Town Covid-19 Dashboard</title>
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/ct-covid-dash.css">
<script src="assets/js/lazysizes.min.js" async=""></script>
</head>
<body class="bg-dark">
<video id="backgroundVideo" autoplay="autoplay" muted="muted" loop="loop">
<source id="backgroundVideoSrc" src="" type="video/mp4">
</video>
<div id="navbarPlaceholder"></div>
<div class="container-fluid" id="overlay">
<div class="row row-cols-1">
<div class="col" id="disclaimer">
</div>
</div>
<div class="row row-cols-3 mt-1" style="height:11vh;min-height:6em">
<div class="col h-100 w-100" id="lastUpdatedStatCard"> </div>
<div class="col h-100 w-100" id="staffWorkingStatCard"> </div>
<div class="col h-100 w-100" id="staffAssessedStatCard"> </div>
</div>
<div class="container-fluid p-0" style="height:73vh;">
<div class="row mt-2 row-cols-2" style="height:49%">
<div class="col h-100" id="BCSickPlot"></div>
<div class="col h-100" id="BCFacilityLocationMap"></div>
</div>
<div class="row" style="height:1%"></div>
<div class="row mt-2 row-cols-2" style="height:49%">
<div class="col h-100" id="serviceRequestPlot"></div>
<div class="col h-100" id="financePlot"></div>
</div>
</div>
<div class="row row-cols-1 mt-3" style="height: 88vh">
<div class="col h-100" id="hrOrgUnitStatus"></div>
</div>
<div class="row row-cols-1 mt-3" style="height: 88vh">
<div class="col h-100" id="sRVolumeDetail"></div>
</div>
<div class="row row-cols-1 mt-3" style="height: 88vh">
<div class="col h-100" id="sROpenRequestDetail"></div>
</div>
<div class="row row-cols-1 mt-3" style="height: 88vh">
<div class="col h-100" id="sRAllRequestDetail"></div>
</div>
<div id="footerPlaceholder"></div>
</div>
<!-- bootstrap scripts -->
<script src="assets/js/jquery-3.4.1.min.js"></script>
<!-- custom code for dynamically updating data -->
<script src="assets/js/numeral.min.js"></script>
<script src="assets/js/update_dash.js"></script>
<script>
$(() => {
$.ajaxSetup({ cache: false });
addNavbar("navbarPlaceholder");
var lastUpdateTextDiv = addStatCard("lastUpdatedStatCard", "assets/imgs/clock-regular.svg", "Last Updated");
var staffWorkingTextDiv = addStatCard("staffWorkingStatCard", "assets/imgs/cogs-solid.svg",
"Staff Working / Assessed");
var staffAssessedTextDiv = addStatCard("staffAssessedStatCard", "assets/imgs/clipboard-regular.svg",
"Staff Assessed using HR Form");
setStatCardValue(lastUpdateTextDiv, 'widgets/private/business_continuity_city_values.json',
'city_last_updated');
setStatCardValueFractions(staffWorkingTextDiv, 'widgets/private/business_continuity_city_values.json',
'city_staff_at_work', 'city_staff_reported', true);
setStatCardValueFractions(staffAssessedTextDiv, 'widgets/private/business_continuity_city_values.json',
'city_staff_reported', 'city_staff_assessed', true);
addDisclaimerAlert("disclaimer");
addCard("BCSickPlot", "widgets/private/business_continuity_city_hr_absenteeism_plot.html", 'HR Capacity <small><a class="text-white" href="#hrOrgUnitStatus">(<u>more detail</u>)</a></small>');
addCard("BCFacilityLocationMap", "widgets/private/business_continuity_facility_location_counts.html", "City Facility Locations (with headcounts)");
addCard("serviceRequestPlot", "widgets/private/business_continuity_city_service_request_count_plot.html", 'Service Requests over Time <small><a class="text-white" href="#sRVolumeDetail">(<u>more detail</u>)</a></small>');
addCard("financePlot", "widgets/private/business_continuity_line_finance_plot.html", "City Financial Flows");
addCard("hrOrgUnitStatus", "widgets/private/business_continuity_city_hr_unitstatus_plot.html", "Organisational Unit Status");
addTabbedCard("sRVolumeDetail",
[
{
tabId: "mapTab_last_week_city",
iframeLink: "widgets/private/business_continuity_service_request_map/last_week_city_map.html",
titleString: "Last Week"
},
{
tabId: "mapTab_last_day_city",
iframeLink: "widgets/private/business_continuity_service_request_map/last_day_city_map.html",
titleString: "Last Day"
},
{
tabId: "mapTab_last_month_city",
iframeLink: "widgets/private/business_continuity_service_request_map/last_month_city_map.html",
titleString: "Last Month"
},
{
tabId: "mapTab_since_sod_city",
iframeLink: "widgets/private/business_continuity_service_request_map/since_sod_city_map.html",
titleString: "Since 2020-03-15"
}
],
"Service Requests over Space"
);
addTabbedCard("sROpenRequestDetail",
[
{
tabId: "mapTab_last_week_city",
iframeLink: "widgets/private/business_continuity_service_request_map/last_week_city_open_focused_map.html",
titleString: "Last Week"
},
{
tabId: "mapTab_last_day_city",
iframeLink: "widgets/private/business_continuity_service_request_map/last_day_city_open_focused_map.html",
titleString: "Last Day"
},
{
tabId: "mapTab_last_month_city",
iframeLink: "widgets/private/business_continuity_service_request_map/last_month_city_open_focused_map.html",
titleString: "Last Month"
},
{
tabId: "mapTab_since_sod_city",
iframeLink: "widgets/private/business_continuity_service_request_map/since_sod_city_open_focused_map.html",
titleString: "Since 2020-03-15"
}
],
"Open Service Requests over Space"
);
addTabbedCard("sRAllRequestDetail",
[
{
tabId: "mapTab_last_week_city",
iframeLink: "widgets/private/business_continuity_service_request_map/last_week_city_focused_map.html",
titleString: "Last Week"
},
{
tabId: "mapTab_last_day_city",
iframeLink: "widgets/private/business_continuity_service_request_map/last_day_city_focused_map.html",
titleString: "Last Day"
},
{
tabId: "mapTab_last_month_city",
iframeLink: "widgets/private/business_continuity_service_request_map/last_month_city_focused_map.html",
titleString: "Last Month"
},
{
tabId: "mapTab_since_sod_city",
iframeLink: "widgets/private/business_continuity_service_request_map/since_sod_city_focused_map.html",
titleString: "Since 2020-03-15"
}
],
"All Service Requests over Space"
);
addFooter("footerPlaceholder")
setTimeout(function() {
addBackgroundVideoSrc("backgroundVideoSrc", "backgroundVideo", "assets/imgs/ct_timelapse.mp4");
}, 10000);
});
</script>
<script src="assets/js/popper.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
</body>
</html>