mirror of
https://github.com/Unleash/unleash.git
synced 2026-01-05 20:06:22 +01:00
feat: skip safeguard cr confirmation dialogue (#11040)
This follows the same pattern we use for release plans in cr. <img width="1519" height="618" alt="image" src="https://github.com/user-attachments/assets/01ecbbd1-5991-4961-88ed-f3702f86dacf" />
This commit is contained in:
parent
9d7521672a
commit
d1180f111f
@ -191,6 +191,7 @@ const ChangeSafeguard: FC<{
|
||||
onCancel={() => {}}
|
||||
safeguard={safeguard}
|
||||
environment={environmentName}
|
||||
skipConfirmation={true}
|
||||
/>
|
||||
)}
|
||||
</TabPanel>
|
||||
@ -271,6 +272,7 @@ const DeleteSafeguard: FC<{
|
||||
onCancel={() => {}}
|
||||
safeguard={safeguard}
|
||||
environment={environmentName}
|
||||
skipConfirmation={true}
|
||||
/>
|
||||
)}
|
||||
</TabPanel>
|
||||
|
||||
@ -51,6 +51,7 @@ interface ISafeguardFormProps {
|
||||
onDelete?: () => void;
|
||||
safeguard?: ISafeguard;
|
||||
environment: string;
|
||||
skipConfirmation?: boolean;
|
||||
}
|
||||
|
||||
const getInitialValues = (safeguard?: ISafeguard) => ({
|
||||
@ -87,6 +88,7 @@ export const SafeguardForm = ({
|
||||
onDelete,
|
||||
safeguard,
|
||||
environment,
|
||||
skipConfirmation = false,
|
||||
}: ISafeguardFormProps) => {
|
||||
const { metricOptions, loading } = useImpactMetricsOptions();
|
||||
const projectId = useRequiredPathParam('projectId');
|
||||
@ -211,7 +213,7 @@ export const SafeguardForm = ({
|
||||
return;
|
||||
}
|
||||
|
||||
if (isChangeRequestConfigured(environment)) {
|
||||
if (isChangeRequestConfigured(environment) && !skipConfirmation) {
|
||||
setDialogOpen(true);
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user