mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
feat(helm): helm actions [r8s-259] (#715)
Co-authored-by: James Player <james.player@portainer.io> Co-authored-by: Cara Ryan <cara.ryan@portainer.io> Co-authored-by: stevensbkang <skan070@gmail.com>
This commit is contained in:
parent
dfa32b6755
commit
4ee349bd6b
117 changed files with 4161 additions and 696 deletions
48
app/react/kubernetes/helm/helm-status-utils.ts
Normal file
48
app/react/kubernetes/helm/helm-status-utils.ts
Normal file
|
@ -0,0 +1,48 @@
|
|||
export enum DeploymentStatus {
|
||||
DEPLOYED = 'deployed',
|
||||
FAILED = 'failed',
|
||||
PENDING = 'pending-install',
|
||||
PENDINGUPGRADE = 'pending-upgrade',
|
||||
PENDINGROLLBACK = 'pending-rollback',
|
||||
SUPERSEDED = 'superseded',
|
||||
UNINSTALLED = 'uninstalled',
|
||||
UNINSTALLING = 'uninstalling',
|
||||
}
|
||||
|
||||
export function getStatusColor(status?: string) {
|
||||
switch (status?.toLowerCase()) {
|
||||
case DeploymentStatus.DEPLOYED:
|
||||
return 'success';
|
||||
case DeploymentStatus.FAILED:
|
||||
return 'danger';
|
||||
case DeploymentStatus.PENDING:
|
||||
case DeploymentStatus.PENDINGUPGRADE:
|
||||
case DeploymentStatus.PENDINGROLLBACK:
|
||||
case DeploymentStatus.UNINSTALLING:
|
||||
return 'warn';
|
||||
case DeploymentStatus.SUPERSEDED:
|
||||
default:
|
||||
return 'muted';
|
||||
}
|
||||
}
|
||||
|
||||
export function getStatusText(status?: string) {
|
||||
switch (status?.toLowerCase()) {
|
||||
case DeploymentStatus.DEPLOYED:
|
||||
return 'Deployed';
|
||||
case DeploymentStatus.FAILED:
|
||||
return 'Failed';
|
||||
case DeploymentStatus.PENDING:
|
||||
return 'Pending install';
|
||||
case DeploymentStatus.PENDINGUPGRADE:
|
||||
return 'Pending upgrade';
|
||||
case DeploymentStatus.PENDINGROLLBACK:
|
||||
return 'Pending rollback';
|
||||
case DeploymentStatus.UNINSTALLING:
|
||||
return 'Uninstalling';
|
||||
case DeploymentStatus.SUPERSEDED:
|
||||
return 'Superseded';
|
||||
default:
|
||||
return 'Unknown';
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue