mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-02 08:12:21 -07:00
Refactor event and session column names to camelCase
- Updated test cases to reflect new column names (eve_MAC -> eveMac, eve_DateTime -> eveDateTime, etc.) across various test files. - Modified SQL table definitions in the database cleanup and migration tests to use camelCase naming conventions. - Implemented migration tests to ensure legacy column names are correctly renamed to camelCase equivalents. - Ensured that existing data is preserved during the migration process and that views referencing old column names are dropped before renaming. - Verified that the migration function is idempotent, allowing for safe re-execution without data loss.
This commit is contained in:
@@ -43,9 +43,9 @@
|
||||
<?= lang('report_select_format') ;?>
|
||||
</label>
|
||||
<select id="formatSelect" class="pointer">
|
||||
<option value="HTML">HTML</option>
|
||||
<option value="JSON">JSON</option>
|
||||
<option value="Text">Text</option>
|
||||
<option value="html">HTML</option>
|
||||
<option value="json">JSON</option>
|
||||
<option value="text">Text</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -100,23 +100,23 @@
|
||||
|
||||
// Display the selected format data and update timestamp
|
||||
switch (format) {
|
||||
case 'HTML':
|
||||
case 'html':
|
||||
notificationData.innerHTML = formatData;
|
||||
break;
|
||||
case 'JSON':
|
||||
case 'json':
|
||||
notificationData.innerHTML = `<pre class="logs" cols="70" rows="10" wrap="off" readonly="">
|
||||
${jsonSyntaxHighlight(JSON.stringify(JSON.parse(formatData), undefined, 4))}
|
||||
</pre>`;
|
||||
break;
|
||||
case 'Text':
|
||||
case 'text':
|
||||
notificationData.innerHTML = `<pre class="logs" cols="70" rows="10" wrap="off" readonly">${formatData}</pre>`;
|
||||
break;
|
||||
}
|
||||
|
||||
// console.log(notification)
|
||||
|
||||
timestamp.textContent = localizeTimestamp(notification.DateTimeCreated);
|
||||
notiGuid.textContent = notification.GUID;
|
||||
timestamp.textContent = localizeTimestamp(notification.dateTimeCreated);
|
||||
notiGuid.textContent = notification.guid;
|
||||
currentIndex = index;
|
||||
|
||||
$("#notificationOutOff").html(`${currentIndex + 1}/${data.data.length}`);
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
// Function to find the index of a notification by GUID
|
||||
function findIndexByGUID(data, guid) {
|
||||
return data.findIndex(notification => notification.GUID == guid);
|
||||
return data.findIndex(notification => notification.guid == guid);
|
||||
}
|
||||
|
||||
// Listen for format selection changes
|
||||
|
||||
Reference in New Issue
Block a user