1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

Add settings page and badge filters

This commit is contained in:
Michael Crosby 2013-06-09 16:31:05 -09:00
parent 665e750c7b
commit 406f06cb3e
6 changed files with 188 additions and 8 deletions

View file

@ -27,6 +27,32 @@ angular.module('dockerui.filters', [])
return 'success';
};
})
.filter('getstatetext', function() {
return function(state) {
if (state == undefined) return '';
if (state.Ghost && state.Running) {
return 'Ghost';
}
if (state.Running) {
return 'Running';
}
return 'Stopped';
};
})
.filter('getstatelabel', function() {
return function(state) {
if (state == undefined) return '';
if (state.Ghost && state.Running) {
return 'label-important';
}
if (state.Running) {
return 'label-success';
}
return '';
};
})
.filter('getdate', function() {
return function(data) {
//Multiply by 1000 for the unix format