mirror of https://github.com/portainer/portainer
21 lines
565 B
JavaScript
21 lines
565 B
JavaScript
|
angular.module('portainer.docker').controller('NodeBrowserController', [
|
||
|
'NodeService', 'HttpRequestHelper', '$stateParams',
|
||
|
function NodeBrowserController(NodeService, HttpRequestHelper, $stateParams) {
|
||
|
var ctrl = this;
|
||
|
|
||
|
ctrl.$onInit = $onInit;
|
||
|
|
||
|
function $onInit() {
|
||
|
ctrl.nodeId = $stateParams.id;
|
||
|
loadNode();
|
||
|
}
|
||
|
|
||
|
function loadNode() {
|
||
|
NodeService.node(ctrl.nodeId).then(function onNodeLoaded(node) {
|
||
|
HttpRequestHelper.setPortainerAgentTargetHeader(node.Hostname);
|
||
|
ctrl.node = node;
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
]);
|