mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
refactor(docker/containers): remove EndpointProvider from container service [EE-6180] (#10392)
This commit is contained in:
parent
b80fcb0467
commit
8e1417b4e9
20 changed files with 102 additions and 106 deletions
|
@ -4,9 +4,8 @@ angular.module('portainer.docker').controller('NodeDetailsViewController', [
|
|||
'NodeService',
|
||||
'StateManager',
|
||||
'AgentService',
|
||||
'ContainerService',
|
||||
'Authentication',
|
||||
function NodeDetailsViewController($q, $stateParams, NodeService, StateManager, AgentService, ContainerService, Authentication) {
|
||||
function NodeDetailsViewController($q, $stateParams, NodeService, StateManager, AgentService, Authentication) {
|
||||
var ctrl = this;
|
||||
|
||||
ctrl.$onInit = initView;
|
||||
|
@ -22,19 +21,15 @@ angular.module('portainer.docker').controller('NodeDetailsViewController', [
|
|||
ctrl.state.isAdmin = Authentication.isAdmin();
|
||||
ctrl.state.enableHostManagementFeatures = ctrl.endpoint.SecuritySettings.enableHostManagementFeatures;
|
||||
|
||||
var fetchJobs = ctrl.state.isAdmin && ctrl.state.isAgent;
|
||||
|
||||
var nodeId = $stateParams.id;
|
||||
$q.all({
|
||||
node: NodeService.node(nodeId),
|
||||
jobs: fetchJobs ? ContainerService.containers(true, { label: ['io.portainer.job.endpoint'] }) : [],
|
||||
}).then(function (data) {
|
||||
var node = data.node;
|
||||
ctrl.originalNode = node;
|
||||
ctrl.hostDetails = buildHostDetails(node);
|
||||
ctrl.engineDetails = buildEngineDetails(node);
|
||||
ctrl.nodeDetails = buildNodeDetails(node);
|
||||
ctrl.jobs = data.jobs;
|
||||
if (ctrl.state.isAgent) {
|
||||
var agentApiVersion = applicationState.endpoint.agentApiVersion;
|
||||
ctrl.state.agentApiVersion = agentApiVersion;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue