mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-04 09:11:34 -07:00
BE+FE: refactor timezone UTC additional work #1506
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
require 'php/templates/header.php';
|
require 'php/templates/header.php';
|
||||||
require 'php/templates/modals.php';
|
require 'php/templates/modals.php';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<!-- Content header--------------------------------------------------------- -->
|
<!-- Content header--------------------------------------------------------- -->
|
||||||
<!-- Main content ---------------------------------------------------------- -->
|
<!-- Main content ---------------------------------------------------------- -->
|
||||||
<section class="content tab-content">
|
<section class="content tab-content">
|
||||||
|
|
||||||
<div class="box box-gray col-xs-12" >
|
<div class="box box-gray col-xs-12" >
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<select id="formatSelect" class="pointer">
|
<select id="formatSelect" class="pointer">
|
||||||
<option value="HTML">HTML</option>
|
<option value="HTML">HTML</option>
|
||||||
<option value="JSON">JSON</option>
|
<option value="JSON">JSON</option>
|
||||||
<option value="Text">Text</option>
|
<option value="Text">Text</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
const prevButton = document.getElementById('prevButton');
|
const prevButton = document.getElementById('prevButton');
|
||||||
const nextButton = document.getElementById('nextButton');
|
const nextButton = document.getElementById('nextButton');
|
||||||
const formatSelect = document.getElementById('formatSelect');
|
const formatSelect = document.getElementById('formatSelect');
|
||||||
|
|
||||||
let currentIndex = -1; // Current report index
|
let currentIndex = -1; // Current report index
|
||||||
|
|
||||||
// Function to update the displayed data and timestamp based on the selected format and index
|
// Function to update the displayed data and timestamp based on the selected format and index
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
|
|
||||||
// console.log(notification)
|
// console.log(notification)
|
||||||
|
|
||||||
timestamp.textContent = notification.DateTimeCreated;
|
timestamp.textContent = localizeTimestamp(notification.DateTimeCreated);
|
||||||
notiGuid.textContent = notification.GUID;
|
notiGuid.textContent = notification.GUID;
|
||||||
currentIndex = index;
|
currentIndex = index;
|
||||||
|
|
||||||
@@ -161,17 +161,17 @@
|
|||||||
console.log(index)
|
console.log(index)
|
||||||
|
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
showModalOk('WARNING', `${getString("report_guid_missing")} <br/> <br/> <code>${guid}</code>`)
|
showModalOk('WARNING', `${getString("report_guid_missing")} <br/> <br/> <code>${guid}</code>`)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load the notification with the specified GUID
|
// Load the notification with the specified GUID
|
||||||
updateData(formatSelect.value, index);
|
updateData(formatSelect.value, index);
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Initial data load
|
// Initial data load
|
||||||
updateData('HTML', -1); // Default format to HTML and load the latest report
|
updateData('HTML', -1); // Default format to HTML and load the latest report
|
||||||
|
|||||||
Reference in New Issue
Block a user