1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Show pod terminating status (#259)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-04-16 16:46:33 +03:00 committed by GitHub
parent bfc58edc46
commit 66e977ac14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -298,6 +298,9 @@ export class Pod extends WorkloadKubeObject {
// Returns pod phase or container error if occured
getStatusMessage() {
if (this.getReason() === PodStatus.EVICTED) return "Evicted";
if (this.getStatus() === PodStatus.RUNNING && this.metadata.deletionTimestamp) return "Terminating";
let message = "";
const statuses = this.getContainerStatuses(false); // not including initContainers
if (statuses.length) {
@ -313,7 +316,6 @@ export class Pod extends WorkloadKubeObject {
}
})
}
if (this.getReason() === PodStatus.EVICTED) return "Evicted";
if (message) return message;
return this.getStatusPhase();
}

View File

@ -5,6 +5,7 @@ $pod-status-evicted-color: $colorError;
$pod-status-succeeded-color: $colorSuccess;
$pod-status-failed-color: $colorError;
$pod-status-terminated-color: $colorTerminated;
$pod-status-terminating-color: $colorTerminated;
$pod-status-unknown-color: $colorVague;
$pod-status-complete-color: $colorSuccess;
$pod-status-crash-loop-color: $colorError;
@ -33,6 +34,7 @@ $pod-status-color-list: (
waiting: $pod-status-pending-color,
succeeded: $pod-status-succeeded-color,
failed: $pod-status-failed-color,
terminating: $pod-status-terminating-color,
terminated: $pod-status-terminated-color,
completed: $pod-status-complete-color,
crash-loop-back-off: $pod-status-crash-loop-color,