Merge pull request #3694 from bluewave-labs/feat/fe/progress-indicator-infra

Feat: Progress indicator infra & pagespeed
This commit is contained in:
Alexander Holliday authored and GitHub committed 2026-06-04 00:25:19 -07:00
commit 45e31e7212
2 files changed
+15 -11

No files matched your search

+7 -7
View File
@@ -264,10 +264,10 @@ const CreateMonitorPage = () => {
reset(defaults);
}, [defaults, reset]);
// Multi-step wizard, uptime create only (showTypeSelector). Other flows
// keep the flat form, where showStep() is always true.
// Multi-step wizard on every create flow; edit mode keeps the flat form
// where showStep() is always true.
const [currentStep, setCurrentStep] = useState(0);
const showStep = (step: number) => !showTypeSelector || currentStep === step;
const showStep = (step: number) => isEditMode || currentStep === step;
const watchedType = watch("type") as MonitorType;
const watchedUseAdvancedMatching = watch("useAdvancedMatching") as boolean;
@@ -362,7 +362,7 @@ const CreateMonitorPage = () => {
refetch={refetchMonitor}
onDelete={handleDeleteClick}
/>
{showTypeSelector && (
{!isEditMode && (
<StepProgress
steps={totalSteps}
current={currentStep}
@@ -1335,9 +1335,9 @@ const CreateMonitorPage = () => {
<Stack
direction="row"
justifyContent={showTypeSelector ? "space-between" : "flex-end"}
justifyContent={!isEditMode ? "space-between" : "flex-end"}
>
{showTypeSelector && (
{!isEditMode && (
<Button
type="button"
variant="outlined"
@@ -1348,7 +1348,7 @@ const CreateMonitorPage = () => {
{t("common.buttons.back")}
</Button>
)}
{showTypeSelector && currentStep < totalSteps - 1 ? (
{!isEditMode && currentStep < totalSteps - 1 ? (
<Button
key="wizard-next"
type="button"
+8 -4
View File
@@ -128,19 +128,23 @@ const hardwareSchema = baseSchema.extend({
cpuAlertThreshold: z
.number()
.min(0, "CPU threshold must be at least 0")
.max(100, "CPU threshold must be at most 100"),
.max(100, "CPU threshold must be at most 100")
.register(monitorStepRegistry, { step: 1 }),
memoryAlertThreshold: z
.number()
.min(0, "Memory threshold must be at least 0")
.max(100, "Memory threshold must be at most 100"),
.max(100, "Memory threshold must be at most 100")
.register(monitorStepRegistry, { step: 1 }),
diskAlertThreshold: z
.number()
.min(0, "Disk threshold must be at least 0")
.max(100, "Disk threshold must be at most 100"),
.max(100, "Disk threshold must be at most 100")
.register(monitorStepRegistry, { step: 1 }),
tempAlertThreshold: z
.number()
.min(0, "Temperature threshold must be at least 0")
.max(150, "Temperature threshold must be at most 150"),
.max(150, "Temperature threshold must be at most 150")
.register(monitorStepRegistry, { step: 1 }),
selectedDisks: z.array(z.string()),
});