|
2 | 2 |
|
3 | 3 | require 'php/templates/header.php'; |
4 | 4 | require 'php/templates/modals.php'; |
5 | | - |
| 5 | + |
6 | 6 | ?> |
7 | 7 |
|
8 | 8 | <script> |
|
14 | 14 |
|
15 | 15 | <!-- Content header--------------------------------------------------------- --> |
16 | 16 | <!-- Main content ---------------------------------------------------------- --> |
17 | | - <section class="content tab-content"> |
| 17 | + <section class="content tab-content"> |
18 | 18 |
|
19 | 19 | <div class="box box-gray col-xs-12" > |
20 | 20 | <div class="box-header"> |
|
45 | 45 | <select id="formatSelect" class="pointer"> |
46 | 46 | <option value="HTML">HTML</option> |
47 | 47 | <option value="JSON">JSON</option> |
48 | | - <option value="Text">Text</option> |
| 48 | + <option value="Text">Text</option> |
49 | 49 | </select> |
50 | 50 | </div> |
51 | 51 |
|
|
80 | 80 | const prevButton = document.getElementById('prevButton'); |
81 | 81 | const nextButton = document.getElementById('nextButton'); |
82 | 82 | const formatSelect = document.getElementById('formatSelect'); |
83 | | - |
| 83 | + |
84 | 84 | let currentIndex = -1; // Current report index |
85 | 85 |
|
86 | 86 | // Function to update the displayed data and timestamp based on the selected format and index |
@@ -115,7 +115,7 @@ function updateData(format, index) { |
115 | 115 |
|
116 | 116 | // console.log(notification) |
117 | 117 |
|
118 | | - timestamp.textContent = notification.DateTimeCreated; |
| 118 | + timestamp.textContent = localizeTimestamp(notification.DateTimeCreated); |
119 | 119 | notiGuid.textContent = notification.GUID; |
120 | 120 | currentIndex = index; |
121 | 121 |
|
@@ -161,17 +161,17 @@ function findIndexByGUID(data, guid) { |
161 | 161 | console.log(index) |
162 | 162 |
|
163 | 163 | if (index == -1) { |
164 | | - showModalOk('WARNING', `${getString("report_guid_missing")} <br/> <br/> <code>${guid}</code>`) |
| 164 | + showModalOk('WARNING', `${getString("report_guid_missing")} <br/> <br/> <code>${guid}</code>`) |
165 | 165 | } |
166 | 166 |
|
167 | 167 | // Load the notification with the specified GUID |
168 | 168 | updateData(formatSelect.value, index); |
169 | | - |
| 169 | + |
170 | 170 | }) |
171 | 171 | .catch(error => { |
172 | 172 | console.error('Error:', error); |
173 | 173 | }); |
174 | | - } else { |
| 174 | + } else { |
175 | 175 |
|
176 | 176 | // Initial data load |
177 | 177 | updateData('HTML', -1); // Default format to HTML and load the latest report |
|
0 commit comments