Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

feat: Hide AI buttons when AI is not configured. Closes #905

rcourtman96fc47537527
diff --git a/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx b/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx
index 00ad59efb0..96de302670 100644
--- a/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx
+++ b/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx
@@ -17,11 +17,17 @@ interface InvestigateAlertButtonProps {
/**
* "Ask AI" button for one-click alert investigation.
* When clicked, opens the AI chat panel with the alert context pre-populated.
+ * Hidden entirely when AI is not configured.
*/
export function InvestigateAlertButton(props: InvestigateAlertButtonProps) {
const [isHovered, setIsHovered] = createSignal(false);
const isLocked = () => props.licenseLocked === true;
+ // Don't render if AI is not enabled
+ if (aiChatStore.enabled !== true) {
+ return null;
+ }
+
const handleClick = (e: MouseEvent) => {
e.stopPropagation();
e.preventDefault();
diff --git a/frontend-modern/src/components/Dashboard/InvestigateProblemsButton.tsx b/frontend-modern/src/components/Dashboard/InvestigateProblemsButton.tsx
index c57088c2c4..eff09756ce 100644
--- a/frontend-modern/src/components/Dashboard/InvestigateProblemsButton.tsx
+++ b/frontend-modern/src/components/Dashboard/InvestigateProblemsButton.tsx
@@ -118,9 +118,9 @@ Start with the most critical problems first.`;
});
};
- // Only show if problems mode is active AND there are results
+ // Only show if problems mode is active AND there are results AND AI is enabled
const shouldShow = createMemo(() =>
- props.isProblemsMode && props.problemGuests.length > 0
+ props.isProblemsMode && props.problemGuests.length > 0 && aiChatStore.enabled === true
);
return (