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

feat(app): limit the docker API version supported by the frontend (#11855)
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:s390x platform:linux version:]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run

This commit is contained in:
LP B 2024-06-10 20:54:31 +02:00 committed by GitHub
parent 4ba16f1b04
commit 6a8e6734f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
212 changed files with 4439 additions and 3281 deletions

View file

@ -3,7 +3,6 @@ import { VolumesNFSFormData } from '../../../components/volumesNFSForm/volumesNF
import { VolumesCIFSFormData } from '../../../components/volumesCIFSForm/volumesCifsFormModel';
angular.module('portainer.docker').controller('CreateVolumeController', [
'$q',
'$scope',
'$state',
'VolumeService',
@ -12,9 +11,8 @@ angular.module('portainer.docker').controller('CreateVolumeController', [
'Authentication',
'Notifications',
'FormValidator',
'HttpRequestHelper',
'endpoint',
function ($q, $scope, $state, VolumeService, PluginService, ResourceControlService, Authentication, Notifications, FormValidator, HttpRequestHelper, endpoint) {
function ($scope, $state, VolumeService, PluginService, ResourceControlService, Authentication, Notifications, FormValidator, endpoint) {
$scope.endpoint = endpoint;
$scope.formValues = {
@ -126,10 +124,9 @@ angular.module('portainer.docker').controller('CreateVolumeController', [
}
var nodeName = $scope.formValues.NodeName;
HttpRequestHelper.setPortainerAgentTargetHeader(nodeName);
$scope.state.actionInProgress = true;
VolumeService.createVolume(volumeConfiguration)
VolumeService.createVolume(volumeConfiguration, nodeName)
.then(function success(data) {
const userId = userDetails.ID;
const resourceControl = data.ResourceControl;

View file

@ -21,7 +21,7 @@ angular.module('portainer.docker').controller('VolumeController', [
$scope.removeVolume = function removeVolume() {
confirmDelete('Do you want to remove this volume?').then((confirmed) => {
if (confirmed) {
VolumeService.remove($scope.volume)
VolumeService.remove($scope.volume.Id)
.then(function success() {
Notifications.success('Volume successfully removed', $transition$.params().id);
$state.go('docker.volumes', {});

View file

@ -8,14 +8,12 @@ angular.module('portainer.docker').controller('VolumesController', [
'ServiceService',
'VolumeHelper',
'Notifications',
'HttpRequestHelper',
'Authentication',
'endpoint',
function ($q, $scope, $state, VolumeService, ServiceService, VolumeHelper, Notifications, HttpRequestHelper, Authentication, endpoint) {
function ($q, $scope, $state, VolumeService, ServiceService, VolumeHelper, Notifications, Authentication, endpoint) {
$scope.removeAction = async function (selectedItems) {
async function doRemove(volume) {
HttpRequestHelper.setPortainerAgentTargetHeader(volume.NodeName);
return VolumeService.remove(volume)
return VolumeService.remove(volume.Id, volume.NodeName)
.then(function success() {
Notifications.success('Volume successfully removed', volume.Id);
var index = $scope.volumes.indexOf(volume);
@ -36,8 +34,8 @@ angular.module('portainer.docker').controller('VolumesController', [
var endpointRole = $scope.applicationState.endpoint.mode.role;
$q.all({
attached: VolumeService.volumes({ filters: { dangling: ['false'] } }),
dangling: VolumeService.volumes({ filters: { dangling: ['true'] } }),
attached: VolumeService.volumes({ dangling: ['false'] }),
dangling: VolumeService.volumes({ dangling: ['true'] }),
services: endpointProvider === 'DOCKER_SWARM_MODE' && endpointRole === 'MANAGER' ? ServiceService.services() : [],
})
.then(function success(data) {