diff --git a/app/scripts/directives/createSecret.js b/app/scripts/directives/createSecret.js index 75fec3c46c..cbcc907762 100644 --- a/app/scripts/directives/createSecret.js +++ b/app/scripts/directives/createSecret.js @@ -26,6 +26,11 @@ angular.module("openshiftConsole") templateUrl: 'views/directives/create-secret.html', link: function($scope) { $scope.nameValidation = DNS1123_SUBDOMAIN_VALIDATION; + $scope.secretReferenceValidation = { + pattern: /^[a-zA-Z0-9\-_]+$/, + minLength: 8, + description: 'Secret reference key must consist of lower-case, upper-case letters, numbers, dash, and underscore.' + }; $scope.secretAuthTypeMap = { image: { diff --git a/app/views/directives/create-secret.html b/app/views/directives/create-secret.html index da96c9385b..fe26484303 100644 --- a/app/views/directives/create-secret.html +++ b/app/views/directives/create-secret.html @@ -12,10 +12,10 @@
- +
-
-
+
+
{{nameValidation.description}}
-
+
Name is required.
-
+
Can't be longer than {{nameValidation.maxlength}} characters.
@@ -51,11 +51,13 @@
-
+
Learn More 
+
+ + {{secretReferenceValidation.description}} + +
+
+ + The key must have at least {{secretReferenceValidation.minLength}} characters. + +
@@ -105,7 +117,7 @@ \n" + "
\n" + "\n" + - "\n" + - "\n" + + "\n" + + "\n" + "\n" + "
\n" + "\n" + "This name is already in use. Please choose a different name.\n" + "\n" + "
\n" + - "
\n" + - "
\n" + + "
\n" + + "
\n" + "{{nameValidation.description}}\n" + "
\n" + - "
\n" + + "
\n" + "Name is required.\n" + "
\n" + - "
\n" + + "
\n" + "Can't be longer than {{nameValidation.maxlength}} characters.\n" + "
\n" + "
\n" + @@ -6100,8 +6100,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "
\n" + "
\n" + "\n" + - "
\n" + - "\n" + + "
\n" + + "\n" + "\n" + "\n" + "\n" + @@ -6110,6 +6110,16 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "Value of the secret will be supplied when invoking the webhook.\n" + "Learn More \n" + "
\n" + + "
\n" + + "\n" + + "{{secretReferenceValidation.description}}\n" + + "\n" + + "
\n" + + "
\n" + + "\n" + + "The key must have at least {{secretReferenceValidation.minLength}} characters.\n" + + "\n" + + "
\n" + "
\n" + "
\n" + "
\n" + @@ -6132,7 +6142,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "
\n" + "
\n" + "\n" + - "\n" + + "\n" + "
\n" + "
\n" + "
\n" + @@ -6205,7 +6215,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "
\n" + "\n" + "
\n" + - "\n" + + "\n" + "
\n" + "
\n" + "
\n" + @@ -6216,7 +6226,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "
\n" + "\n" + "
\n" + - "\n" + + "\n" + "
\n" + "
\n" + "
\n" + @@ -6227,7 +6237,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "
\n" + "\n" + "
\n" + - "\n" + + "\n" + "
\n" + "
\n" + "
\n" + @@ -6238,7 +6248,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "
\n" + "\n" + "
\n" + - "\n" + + "\n" + "
\n" + "
\n" + "
\n" +