Skip to content

Commit

Permalink
when null show deployment status
Browse files Browse the repository at this point in the history
  • Loading branch information
GihanAyesh committed Oct 13, 2023
1 parent 1fbb1a9 commit 32ba840
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,8 @@ export default function Environments() {
return revision.deploymentInfo.some(info => info.status === "CREATED" && info.name === row.name);});

const hasApprovedDeployment =gatewayRevisions.some(revision => {
return revision.deploymentInfo.some(info => info.status === "APPROVED" && info.name === row.name);});
return revision.deploymentInfo.some(info => (info.status === null || info.status === "APPROVED") &&
info.name === row.name);});

if (pendingDeployment) {
// Content to display when revision status is created
Expand Down Expand Up @@ -1657,7 +1658,8 @@ export default function Environments() {
return revision.deploymentInfo.some(info => info.status === "CREATED" && info.name === row.name);});

const approvedDeployment =gatewayRevisions.find(revision => {
return revision.deploymentInfo.some(info => info.status === "APPROVED" && info.name === row.name);});
return revision.deploymentInfo.some(info => (info.status === null || info.status === "APPROVED") &&
info.name === row.name);});

const filteredRevisions = allRevisions.filter(item => {
if (pendingDeployment && pendingDeployment.displayName === item.displayName) {
Expand Down Expand Up @@ -2166,7 +2168,8 @@ export default function Environments() {
.filter(o1 => {
if (o1.deploymentInfo.some(
o2 => o2.name === row.name &&
o2.status === 'APPROVED')) {
(o2.status === null ||
o2.status === 'APPROVED'))) {
return o1;
}
return null;
Expand Down

0 comments on commit 32ba840

Please sign in to comment.