mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
refactor(portainer): remove offline mode [EE-4348] (#7761)
Co-authored-by: deviantony <anthony.lapenna@portainer.io>
This commit is contained in:
parent
61e8e68c31
commit
75f40fe485
39 changed files with 28 additions and 311 deletions
|
@ -21,7 +21,7 @@
|
|||
data-cy="image-searchInput"
|
||||
/>
|
||||
</div>
|
||||
<div class="actionBar !gap-3" ng-if="!$ctrl.offlineMode" authorization="DockerImageDelete, DockerImageBuild, DockerImageLoad, DockerImageGet">
|
||||
<div class="actionBar !gap-3" authorization="DockerImageDelete, DockerImageBuild, DockerImageLoad, DockerImageGet">
|
||||
<div class="btn-group" authorization="DockerImageDelete">
|
||||
<button
|
||||
type="button"
|
||||
|
@ -128,7 +128,7 @@
|
|||
<tr>
|
||||
<th uib-dropdown dropdown-append-to-body auto-close="disabled" popover-placement="bottom-left" is-open="$ctrl.filters.state.open">
|
||||
<div class="flex gap-1 items-center">
|
||||
<span class="md-checkbox" ng-if="!$ctrl.offlineMode">
|
||||
<span class="md-checkbox">
|
||||
<input id="select_all" type="checkbox" ng-model="$ctrl.state.selectAll" ng-change="$ctrl.selectAll()" />
|
||||
<label for="select_all"></label>
|
||||
</span>
|
||||
|
@ -208,14 +208,11 @@
|
|||
ng-class="{ active: item.Checked }"
|
||||
>
|
||||
<td>
|
||||
<span class="md-checkbox" ng-if="!$ctrl.offlineMode">
|
||||
<span class="md-checkbox">
|
||||
<input id="select_{{ $index }}" type="checkbox" ng-model="item.Checked" ng-click="$ctrl.selectItem(item, $event)" />
|
||||
<label for="select_{{ $index }}"></label>
|
||||
</span>
|
||||
<a ng-if="!$ctrl.offlineMode" ui-sref="docker.images.image({ id: item.Id, nodeName: item.NodeName })" class="monospaced" title="{{ item.Id }}">{{
|
||||
item.Id | truncate: 40
|
||||
}}</a>
|
||||
<span ng-if="$ctrl.offlineMode">{{ item.Id | truncate: 40 }}</span>
|
||||
<a ui-sref="docker.images.image({ id: item.Id, nodeName: item.NodeName })" class="monospaced" title="{{ item.Id }}">{{ item.Id | truncate: 40 }}</a>
|
||||
<span style="margin-left: 10px" class="label label-warning image-tag" ng-if="::item.ContainerCount === 0">Unused</span>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
@ -13,7 +13,6 @@ angular.module('portainer.docker').component('imagesDatatable', {
|
|||
downloadAction: '<',
|
||||
forceRemoveAction: '<',
|
||||
exportInProgress: '<',
|
||||
offlineMode: '<',
|
||||
refreshCallback: '<',
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<td ng-if="allowCheckbox">
|
||||
<span class="md-checkbox" ng-if="!parentCtrl.offlineMode" authorization="DockerNetworkDelete, DockerNetworkCreate">
|
||||
<span class="md-checkbox" authorization="DockerNetworkDelete, DockerNetworkCreate">
|
||||
<input
|
||||
id="select_{{ $index }}"
|
||||
type="checkbox"
|
||||
|
@ -15,8 +15,7 @@
|
|||
</td>
|
||||
<td ng-if="!allowCheckbox"></td>
|
||||
<td>
|
||||
<a ng-if="!parentCtrl.offlineMode" ui-sref="docker.networks.network({ id: item.Id, nodeName: item.NodeName })" title="{{ item.Name }}">{{ item.Name | truncate: 40 }}</a>
|
||||
<span ng-if="parentCtrl.offlineMode">{{ item.Name | truncate: 40 }}</span>
|
||||
<a ui-sref="docker.networks.network({ id: item.Id, nodeName: item.NodeName })" title="{{ item.Name }}">{{ item.Name | truncate: 40 }}</a>
|
||||
<span style="margin-left: 10px" class="label label-info image-tag space-left" ng-if="item.ResourceControl.System">System</span>
|
||||
</td>
|
||||
<td>{{ item.StackName ? item.StackName : '-' }}</td>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
data-cy="network-searchInput"
|
||||
/>
|
||||
</div>
|
||||
<div class="actionBar !gap-3" ng-if="!$ctrl.offlineMode" authorization="DockerNetworkDelete, DockerNetworkCreate">
|
||||
<div class="actionBar !gap-3" authorization="DockerNetworkDelete, DockerNetworkCreate">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm btn-dangerlight h-fit vertical-center !ml-0"
|
||||
|
@ -84,7 +84,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th style="width: 55px">
|
||||
<span class="md-checkbox" ng-if="!$ctrl.offlineMode" authorization="DockerNetworkDelete, DockerNetworkCreate">
|
||||
<span class="md-checkbox" authorization="DockerNetworkDelete, DockerNetworkCreate">
|
||||
<input id="select_all" type="checkbox" ng-model="$ctrl.state.selectAll" ng-change="$ctrl.selectAll()" />
|
||||
<label for="select_all"></label>
|
||||
</span>
|
||||
|
|
|
@ -10,7 +10,6 @@ angular.module('portainer.docker').component('networksDatatable', {
|
|||
reverseOrder: '<',
|
||||
showHostColumn: '<',
|
||||
removeAction: '<',
|
||||
offlineMode: '<',
|
||||
refreshCallback: '<',
|
||||
},
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
data-cy="volume-searchInput"
|
||||
/>
|
||||
</div>
|
||||
<div class="actionBar !gap-3" ng-if="!$ctrl.offlineMode" authorization="DockerVolumeDelete, DockerVolumeCreate">
|
||||
<div class="actionBar !gap-3" authorization="DockerVolumeDelete, DockerVolumeCreate">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm btn-dangerlight h-fit vertical-center !ml-0"
|
||||
|
@ -84,7 +84,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th uib-dropdown dropdown-append-to-body auto-close="disabled" is-open="$ctrl.filters.state.open" class="flex gap-1">
|
||||
<span class="md-checkbox" ng-if="!$ctrl.offlineMode" authorization="DockerVolumeDelete, DockerVolumeCreate">
|
||||
<span class="md-checkbox" authorization="DockerVolumeDelete, DockerVolumeCreate">
|
||||
<input id="select_all" type="checkbox" ng-model="$ctrl.state.selectAll" ng-change="$ctrl.selectAll()" />
|
||||
<label for="select_all"></label>
|
||||
</span>
|
||||
|
@ -182,17 +182,14 @@
|
|||
ng-class="{ active: item.Checked }"
|
||||
>
|
||||
<td>
|
||||
<span class="md-checkbox" ng-if="!$ctrl.offlineMode" authorization="DockerVolumeDelete, DockerVolumeCreate">
|
||||
<span class="md-checkbox" authorization="DockerVolumeDelete, DockerVolumeCreate">
|
||||
<input id="select_{{ $index }}" type="checkbox" ng-model="item.Checked" ng-click="$ctrl.selectItem(item, $event)" />
|
||||
<label for="select_{{ $index }}"></label>
|
||||
</span>
|
||||
<a ng-if="!$ctrl.offlineMode" ui-sref="docker.volumes.volume({ id: item.Id, nodeName: item.NodeName })" class="monospaced" title="{{ item.Id }}">{{
|
||||
item.Id | truncate: 40
|
||||
}}</a>
|
||||
<span ng-if="$ctrl.offlineMode">{{ item.Id | truncate: 40 }}</span>
|
||||
<a ui-sref="docker.volumes.volume({ id: item.Id, nodeName: item.NodeName })" class="monospaced" title="{{ item.Id }}">{{ item.Id | truncate: 40 }}</a>
|
||||
|
||||
<button
|
||||
ng-if="$ctrl.showBrowseAction && !$ctrl.offlineMode"
|
||||
ng-if="$ctrl.showBrowseAction"
|
||||
type="button"
|
||||
ui-sref="docker.volumes.volume.browse({ id: item.Id, nodeName: item.NodeName })"
|
||||
class="btn btn-xs btn-primary space-left"
|
||||
|
|
|
@ -11,7 +11,6 @@ angular.module('portainer.docker').component('volumesDatatable', {
|
|||
showHostColumn: '<',
|
||||
removeAction: '<',
|
||||
showBrowseAction: '<',
|
||||
offlineMode: '<',
|
||||
refreshCallback: '<',
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
<page-header title="'Host overview'" breadcrumbs="['Docker']" reload="true"> </page-header>
|
||||
|
||||
<information-panel-offline ng-if="$ctrl.offlineMode"></information-panel-offline>
|
||||
|
||||
<host-details-panel
|
||||
host="$ctrl.hostDetails"
|
||||
is-browse-enabled="$ctrl.isAgent && $ctrl.agentApiVersion > 1 && !$ctrl.offlineMode && $ctrl.hostFeaturesEnabled"
|
||||
is-browse-enabled="$ctrl.isAgent && $ctrl.agentApiVersion > 1 && $ctrl.hostFeaturesEnabled"
|
||||
browse-url="{{ $ctrl.browseUrl }}"
|
||||
></host-details-panel>
|
||||
|
||||
<engine-details-panel engine="$ctrl.engineDetails"></engine-details-panel>
|
||||
|
||||
<devices-panel ng-if="$ctrl.isAgent && $ctrl.agentApiVersion > 1 && !$ctrl.offlineMode && $ctrl.hostFeaturesEnabled" devices="$ctrl.devices"></devices-panel>
|
||||
<disks-panel ng-if="$ctrl.isAgent && $ctrl.agentApiVersion > 1 && !$ctrl.offlineMode && $ctrl.hostFeaturesEnabled" disks="$ctrl.disks"></disks-panel>
|
||||
<devices-panel ng-if="$ctrl.isAgent && $ctrl.agentApiVersion > 1 && $ctrl.hostFeaturesEnabled" devices="$ctrl.devices"></devices-panel>
|
||||
<disks-panel ng-if="$ctrl.isAgent && $ctrl.agentApiVersion > 1 && $ctrl.hostFeaturesEnabled" disks="$ctrl.disks"></disks-panel>
|
||||
|
||||
<ng-transclude></ng-transclude>
|
||||
|
|
|
@ -6,7 +6,6 @@ angular.module('portainer.docker').component('hostOverview', {
|
|||
devices: '<',
|
||||
disks: '<',
|
||||
isAgent: '<',
|
||||
offlineMode: '<',
|
||||
agentApiVersion: '<',
|
||||
refreshUrl: '@',
|
||||
browseUrl: '@',
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
angular.module('portainer.app').factory('ContainersInterceptor', [
|
||||
'$q',
|
||||
'EndpointProvider',
|
||||
function ($q, EndpointProvider) {
|
||||
'use strict';
|
||||
var interceptor = {};
|
||||
|
||||
interceptor.responseError = responseErrorInterceptor;
|
||||
|
||||
function responseErrorInterceptor(rejection) {
|
||||
if (rejection.status === 502 || rejection.status === 503 || rejection.status === -1) {
|
||||
var endpoint = EndpointProvider.currentEndpoint();
|
||||
if (endpoint !== undefined) {
|
||||
var data = endpoint.Snapshots[0].SnapshotRaw.Containers;
|
||||
if (data !== undefined) {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $q.reject(rejection);
|
||||
}
|
||||
return interceptor;
|
||||
},
|
||||
]);
|
|
@ -1,24 +0,0 @@
|
|||
angular.module('portainer.app').factory('ImagesInterceptor', [
|
||||
'$q',
|
||||
'EndpointProvider',
|
||||
function ($q, EndpointProvider) {
|
||||
'use strict';
|
||||
var interceptor = {};
|
||||
|
||||
interceptor.responseError = responseErrorInterceptor;
|
||||
|
||||
function responseErrorInterceptor(rejection) {
|
||||
if (rejection.status === 502 || rejection.status === 503 || rejection.status === -1) {
|
||||
var endpoint = EndpointProvider.currentEndpoint();
|
||||
if (endpoint !== undefined) {
|
||||
var data = endpoint.Snapshots[0].SnapshotRaw.Images;
|
||||
if (data !== undefined) {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $q.reject(rejection);
|
||||
}
|
||||
return interceptor;
|
||||
},
|
||||
]);
|
|
@ -1,24 +0,0 @@
|
|||
angular.module('portainer.app').factory('InfoInterceptor', [
|
||||
'$q',
|
||||
'EndpointProvider',
|
||||
function ($q, EndpointProvider) {
|
||||
'use strict';
|
||||
var interceptor = {};
|
||||
|
||||
interceptor.responseError = responseErrorInterceptor;
|
||||
|
||||
function responseErrorInterceptor(rejection) {
|
||||
if (rejection.status === 502 || rejection.status === 503 || rejection.status === -1) {
|
||||
var endpoint = EndpointProvider.currentEndpoint();
|
||||
if (endpoint !== undefined && endpoint.Snapshots.length && endpoint.Snapshots[0].SnapshotRaw) {
|
||||
var data = endpoint.Snapshots[0].SnapshotRaw.Info;
|
||||
if (data !== undefined) {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $q.reject(rejection);
|
||||
}
|
||||
return interceptor;
|
||||
},
|
||||
]);
|
|
@ -1,24 +0,0 @@
|
|||
angular.module('portainer.app').factory('NetworksInterceptor', [
|
||||
'$q',
|
||||
'EndpointProvider',
|
||||
function ($q, EndpointProvider) {
|
||||
'use strict';
|
||||
var interceptor = {};
|
||||
|
||||
interceptor.responseError = responseErrorInterceptor;
|
||||
|
||||
function responseErrorInterceptor(rejection) {
|
||||
if (rejection.status === 502 || rejection.status === 503 || rejection.status === -1) {
|
||||
var endpoint = EndpointProvider.currentEndpoint();
|
||||
if (endpoint !== undefined) {
|
||||
var data = endpoint.Snapshots[0].SnapshotRaw.Networks;
|
||||
if (data !== undefined) {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $q.reject(rejection);
|
||||
}
|
||||
return interceptor;
|
||||
},
|
||||
]);
|
|
@ -1,24 +0,0 @@
|
|||
angular.module('portainer.app').factory('VersionInterceptor', [
|
||||
'$q',
|
||||
'EndpointProvider',
|
||||
function ($q, EndpointProvider) {
|
||||
'use strict';
|
||||
var interceptor = {};
|
||||
|
||||
interceptor.responseError = responseErrorInterceptor;
|
||||
|
||||
function responseErrorInterceptor(rejection) {
|
||||
if (rejection.status === 502 || rejection.status === 503 || rejection.status === -1) {
|
||||
var endpoint = EndpointProvider.currentEndpoint();
|
||||
if (endpoint !== undefined && endpoint.Snapshots.length && endpoint.Snapshots[0].SnapshotRaw) {
|
||||
var data = endpoint.Snapshots[0].SnapshotRaw.Version;
|
||||
if (data !== undefined) {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $q.reject(rejection);
|
||||
}
|
||||
return interceptor;
|
||||
},
|
||||
]);
|
|
@ -1,24 +0,0 @@
|
|||
angular.module('portainer.app').factory('VolumesInterceptor', [
|
||||
'$q',
|
||||
'EndpointProvider',
|
||||
function ($q, EndpointProvider) {
|
||||
'use strict';
|
||||
var interceptor = {};
|
||||
|
||||
interceptor.responseError = responseErrorInterceptor;
|
||||
|
||||
function responseErrorInterceptor(rejection) {
|
||||
if (rejection.status === 502 || rejection.status === 503 || rejection.status === -1) {
|
||||
var endpoint = EndpointProvider.currentEndpoint();
|
||||
if (endpoint !== undefined) {
|
||||
var data = endpoint.Snapshots[0].SnapshotRaw.Volumes;
|
||||
if (data !== undefined) {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $q.reject(rejection);
|
||||
}
|
||||
return interceptor;
|
||||
},
|
||||
]);
|
|
@ -5,7 +5,6 @@
|
|||
<dashboard-cluster-agent-info endpoint-id="endpoint.Id"></dashboard-cluster-agent-info>
|
||||
</div>
|
||||
</div>
|
||||
<information-panel-offline ng-if="offlineMode"></information-panel-offline>
|
||||
<information-panel
|
||||
ng-if="
|
||||
!applicationState.UI.dismissedInfoPanels['docker-dashboard-info-01'] &&
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
|
||||
import { isOfflineEndpoint } from '@/portainer/helpers/endpointHelper';
|
||||
import { PortainerEndpointTypes } from 'Portainer/models/endpoint/models';
|
||||
import { useContainerStatusComponent } from '@/react/docker/DashboardView/ContainerStatus';
|
||||
import { useImagesTotalSizeComponent } from '@/react/docker/DashboardView/ImagesTotalSize';
|
||||
|
@ -41,7 +40,6 @@ angular.module('portainer.docker').controller('DashboardController', [
|
|||
StateManager.dismissInformationPanel(id);
|
||||
};
|
||||
|
||||
$scope.offlineMode = false;
|
||||
$scope.showStacks = false;
|
||||
|
||||
$scope.buildGpusStr = function (gpuUseSet) {
|
||||
|
@ -122,7 +120,6 @@ angular.module('portainer.docker').controller('DashboardController', [
|
|||
', '
|
||||
)
|
||||
: '-';
|
||||
$scope.offlineMode = isOfflineEndpoint(endpoint);
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to load dashboard data');
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import { isOfflineEndpoint } from '@/portainer/helpers/endpointHelper';
|
||||
|
||||
angular.module('portainer.docker').controller('HostViewController', [
|
||||
'$q',
|
||||
'SystemService',
|
||||
|
@ -16,7 +14,6 @@ angular.module('portainer.docker').controller('HostViewController', [
|
|||
ctrl.state = {
|
||||
isAgent: false,
|
||||
isAdmin: false,
|
||||
offlineMode: false,
|
||||
};
|
||||
|
||||
this.engineDetails = {};
|
||||
|
@ -40,7 +37,6 @@ angular.module('portainer.docker').controller('HostViewController', [
|
|||
.then(function success(data) {
|
||||
ctrl.engineDetails = buildEngineDetails(data);
|
||||
ctrl.hostDetails = buildHostDetails(data.info);
|
||||
ctrl.state.offlineMode = isOfflineEndpoint(ctrl.endpoint);
|
||||
ctrl.jobs = data.jobs;
|
||||
|
||||
if (ctrl.state.isAgent && agentApiVersion > 1 && ctrl.state.enableHostManagementFeatures) {
|
||||
|
|
|
@ -7,6 +7,5 @@
|
|||
devices="$ctrl.devices"
|
||||
refresh-url="docker.host"
|
||||
browse-url="docker.host.browser"
|
||||
offline-mode="$ctrl.state.offlineMode"
|
||||
host-features-enabled="$ctrl.state.enableHostManagementFeatures"
|
||||
></host-overview>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<page-header title="'Image list'" breadcrumbs="['Images']" reload="true"> </page-header>
|
||||
|
||||
<div class="row" ng-if="!offlineMode" authorization="DockerImageCreate">
|
||||
<div class="row" authorization="DockerImageCreate">
|
||||
<div class="col-lg-12 col-md-12 col-xs-12">
|
||||
<rd-widget>
|
||||
<rd-widget-header icon="download" feather-icon="true" title-text="Pull image "> </rd-widget-header>
|
||||
|
@ -44,7 +44,6 @@
|
|||
</rd-widget>
|
||||
</div>
|
||||
</div>
|
||||
<information-panel-offline ng-if="offlineMode"></information-panel-offline>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<images-datatable
|
||||
|
@ -58,7 +57,6 @@
|
|||
remove-action="removeAction"
|
||||
force-remove-action="confirmRemovalAction"
|
||||
export-in-progress="state.exportInProgress"
|
||||
offline-mode="offlineMode"
|
||||
refresh-callback="getImages"
|
||||
></images-datatable>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
import { PorImageRegistryModel } from 'Docker/models/porImageRegistry';
|
||||
import { isOfflineEndpoint } from '@/portainer/helpers/endpointHelper';
|
||||
|
||||
angular.module('portainer.docker').controller('ImagesController', [
|
||||
'$scope',
|
||||
|
@ -135,14 +134,11 @@ angular.module('portainer.docker').controller('ImagesController', [
|
|||
});
|
||||
};
|
||||
|
||||
$scope.offlineMode = false;
|
||||
|
||||
$scope.getImages = getImages;
|
||||
function getImages() {
|
||||
ImageService.images(true)
|
||||
.then(function success(data) {
|
||||
$scope.images = data;
|
||||
$scope.offlineMode = isOfflineEndpoint(endpoint);
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to retrieve images');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<page-header title="'Network list'" breadcrumbs="['Networks']" reload="true"> </page-header>
|
||||
|
||||
<information-panel-offline ng-if="offlineMode"></information-panel-offline>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<networks-datatable
|
||||
|
@ -11,7 +10,6 @@
|
|||
order-by="Name"
|
||||
remove-action="removeAction"
|
||||
show-host-column="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'"
|
||||
offline-mode="offlineMode"
|
||||
refresh-callback="getNetworks"
|
||||
></networks-datatable>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import _ from 'lodash-es';
|
||||
import DockerNetworkHelper from 'Docker/helpers/networkHelper';
|
||||
import { isOfflineEndpoint } from '@/portainer/helpers/endpointHelper';
|
||||
import { confirmDeletionAsync } from 'Portainer/services/modal.service/confirm';
|
||||
import DockerNetworkHelper from '@/docker/helpers/networkHelper';
|
||||
import { confirmDeletionAsync } from '@/portainer/services/modal.service/confirm';
|
||||
|
||||
angular.module('portainer.docker').controller('NetworksController', [
|
||||
'$q',
|
||||
|
@ -39,8 +38,6 @@ angular.module('portainer.docker').controller('NetworksController', [
|
|||
});
|
||||
};
|
||||
|
||||
$scope.offlineMode = false;
|
||||
|
||||
$scope.getNetworks = getNetworks;
|
||||
|
||||
function groupSwarmNetworksManagerNodesFirst(networks, agents) {
|
||||
|
@ -71,7 +68,6 @@ angular.module('portainer.docker').controller('NetworksController', [
|
|||
|
||||
$q.all(req)
|
||||
.then((data) => {
|
||||
$scope.offlineMode = isOfflineEndpoint(endpoint);
|
||||
const networks = _.forEach(data.networks, (item) => (item.Subs = []));
|
||||
if ($scope.applicationState.endpoint.mode.agentProxy && $scope.applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE') {
|
||||
$scope.networks = groupSwarmNetworksManagerNodesFirst(data.networks, data.agents);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<page-header title="'Volume list'" breadcrumbs="['Volumes']" reload="true"> </page-header>
|
||||
|
||||
<information-panel-offline ng-if="offlineMode"></information-panel-offline>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<volumes-datatable
|
||||
|
@ -12,7 +11,6 @@
|
|||
remove-action="removeAction"
|
||||
show-host-column="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'"
|
||||
show-browse-action="showBrowseAction"
|
||||
offline-mode="offlineMode"
|
||||
refresh-callback="getVolumes"
|
||||
></volumes-datatable>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import { isOfflineEndpoint } from '@/portainer/helpers/endpointHelper';
|
||||
|
||||
angular.module('portainer.docker').controller('VolumesController', [
|
||||
'$q',
|
||||
'$scope',
|
||||
|
@ -39,8 +37,6 @@ angular.module('portainer.docker').controller('VolumesController', [
|
|||
});
|
||||
};
|
||||
|
||||
$scope.offlineMode = false;
|
||||
|
||||
$scope.getVolumes = getVolumes;
|
||||
function getVolumes() {
|
||||
var endpointProvider = $scope.applicationState.endpoint.mode.provider;
|
||||
|
@ -53,7 +49,6 @@ angular.module('portainer.docker').controller('VolumesController', [
|
|||
})
|
||||
.then(function success(data) {
|
||||
var services = data.services;
|
||||
$scope.offlineMode = isOfflineEndpoint(endpoint);
|
||||
$scope.volumes = data.attached
|
||||
.map(function (volume) {
|
||||
volume.dangling = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue