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.

Use not-metered billing fallback copy

rcourtmanbfd6b42f1598
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.md
index fec86644cb..da1f339ff9 100644
--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md
+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md
@@ -1482,6 +1482,10 @@ pause-new-admissions copy, while `licensePresentation.ts` must keep current
plan summaries focused on core monitoring plus the actual tier
extras. Bounded fallback continuity may only be displayed for a support context
that is not already normalized to a recognized self-hosted v6 package.
+When billing or support presentation still needs a capacity-free self-hosted
+summary value, the customer-facing label is `Not metered`, not `Unlimited`;
+lifetime commercial continuity duration may use `Permanent`, but no normal
+self-hosted plan surface should imply monitored-system volume is a paid tier.
That same pricing boundary now also owns the shared frontend plan-definition
models. `frontend-modern/src/utils/cloudPlans.ts` and
`frontend-modern/src/utils/selfHostedPlans.ts` are the canonical frontend
diff --git a/frontend-modern/src/components/Settings/CommercialBillingSections.tsx b/frontend-modern/src/components/Settings/CommercialBillingSections.tsx
index 0511b5286f..61d41f9b23 100644
--- a/frontend-modern/src/components/Settings/CommercialBillingSections.tsx
+++ b/frontend-modern/src/components/Settings/CommercialBillingSections.tsx
@@ -44,6 +44,8 @@ const usageRatio = (current: number, limit?: number) => {
return Math.min(100, Math.round((current / limit) * 100));
};
+const NOT_METERED_USAGE_LABEL = 'Not metered';
+
export const CommercialSection: Component<CommercialSectionProps> = (props) => (
<section id={props.id} class="scroll-mt-24 space-y-2 border-t border-border pt-4">
<h3 class="text-sm font-semibold text-base-content">{props.title}</h3>
@@ -81,7 +83,7 @@ export const CommercialUsageMeters: Component<CommercialUsageMetersProps> = (pro
<span>{item.label}</span>
<span>
{item.current}
- {typeof item.limit === 'number' ? ` / ${item.limit}` : ' / Unlimited'}
+ {typeof item.limit === 'number' ? ` / ${item.limit}` : ` / ${NOT_METERED_USAGE_LABEL}`}
</span>
</div>
<Show when={typeof item.limit === 'number'}>
diff --git a/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx
index 5d59fbe3c5..0931a6a593 100644
--- a/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx
@@ -381,6 +381,8 @@ describe('ProLicensePanel', () => {
expect(screen.queryByText('Capacity Status')).not.toBeInTheDocument();
expect(screen.queryByText('Monitored-system policy')).not.toBeInTheDocument();
expect(screen.queryByRole('tab', { name: 'Usage' })).not.toBeInTheDocument();
+ expect(screen.getByText('Permanent')).toBeInTheDocument();
+ expect(screen.queryByText('Unlimited')).not.toBeInTheDocument();
expect(screen.getAllByText('Included').length).toBeGreaterThan(0);
expect(screen.queryByText('5 / 12')).not.toBeInTheDocument();
});
diff --git a/frontend-modern/src/components/Settings/useProLicensePanelState.ts b/frontend-modern/src/components/Settings/useProLicensePanelState.ts
index a75c0b280e..c2642cc193 100644
--- a/frontend-modern/src/components/Settings/useProLicensePanelState.ts
+++ b/frontend-modern/src/components/Settings/useProLicensePanelState.ts
@@ -52,7 +52,11 @@ import {
type SelfHostedBillingPlanIntent,
type SelfHostedBillingSection,
} from '@/utils/pricingHandoff';
-import { buildSelfHostedCommercialPlanModel } from '@/utils/commercialBillingModel';
+import {
+ buildSelfHostedCommercialPlanModel,
+ LIFETIME_DAYS_REMAINING_LABEL,
+ SELF_HOSTED_NOT_METERED_LABEL,
+} from '@/utils/commercialBillingModel';
import { getSelfHostedPlanDefinitionForBillingTier } from '@/utils/selfHostedPlans';
import {
buildMonitoredSystemCapacitySectionModel,
@@ -342,7 +346,7 @@ export function useProLicensePanelState() {
const displayedDaysRemaining = createMemo(() => {
const current = entitlements();
- if (current?.is_lifetime) return 'Unlimited';
+ if (current?.is_lifetime) return LIFETIME_DAYS_REMAINING_LABEL;
if (subscriptionState() === 'trial' && typeof trialDaysRemaining() === 'number') {
return trialDaysRemaining();
}
@@ -365,7 +369,7 @@ export function useProLicensePanelState() {
const limit = monitoredSystemLimitStatus();
const capacity = monitoredSystemCapacity();
if (!limit && !capacity && usesCanonicalSelfHostedPlan()) {
- return 'Unlimited';
+ return SELF_HOSTED_NOT_METERED_LABEL;
}
return getMonitoredSystemLimitUsageSummary(limit, capacity);
});
@@ -373,7 +377,7 @@ export function useProLicensePanelState() {
const limit = monitoredSystemLimitStatus();
const capacity = monitoredSystemCapacity();
if (!limit && !capacity && usesCanonicalSelfHostedPlan()) {
- return 'Unlimited';
+ return SELF_HOSTED_NOT_METERED_LABEL;
}
return getMonitoredSystemLimitCapacityStatusSummary(limit, capacity);
});
@@ -508,7 +512,7 @@ export function useProLicensePanelState() {
typeof monitoredSystemLimitStatus()?.limit === 'number' &&
monitoredSystemLimitStatus()!.limit > 0
? monitoredSystemLimitStatus()!.limit
- : 'Unlimited',
+ : SELF_HOSTED_NOT_METERED_LABEL,
retailPlanDefinition: currentRetailPlanDefinition(),
monitoredSystemContinuity: displayableMonitoredSystemContinuity() ?? null,
continuityCapturedAt: continuityCapturedAt(),
diff --git a/frontend-modern/src/utils/__tests__/commercialBillingModel.test.ts b/frontend-modern/src/utils/__tests__/commercialBillingModel.test.ts
index 3b73cc4b30..ed3dcbe902 100644
--- a/frontend-modern/src/utils/__tests__/commercialBillingModel.test.ts
+++ b/frontend-modern/src/utils/__tests__/commercialBillingModel.test.ts
@@ -1,6 +1,9 @@
import { describe, expect, it } from 'vitest';
-import { buildSelfHostedCommercialPlanModel } from '../commercialBillingModel';
+import {
+ buildSelfHostedCommercialPlanModel,
+ SELF_HOSTED_NOT_METERED_LABEL,
+} from '../commercialBillingModel';
import { SELF_HOSTED_PLAN_BY_TIER } from '../selfHostedPlans';
const createBaseInput = () => ({
@@ -10,9 +13,9 @@ const createBaseInput = () => ({
planTerms: 'Pro Monthly',
expires: '12/31/2026',
daysRemaining: 123,
- monitoredSystemsSummary: 'Unlimited',
- capacityStatusSummary: 'Unlimited',
- maxMonitoredSystems: 'Unlimited' as const,
+ monitoredSystemsSummary: SELF_HOSTED_NOT_METERED_LABEL,
+ capacityStatusSummary: SELF_HOSTED_NOT_METERED_LABEL,
+ maxMonitoredSystems: SELF_HOSTED_NOT_METERED_LABEL,
});
describe('commercialBillingModel', () => {
@@ -49,6 +52,7 @@ describe('commercialBillingModel', () => {
]);
expect(model.details.map((item) => item.label)).not.toContain('Included Monitored Systems');
expect(model.summary.map((item) => item.label)).not.toContain('Guest Capacity');
+ expect(JSON.stringify(model)).not.toContain('Unlimited');
});
it('keeps bounded monitored-system details on legacy fallback paths', () => {
diff --git a/frontend-modern/src/utils/__tests__/monitoredSystemPresentation.test.ts b/frontend-modern/src/utils/__tests__/monitoredSystemPresentation.test.ts
index 628ee2b73d..2a5cc94bf3 100644
--- a/frontend-modern/src/utils/__tests__/monitoredSystemPresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/monitoredSystemPresentation.test.ts
@@ -78,7 +78,7 @@ describe('monitoredSystemPresentation', () => {
continuityCaptureCapturedLabel: 'Captured',
usageVerifyingLabel: 'Verifying…',
remainingCapacityUnavailableLabel: 'Unavailable',
- unlimitedLimitLabel: 'Unlimited',
+ unlimitedLimitLabel: 'Not metered',
loadingState: {
text: 'Loading monitored system usage…',
},
@@ -365,7 +365,7 @@ describe('monitoredSystemPresentation', () => {
limit: 0,
current_available: true,
}),
- ).toBe('Unlimited');
+ ).toBe('Not metered');
expect(
getMonitoredSystemLimitContextSummary({
current: 10,
diff --git a/frontend-modern/src/utils/commercialBillingModel.ts b/frontend-modern/src/utils/commercialBillingModel.ts
index f6b82c4b97..f6c7325225 100644
--- a/frontend-modern/src/utils/commercialBillingModel.ts
+++ b/frontend-modern/src/utils/commercialBillingModel.ts
@@ -55,11 +55,18 @@ export interface HostedCommercialModelInput {
renewsOrExpires: string;
}
+export const SELF_HOSTED_NOT_METERED_LABEL = 'Not metered';
+export const LIFETIME_DAYS_REMAINING_LABEL = 'Permanent';
+
const asUnlimitedLimit = (value?: number) =>
typeof value === 'number' && value > 0 ? value : undefined;
const hasFiniteSelfHostedLimit = (value: string | number) =>
- typeof value === 'number' ? value > 0 : value.trim().toLowerCase() !== 'unlimited';
+ typeof value === 'number'
+ ? value > 0
+ : !['unlimited', SELF_HOSTED_NOT_METERED_LABEL.toLowerCase()].includes(
+ value.trim().toLowerCase(),
+ );
const buildSelfHostedBaseDetails = (
input: SelfHostedCommercialModelInput,
@@ -149,14 +156,14 @@ export const buildSelfHostedCommercialPlanModel = (
value:
input.monitoredSystemContinuity.plan_limit > 0
? input.monitoredSystemContinuity.plan_limit
- : 'Unlimited',
+ : SELF_HOSTED_NOT_METERED_LABEL,
},
{
label: 'Effective Monitored System Limit',
value:
input.monitoredSystemContinuity.effective_limit > 0
? input.monitoredSystemContinuity.effective_limit
- : 'Unlimited',
+ : SELF_HOSTED_NOT_METERED_LABEL,
},
...(typeof input.monitoredSystemContinuity.grandfathered_floor === 'number' &&
input.monitoredSystemContinuity.grandfathered_floor > 0
diff --git a/frontend-modern/src/utils/monitoredSystemPresentation.ts b/frontend-modern/src/utils/monitoredSystemPresentation.ts
index 07a7d447aa..3cc8b9b110 100644
--- a/frontend-modern/src/utils/monitoredSystemPresentation.ts
+++ b/frontend-modern/src/utils/monitoredSystemPresentation.ts
@@ -34,7 +34,7 @@ const MONITORED_SYSTEM_LEDGER_PRESENTATION = {
continuityCaptureCapturedLabel: 'Captured',
usageVerifyingLabel: 'Verifying…',
remainingCapacityUnavailableLabel: 'Unavailable',
- unlimitedLimitLabel: 'Unlimited',
+ unlimitedLimitLabel: 'Not metered',
loadingState: {
text: 'Loading monitored system usage…',
},