1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

refactor(portainer): remove offline mode [EE-4348] (#7761)

Co-authored-by: deviantony <anthony.lapenna@portainer.io>
This commit is contained in:
Chaim Lev-Ari 2022-11-21 09:50:47 +02:00 committed by GitHub
parent 61e8e68c31
commit 75f40fe485
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 28 additions and 311 deletions

View file

@ -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>

View file

@ -13,7 +13,6 @@ angular.module('portainer.docker').component('imagesDatatable', {
downloadAction: '<',
forceRemoveAction: '<',
exportInProgress: '<',
offlineMode: '<',
refreshCallback: '<',
},
});

View file

@ -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>

View file

@ -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>

View file

@ -10,7 +10,6 @@ angular.module('portainer.docker').component('networksDatatable', {
reverseOrder: '<',
showHostColumn: '<',
removeAction: '<',
offlineMode: '<',
refreshCallback: '<',
},
});

View file

@ -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"

View file

@ -11,7 +11,6 @@ angular.module('portainer.docker').component('volumesDatatable', {
showHostColumn: '<',
removeAction: '<',
showBrowseAction: '<',
offlineMode: '<',
refreshCallback: '<',
},
});