refactor(infrastructure): move capture-form guidance to ConfigBox subtitle
The previous commit added inline helperText under the URL and Secret fields, but no other form in the codebase uses helperText for static guidance — only for validation errors. The project's pattern for setup guidance is the ConfigBox subtitle text on the left side of the form, populated from pages.createMonitor.form.general.description.<type>. Move the guidance there so this form follows the same convention as every other monitor type. - Remove urlHelperText / secretHelperText from GeneralSettingsConfig - Remove the new helperText props on the URL and Secret TextFields - Drop captureUrl.helperText and secret.helperText keys from all 16 locales - Beef up description.hardware to mention the /api/v1/metrics path requirement and the no-Bearer-prefix rule The realistic captureUrl placeholder (added in the previous commit) stays — it does most of the URL-disambiguation work on its own.
This commit is contained in:
1 parent
d5cd957bbd
commit
63c1a60b06
17 files changed
+50
-94
No files matched your search
@@ -44,13 +44,11 @@ import type { MonitorFormData } from "@/Validation/monitor";
|
||||
interface GeneralSettingsConfig {
|
||||
urlLabel: string;
|
||||
urlPlaceholder: string;
|
||||
urlHelperText?: string;
|
||||
namePlaceholder: string;
|
||||
showUrl: boolean;
|
||||
showPort: boolean;
|
||||
showGameSelect: boolean;
|
||||
showSecret: boolean;
|
||||
secretHelperText?: string;
|
||||
showGrpcServiceName: boolean;
|
||||
showIgnoreTls: boolean;
|
||||
}
|
||||
@@ -140,13 +138,11 @@ const getGeneralSettingsConfig = (
|
||||
hardware: {
|
||||
urlLabel: t("pages.createMonitor.form.general.option.captureUrl.label"),
|
||||
urlPlaceholder: t("pages.createMonitor.form.general.option.captureUrl.placeholder"),
|
||||
urlHelperText: t("pages.createMonitor.form.general.option.captureUrl.helperText"),
|
||||
namePlaceholder: t("pages.createMonitor.form.general.option.name.placeholder"),
|
||||
showUrl: true,
|
||||
showPort: false,
|
||||
showGameSelect: false,
|
||||
showSecret: true,
|
||||
secretHelperText: t("pages.createMonitor.form.general.option.secret.helperText"),
|
||||
showGrpcServiceName: false,
|
||||
showIgnoreTls: false,
|
||||
},
|
||||
@@ -393,11 +389,7 @@ const CreateMonitorPage = () => {
|
||||
fullWidth
|
||||
disabled={isEditMode}
|
||||
error={!!fieldState.error}
|
||||
helperText={
|
||||
fieldState.error?.message ??
|
||||
generalSettingsConfig.urlHelperText ??
|
||||
""
|
||||
}
|
||||
helperText={fieldState.error?.message ?? ""}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
@@ -498,11 +490,7 @@ const CreateMonitorPage = () => {
|
||||
)}
|
||||
fullWidth
|
||||
error={!!fieldState.error}
|
||||
helperText={
|
||||
fieldState.error?.message ??
|
||||
generalSettingsConfig.secretHelperText ??
|
||||
""
|
||||
}
|
||||
helperText={fieldState.error?.message ?? ""}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user