-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
198 lines (189 loc) · 12.1 KB
/
index.php
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
<?php
define('SIDEBAR', false);
include_once('layout/head.php');
?>
<!-- Toasts -->
<div aria-live="polite" aria-atomic="true" class="position-relative" style="z-index:9999;">
<div class="toast-container position-absolute top-0 end-0 p-3">
<div class="toast align-items-center text-white bg-danger border-0 p-3 shadow" aria-live="assertive" role="alert" id="websocket-error">
<div class="d-flex">
<div class="toast-body">
<i class="fas fa-circle-xmark fa-fw"></i> <?php echo _("There was an error opening the connection to the server over the websocket. Perhaps the server is offline?"); ?>
</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
</div>
<div class="toast align-items-center text-white bg-success border-0 p-3 shadow" aria-live="assertive" role="alert" id="websocket-connected">
<div class="d-flex">
<div class="toast-body">
<i class="fas fa-circle-check fa-fw"></i> <?php echo _("Websocket connected successfully!"); ?>
</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
</div>
<div class="toast align-items-center text-white bg-warning border-0 p-3 shadow" aria-live="assertive" role="alert" id="websocket-closed">
<div class="d-flex">
<div class="toast-body">
<i class="fas fa-triangle-exclamation fa-fw"></i> <?php echo _("Websocket connection closed."); ?>
</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
</div>
<div class="toast align-items-center text-white bg-success border-0 p-3 shadow" aria-live="assertive" role="alert" id="tests-complete">
<div class="d-flex">
<div class="toast-body">
<i class="fas fa-circle-check fa-fw"></i> <?php echo _("All tests complete!"); ?>
</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
</div>
</div>
</div>
<main class="pb-5" style="margin-top: 6em;">
<div class="container-fluid">
<div id="testsContainer">
<div class="row mb-3 text-center g-3 litcaltests-header align-items-end justify-content-center">
<div class="col-2">
<label for="APICalendarSelect"><?php echo _("Liturgical Calendar"); ?></label>
<select id="APICalendarSelect" class="form-select form-select-sm">
<option data-calendartype="nationalcalendar" value="VA"><?php echo _("General Roman"); ?></option>
</select>
</div>
<div class="col-1">
<label for="APIResponseSelect"><?php echo _("Response Format"); ?></label>
<select id="APIResponseSelect" class="form-select form-select-sm">
<option data-responsetype="json" value="JSON">JSON</option>
<option data-responsetype="yaml" value="YML">YAML</option>
<option data-responsetype="xml" value="XML">XML</option>
<option data-responsetype="ics" value="ICS">ICS</option>
</select>
</div>
<div class="col-2">
<button id="startTestRunnerBtn" type="button"
class="btn btn-primary" disabled
><i class="fa fa-rotate fa-fw d-inline-block"></i> <span id="startTestRunnerBtnLbl"><?php
echo _("Run Tests");
?></span></button>
</div>
<div class="col-1"></div>
<div class="col-2 text-white bg-success p-2">
<i class="fas fa-circle-check fa-fw"></i> <?php echo _("Successful tests:"); ?> <span id="successfulCount" class="successfulCount">0</span>
</div>
<div class="col-2 text-white bg-danger p-2">
<i class="fas fa-circle-xmark fa-fw"></i> <?php echo _("Failed tests:"); ?> <span id="failedCount" class="failedCount">0</span>
</div>
<div class="col-2 text-white bg-dark p-2">
<i class="fas fa-stopwatch fa-fw"></i> <?php
echo sprintf(_("Total time for %s tests:"), "<span id=\"total-tests-count\"></span>");
?> <span id="total-time">0</span>
</div>
</div>
<div class="accordion" id="testSuiteAccordion">
<div class="accordion-item">
<h2 class="row g-0 accordion-header" id="sourceDataHeader">
<button class="accordion-button" type="button"
data-bs-toggle="collapse" data-bs-target="#sourceDataTests"
aria-expanded="true" aria-controls="sourceDataTests"
>
<div class="col-4"><i class="fas fa-file-import fa-fw"></i> <span><?php echo _("VALIDATE SOURCE DATA"); ?></span></div>
<div class="col-2 text-white p-2 text-center test-results bg-success">
<i class="fas fa-circle-check fa-fw"></i> <?php
echo _("Successful tests:");
?> <span id="successfulSourceDataTestsCount" class="successfulCount">0</span>
</div>
<div class="col-2 text-white p-2 text-center test-results bg-danger">
<i class="fas fa-circle-xmark fa-fw"></i> <?php
echo _("Failed tests:");
?> <span id="failedSourceDataTestsCount" class="failedCount">0</span>
</div>
<div class="col-3 text-white p-2 text-center test-results bg-dark">
<i class="fas fa-stopwatch fa-fw"></i> <?php
echo sprintf(_("Total time for %s tests:"), "<span id=\"totalSourceDataTestsCount\"></span>");
?> <span id="totalSourceDataTestsTime">0</span>
</div>
</button>
</h2>
<div id="sourceDataTests" class="accordion-collapse collapse show" aria-labelledby="sourceDataHeader" data-bs-parent="#testSuiteAccordion">
<div class="row g-0 sourcedata-tests"></div>
</div>
</div>
<div class="accordion-item">
<h2 class="row g-0 accordion-header" id="calendarDataHeader">
<button class="accordion-button collapsed" type="button"
data-bs-toggle="collapse" data-bs-target="#calendarDataTests"
aria-expanded="false" aria-controls="calendarDataTests"
>
<div class="col-4">
<i class="fas fa-file-export fa-fw"></i> <?php
echo _("VALIDATE CALENDAR DATA FOR YEARS FROM 1970 UNTIL");
?> <span class="yearMax"></span>
</div>
<div class="col-2 text-white p-2 text-center test-results bg-success">
<i class="fas fa-circle-check fa-fw"></i> <?php
echo _("Successful tests:");
?> <span id="successfulCalendarDataTestsCount" class="successfulCount">0</span>
</div>
<div class="col-2 text-white p-2 text-center test-results bg-danger">
<i class="fas fa-circle-xmark fa-fw"></i> <?php
echo _("Failed tests:");
?> <span id="failedCalendarDataTestsCount" class="failedCount">0</span>
</div>
<div class="col-3 text-white p-2 text-center test-results bg-dark">
<i class="fas fa-stopwatch fa-fw"></i> <?php
echo sprintf(_("Total time for %s tests:"), "<span id=\"totalCalendarDataTestsCount\"></span>");
?> <span id="totalCalendarDataTestsTime">0</span>
</div>
</button>
</h2>
<div id="calendarDataTests" class="accordion-collapse collapse" aria-labelledby="calendarDataHeader" data-bs-parent="#testSuiteAccordion">
<div class="row g-0 calendardata-tests"></div>
</div>
</div>
<div class="accordion-item">
<h2 class="row g-0 accordion-header" id="specificUnitTestHeader">
<button class="accordion-button collapsed" type="button"
data-bs-toggle="collapse" data-bs-target="#specificUnitTests"
aria-expanded="false" aria-controls="specificUnitTests"
>
<div class="col-4"><i class="fas fa-file-shield fa-fw"></i> <?php
echo _("EXECUTE UNIT TESTS FOR SPECIFIC EVENTS");
?>
</div>
<div class="col-2 text-white p-2 text-center test-results bg-success">
<i class="fas fa-circle-check fa-fw"></i> <?php
echo _("Successful tests:");
?> <span id="successfulUnitTestsCount" class="successfulCount">0</span>
</div>
<div class="col-2 text-white p-2 text-center test-results bg-danger">
<i class="fas fa-circle-xmark fa-fw"></i> <?php
echo _("Failed tests:");
?> <span id="failedUnitTestsCount" class="failedCount">0</span>
</div>
<div class="col-3 text-white p-2 text-center test-results bg-dark">
<i class="fas fa-stopwatch fa-fw"></i> <?php
echo sprintf(_("Total time for %s tests:"), "<span id=\"totalUnitTestsCount\"></span>");
?> <span id="totalUnitTestsTime">0</span>
</div>
</button>
</h2>
<div id="specificUnitTests" class="accordion-collapse collapse" aria-labelledby="specificUnitTestHeader" data-bs-parent="#testSuiteAccordion">
<div class="accordion bg-light p-3" id="specificUnitTestsAccordion">
</div>
</div><!-- specific unit test body -->
</div><!-- end accordion-item -->
</div><!-- end accordion -->
</div><!-- end testsContainer -->
</div><!-- end containerFluid -->
</main>
<!-- End of Main Content -->
<div class="bg-light position-absolute top-0 left-0 text-center page-loader" style="width:100vw;height:100vh;opacity:.5;">
<div class="spinner-border text-dark m-auto position-relative" role="status" style="top:50%;">
<span class="visually-hidden"><?php echo _("Loading..."); ?></span>
</div>
</div>
<?php include_once('layout/disclaimer.php'); ?>
<!-- </div> -->
<!-- End of Content Wrapper -->
<!-- </div> -->
<!-- End of Page Wrapper -->
<?php include_once('layout/footer.php'); ?>