mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
feat(stacks): support compose v2.0 stack (#1963)
This commit is contained in:
parent
ef15cd30eb
commit
e3d564325b
174 changed files with 7898 additions and 5849 deletions
|
@ -1,6 +1,27 @@
|
|||
function createStatus(statusText) {
|
||||
var status = _.toLower(statusText);
|
||||
|
||||
if (status.indexOf('paused') > -1) {
|
||||
return 'paused';
|
||||
} else if (status.indexOf('dead') > -1) {
|
||||
return 'dead';
|
||||
} else if (status.indexOf('created') > -1) {
|
||||
return 'created';
|
||||
} else if (status.indexOf('exited') > -1) {
|
||||
return 'stopped';
|
||||
} else if (status.indexOf('(healthy)') > -1) {
|
||||
return 'healthy';
|
||||
} else if (status.indexOf('(unhealthy)') > -1) {
|
||||
return 'unhealthy';
|
||||
} else if (status.indexOf('(health: starting)') > -1) {
|
||||
return 'starting';
|
||||
}
|
||||
return 'running';
|
||||
}
|
||||
|
||||
function ContainerViewModel(data) {
|
||||
this.Id = data.Id;
|
||||
this.Status = data.Status;
|
||||
this.Status = createStatus(data.Status);
|
||||
this.State = data.State;
|
||||
this.Names = data.Names;
|
||||
// Unavailable in Docker < 1.10
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue