mirror of https://github.com/rancher/ui.git
Merge pull request #2251 from loganhz/uppercase
Convert node name to lowercase in registration command
This commit is contained in:
commit
a08bb854ef
|
|
@ -364,10 +364,12 @@ export default InputTextFile.extend(ClusterDriver, {
|
|||
}),
|
||||
|
||||
isNodeNameValid: computed('nodeName', function() {
|
||||
if ( get(this, 'nodeName') === undefined || get(this, 'nodeName.length') === 0 ) {
|
||||
const nodeName = (get(this, 'nodeName') || '').toLowerCase();
|
||||
|
||||
if ( get(nodeName, 'length') === 0 ) {
|
||||
return true;
|
||||
} else {
|
||||
const errors = validateHostname(get(this, 'nodeName'), 'Node Name', get(this, 'intl'));
|
||||
const errors = validateHostname(nodeName, 'Node Name', get(this, 'intl'), { restricted: true });
|
||||
|
||||
set(this, 'nodeNameErrors', errors);
|
||||
|
||||
|
|
@ -410,7 +412,7 @@ export default InputTextFile.extend(ClusterDriver, {
|
|||
const labels = get(this, 'labels') || {};
|
||||
|
||||
if ( nodeName ) {
|
||||
out += ` --node-name ${ nodeName }`;
|
||||
out += ` --node-name ${ nodeName.toLowerCase() }`;
|
||||
}
|
||||
|
||||
if (address) {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ export function validatePrefix(str, displayKey, intl, errors = []) {
|
|||
max
|
||||
}));
|
||||
} else {
|
||||
validateHostname(str, intlKey, intl, errors);
|
||||
validateHostname(str, intlKey, intl, { restricted: false }, errors);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
"d3": "3.5.17",
|
||||
"dot-object": "^1.7.0",
|
||||
"dotenv": "^6.0.0",
|
||||
"ember-api-store": "2.6.13",
|
||||
"ember-api-store": "2.7.2",
|
||||
"ember-assign-helper": "^0.1.2",
|
||||
"ember-basic-dropdown": "^1.0.0",
|
||||
"ember-browserify": "^1.2.0",
|
||||
|
|
|
|||
|
|
@ -5894,6 +5894,7 @@ validation:
|
|||
doubleHyphen: Cannot contain two consecutive hyphens
|
||||
hostname:
|
||||
startDot: '"{key}" cannot start with a dot'
|
||||
endDot: '"{key}" cannot end with a dot'
|
||||
empty: '"{key}" must be at least one character'
|
||||
tooLong: '"{key}" cannot be longer than {max} characters'
|
||||
startNumber: '"{key}" cannot start with a number'
|
||||
|
|
|
|||
Loading…
Reference in New Issue