Skip to content

Commit

Permalink
feat(core/managed): add proper support for skipped, approved artifact…
Browse files Browse the repository at this point in the history
… states (#8142)
  • Loading branch information
Erik Munson committed Apr 8, 2020
1 parent 9b05a07 commit b7709ab
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/scripts/modules/core/src/domain/IManagedEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export interface IManagedEnviromentSummary {
approved: string[];
previous: string[];
vetoed: string[];
skipped: string[];
};
}>;
}
Expand All @@ -77,7 +78,7 @@ export interface IManagedArtifactVersion {
version: string;
environments: Array<{
name: string;
state: 'current' | 'deploying' | 'approved' | 'pending' | 'previous' | 'vetoed';
state: 'current' | 'deploying' | 'approved' | 'pending' | 'previous' | 'vetoed' | 'skipped';
deployedAt?: string;
replacedAt?: string;
replacedBy?: string;
Expand Down
41 changes: 40 additions & 1 deletion app/scripts/modules/core/src/managed/ArtifactDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,46 @@ export const ArtifactDetail = ({
className="sp-margin-l-right"
icon="placeholder"
text={undefined}
title="Never deployed here"
title="Not deployed here yet"
isActive={true}
noticeType="neutral"
/>
)}
{state === 'approved' && (
<NoticeCard
className="sp-margin-l-right"
icon="checkBadge"
text={undefined}
title={
<span className="sp-group-margin-xs-xaxis">
<span>Approved</span> <span className="text-regular"></span>{' '}
<span className="text-regular">deployment is about to begin</span>
</span>
}
isActive={true}
noticeType="info"
/>
)}
{state === 'skipped' && (
<NoticeCard
className="sp-margin-l-right"
icon="placeholder"
text={undefined}
title={
<span className="sp-group-margin-xs-xaxis">
<span>Skipped</span> <span className="text-regular"></span>{' '}
{replacedBy && (
<Pill
text={
replacedByBuildNumber
? `#${replacedByBuildNumber}`
: replacedByPackageVersion || replacedBy
}
/>
)}{' '}
<span className="text-regular">{!replacedBy && 'a later version '}became available</span>
</span>
}
isActive={true}
noticeType="neutral"
/>
Expand Down
4 changes: 4 additions & 0 deletions app/scripts/modules/core/src/managed/ArtifactRow.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
background-color: var(--color-porcelain);
}

&.skipped {
background-color: var(--color-porcelain);
}

&.previous {
background-color: var(--color-nobel);
}
Expand Down

0 comments on commit b7709ab

Please sign in to comment.