-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis.html
546 lines (469 loc) · 11.3 KB
/
analysis.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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
<!-- popup.html -->
<!DOCTYPE html>
<!-- Add in:
- PDF Viewer (from Base64 encoded)
- Options page link
- Trace Show/Hide based on current page
-->
<html>
<head>
<script src="chartjs/chart.umd.js"></script>
<script src="chartjs/chartjs-adapter-date-fns.bundle.min.js"> </script>
<script src="chartjs/chartjs-plugin-datalabels.min.js"></script>
<script src="chartjs/hammer.min.js"></script>
<script src="chartjs/chartjs-plugin-zoom.min.js"></script>
<link rel="stylesheet" href="css/button.css">
<style>
:root {
--Max-Height: 500px;
}
html {
min-height: 5em;
min-width: 20em;
background: #ffffff;
}
body {
margin: 0px;
}
.padding-div {
padding-left: 10px;
padding-right: 10px;
}
.padding-div-charts {
padding-left: 2%;
padding-right: 2%;
}
.chart-row {
display: flex;
gap: 20px;
flex-wrap: wrap;
justify-content: center;
margin-top: 20px;
min-height: 500px;
}
.chart-row.time {
max-height: 600px;
min-height: 400px;
display: block;
}
.chart-row-control {
display: flex;
top: 0px;
/* margin-left: 10%; */
gap: 20px;
padding-bottom: 5px;
padding-top: 5px;
width: 100%;
/* flex-wrap: wrap; */
min-height: 20px;
border-bottom: #c6c6c6 1px solid;
align-items: flex-start;
justify-content: center;
z-index: 100;
background-color: #e8e8e8;
}
.chart-row-control .dynamicChartControlBox {
justify-content: center;
position: fixed;
height: 20px;
min-height: 20px;
}
.chart-row-control .dynamicChartControlBox ul {
padding-left: 10px;
padding-right: 20px;
}
.chartContainer {
flex: 1 1 400px;
min-width: 300px;
max-width: 100%;
box-sizing: border-box;
border-radius: 5px;
background-color: #f7f7f7;
position: relative;
}
.chartContainerMain {
box-sizing: border-box;
border-radius: 5px;
background-color: #f7f7f7;
display: flex;
gap: 10px;
align-items: flex-start;
justify-content: center;
position: relative;
}
.chartContainerMain .chart {
flex: 2;
max-height: var(--Max-Height, 400px);
min-height: 400px;
max-width: 100%;
min-width: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.chartContainerMain .controls {
flex: 1; /* 1/3 of the available space */
max-width: 33.33%; /* Limit to 1/3 width */
min-width: 200px; /* Optional: minimum width for small screens */
box-sizing: border-box;
}
/*
.chart-row.time .chartContainerMain .messageBtnBar {
display: block;
position: absolute;
right: 0px;
top: 0px;
}*/
/* Media query for smaller screens & resize */
@container (width < 800px) {
.chart-row {
max-height: 300px;
min-height: 200px;
}
.chart-row.time {
max-height: 300px;
min-height: 200px;
}
}
@container (height < 1000px) {
.chart-row {
max-height: 300px;
min-height: 200px;
}
.chart-row.time {
max-height: 300px;
min-height: 200px;
}
}
canvas {
width: 100% !important; /* Ensures the canvas scales with the container */
height: 100% !important; /* Important to fill container height */
max-height: var(--Max-Height, 500px);
}
/* Style the buttons that are used to open and close the accordion panel */
.accordion {
background-color: #eaeaea;
color: #444;
cursor: pointer;
padding: 18px;
width: 100%;
text-align: left;
border: none;
border-radius: 5px;
outline: none;
transition: 0.4s;
}
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active, .accordion:hover {
background-color: #ccc;
}
/* Style the accordion panel. Note: hidden by default */
.panel {
padding: 0 18px;
background-color: white;
display: none;
overflow: hidden;
}
.pageContainerDiv {
padding: 5px;
padding-right: 20px;
border: 1px solid lightgrey;
text-underline-position: under;
text-decoration: none;
border-radius: 5px;
margin-top: 5px;
position: relative;
}
.active, .pageContainerDiv:hover {
background-color: #ccc;
}
.pageContainerDiv p {
margin: 0px;
color: grey;
}
.pageContainerDiv a {
text-decoration: none;
}
.closeBtnDelete {
background-color: pink;
padding-left: 3px;
padding-right: 3px;
border: solid 1px black;
cursor: pointer;
position: absolute;
display: inherit;
top: 5px;
right: 5px;
}
#pageTitles {
overflow: auto;
max-height: 200px;
}
.controls {
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
background-color: #f9f9f9;
width: 200px;
}
label {
margin: 5px 10px;
cursor: pointer;
}
h3 {
margin-bottom: 10px;
}
#container {
display: flex;
height: 100vh;
overflow: auto;
}
/* Sidebar for dataViewer */
#dataViewerContainer {
left: 0px;
width: 50%;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
background: yellow;
min-width: 150px;
background-color: #f4f4f9;
padding: 20px;
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
overflow-y: auto;
z-index: 0;
position: relative;
}
/* Main content area for charts */
#chartsContainer {
/*flex-grow: 1; Take up remaining space */
container: size;
position: fixed;
top: 0px;
right: 0px;
height: auto;
overflow-y: auto;
background-color: #ffffff;
height: 100vh;
width: 50%;
}
#selectedData {
min-width: 150;
height: auto;
background-color: #ffffff;
padding: 20px;
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
overflow-y: auto;
z-index: 1000;
position: relative;
}
#chartData {
min-width: 150;
height: auto;
background-color: #ffffff;
padding: 20px;
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
overflow-y: auto;
z-index: 1000;
position: relative;
}
/* Draggable divider */
#divider {
top: 0px;
left: 50%;
position: absolute;
width: 5px;
cursor: col-resize; /* Show resize cursor */
background-color: #ddd;
height: 100vh;
z-index: 10;
}
#divider:hover {
background-color: rgb(192, 192, 192)
}
#toggleSliderBtn {
position: sticky;
top: 50%; /* Adjust to center vertically */
transform: translateX(-50%);
padding: 20px 7px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
box-shadow: rgba(0, 0, 0, 0.5) 1px 1px 10px;
}
#toggleSliderBtn:hover {
background-color: #0056b3;
}
.data-table {
width: 100%;
border-collapse: collapse;
}
.data-table th, .data-table td {
border: 1px solid #ddd;
padding: 8px;
}
.data-table th {
background-color: #f2f2f2;
text-align: left;
}
.off {
color: darkred;
background-color: pink;
}
.on {
color: darkgreen;
background-color: greenyellow;
}
.no-select {
user-select: none;
}
#selectedMessages {
min-width: 150; /* Minimum width limit */
height: auto;
background-color: #ffffff;
padding: 20px;
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
overflow-y: auto;
z-index: 1000;
position: relative;
}
.dataViewerChild {
display: flex; /* Use flexbox for layout */
flex-direction: column; /* Stack items vertically */
align-items: flex-start; /* Align items to the start */
padding: 10px; /* Add some padding inside the box */
border: 1px solid #ccc; /* Optional: Add a border */
border-radius: 5px; /* Optional: Round corners */
background-color: #f9f9f9;
margin-bottom: 10px;
overflow-y: auto;
}
.gradient-overlay {
position: absolute;
top: 0;
right: 0;
width: 30px; /* Width of the gradient */
height: 100%;
background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); /* Adjust gradient colors as needed */
pointer-events: none; /* Ensure it doesn't interfere with interactions */
}
.messageBtnBar {
position: absolute;
margin-top: 3px;
}
#dynamicChartControlBox {
display: flex;
flex-direction: row;
align-items: center;
padding-left: 20px;
padding-right: 20px;
justify-content: center;
height: 20px;
}
#dynamicChartControlBox label {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 10px;
}
#dynamicChartControlBox h3 {
margin-top: 15px;
}
.timeUnitDropdown {
margin-left: 10px;
margin-right: 10px;
}
.header {
position: sticky;
z-index: 100;
top: 0px;
}
</style>
</head>
<body>
<div id="container">
<div class="dataViewer MsgContents" id="dataViewerContainer">
<div class="padding-div">
<div id="selectedMessages" class="dataViewerChild MsgContents">
<div><h3>Selected Bar Chart Messages</h3></div>
<p>Click a bar chart block to show the message data here.</p>
<div id="selectedMessage" class="dataViewer"></div>
</div>
<div id="selectedData" class="dataViewerChild MsgContents">
<div><h3>Selected Doughnut Chart Segment</h3></div>
<p>Click a doughnut chart segment to show the segment data here.</p>
<div id="dataViewer" class="dataViewer"></div>
</div>
<div id="chartData" class="dataViewerChild MsgContents">
<h3>Imported Data</h3>
<div id="chartDataViewer" class="dataViewer"></div>
</div>
</div>
</div>
<div id="divider">
<button id="toggleSliderBtn"></button>
</div>
<div class = "charts" id="chartsContainer">
<div class="header" style="text-align: center;">
<div class="chart-row-control">
<img src="/icons/IRISWHIZ.png" height="40px" width="40px";></img>
<div id ="dynamicChartControlBox" class="controls">
<h4>Time Scale:</h4>
<select id="timeUnitDropdown" name="timeUnit">
<option value="minute" selected>Minute</option>
<option value="hour">Hour</option>
<option value="day">Day</option>
<option value="week">Week</option>
<option value="month">Month</option>
<option value="year">Year</option>
</select>
<button id="resetZoomBtn" class="whizButton resetZoomBtn">Reset Zoom</button>
</div>
</div>
</div>
<div class="padding-div-charts">
<div id="barChartRow" class="chart-row time">
<div class="chartContainerMain">
<div class="chart">
<canvas id ="barChart"></canvas>
</div>
</div>
</div>
<div class="chart-row time">
<div class="chartContainerMain">
<div class="chart">
<canvas id ="lineChart"></canvas>
</div>
</div>
</div>
<div class="chart-row">
<div class="chartContainer">
<canvas id ="Source"></canvas>
</div>
<div class="chartContainer">
<canvas id ="Target"></canvas>
</div>
</div>
<div class="chart-row">
<div class="chartContainer">
<canvas id ="Error"></canvas>
</div>
<div class="chartContainer">
<canvas id ="Status"></canvas>
</div>
</div>
<div id="customRow">
</div>
</div>
</div>
</div>
</body>
<script src="utils.js"></script>
<script src="analysis.js"></script>
</html>