mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
feat(Monitor): add monitorId prop to MonitorStep and MonitorSteps components for secret population during testing
This commit is contained in:
@@ -60,6 +60,7 @@ import MonitorStepTraceMonitor, {
|
||||
import CheckboxElement from "Common/UI/Components/Checkbox/Checkbox";
|
||||
import MonitorTestForm from "./MonitorTest";
|
||||
import MonitorSteps from "Common/Types/Monitor/MonitorSteps";
|
||||
import ObjectID from "Common/Types/ObjectID";
|
||||
import Probe from "Common/Models/DatabaseModels/Probe";
|
||||
import MetricMonitorStepForm from "./MetricMonitor/MetricMonitorStepForm";
|
||||
import MonitorStepMetricMonitor, {
|
||||
@@ -82,6 +83,7 @@ export interface ComponentProps {
|
||||
monitorType: MonitorType;
|
||||
allMonitorSteps: MonitorSteps;
|
||||
probes: Array<Probe>;
|
||||
monitorId?: ObjectID | undefined; // this is used to populate secrets when testing the monitor.
|
||||
}
|
||||
|
||||
const MonitorStepElement: FunctionComponent<ComponentProps> = (
|
||||
@@ -824,6 +826,7 @@ return {
|
||||
{/** Monitor Test Form */}
|
||||
<div className="mt-5 mb-2">
|
||||
<MonitorTestForm
|
||||
monitorId={props.monitorId}
|
||||
monitorSteps={props.allMonitorSteps}
|
||||
monitorType={props.monitorType}
|
||||
probes={props.probes}
|
||||
|
||||
@@ -32,6 +32,7 @@ export interface ComponentProps extends CustomElementProps {
|
||||
initialValue?: MonitorSteps;
|
||||
monitorType: MonitorType;
|
||||
monitorName?: string | undefined; // this is used to prefill incident title and description. If not provided then it will be empty.
|
||||
monitorId?: ObjectID | undefined; // this is used to populate secrets when testing the monitor.
|
||||
}
|
||||
|
||||
const MonitorStepsElement: FunctionComponent<ComponentProps> = (
|
||||
@@ -236,6 +237,7 @@ const MonitorStepsElement: FunctionComponent<ComponentProps> = (
|
||||
onCallPolicyDropdownOptions={onCallPolicyDropdownOptions}
|
||||
value={i}
|
||||
probes={probes}
|
||||
monitorId={props.monitorId}
|
||||
/*
|
||||
* onDelete={() => {
|
||||
* // remove the criteria filter
|
||||
|
||||
@@ -163,6 +163,7 @@ const MonitorCriteria: FunctionComponent<
|
||||
<MonitorStepsForm
|
||||
{...props}
|
||||
monitorType={monitorType || MonitorType.Manual}
|
||||
monitorId={modelId}
|
||||
/>
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user