1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-01 20:05:23 +02:00

feat(node): add engine labels info in the swarm nodes view (#1451)

This commit is contained in:
doncicuto 2017-12-01 09:26:03 +01:00 committed by Anthony Lapenna
parent ca036b56c1
commit 9513da80f6
2 changed files with 36 additions and 1 deletions

View file

@ -17,13 +17,21 @@ function NodeViewModel(data) {
this.Labels = [];
}
var engineLabels = data.Description.Engine.Labels;
if (engineLabels) {
this.EngineLabels = Object.keys(engineLabels).map(function(key) {
return { key: key, value: engineLabels[key] };
});
} else {
this.EngineLabels = [];
}
this.Hostname = data.Description.Hostname;
this.PlatformArchitecture = data.Description.Platform.Architecture;
this.PlatformOS = data.Description.Platform.OS;
this.CPUs = data.Description.Resources.NanoCPUs;
this.Memory = data.Description.Resources.MemoryBytes;
this.EngineVersion = data.Description.Engine.EngineVersion;
this.EngineLabels = data.Description.Engine.Labels;
this.Plugins = data.Description.Engine.Plugins;
this.Status = data.Status.State;