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:
parent
6290e9facc
commit
23295d2736
22 changed files with 312 additions and 297 deletions
|
@ -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';
|
||||
}
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue