1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 13:59:40 +02:00

fix(stack) normalize stack name EE-1701 (#5776)

* fix(stack) normalize stack name EE-1701

* fix(stack) normalize swarm stack name and fix rebase error EE-1701

* fix(stack) add front end stack name validation EE-1701

* fix(stack) make stack name regex as a const EE-1701

* fix(stack) reuse stack name regex for compose and swarm EE-1701

* fix(stack) add name validation for stack duplication form EE-1701

Co-authored-by: Simon Meng <simon.meng@portainer.io>
This commit is contained in:
cong meng 2021-10-01 16:56:34 +13:00 committed by GitHub
parent fbcf67bc1e
commit 328abfd74e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 114 additions and 53 deletions

View file

@ -1,3 +1,5 @@
import { STACK_NAME_VALIDATION_REGEX } from '@/constants';
angular.module('portainer.app').controller('StackDuplicationFormController', [
'Notifications',
function StackDuplicationFormController(Notifications) {
@ -13,6 +15,8 @@ angular.module('portainer.app').controller('StackDuplicationFormController', [
newName: '',
};
ctrl.STACK_NAME_VALIDATION_REGEX = STACK_NAME_VALIDATION_REGEX;
ctrl.isFormValidForDuplication = isFormValidForDuplication;
ctrl.isFormValidForMigration = isFormValidForMigration;
ctrl.duplicateStack = duplicateStack;