mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-24 20:06:55 +01:00
feat: changing milestone progression url (#10795)
This commit is contained in:
parent
16d420a2e8
commit
61a82673e9
@ -60,6 +60,7 @@ interface IMilestoneProgressionFormProps {
|
||||
targetMilestoneId: string;
|
||||
projectId: string;
|
||||
environment: string;
|
||||
featureName: string;
|
||||
onSave: () => void;
|
||||
onCancel: () => void;
|
||||
}
|
||||
@ -69,6 +70,7 @@ export const MilestoneProgressionForm = ({
|
||||
targetMilestoneId,
|
||||
projectId,
|
||||
environment,
|
||||
featureName,
|
||||
onSave,
|
||||
onCancel,
|
||||
}: IMilestoneProgressionFormProps) => {
|
||||
@ -93,6 +95,7 @@ export const MilestoneProgressionForm = ({
|
||||
await createMilestoneProgression(
|
||||
projectId,
|
||||
environment,
|
||||
featureName,
|
||||
form.getProgressionPayload(),
|
||||
);
|
||||
setToastData({
|
||||
|
||||
@ -272,6 +272,7 @@ export const ReleasePlan = ({
|
||||
await deleteMilestoneProgression(
|
||||
projectId,
|
||||
environment,
|
||||
featureName,
|
||||
milestoneToDeleteProgression.id,
|
||||
);
|
||||
await refetch();
|
||||
@ -363,6 +364,7 @@ export const ReleasePlan = ({
|
||||
targetMilestoneId={nextMilestoneId}
|
||||
projectId={projectId}
|
||||
environment={environment}
|
||||
featureName={featureName}
|
||||
onSave={handleProgressionSave}
|
||||
onCancel={handleProgressionCancel}
|
||||
/>
|
||||
@ -370,6 +372,7 @@ export const ReleasePlan = ({
|
||||
}
|
||||
projectId={projectId}
|
||||
environment={environment}
|
||||
featureName={featureName}
|
||||
onUpdate={refetch}
|
||||
allMilestones={milestones}
|
||||
activeMilestoneId={activeMilestoneId}
|
||||
|
||||
@ -62,6 +62,7 @@ interface IMilestoneAutomationSectionProps {
|
||||
milestoneName: string;
|
||||
projectId: string;
|
||||
environment: string;
|
||||
featureName: string;
|
||||
sourceMilestoneId: string;
|
||||
onUpdate: () => void;
|
||||
}
|
||||
@ -76,6 +77,7 @@ export const MilestoneAutomationSection = ({
|
||||
milestoneName,
|
||||
projectId,
|
||||
environment,
|
||||
featureName,
|
||||
sourceMilestoneId,
|
||||
onUpdate,
|
||||
}: IMilestoneAutomationSectionProps) => {
|
||||
@ -93,6 +95,7 @@ export const MilestoneAutomationSection = ({
|
||||
status={status}
|
||||
projectId={projectId}
|
||||
environment={environment}
|
||||
featureName={featureName}
|
||||
sourceMilestoneId={sourceMilestoneId}
|
||||
onUpdate={onUpdate}
|
||||
/>
|
||||
|
||||
@ -64,6 +64,7 @@ interface IMilestoneTransitionDisplayProps {
|
||||
status?: MilestoneStatus;
|
||||
projectId: string;
|
||||
environment: string;
|
||||
featureName: string;
|
||||
sourceMilestoneId: string;
|
||||
onUpdate: () => void;
|
||||
}
|
||||
@ -75,6 +76,7 @@ export const MilestoneTransitionDisplay = ({
|
||||
status,
|
||||
projectId,
|
||||
environment,
|
||||
featureName,
|
||||
sourceMilestoneId,
|
||||
onUpdate,
|
||||
}: IMilestoneTransitionDisplayProps) => {
|
||||
@ -103,6 +105,7 @@ export const MilestoneTransitionDisplay = ({
|
||||
await updateMilestoneProgression(
|
||||
projectId,
|
||||
environment,
|
||||
featureName,
|
||||
sourceMilestoneId,
|
||||
{
|
||||
transitionCondition: {
|
||||
|
||||
@ -105,6 +105,7 @@ interface IReleasePlanMilestoneProps {
|
||||
automationForm?: React.ReactNode;
|
||||
projectId?: string;
|
||||
environment?: string;
|
||||
featureName?: string;
|
||||
onUpdate?: () => void;
|
||||
allMilestones: IReleasePlanMilestone[];
|
||||
activeMilestoneId?: string;
|
||||
@ -121,6 +122,7 @@ export const ReleasePlanMilestone = ({
|
||||
automationForm,
|
||||
projectId,
|
||||
environment,
|
||||
featureName,
|
||||
onUpdate,
|
||||
allMilestones,
|
||||
activeMilestoneId,
|
||||
@ -173,21 +175,26 @@ export const ReleasePlanMilestone = ({
|
||||
</StyledSecondaryLabel>
|
||||
</StyledAccordionSummary>
|
||||
</StyledAccordion>
|
||||
{showAutomation && projectId && environment && onUpdate && (
|
||||
<MilestoneAutomationSection
|
||||
showAutomation={showAutomation}
|
||||
status={status}
|
||||
onAddAutomation={onAddAutomation}
|
||||
onDeleteAutomation={onDeleteAutomation}
|
||||
automationForm={automationForm}
|
||||
transitionCondition={milestone.transitionCondition}
|
||||
milestoneName={milestone.name}
|
||||
projectId={projectId}
|
||||
environment={environment}
|
||||
sourceMilestoneId={milestone.id}
|
||||
onUpdate={onUpdate}
|
||||
/>
|
||||
)}
|
||||
{showAutomation &&
|
||||
projectId &&
|
||||
environment &&
|
||||
featureName &&
|
||||
onUpdate && (
|
||||
<MilestoneAutomationSection
|
||||
showAutomation={showAutomation}
|
||||
status={status}
|
||||
onAddAutomation={onAddAutomation}
|
||||
onDeleteAutomation={onDeleteAutomation}
|
||||
automationForm={automationForm}
|
||||
transitionCondition={milestone.transitionCondition}
|
||||
milestoneName={milestone.name}
|
||||
projectId={projectId}
|
||||
environment={environment}
|
||||
featureName={featureName}
|
||||
sourceMilestoneId={milestone.id}
|
||||
onUpdate={onUpdate}
|
||||
/>
|
||||
)}
|
||||
</StyledMilestoneContainer>
|
||||
);
|
||||
}
|
||||
@ -258,21 +265,26 @@ export const ReleasePlanMilestone = ({
|
||||
</StrategyList>
|
||||
</StyledAccordionDetails>
|
||||
</StyledAccordion>
|
||||
{showAutomation && projectId && environment && onUpdate && (
|
||||
<MilestoneAutomationSection
|
||||
showAutomation={showAutomation}
|
||||
status={status}
|
||||
onAddAutomation={onAddAutomation}
|
||||
onDeleteAutomation={onDeleteAutomation}
|
||||
automationForm={automationForm}
|
||||
transitionCondition={milestone.transitionCondition}
|
||||
milestoneName={milestone.name}
|
||||
projectId={projectId}
|
||||
environment={environment}
|
||||
sourceMilestoneId={milestone.id}
|
||||
onUpdate={onUpdate}
|
||||
/>
|
||||
)}
|
||||
{showAutomation &&
|
||||
projectId &&
|
||||
environment &&
|
||||
featureName &&
|
||||
onUpdate && (
|
||||
<MilestoneAutomationSection
|
||||
showAutomation={showAutomation}
|
||||
status={status}
|
||||
onAddAutomation={onAddAutomation}
|
||||
onDeleteAutomation={onDeleteAutomation}
|
||||
automationForm={automationForm}
|
||||
transitionCondition={milestone.transitionCondition}
|
||||
milestoneName={milestone.name}
|
||||
projectId={projectId}
|
||||
environment={environment}
|
||||
featureName={featureName}
|
||||
sourceMilestoneId={milestone.id}
|
||||
onUpdate={onUpdate}
|
||||
/>
|
||||
)}
|
||||
</StyledMilestoneContainer>
|
||||
);
|
||||
};
|
||||
|
||||
@ -10,10 +10,11 @@ export const useMilestoneProgressionsApi = () => {
|
||||
const createMilestoneProgression = async (
|
||||
projectId: string,
|
||||
environment: string,
|
||||
featureName: string,
|
||||
body: CreateMilestoneProgressionSchema,
|
||||
): Promise<void> => {
|
||||
const requestId = 'createMilestoneProgression';
|
||||
const path = `api/admin/projects/${projectId}/environments/${environment}/progressions`;
|
||||
const path = `api/admin/projects/${projectId}/features/${featureName}/environments/${environment}/progressions`;
|
||||
const req = createRequest(
|
||||
path,
|
||||
{
|
||||
@ -29,11 +30,12 @@ export const useMilestoneProgressionsApi = () => {
|
||||
const updateMilestoneProgression = async (
|
||||
projectId: string,
|
||||
environment: string,
|
||||
featureName: string,
|
||||
sourceMilestoneId: string,
|
||||
body: UpdateMilestoneProgressionSchema,
|
||||
): Promise<void> => {
|
||||
const requestId = 'updateMilestoneProgression';
|
||||
const path = `api/admin/projects/${projectId}/environments/${environment}/progressions/${sourceMilestoneId}`;
|
||||
const path = `api/admin/projects/${projectId}/features/${featureName}/environments/${environment}/progressions/${sourceMilestoneId}`;
|
||||
const req = createRequest(
|
||||
path,
|
||||
{
|
||||
@ -49,10 +51,11 @@ export const useMilestoneProgressionsApi = () => {
|
||||
const deleteMilestoneProgression = async (
|
||||
projectId: string,
|
||||
environment: string,
|
||||
featureName: string,
|
||||
sourceMilestoneId: string,
|
||||
): Promise<void> => {
|
||||
const requestId = 'deleteMilestoneProgression';
|
||||
const path = `api/admin/projects/${projectId}/environments/${environment}/progressions/${sourceMilestoneId}`;
|
||||
const path = `api/admin/projects/${projectId}/features/${featureName}/environments/${environment}/progressions/${sourceMilestoneId}`;
|
||||
const req = createRequest(
|
||||
path,
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user