|
@@ -229,7 +229,6 @@ App.ServiceConfigProperty = Ember.Object.extend({
|
|
types.forEach(function(type) {
|
|
types.forEach(function(type) {
|
|
if (type === displayType) {
|
|
if (type === displayType) {
|
|
result = true;
|
|
result = true;
|
|
- return;
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
return result;
|
|
return result;
|
|
@@ -664,16 +663,17 @@ App.ServiceConfigProperty = Ember.Object.extend({
|
|
case 'checkbox':
|
|
case 'checkbox':
|
|
break;
|
|
break;
|
|
case 'directories':
|
|
case 'directories':
|
|
- if (!validator.isValidDir(value)) {
|
|
|
|
- this.set('errorMessage', 'Must be a slash at the start');
|
|
|
|
- isError = true;
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
case 'directory':
|
|
case 'directory':
|
|
if (!validator.isValidDir(value)) {
|
|
if (!validator.isValidDir(value)) {
|
|
this.set('errorMessage', 'Must be a slash at the start');
|
|
this.set('errorMessage', 'Must be a slash at the start');
|
|
isError = true;
|
|
isError = true;
|
|
}
|
|
}
|
|
|
|
+ else {
|
|
|
|
+ if (!validator.isAllowedDir(value)) {
|
|
|
|
+ this.set('errorMessage', 'Can\'t start with "home(s)"');
|
|
|
|
+ isError = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
break;
|
|
break;
|
|
case 'custom':
|
|
case 'custom':
|
|
break;
|
|
break;
|
|
@@ -691,7 +691,7 @@ App.ServiceConfigProperty = Ember.Object.extend({
|
|
break;
|
|
break;
|
|
case 'host':
|
|
case 'host':
|
|
var hiveOozieHostNames = ['hive_hostname','hive_existing_mysql_host','hive_existing_oracle_host','hive_ambari_host',
|
|
var hiveOozieHostNames = ['hive_hostname','hive_existing_mysql_host','hive_existing_oracle_host','hive_ambari_host',
|
|
- 'oozie_hostname','oozie_existing_mysql_host','oozie_existing_oracle_host','oozie_ambari_host']
|
|
|
|
|
|
+ 'oozie_hostname','oozie_existing_mysql_host','oozie_existing_oracle_host','oozie_ambari_host'];
|
|
if(hiveOozieHostNames.contains(this.get('name'))) {
|
|
if(hiveOozieHostNames.contains(this.get('name'))) {
|
|
if (validator.hasSpaces(value)) {
|
|
if (validator.hasSpaces(value)) {
|
|
this.set('errorMessage', Em.I18n.t('host.spacesValidation'));
|
|
this.set('errorMessage', Em.I18n.t('host.spacesValidation'));
|