Skip to content

Commit

Permalink
change replaced icon
Browse files Browse the repository at this point in the history
  • Loading branch information
gbanu committed Feb 17, 2025
1 parent d2c0735 commit cfd2279
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ export class DeploymentStateTagComponent {
INACTIVE: 'time-duration-off',
UNKNOWN: 'question-mark',
NEVER_DEPLOYED: 'question-mark',
REPLACED: 'progress',
REPLACED: 'repeat',
};
return iconMap[this.internalState()];
});

iconClass = computed(() => {
const spinStates: ExtendedDeploymentState[] = ['WAITING', 'PENDING', 'IN_PROGRESS', 'QUEUED', 'REPLACED'];
const spinStates: ExtendedDeploymentState[] = ['WAITING', 'PENDING', 'IN_PROGRESS', 'QUEUED'];
return `!size-5 ${spinStates.includes(this.internalState()) ? 'animate-spin' : ''}`;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ export class ReleaseCandidateDeploymentTableComponent {
}

// If the latest deployment is not part of the deployments list, but there were deployments to this environment, the release candidate was replaced
if (deployments.every(deployment => environment.latestDeployment?.id !== deployment.id && environment.latestDeployment?.type !== deployment.type)) {
if (deployments.every(deployment => environment.latestDeployment?.id !== deployment.id || environment.latestDeployment?.type !== deployment.type)) {
return 'REPLACED';
}

console.log(deployments);

// If we were not replaced and we are deployed, we are the latest deployment
return environment.latestDeployment?.state || 'UNKNOWN';
};
Expand Down

0 comments on commit cfd2279

Please sign in to comment.