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.

fix(frontend): use Show components for reactive license check in AgentProfilesPanel

rcourtman9389194d2e19
diff --git a/frontend-modern/src/components/Settings/AgentProfilesPanel.tsx b/frontend-modern/src/components/Settings/AgentProfilesPanel.tsx
index 60ef1da6da..361cd3fdfa 100644
--- a/frontend-modern/src/components/Settings/AgentProfilesPanel.tsx
+++ b/frontend-modern/src/components/Settings/AgentProfilesPanel.tsx
@@ -231,48 +231,49 @@ export const AgentProfilesPanel: Component = () => {
}
};
- // Render license gate
- if (checkingLicense()) {
- return (
- <Card padding="lg">
- <div class="flex items-center justify-center py-8">
- <div class="animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500" />
- <span class="ml-3 text-gray-600 dark:text-gray-400">Checking license...</span>
- </div>
- </Card>
- );
- }
-
- if (!hasFeature()) {
- return (
- <Card padding="lg" class="space-y-4">
- <div class="flex items-center gap-3">
- <div class="flex items-center justify-center w-10 h-10 rounded-lg bg-amber-100 dark:bg-amber-900/30">
- <Crown class="w-5 h-5 text-amber-600 dark:text-amber-400" />
- </div>
- <div>
- <h3 class="text-base font-semibold text-gray-900 dark:text-gray-100">Agent Profiles</h3>
- <p class="text-sm text-gray-600 dark:text-gray-400">Pro feature</p>
- </div>
- </div>
- <p class="text-sm text-gray-600 dark:text-gray-400">
- Create reusable configuration profiles for your agents. Manage settings like Docker monitoring,
- logging levels, and reporting intervals from a central location.
- </p>
- <a
- href="https://pulserelay.pro/"
- target="_blank"
- rel="noopener noreferrer"
- class="inline-flex items-center gap-2 rounded-lg bg-gradient-to-r from-amber-500 to-orange-500 px-4 py-2 text-sm font-medium text-white transition-all hover:from-amber-600 hover:to-orange-600"
- >
- <Crown class="w-4 h-4" />
- Upgrade to Pro
- </a>
- </Card>
- );
- }
-
+ // License gate - using Show components for proper SolidJS reactivity
+ // (early returns don't re-render when signals change in SolidJS)
return (
+ <Show
+ when={!checkingLicense()}
+ fallback={
+ <Card padding="lg">
+ <div class="flex items-center justify-center py-8">
+ <div class="animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500" />
+ <span class="ml-3 text-gray-600 dark:text-gray-400">Checking license...</span>
+ </div>
+ </Card>
+ }
+ >
+ <Show
+ when={hasFeature()}
+ fallback={
+ <Card padding="lg" class="space-y-4">
+ <div class="flex items-center gap-3">
+ <div class="flex items-center justify-center w-10 h-10 rounded-lg bg-amber-100 dark:bg-amber-900/30">
+ <Crown class="w-5 h-5 text-amber-600 dark:text-amber-400" />
+ </div>
+ <div>
+ <h3 class="text-base font-semibold text-gray-900 dark:text-gray-100">Agent Profiles</h3>
+ <p class="text-sm text-gray-600 dark:text-gray-400">Pro feature</p>
+ </div>
+ </div>
+ <p class="text-sm text-gray-600 dark:text-gray-400">
+ Create reusable configuration profiles for your agents. Manage settings like Docker monitoring,
+ logging levels, and reporting intervals from a central location.
+ </p>
+ <a
+ href="https://pulserelay.pro/"
+ target="_blank"
+ rel="noopener noreferrer"
+ class="inline-flex items-center gap-2 rounded-lg bg-gradient-to-r from-amber-500 to-orange-500 px-4 py-2 text-sm font-medium text-white transition-all hover:from-amber-600 hover:to-orange-600"
+ >
+ <Crown class="w-4 h-4" />
+ Upgrade to Pro
+ </a>
+ </Card>
+ }
+ >
<div class="space-y-6">
{/* Profiles Section */}
<Card padding="lg" class="space-y-4">
@@ -577,6 +578,8 @@ export const AgentProfilesPanel: Component = () => {
</div>
</Show>
</div>
+ </Show>
+ </Show>
);
};