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

Added pause/unpause to containers,

Auto-update /container and /containers views after performing an action,
Display spinner when container actions are being performed,
Unified style
This commit is contained in:
Kevan Ahlquist 2014-10-18 21:41:26 -05:00
parent 9dccf95152
commit 8652285227
5 changed files with 151 additions and 81 deletions

View file

@ -34,6 +34,9 @@ angular.module('dockerui.filters', [])
if (state.Ghost && state.Running) {
return 'Ghost';
}
if (state.Running && state.Paused) {
return 'Running (Paused)';
}
if (state.Running) {
return 'Running';
}
@ -62,22 +65,22 @@ angular.module('dockerui.filters', [])
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[[i]];
};
})
.filter('containername', function() {
return function(container) {
var name = container.Names[0];
return name.substring(1, name.length);
};
})
.filter('repotag', function() {
return function(image) {
if (image.RepoTags && image.RepoTags.length > 0) {
var tag = image.RepoTags[0];
if (tag == '<none>:<none>') { tag = ''; }
return tag;
}
return '';
};
})
.filter('containername', function() {
return function(container) {
var name = container.Names[0];
return name.substring(1, name.length);
};
})
.filter('repotag', function() {
return function(image) {
if (image.RepoTags && image.RepoTags.length > 0) {
var tag = image.RepoTags[0];
if (tag == '<none>:<none>') { tag = ''; }
return tag;
}
return '';
};
})
.filter('getdate', function() {
return function(data) {