mirror of
https://github.com/Unleash/unleash.git
synced 2025-12-09 20:04:11 +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;
|
targetMilestoneId: string;
|
||||||
projectId: string;
|
projectId: string;
|
||||||
environment: string;
|
environment: string;
|
||||||
|
featureName: string;
|
||||||
onSave: () => void;
|
onSave: () => void;
|
||||||
onCancel: () => void;
|
onCancel: () => void;
|
||||||
}
|
}
|
||||||
@ -69,6 +70,7 @@ export const MilestoneProgressionForm = ({
|
|||||||
targetMilestoneId,
|
targetMilestoneId,
|
||||||
projectId,
|
projectId,
|
||||||
environment,
|
environment,
|
||||||
|
featureName,
|
||||||
onSave,
|
onSave,
|
||||||
onCancel,
|
onCancel,
|
||||||
}: IMilestoneProgressionFormProps) => {
|
}: IMilestoneProgressionFormProps) => {
|
||||||
@ -93,6 +95,7 @@ export const MilestoneProgressionForm = ({
|
|||||||
await createMilestoneProgression(
|
await createMilestoneProgression(
|
||||||
projectId,
|
projectId,
|
||||||
environment,
|
environment,
|
||||||
|
featureName,
|
||||||
form.getProgressionPayload(),
|
form.getProgressionPayload(),
|
||||||
);
|
);
|
||||||
setToastData({
|
setToastData({
|
||||||
|
|||||||
@ -272,6 +272,7 @@ export const ReleasePlan = ({
|
|||||||
await deleteMilestoneProgression(
|
await deleteMilestoneProgression(
|
||||||
projectId,
|
projectId,
|
||||||
environment,
|
environment,
|
||||||
|
featureName,
|
||||||
milestoneToDeleteProgression.id,
|
milestoneToDeleteProgression.id,
|
||||||
);
|
);
|
||||||
await refetch();
|
await refetch();
|
||||||
@ -363,6 +364,7 @@ export const ReleasePlan = ({
|
|||||||
targetMilestoneId={nextMilestoneId}
|
targetMilestoneId={nextMilestoneId}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
environment={environment}
|
environment={environment}
|
||||||
|
featureName={featureName}
|
||||||
onSave={handleProgressionSave}
|
onSave={handleProgressionSave}
|
||||||
onCancel={handleProgressionCancel}
|
onCancel={handleProgressionCancel}
|
||||||
/>
|
/>
|
||||||
@ -370,6 +372,7 @@ export const ReleasePlan = ({
|
|||||||
}
|
}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
environment={environment}
|
environment={environment}
|
||||||
|
featureName={featureName}
|
||||||
onUpdate={refetch}
|
onUpdate={refetch}
|
||||||
allMilestones={milestones}
|
allMilestones={milestones}
|
||||||
activeMilestoneId={activeMilestoneId}
|
activeMilestoneId={activeMilestoneId}
|
||||||
|
|||||||
@ -62,6 +62,7 @@ interface IMilestoneAutomationSectionProps {
|
|||||||
milestoneName: string;
|
milestoneName: string;
|
||||||
projectId: string;
|
projectId: string;
|
||||||
environment: string;
|
environment: string;
|
||||||
|
featureName: string;
|
||||||
sourceMilestoneId: string;
|
sourceMilestoneId: string;
|
||||||
onUpdate: () => void;
|
onUpdate: () => void;
|
||||||
}
|
}
|
||||||
@ -76,6 +77,7 @@ export const MilestoneAutomationSection = ({
|
|||||||
milestoneName,
|
milestoneName,
|
||||||
projectId,
|
projectId,
|
||||||
environment,
|
environment,
|
||||||
|
featureName,
|
||||||
sourceMilestoneId,
|
sourceMilestoneId,
|
||||||
onUpdate,
|
onUpdate,
|
||||||
}: IMilestoneAutomationSectionProps) => {
|
}: IMilestoneAutomationSectionProps) => {
|
||||||
@ -93,6 +95,7 @@ export const MilestoneAutomationSection = ({
|
|||||||
status={status}
|
status={status}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
environment={environment}
|
environment={environment}
|
||||||
|
featureName={featureName}
|
||||||
sourceMilestoneId={sourceMilestoneId}
|
sourceMilestoneId={sourceMilestoneId}
|
||||||
onUpdate={onUpdate}
|
onUpdate={onUpdate}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -64,6 +64,7 @@ interface IMilestoneTransitionDisplayProps {
|
|||||||
status?: MilestoneStatus;
|
status?: MilestoneStatus;
|
||||||
projectId: string;
|
projectId: string;
|
||||||
environment: string;
|
environment: string;
|
||||||
|
featureName: string;
|
||||||
sourceMilestoneId: string;
|
sourceMilestoneId: string;
|
||||||
onUpdate: () => void;
|
onUpdate: () => void;
|
||||||
}
|
}
|
||||||
@ -75,6 +76,7 @@ export const MilestoneTransitionDisplay = ({
|
|||||||
status,
|
status,
|
||||||
projectId,
|
projectId,
|
||||||
environment,
|
environment,
|
||||||
|
featureName,
|
||||||
sourceMilestoneId,
|
sourceMilestoneId,
|
||||||
onUpdate,
|
onUpdate,
|
||||||
}: IMilestoneTransitionDisplayProps) => {
|
}: IMilestoneTransitionDisplayProps) => {
|
||||||
@ -103,6 +105,7 @@ export const MilestoneTransitionDisplay = ({
|
|||||||
await updateMilestoneProgression(
|
await updateMilestoneProgression(
|
||||||
projectId,
|
projectId,
|
||||||
environment,
|
environment,
|
||||||
|
featureName,
|
||||||
sourceMilestoneId,
|
sourceMilestoneId,
|
||||||
{
|
{
|
||||||
transitionCondition: {
|
transitionCondition: {
|
||||||
|
|||||||
@ -105,6 +105,7 @@ interface IReleasePlanMilestoneProps {
|
|||||||
automationForm?: React.ReactNode;
|
automationForm?: React.ReactNode;
|
||||||
projectId?: string;
|
projectId?: string;
|
||||||
environment?: string;
|
environment?: string;
|
||||||
|
featureName?: string;
|
||||||
onUpdate?: () => void;
|
onUpdate?: () => void;
|
||||||
allMilestones: IReleasePlanMilestone[];
|
allMilestones: IReleasePlanMilestone[];
|
||||||
activeMilestoneId?: string;
|
activeMilestoneId?: string;
|
||||||
@ -121,6 +122,7 @@ export const ReleasePlanMilestone = ({
|
|||||||
automationForm,
|
automationForm,
|
||||||
projectId,
|
projectId,
|
||||||
environment,
|
environment,
|
||||||
|
featureName,
|
||||||
onUpdate,
|
onUpdate,
|
||||||
allMilestones,
|
allMilestones,
|
||||||
activeMilestoneId,
|
activeMilestoneId,
|
||||||
@ -173,7 +175,11 @@ export const ReleasePlanMilestone = ({
|
|||||||
</StyledSecondaryLabel>
|
</StyledSecondaryLabel>
|
||||||
</StyledAccordionSummary>
|
</StyledAccordionSummary>
|
||||||
</StyledAccordion>
|
</StyledAccordion>
|
||||||
{showAutomation && projectId && environment && onUpdate && (
|
{showAutomation &&
|
||||||
|
projectId &&
|
||||||
|
environment &&
|
||||||
|
featureName &&
|
||||||
|
onUpdate && (
|
||||||
<MilestoneAutomationSection
|
<MilestoneAutomationSection
|
||||||
showAutomation={showAutomation}
|
showAutomation={showAutomation}
|
||||||
status={status}
|
status={status}
|
||||||
@ -184,6 +190,7 @@ export const ReleasePlanMilestone = ({
|
|||||||
milestoneName={milestone.name}
|
milestoneName={milestone.name}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
environment={environment}
|
environment={environment}
|
||||||
|
featureName={featureName}
|
||||||
sourceMilestoneId={milestone.id}
|
sourceMilestoneId={milestone.id}
|
||||||
onUpdate={onUpdate}
|
onUpdate={onUpdate}
|
||||||
/>
|
/>
|
||||||
@ -258,7 +265,11 @@ export const ReleasePlanMilestone = ({
|
|||||||
</StrategyList>
|
</StrategyList>
|
||||||
</StyledAccordionDetails>
|
</StyledAccordionDetails>
|
||||||
</StyledAccordion>
|
</StyledAccordion>
|
||||||
{showAutomation && projectId && environment && onUpdate && (
|
{showAutomation &&
|
||||||
|
projectId &&
|
||||||
|
environment &&
|
||||||
|
featureName &&
|
||||||
|
onUpdate && (
|
||||||
<MilestoneAutomationSection
|
<MilestoneAutomationSection
|
||||||
showAutomation={showAutomation}
|
showAutomation={showAutomation}
|
||||||
status={status}
|
status={status}
|
||||||
@ -269,6 +280,7 @@ export const ReleasePlanMilestone = ({
|
|||||||
milestoneName={milestone.name}
|
milestoneName={milestone.name}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
environment={environment}
|
environment={environment}
|
||||||
|
featureName={featureName}
|
||||||
sourceMilestoneId={milestone.id}
|
sourceMilestoneId={milestone.id}
|
||||||
onUpdate={onUpdate}
|
onUpdate={onUpdate}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -10,10 +10,11 @@ export const useMilestoneProgressionsApi = () => {
|
|||||||
const createMilestoneProgression = async (
|
const createMilestoneProgression = async (
|
||||||
projectId: string,
|
projectId: string,
|
||||||
environment: string,
|
environment: string,
|
||||||
|
featureName: string,
|
||||||
body: CreateMilestoneProgressionSchema,
|
body: CreateMilestoneProgressionSchema,
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
const requestId = 'createMilestoneProgression';
|
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(
|
const req = createRequest(
|
||||||
path,
|
path,
|
||||||
{
|
{
|
||||||
@ -29,11 +30,12 @@ export const useMilestoneProgressionsApi = () => {
|
|||||||
const updateMilestoneProgression = async (
|
const updateMilestoneProgression = async (
|
||||||
projectId: string,
|
projectId: string,
|
||||||
environment: string,
|
environment: string,
|
||||||
|
featureName: string,
|
||||||
sourceMilestoneId: string,
|
sourceMilestoneId: string,
|
||||||
body: UpdateMilestoneProgressionSchema,
|
body: UpdateMilestoneProgressionSchema,
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
const requestId = 'updateMilestoneProgression';
|
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(
|
const req = createRequest(
|
||||||
path,
|
path,
|
||||||
{
|
{
|
||||||
@ -49,10 +51,11 @@ export const useMilestoneProgressionsApi = () => {
|
|||||||
const deleteMilestoneProgression = async (
|
const deleteMilestoneProgression = async (
|
||||||
projectId: string,
|
projectId: string,
|
||||||
environment: string,
|
environment: string,
|
||||||
|
featureName: string,
|
||||||
sourceMilestoneId: string,
|
sourceMilestoneId: string,
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
const requestId = 'deleteMilestoneProgression';
|
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(
|
const req = createRequest(
|
||||||
path,
|
path,
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user