1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

feat(app): migrate app containers to react [EE-5353] (#9992)

This commit is contained in:
Ali 2023-08-17 22:00:25 +12:00 committed by GitHub
parent 6290e9facc
commit 23295d2736
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 312 additions and 297 deletions

View file

@ -1,52 +0,0 @@
import _ from 'lodash-es';
angular
.module('portainer.kubernetes')
.filter('kubernetesPodStatusColor', function () {
'use strict';
return function (text) {
var status = _.toLower(text);
switch (status) {
case 'running':
return 'success';
case 'waiting':
return 'warning';
case 'terminated':
return 'info';
default:
return 'danger';
}
};
})
.filter('kubernetesPodConditionStatusText', function () {
'use strict';
return function (status, type) {
switch (type) {
case 'Unschedulable':
switch (status) {
case 'True':
return 'Alert';
case 'False':
return 'OK';
case 'Unknown':
return 'Warning';
}
break;
case 'PodScheduled':
case 'Ready':
case 'Initialized':
case 'ContainersReady':
switch (status) {
case 'True':
return 'Ok';
case 'False':
return 'Alert';
case 'Unknown':
return 'Warning';
}
break;
default:
return 'Unknown';
}
};
});