From ecbee3ee3de30eab1d980028b7fc2357fecd996b Mon Sep 17 00:00:00 2001 From: Maxime Bajeux Date: Fri, 22 May 2020 01:35:34 +0200 Subject: [PATCH] fix(templates): replace volume input with a select (#3853) * prevent non admins to create volume which they do not have access * fix(volumes): replace volume input by a select --- app/portainer/views/templates/templates.html | 20 +++++++++---------- .../views/templates/templatesController.js | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/app/portainer/views/templates/templates.html b/app/portainer/views/templates/templates.html index 692f39f62..772c3f500 100644 --- a/app/portainer/views/templates/templates.html +++ b/app/portainer/views/templates/templates.html @@ -86,7 +86,7 @@ -
+
@@ -236,16 +236,14 @@
- volume - +
+ volume +
+ +
+
diff --git a/app/portainer/views/templates/templatesController.js b/app/portainer/views/templates/templatesController.js index d0d1238f9..d2919866b 100644 --- a/app/portainer/views/templates/templatesController.js +++ b/app/portainer/views/templates/templatesController.js @@ -295,7 +295,7 @@ angular.module('portainer.app').controller('TemplatesController', [ .then(function success(data) { var templates = data.templates; $scope.templates = templates; - $scope.availableVolumes = data.volumes.Volumes; + $scope.availableVolumes = _.orderBy(data.volumes.Volumes, [(volume) => volume.Name.toLowerCase()], ['asc']); var networks = data.networks; $scope.availableNetworks = networks; var settings = data.settings;