fix(docker): EE-3247 Portainer should not send a host information request when host management features are disabled (#7038)

pull/7154/head
congs 2 years ago committed by GitHub
parent 69baa279d4
commit 89359a21ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -43,7 +43,7 @@ angular.module('portainer.docker').controller('HostViewController', [
ctrl.state.offlineMode = isOfflineEndpoint(ctrl.endpoint); ctrl.state.offlineMode = isOfflineEndpoint(ctrl.endpoint);
ctrl.jobs = data.jobs; ctrl.jobs = data.jobs;
if (ctrl.state.isAgent && agentApiVersion > 1) { if (ctrl.state.isAgent && agentApiVersion > 1 && ctrl.state.enableHostManagementFeatures) {
return AgentService.hostInfo(data.info.Hostname).then(function onHostInfoLoad(agentHostInfo) { return AgentService.hostInfo(data.info.Hostname).then(function onHostInfoLoad(agentHostInfo) {
ctrl.devices = agentHostInfo.PCIDevices; ctrl.devices = agentHostInfo.PCIDevices;
ctrl.disks = agentHostInfo.PhysicalDisks; ctrl.disks = agentHostInfo.PhysicalDisks;

@ -38,7 +38,7 @@ angular.module('portainer.docker').controller('NodeDetailsViewController', [
if (ctrl.state.isAgent) { if (ctrl.state.isAgent) {
var agentApiVersion = applicationState.endpoint.agentApiVersion; var agentApiVersion = applicationState.endpoint.agentApiVersion;
ctrl.state.agentApiVersion = agentApiVersion; ctrl.state.agentApiVersion = agentApiVersion;
if (agentApiVersion < 2) { if (agentApiVersion < 2 || !ctrl.state.enableHostManagementFeatures) {
return; return;
} }

Loading…
Cancel
Save