remove: Alert Configuration tab from settings modal

- Removed Alert Configuration tab from settings navigation
- Updated remaining alert references to redirect to alert management modal
- Cleaned up hasSignificantConfiguration function alert case
- Settings modal now focuses on system config only

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
courtmanr@gmail.com
2025-06-05 13:33:42 +01:00
parent ec86702c67
commit 235ec2fdef
2 changed files with 14 additions and 18 deletions
-3
View File
@@ -903,9 +903,6 @@
<button class="settings-tab py-3 px-1 border-b-2 border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 font-medium text-sm" data-tab="pbs">
Backup Server
</button>
<button class="settings-tab py-3 px-1 border-b-2 border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 font-medium text-sm" data-tab="alerts">
Alert Configuration
</button>
<button class="settings-tab py-3 px-1 border-b-2 border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 font-medium text-sm" data-tab="system">
System
</button>
+14 -15
View File
@@ -1214,16 +1214,6 @@ PulseApp.ui.settings = (() => {
return !!(data.PBS_HOST && data.PBS_HOST.trim()) ||
!!(data.PBS_HOST_2 && data.PBS_HOST_2.trim()) ||
!!(data.PBS_HOST_3 && data.PBS_HOST_3.trim());
} else if (tabName === 'alerts') {
// For alerts tab, any threshold value or email/webhook config is significant
return Object.keys(data).some(key => {
const value = data[key];
if (typeof value === 'string' && value.trim()) return true;
if (typeof value === 'boolean' && value) return true;
if (typeof value === 'number' && value > 0) return true;
return false;
});
}
// For other tabs, check if any field has a non-empty value
return Object.values(data).some(value => {
@@ -3347,8 +3337,11 @@ PulseApp.ui.settings = (() => {
if (addCustomBtn) {
addCustomBtn.addEventListener('click', () => {
// Switch to alerts tab to add custom threshold
switchTab('alerts');
// Open alert management modal instead
if (window.PulseApp && window.PulseApp.ui && window.PulseApp.ui.alertManagementModal) {
closeModal();
window.PulseApp.ui.alertManagementModal.openModal();
}
setTimeout(() => {
// Scroll to the custom threshold section
const customSection = document.querySelector('h3:contains("Custom Threshold Configurations")');
@@ -3562,7 +3555,11 @@ PulseApp.ui.settings = (() => {
const gotoBtn = document.getElementById('goto-custom-thresholds');
if (gotoBtn) {
gotoBtn.addEventListener('click', () => switchTab('alerts'));
gotoBtn.addEventListener('click', () => {
if (window.PulseApp && window.PulseApp.ui && window.PulseApp.ui.alertManagementModal) {
window.PulseApp.ui.alertManagementModal.openModal();
}
});
}
} else {
// Display the custom thresholds
@@ -3684,8 +3681,10 @@ PulseApp.ui.settings = (() => {
};
window.editCustomThreshold = function(endpointId, nodeId, vmid) {
// Switch to alerts tab to edit
switchTab('alerts');
// Open alert management modal instead
if (window.PulseApp && window.PulseApp.ui && window.PulseApp.ui.alertManagementModal) {
window.PulseApp.ui.alertManagementModal.openModal();
}
setTimeout(() => {
// Scroll to custom threshold section and highlight it
const customSection = document.querySelector('h3[contains("Custom Threshold Configurations")]');