diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/deploy-service.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/deploy-service.js index 18e4d36b81b..ff939855e24 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/deploy-service.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/deploy-service.js @@ -152,7 +152,8 @@ export default Ember.Component.extend({ isUserNameGiven: Ember.computed.empty('userName'), - isValidServiceDef: Ember.computed('serviceDef.name', 'serviceDef.queue', 'serviceDef.serviceComponents.[]', function () { + isValidServiceDef: Ember.computed('serviceDef.name', 'serviceDef.queue', + 'serviceDef.version', 'serviceDef.serviceComponents.[]', function () { return this.get('serviceDef').isValidServiceDef(); }), diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-servicedef.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-servicedef.js index 2a9953dc979..c0153a5a2b9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-servicedef.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-servicedef.js @@ -22,6 +22,7 @@ import Ember from 'ember'; export default DS.Model.extend({ name: DS.attr('string', {defaultValue: ''}), queue: DS.attr('string', {defaultValue: ''}), + version: DS.attr('string', {defaultValue: ''}), lifetime: DS.attr('string', {defaultValue: ''}), isCached: DS.attr('boolean', {defaultValue: false}), @@ -44,6 +45,7 @@ export default DS.Model.extend({ clear() { this.set('name', ''); this.set('queue', ''); + this.set('version', ''); this.set('lifetime', ''); this.get('serviceComponents').clear(); this.get('serviceConfigs').clear(); @@ -52,7 +54,8 @@ export default DS.Model.extend({ }, isValidServiceDef() { - return this.get('name') !== '' && this.get('queue') !== '' && this.get('serviceComponents.length') > 0; + return this.get('name') !== '' && this.get('queue') !== '' && + this.get('version') !== '' && this.get('serviceComponents.length') > 0; }, createNewServiceComponent() { @@ -115,6 +118,7 @@ export default DS.Model.extend({ var json = { name: "", queue: "", + version: "", lifetime: "-1", components: [], configuration: { @@ -131,6 +135,7 @@ export default DS.Model.extend({ json['name'] = this.get('name'); json['queue'] = this.get('queue'); + json['version'] = this.get('version'); if (this.get('lifetime')) { json['lifetime'] = this.get('lifetime'); @@ -266,6 +271,7 @@ export default DS.Model.extend({ var clone = this.createNewServiceDef(); clone.set('name', this.get('name')); clone.set('queue', this.get('queue')); + clone.set('version', this.get('version')); clone.set('lifetime', this.get('lifetime')); clone.get('serviceComponents', this.get('serviceComponents')); clone.get('serviceConfigs', this.get('serviceConfigs')); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/deploy-service.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/deploy-service.hbs index 2d186106b45..d348200920d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/deploy-service.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/deploy-service.hbs @@ -99,6 +99,17 @@ +