mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-11 14:00:29 +00:00
style(frontend): sweep prettier drift out of 14 committed files
Pure `prettier --write` output, no semantic change. These files were all last touched by commits made after the 2026-07-20 sweep (d89e3e316) from worktrees where the pre-commit formatter silently skipped, so they landed unformatted and `make format` on a clean tree kept re-reporting them. Verified this is drift and not a formatter version change: prettier 3.9.5 (the tracked lockfile) and 3.9.6 (installed) flag exactly the same 14 files, and today's prettier finds zero differences across all 2099 source files atd89e3e316-- so prettier's output is unchanged since the sweep. `prettier --check` over frontend-modern/src is now clean, which makes `make format` a genuine no-op on a clean tree again. Contract-Neutral: prettier-only reformat of already-committed files; zero token changes, no public-contract delta (verified: staged content is byte-identical to prettier(HEAD content) for every path)
This commit is contained in:
@@ -419,10 +419,9 @@ export async function dismissFinding(
|
||||
export async function reopenFinding(
|
||||
findingId: string,
|
||||
): Promise<{ success: boolean; message: string }> {
|
||||
return apiFetchJSON(
|
||||
`/api/ai/patrol/suppressions/${encodeURIComponent(`finding_${findingId}`)}`,
|
||||
{ method: 'DELETE' },
|
||||
);
|
||||
return apiFetchJSON(`/api/ai/patrol/suppressions/${encodeURIComponent(`finding_${findingId}`)}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -521,7 +521,8 @@ const formatCustomSensorValue = (value: number, unit?: string): string => {
|
||||
}).format(value);
|
||||
const normalizedUnit = (unit || '').trim();
|
||||
if (!normalizedUnit) return formatted;
|
||||
if (normalizedUnit === '%' || normalizedUnit.startsWith('°')) return `${formatted}${normalizedUnit}`;
|
||||
if (normalizedUnit === '%' || normalizedUnit.startsWith('°'))
|
||||
return `${formatted}${normalizedUnit}`;
|
||||
return `${formatted} ${normalizedUnit}`;
|
||||
};
|
||||
|
||||
@@ -541,9 +542,7 @@ export const buildCustomSensorRows = (sensors?: HostSensorSummary) =>
|
||||
.map((part) => part?.trim() ?? '')
|
||||
.join('\u0000')
|
||||
.localeCompare(
|
||||
[b.group, b.subgroup, b.name]
|
||||
.map((part) => part?.trim() ?? '')
|
||||
.join('\u0000'),
|
||||
[b.group, b.subgroup, b.name].map((part) => part?.trim() ?? '').join('\u0000'),
|
||||
),
|
||||
)
|
||||
.map((metric) => {
|
||||
|
||||
@@ -36,10 +36,7 @@ export function brandLogoFormatForFile(file: Pick<File, 'type' | 'name'>): Brand
|
||||
return null;
|
||||
}
|
||||
|
||||
export function brandingLogoPreview(
|
||||
logoBase64: string,
|
||||
logoFormat: BrandLogoFormat,
|
||||
): string {
|
||||
export function brandingLogoPreview(logoBase64: string, logoFormat: BrandLogoFormat): string {
|
||||
const value = logoBase64.trim();
|
||||
if (!value) return '';
|
||||
if (value.startsWith('data:image/')) return value;
|
||||
|
||||
@@ -97,19 +97,19 @@ export const NodeModalClusterMembersSection: Component<NodeModalClusterMembersSe
|
||||
</label>
|
||||
<label class="grid gap-1 text-xs text-muted">
|
||||
Connection address override
|
||||
<input
|
||||
type="text"
|
||||
value={state.formData().clusterEndpointOverrides[endpoint.nodeName] ?? ''}
|
||||
onInput={(event) =>
|
||||
state.updateClusterEndpointOverride(
|
||||
endpoint.nodeName,
|
||||
event.currentTarget.value,
|
||||
)
|
||||
}
|
||||
placeholder={endpoint.ip || 'IP or hostname'}
|
||||
aria-label={`Connection address for ${endpoint.nodeName}`}
|
||||
class={controlClass()}
|
||||
/>
|
||||
<input
|
||||
type="text"
|
||||
value={state.formData().clusterEndpointOverrides[endpoint.nodeName] ?? ''}
|
||||
onInput={(event) =>
|
||||
state.updateClusterEndpointOverride(
|
||||
endpoint.nodeName,
|
||||
event.currentTarget.value,
|
||||
)
|
||||
}
|
||||
placeholder={endpoint.ip || 'IP or hostname'}
|
||||
aria-label={`Connection address for ${endpoint.nodeName}`}
|
||||
class={controlClass()}
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -56,10 +56,7 @@ describe('DataHandlingPanel', () => {
|
||||
'/settings/infrastructure',
|
||||
);
|
||||
expect(screen.queryByText('Governed Resources')).not.toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'Refresh' })).toHaveClass(
|
||||
'min-h-11',
|
||||
'sm:min-h-0',
|
||||
);
|
||||
expect(screen.getByRole('button', { name: 'Refresh' })).toHaveClass('min-h-11', 'sm:min-h-0');
|
||||
});
|
||||
|
||||
it('shows policy posture metrics once resources exist', () => {
|
||||
|
||||
@@ -21,10 +21,7 @@ const endpoint = (nodeName: string, ipOverride?: string): ClusterEndpoint => ({
|
||||
|
||||
describe('cluster node display-name overrides', () => {
|
||||
it('writes immutable identities, permits duplicate labels, and sends an empty clear', () => {
|
||||
const endpoints = [
|
||||
{ ...endpoint('pve1'), displayName: 'Compute' },
|
||||
endpoint('pve2'),
|
||||
];
|
||||
const endpoints = [{ ...endpoint('pve1'), displayName: 'Compute' }, endpoint('pve2')];
|
||||
expect(
|
||||
buildClusterNodeDisplayNameOverridesPayload(endpoints, {
|
||||
'cluster-pve1': '',
|
||||
|
||||
@@ -295,14 +295,11 @@ export const useInfrastructureConfiguredNodesState = ({
|
||||
await NodesAPI.updateNode(existingNode.id, nodeData as NodeConfig);
|
||||
// clusterEndpointOverrides is a write-only payload field: mirror it
|
||||
// onto the cached endpoints instead of spreading it onto the node.
|
||||
const {
|
||||
clusterEndpointOverrides,
|
||||
clusterNodeDisplayNameOverrides,
|
||||
...nodePatch
|
||||
} = nodeData as Partial<NodeConfig> & {
|
||||
clusterEndpointOverrides?: ClusterEndpointOverridePayload[];
|
||||
clusterNodeDisplayNameOverrides?: ClusterNodeDisplayNameOverridePayload[];
|
||||
};
|
||||
const { clusterEndpointOverrides, clusterNodeDisplayNameOverrides, ...nodePatch } =
|
||||
nodeData as Partial<NodeConfig> & {
|
||||
clusterEndpointOverrides?: ClusterEndpointOverridePayload[];
|
||||
clusterNodeDisplayNameOverrides?: ClusterNodeDisplayNameOverridePayload[];
|
||||
};
|
||||
setNodes(
|
||||
nodes().map((node) => {
|
||||
if (node.id !== existingNode.id) return node;
|
||||
|
||||
@@ -6,10 +6,7 @@ import { notificationStore } from '@/stores/notifications';
|
||||
import { logger } from '@/utils/logger';
|
||||
import { updateStore } from '@/stores/updates';
|
||||
import { copyToClipboard } from '@/utils/clipboard';
|
||||
import {
|
||||
loadRuntimeBranding,
|
||||
updateDockerUpdateActionsSetting,
|
||||
} from '@/stores/systemSettings';
|
||||
import { loadRuntimeBranding, updateDockerUpdateActionsSetting } from '@/stores/systemSettings';
|
||||
import type { ReportBrandSettings } from '@/types/config';
|
||||
import {
|
||||
BACKUP_INTERVAL_OPTIONS,
|
||||
|
||||
@@ -50,9 +50,7 @@ describe('Button', () => {
|
||||
expect(buttonModelSource).toContain('dangerOutline:');
|
||||
expect(buttonModelSource).toContain('export const BUTTON_SIZE_CLASSES');
|
||||
expect(buttonModelSource).toContain("xs: 'min-h-11 px-2.5 py-1 text-xs sm:min-h-0'");
|
||||
expect(buttonModelSource).toContain(
|
||||
"mdCompact: 'min-h-11 px-3 py-2 text-sm sm:min-h-0'",
|
||||
);
|
||||
expect(buttonModelSource).toContain("mdCompact: 'min-h-11 px-3 py-2 text-sm sm:min-h-0'");
|
||||
expect(buttonModelSource).toContain("settingsAction: 'min-h-11 px-3 py-2 text-sm sm:min-h-9'");
|
||||
expect(buttonModelSource).toContain(
|
||||
"settingsActionXs: 'min-h-11 px-3 py-2 text-xs sm:min-h-9'",
|
||||
|
||||
@@ -8275,7 +8275,9 @@ describe('shared primitive guardrails', () => {
|
||||
|
||||
expect(savedViewsMenuSource).toContain("from './useSavedViews';");
|
||||
expect(filterToolbarSource).toContain('export const FilterPopoverTrigger');
|
||||
expect(filterToolbarSource).toContain("'min-h-11 rounded-md text-xs font-medium sm:h-7 sm:min-h-0'");
|
||||
expect(filterToolbarSource).toContain(
|
||||
"'min-h-11 rounded-md text-xs font-medium sm:h-7 sm:min-h-0'",
|
||||
);
|
||||
expect(viewOptionsMenuSource).toContain('<FilterPopoverTrigger');
|
||||
expect(viewOptionsMenuSource).toContain('class="static ml-auto shrink-0 sm:relative sm:ml-0"');
|
||||
expect(viewOptionsMenuSource).toContain('class="left-auto right-0');
|
||||
|
||||
@@ -25,7 +25,9 @@ describe('SearchTipsPopover', () => {
|
||||
expect(searchTipsPopoverStateSource).toContain('pointerInside');
|
||||
expect(searchTipsPopoverStateSource).toContain('window.innerWidth >= 640');
|
||||
expect(searchTipsPopoverStateSource).toContain('window.innerWidth - viewportMargin - width');
|
||||
expect(searchTipsPopoverStateSource).toContain("window.addEventListener('scroll', updatePopoverPosition, true)");
|
||||
expect(searchTipsPopoverStateSource).toContain(
|
||||
"window.addEventListener('scroll', updatePopoverPosition, true)",
|
||||
);
|
||||
expect(searchTipsPopoverSource).toContain('style={state.popoverStyle()}');
|
||||
expect(searchTipsPopoverSource).toContain('fixed ${positionClass()}');
|
||||
expect(searchTipsPopoverSource).toContain('sm:absolute sm:mt-2 sm:w-72');
|
||||
|
||||
@@ -55,9 +55,7 @@ describe('AlertDeliveryHealthCard', () => {
|
||||
expect(screen.getByRole('alert')).toHaveTextContent(
|
||||
'Recoverable retry attempts do not trigger this warning',
|
||||
);
|
||||
expect(screen.getByRole('alert')).toHaveTextContent(
|
||||
'classified as authentication (2)',
|
||||
);
|
||||
expect(screen.getByRole('alert')).toHaveTextContent('classified as authentication (2)');
|
||||
expect(screen.getByRole('alert')).toHaveTextContent(
|
||||
'Check destination credentials, tokens, and account permissions',
|
||||
);
|
||||
|
||||
@@ -163,9 +163,7 @@ describe('createNonSuspendingQuery', () => {
|
||||
// patrol-status) the panel emptied and stayed empty until remount.
|
||||
const fetcher = vi.fn(async (key: string) => `value-for-${key}`);
|
||||
|
||||
render(() => (
|
||||
<QueryProbe cacheNamespace={`org-refetch-${Date.now()}`} fetcher={fetcher} />
|
||||
));
|
||||
render(() => <QueryProbe cacheNamespace={`org-refetch-${Date.now()}`} fetcher={fetcher} />);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByTestId('query-probe').textContent).toContain('value-for-stable-key');
|
||||
|
||||
@@ -30,15 +30,7 @@ export type MetricType = 'cpu' | 'memory' | 'disk';
|
||||
export type DisplayMetricType = MetricType | 'temperature' | 'diskTemperature' | 'usage';
|
||||
export type DisplayMetricBarType = MetricType | 'generic';
|
||||
export type AlertThresholdScope =
|
||||
| 'guest'
|
||||
| 'node'
|
||||
| 'pbs'
|
||||
| 'agent'
|
||||
| 'docker'
|
||||
| 'storage'
|
||||
| 'kubernetes'
|
||||
| 'truenas'
|
||||
| 'vmware';
|
||||
'guest' | 'node' | 'pbs' | 'agent' | 'docker' | 'storage' | 'kubernetes' | 'truenas' | 'vmware';
|
||||
|
||||
export interface MetricDisplayThresholds {
|
||||
warning: number;
|
||||
|
||||
Reference in New Issue
Block a user