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

feat(ui): add more info about nodes in Swarm view

This commit is contained in:
Anthony Lapenna 2016-07-27 19:54:31 +12:00
parent 95b16919a6
commit 201ab20131
3 changed files with 50 additions and 56 deletions

View file

@ -21,18 +21,6 @@ function ContainerViewModel(data) {
this.Checked = false;
}
function EventViewModel(data) {
// Type, Action, Actor unavailable in Docker < 1.10
this.Time = data.time;
if (data.Type) {
this.Type = data.Type;
this.Details = createEventDetails(data);
} else {
this.Type = data.status;
this.Details = data.from;
}
}
function createEventDetails(event) {
var eventAttr = event.Actor.Attributes;
var details = '';
@ -126,3 +114,15 @@ function createEventDetails(event) {
}
return details;
}
function EventViewModel(data) {
// Type, Action, Actor unavailable in Docker < 1.10
this.Time = data.time;
if (data.Type) {
this.Type = data.Type;
this.Details = createEventDetails(data);
} else {
this.Type = data.status;
this.Details = data.from;
}
}