mirror of https://github.com/portainer/portainer
feat(engine-details): build host details object
parent
1f16eb446b
commit
c15ee9af7e
|
@ -23,7 +23,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total memory</td>
|
<td>Total memory</td>
|
||||||
<td>{{ $ctrl.host.totalMemory }}</td>
|
<td>{{ $ctrl.host.totalMemory | humansize }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr ng-if="$ctrl.isAgent">
|
<tr ng-if="$ctrl.isAgent">
|
||||||
<td>Physical device information</td>
|
<td>Physical device information</td>
|
||||||
|
|
|
@ -3,6 +3,7 @@ angular.module('portainer.docker').component('hostDetailsPanel', {
|
||||||
'app/docker/components/host-view-panels/host-details-panel/host-details-panel.html',
|
'app/docker/components/host-view-panels/host-details-panel/host-details-panel.html',
|
||||||
controller: 'HostDetailsPanelController',
|
controller: 'HostDetailsPanelController',
|
||||||
bindings: {
|
bindings: {
|
||||||
host: '<'
|
host: '<',
|
||||||
|
isAgent: '<'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,7 +17,7 @@ angular.module('portainer.docker').controller('HostViewController', [
|
||||||
})
|
})
|
||||||
.then(function success(data) {
|
.then(function success(data) {
|
||||||
ctrl.engineDetails = buildEngineDetails(data);
|
ctrl.engineDetails = buildEngineDetails(data);
|
||||||
ctrl.hostDetails = buildHostDetails(data);
|
ctrl.hostDetails = buildHostDetails(data.info);
|
||||||
})
|
})
|
||||||
.catch(function error(err) {
|
.catch(function error(err) {
|
||||||
Notifications.error(
|
Notifications.error(
|
||||||
|
@ -42,8 +42,18 @@ angular.module('portainer.docker').controller('HostViewController', [
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildHostDetails() {
|
function buildHostDetails(info) {
|
||||||
return {};
|
return {
|
||||||
|
os: {
|
||||||
|
arch: info.Architecture,
|
||||||
|
type: info.OSType,
|
||||||
|
name: info.OperatingSystem
|
||||||
|
},
|
||||||
|
name: info.Name,
|
||||||
|
kernelVersion: info.KernelVersion,
|
||||||
|
totalCPU: info.NCPU,
|
||||||
|
totalMemory: info.MemTotal
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in New Issue