Repository: ambari Updated Branches: refs/heads/trunk 7a7bc003f -> dcffaeda0
AMBARI-19352. Designer should always pick latest version for an action node (Padma Priya via pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dcffaeda Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dcffaeda Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dcffaeda Branch: refs/heads/trunk Commit: dcffaeda04ff0348bcb1927f4e1de6a045ddf93a Parents: 7a7bc00 Author: pallavkul <[email protected]> Authored: Thu Jan 5 12:08:08 2017 +0530 Committer: pallavkul <[email protected]> Committed: Thu Jan 5 12:08:08 2017 +0530 ---------------------------------------------------------------------- .../ui/app/components/bundle-config.js | 11 +- .../app/components/bundle-version-settings.js | 12 +- .../resources/ui/app/components/coord-config.js | 12 +- .../ui/app/components/coord-version-settings.js | 12 +- .../ui/app/components/flow-designer.js | 5 +- .../ui/app/components/version-settings.js | 28 +-- .../ui/app/domain/actionjob_hanlder.js | 2 +- .../ui/app/domain/bundle/bundle-xml-importer.js | 18 +- .../coordinator/coordinator-xml-importer.js | 17 +- .../resources/ui/app/domain/schema-versions.js | 208 ++++++++----------- .../ui/app/domain/workflow-importer.js | 27 ++- .../ui/app/domain/workflow-json-importer.js | 2 + .../ui/app/domain/workflow-xml-generator.js | 2 +- .../main/resources/ui/app/domain/workflow.js | 12 +- .../src/main/resources/ui/app/routes/design.js | 42 ++++ .../app/templates/components/bundle-config.hbs | 2 +- .../components/bundle-version-settings.hbs | 4 +- .../app/templates/components/coord-config.hbs | 2 +- .../components/coord-version-settings.hbs | 4 +- .../templates/components/designer-errors.hbs | 2 +- .../app/templates/components/flow-designer.hbs | 2 +- .../templates/components/version-settings.hbs | 4 +- .../main/resources/ui/app/templates/design.hbs | 3 +- 23 files changed, 235 insertions(+), 198 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js index 4ef0ac3..122b956 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js @@ -111,7 +111,9 @@ export default Ember.Component.extend(Ember.Evented, Validations, { type : 'date' }, coordinators : null, - schemaVersions : this.get("schemaVersions") + schemaVersions : { + bundleVersion : this.get('schemaVersions').getDefaultVersion('bundle') + } }); }, importSampleBundle (){ @@ -136,9 +138,10 @@ export default Ember.Component.extend(Ember.Evented, Validations, { deferred.promise.then(function(data){ this.getBundleFromXml(data); this.set("isImporting", false); - }.bind(this)).catch(function(){ + }.bind(this)).catch(function(e){ this.set("isImporting", false); this.set("isImportingSuccess", false); + throw new Error(e); }.bind(this)); }, getFromHdfs(filePath){ @@ -161,8 +164,8 @@ export default Ember.Component.extend(Ember.Evented, Validations, { return deferred; }, getBundleFromXml(bundleXml){ - var bundleXmlImporter = BundleXmlImporter.create({schemaVersions: this.get("schemaVersions")}); - var bundleObj = bundleXmlImporter.importBundle(bundleXml, this.get("errors")); + var bundleXmlImporter = BundleXmlImporter.create(); + var bundleObj = bundleXmlImporter.importBundle(bundleXml); this.set("bundle", bundleObj.bundle); this.get("errors").clear(); this.get("errors").pushObjects(bundleObj.errors); http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-version-settings.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-version-settings.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-version-settings.js index 3bd6653..7067cb9 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-version-settings.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-version-settings.js @@ -17,16 +17,14 @@ import Ember from 'ember'; import Constants from '../utils/constants'; +import SchemaVersions from '../domain/schema-versions'; export default Ember.Component.extend({ + schemaVersions : SchemaVersions.create({}), initialize : function(){ - this.set('currentBundleVersion', this.get('schemaVersions').getCurrentBundleVersion()); - this.set('bundleSchemaVersions', this.get('schemaVersions').getBundleVersions()); - this.get('schemaVersions').createCopy(); + this.set('bundleSchemaVersions', this.get('schemaVersions').getSupportedVersions('bundle')); + this.set('selectedBundleVersion', this.get('bundle').schemaVersions.bundleVersion); }.on('init'), - BundleVersionObserver : Ember.observer('currentBundleVersion',function(){ - this.get('schemaVersions').setCurrentBundleVersion(this.get('currentBundleVersion')); - }), rendered : function(){ this.$('#version-settings-dialog').modal({ backdrop: 'static', @@ -39,10 +37,10 @@ export default Ember.Component.extend({ }.on('didInsertElement'), actions : { save (){ + this.get('bundle').schemaVersions.bundleVersion = this.get('selectedBundleVersion'); this.$('#version-settings-dialog').modal('hide'); }, cancel (){ - this.get('schemaVersions').rollBack(); this.$('#version-settings-dialog').modal('hide'); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js index 1d7f435..904901c 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js @@ -208,7 +208,9 @@ export default Ember.Component.extend(Validations, Ember.Evented, { }, controls : Ember.A([]), slainfo : SlaInfo.create({}), - schemaVersions : this.get("schemaVersions") + schemaVersions : { + coordinatorVersion : this.get('schemaVersions').getDefaultVersion('coordinator') + } }); }, importSampleCoordinator (){ @@ -219,8 +221,8 @@ export default Ember.Component.extend(Validations, Ember.Evented, { dataType: "text", cache:false, success: function(data) { - var coordinatorXmlImporter = CoordinatorXmlImporter.create({schemaVersions: self.schemaVersions}); - var coordinator = coordinatorXmlImporter.importCoordinator(data, self.errors); + var coordinatorXmlImporter = CoordinatorXmlImporter.create({}); + var coordinator = coordinatorXmlImporter.importCoordinator(data); deferred.resolve(coordinator); }.bind(this), failure : function(data){ @@ -276,8 +278,8 @@ export default Ember.Component.extend(Validations, Ember.Evented, { return deferred; }, getCoordinatorFromXml(coordinatorXml){ - var coordinatorXmlImporter = CoordinatorXmlImporter.create({schemaVersions: this.get("schemaVersions")}); - var coordinatorObj = coordinatorXmlImporter.importCoordinator(coordinatorXml, this.errors); + var coordinatorXmlImporter = CoordinatorXmlImporter.create({}); + var coordinatorObj = coordinatorXmlImporter.importCoordinator(coordinatorXml); var coordinator = coordinatorObj.coordinator; this.set("coordinator", coordinator); this.get("errors").clear(); http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-version-settings.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-version-settings.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-version-settings.js index 6385a44..ebb1b0b 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-version-settings.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-version-settings.js @@ -17,16 +17,14 @@ import Ember from 'ember'; import Constants from '../utils/constants'; +import SchemaVersions from '../domain/schema-versions'; export default Ember.Component.extend({ + schemaVersions : SchemaVersions.create({}), initialize : function(){ - this.set('currentCoordinatorVersion', this.get('schemaVersions').getCurrentCoordinatorVersion()); - this.set('coordinatorSchemaVersions', this.get('schemaVersions').getCoordinatorVersions()); - this.get('schemaVersions').createCopy(); + this.set('coordinatorSchemaVersions', this.get('schemaVersions').getSupportedVersions('coordinator')); + this.set('selectedCoordinatorVersion', this.get('coordinator').schemaVersions.coordinatorVersion); }.on('init'), - CoordinatorVersionObserver : Ember.observer('currentCoordinatorVersion',function(){ - this.get('schemaVersions').setCurrentCoordinatorVersion(this.get('currentCoordinatorVersion')); - }), rendered : function(){ this.$('#version-settings-dialog').modal({ backdrop: 'static', @@ -39,10 +37,10 @@ export default Ember.Component.extend({ }.on('didInsertElement'), actions : { save (){ + this.get('coordinator').schemaVersions.coordinatorVersion = this.get('selectedCoordinatorVersion'); this.$('#version-settings-dialog').modal('hide'); }, cancel (){ - this.get('schemaVersions').rollBack(); this.$('#version-settings-dialog').modal('hide'); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index c6264ba..b02e021 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js @@ -481,8 +481,11 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { getWorkflowAsJson(){ try{ var json=JSON.stringify(this.get("workflow")), self = this; + var actionVersions = JSON.stringify([...this.get("workflow").schemaVersions.actionVersions]); + var workflow = JSON.parse(json); + workflow.schemaVersions.actionVersions = actionVersions //this.get('workspaceManager').saveWorkInProgress(this.get('tabInfo.id'), json); - return json; + return JSON.stringify(workflow); }catch(err){ console.error(err); this.isCyclic(this.get("workflow")); http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js index 9103314..966313f 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js @@ -17,25 +17,23 @@ import Ember from 'ember'; import Constants from '../utils/constants'; +import SchemaVersions from '../domain/schema-versions'; export default Ember.Component.extend({ + schemaVersions : SchemaVersions.create({}), initialize : function(){ - this.set('currentWorkflowVersion', this.get('schemaVersions').getCurrentWorkflowVersion()); - this.set('workflowSchemaVersions', this.get('schemaVersions').getWorkflowVersions()); - this.get('schemaVersions').createCopy(); - this.set('actionSchemaVersions', Constants.actions); + this.set('workflowSchemaVersions', this.get('schemaVersions').getSupportedVersions('workflow')); + this.set('selectedWorkflowVersion', this.get('workflow').schemaVersions.workflowVersion); var actionVersions = Ember.A([]); - Object.keys(this.get('actionSchemaVersions')).forEach((key)=>{ - var action = this.get('actionSchemaVersions')[key]; + Object.keys(Constants.actions).forEach((key)=>{ + var action = Constants.actions[key]; if(action.supportsSchema){ - actionVersions.push({name:action.name, supporedVersions :this.get('schemaVersions').getActionVersions(action.name),selectedVersion:this.get('schemaVersions').getActionVersion(action.name)}); + actionVersions.push({name:action.name, supporedVersions :this.get('schemaVersions').getSupportedVersions(action.name), + selectedVersion: this.get('workflow').schemaVersions.actionVersions.get(action.name)}); } }); this.set('actionVersions',actionVersions); }.on('init'), - WorkflowVersionObserver : Ember.observer('currentWorkflowVersion',function(){ - this.get('schemaVersions').setCurrentWorkflowVersion(this.get('currentWorkflowVersion')); - }), rendered : function(){ this.$('#version-settings-dialog').modal({ backdrop: 'static', @@ -48,13 +46,19 @@ export default Ember.Component.extend({ }.on('didInsertElement'), actions : { versionChanged : function(actionName, version){ - this.get('schemaVersions').setActionVersion(actionName, version); + var action = this.get('actionVersions').findBy('name', actionName); + Ember.set(action, 'selectedVersion', version); }, save (){ + var actionVersions = new Map(); + this.get('actionVersions').forEach(versionSetting =>{ + actionVersions.set(versionSetting.name, versionSetting.selectedVersion); + }); + this.get('workflow').schemaVersions.workflowVersion = this.get('selectedWorkflowVersion'); + this.get('workflow').schemaVersions.actionVersions = actionVersions; this.$('#version-settings-dialog').modal('hide'); }, cancel (){ - this.get('schemaVersions').rollBack(); this.$('#version-settings-dialog').modal('hide'); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js index b0453e2..99d96ac 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js @@ -33,7 +33,7 @@ var ActionJobHandler=Ember.Object.extend(MappingMixin,{ var actionObj={}; nodeObj[this.get("actionType")]=actionObj; if (this.get("nameSpace")){ - var schemaVersion=this.schemaVersions.getActionVersion(this.get("actionType")); + var schemaVersion=this.schemaVersions.actionVersions.get(this.get("actionType")); if (this.get("nameSpace")){ var schema=this.get("nameSpace"); if (schemaVersion){ http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js index 2714ca1..a2053c9 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js @@ -21,10 +21,10 @@ import CommonUtils from "../../utils/common-utils"; var BundleXmlImporter= Ember.Object.extend({ x2js : new X2JS(), - schemaVersions : null, - importBundle (xml, errors){ + schemaVersions : SchemaVersions.create({}), + importBundle (xml){ var bundleJson = this.get("x2js").xml_str2json(xml); - return this.processBundleXML(bundleJson, errors); + return this.processBundleXML(bundleJson); }, processBundleXML(bundleJson){ var errors=Ember.A([]); @@ -36,16 +36,18 @@ var BundleXmlImporter= Ember.Object.extend({ type : 'date' }, coordinators : Ember.A([]), - schemaVersions : this.get("schemaVersions") + schemaVersions : { + bundleVersion : this.get("schemaVersions").getDefaultVersion('bundle') + } }); var bundleApp=bundleJson["bundle-app"]; bundle.name = bundleApp._name; var bundleVersion=CommonUtils.extractSchemaVersion(bundleApp._xmlns); - var maxBundleVersion = Math.max.apply(Math, bundle.schemaVersions.getBundleVersions()); - if (bundleVersion < maxBundleVersion) { - bundle.schemaVersions.setCurrentBundleVersion(bundleVersion); - } else { + var maxBundleVersion = Math.max.apply(Math, this.get('schemaVersions').getSupportedVersions('bundle')); + if (bundleVersion > maxBundleVersion) { errors.push({message: "Unsupported bundle version - " + bundleVersion}); + } else { + bundle.schemaVersions.bundleVersion = bundleVersion; } if(bundleApp.control && bundleApp.control["kick-off-time"]) { bundle.kickOffTime = this.extractDateField(bundleApp["control"]["kick-off-time"]); http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js index 76da535..9b54495 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js @@ -21,10 +21,10 @@ import CommonUtils from "../../utils/common-utils"; var CoordinatorXmlImporter= Ember.Object.extend({ x2js : new X2JS(), - schemaVersions: null, - importCoordinator (xml, errors){ + schemaVersions: SchemaVersions.create({}), + importCoordinator (xml){ var coordinatorJson = this.get("x2js").xml_str2json(xml); - return this.processCoordinatorXML(coordinatorJson, errors); + return this.processCoordinatorXML(coordinatorJson); }, createNewCoordinator(){ return Coordinator.create({ @@ -59,7 +59,9 @@ var CoordinatorXmlImporter= Ember.Object.extend({ } }, controls : Ember.A([]), - schemaVersions : this.get("schemaVersions") + schemaVersions : { + coordinatorVersion : this.get('schemaVersions').getDefaultVersion('coordinator') + } }); }, processCoordinatorXML(coordinatorJson){ @@ -68,12 +70,11 @@ var CoordinatorXmlImporter= Ember.Object.extend({ var coordinator = this.createNewCoordinator(); coordinator.name = coordinatorApp._name; var coordinatorVersion=CommonUtils.extractSchemaVersion(coordinatorApp._xmlns); - var maxCoordinatorVersion = Math.max.apply(Math, coordinator.schemaVersions.getCoordinatorVersions()); - if (coordinatorVersion < maxCoordinatorVersion) { - coordinator.schemaVersions.setCurrentCoordinatorVersion(coordinatorVersion); - } else { + var maxCoordinatorVersion = Math.max.apply(Math, this.get('schemaVersions').getSupportedVersions('coordinator')); + if (coordinatorVersion > maxCoordinatorVersion) { errors.push({message: "Unsupported coordinator version - " + coordinatorVersion}); } + coordinator.schemaVersions.coordinatorVersion = coordinatorVersion; var frequency = coordinatorApp._frequency; if(frequency.startsWith('${coord:')){ coordinator.frequency.type = frequency.substring(frequency.indexOf(':')+1, frequency.indexOf('(')); http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/schema-versions.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/schema-versions.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/schema-versions.js index 0a5083f..67605ae 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/schema-versions.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/schema-versions.js @@ -16,16 +16,15 @@ */ import Ember from 'ember'; export default Ember.Object.extend({ - actionVersions: Ember.Map.create(), - currentActionVersion:Ember.Map.create(), - workflowVersions: [], - workflowVersion: null, - bundleVersions: [], - bundleVersion: null, - coordinatorVersions: [], - coordinatorVersion: null, - clone : {}, - actionSchemaMap:{ + + supportedVersions : new Map(), + defaultVersions : new Map(), + actionVersions: new Map(), + currentActionVersion:new Map(), + workflowVersions: ["0.5","0.4.5","0.4","0.3","0.2.5","0.2","0.1"], + bundleVersions: ["0.2","0.1"], + coordinatorVersions: ["0.5", "0.4","0.3", "0.2","0.1"], + actionSchemas:{ "hive":["0.6","0.5","0.4","0.3","0.2","0.1"], "hive2":["0.2","0.1"], "sqoop":["0.3","0.2","0.1"], @@ -34,39 +33,62 @@ export default Ember.Object.extend({ "distcp":["0.2","0.1"], "email":["0.2","0.1"] }, - createCopy(){ - this.clone.workflowVersion = this.workflowVersion; - this.clone.currentActionVersion = this.currentActionVersion.copy(); - this.clone.coordinatorVersion = this.coordinatorVersion; - this.clone.bundleVersion = this.bundleVersion; + init(){ + if(this.supportedVersions.size === 0 && !this.useDefaultSettings){ + this.parseWorkflowSchemaConfig(); + this.parseCoordSchemaConfig(); + this.parseBundleSchemaConfig(); + this.initializeDefaultVersions(); + }else if(this.supportedVersions.size === 0 && this.useDefaultSettings){ + this.loadDefaultSettings() + this.initializeDefaultVersions(); + } + }, + loadDefaultSettings(){ + this.supportedVersions.set('workflow', []); + this.supportedVersions.set('coordinator', []); + this.supportedVersions.set('bundle', []); + this.workflowVersions.forEach((value)=>{ + this.supportedVersions.get('workflow').pushObject(value); + }, this); + this.coordinatorVersions.forEach((value)=>{ + this.supportedVersions.get('coordinator').pushObject(value); + }, this); + this.bundleVersions.forEach((value)=>{ + this.supportedVersions.get('bundle').pushObject(value); + }, this); + Object.keys(this.actionSchemas).forEach((key)=>{ + this.supportedVersions.set(key , this.actionSchemas[key]); + }, this); + }, + getSupportedVersions(type){ + return this.supportedVersions.get(type); }, - rollBack(){ - this.workflowVersion = this.clone.workflowVersion; - this.currentActionVersion = this.clone.currentActionVersion.copy(); + + getDefaultVersion(type){ + return this.defaultVersions.get(type); }, - importAdminConfigs(){ - var url = Ember.ENV.API_URL + "/v1/admin/configuration"; - var deferred = Ember.RSVP.defer(); - Ember.$.ajax({ - url: url, - method: "GET", - dataType: "text", - contentType: "text/plain;charset=utf-8", - beforeSend: function(request) { - request.setRequestHeader("X-Requested-By", "workflow-designer"); - }, - success: function(response) { - deferred.resolve(response); - }.bind(this), - error: function(response) { - deferred.reject(response); - }.bind(this) - }); - return deferred; + + setDefaultVersion(type, version){ + this.defaultVersions.set(type, version); }, - setWfSchemaVersions(configSettings) { + + restoreDefaultVersionSettings(){ + this.initializeDefaultVersions(); + }, + + initializeDefaultVersions(){ + this.supportedVersions.forEach((value, key) =>{ + var max = Math.max(...value) + if(isNaN(max)){ + max = value.reduce((a, b) => a > b?a:b); + } + this.defaultVersions.set(key, String(max)); + }, this); + }, + parseWorkflowSchemaConfig() { this.workflowVersions = []; - var wfSchemaVersions = configSettings["oozie.service.SchemaService.wf.schemas"].trim().split(","); + var wfSchemaVersions = this.adminConfig["oozie.service.SchemaService.wf.schemas"].trim().split(","); wfSchemaVersions = wfSchemaVersions.map(Function.prototype.call, String.prototype.trim).sort(); wfSchemaVersions.forEach(function(wfSchemaVersion) { var wfSchema = wfSchemaVersion.split("-"); @@ -74,67 +96,51 @@ export default Ember.Object.extend({ var wfSchemaType = wfSchema[1]; var wfSchemaVersionNumber = wfSchema[2].replace(".xsd", ""); if (wfSchemaType === "action") { - if (this.actionVersions.get(wfSchemaName)) { - this.actionVersions.get(wfSchemaName).push(wfSchemaVersionNumber); - this.currentActionVersion.set(wfSchemaName, wfSchemaVersionNumber); - } else { - this.actionVersions.set(wfSchemaName, [wfSchemaVersionNumber]); - this.currentActionVersion.set(wfSchemaName, wfSchemaVersionNumber); + if(this.supportedVersions.get(wfSchemaName)){ + this.supportedVersions.get(wfSchemaName).pushObject(wfSchemaVersionNumber); + }else{ + this.supportedVersions.set(wfSchemaName, [wfSchemaVersionNumber]); } } else if (wfSchemaType === "workflow") { - this.workflowVersions.push(wfSchemaVersionNumber); - this.workflowVersion = wfSchemaVersionNumber; + if(this.supportedVersions.get(wfSchemaType)){ + this.supportedVersions.get(wfSchemaType).pushObject(wfSchemaVersionNumber); + }else{ + this.supportedVersions.set(wfSchemaType, [wfSchemaVersionNumber]); + } } }.bind(this)); }, - setCoordSchemaVersions(configSettings) { - this.coordinatorVersions = []; - var coordSchemaVersions = configSettings["oozie.service.SchemaService.coord.schemas"].trim().split(","); + parseCoordSchemaConfig() { + var coordSchemaVersions = this.adminConfig["oozie.service.SchemaService.coord.schemas"].trim().split(","); coordSchemaVersions = coordSchemaVersions.map(Function.prototype.call, String.prototype.trim).sort(); coordSchemaVersions.forEach(function(coordSchemaVersion) { var coordSchema = coordSchemaVersion.split("-"); var coordSchemaType = coordSchema[1]; var coordSchemaVersionNumber = coordSchema[2].replace(".xsd", ""); if (coordSchemaType === "coordinator") { - this.coordinatorVersions.push(coordSchemaVersionNumber); - this.coordinatorVersion = coordSchemaVersionNumber; + if(this.supportedVersions.get('coordinator')){ + this.supportedVersions.get('coordinator').pushObject(coordSchemaVersionNumber); + }else{ + this.supportedVersions.set('coordinator', [coordSchemaVersionNumber]); + } } }.bind(this)); }, - setBundleSchemaVersions(configSettings) { + parseBundleSchemaConfig() { this.bundleVersions = []; - var bundleSchemaVersions = configSettings["oozie.service.SchemaService.bundle.schemas"].trim().split(","); + var bundleSchemaVersions = this.adminConfig["oozie.service.SchemaService.bundle.schemas"].trim().split(","); bundleSchemaVersions = bundleSchemaVersions.map(Function.prototype.call, String.prototype.trim).sort(); bundleSchemaVersions.forEach(function(bundleSchemaVersion) { var bundleSchema = bundleSchemaVersion.split("-"); var bundleSchemaType = bundleSchema[1]; var bundleSchemaVersionNumber = bundleSchema[2].replace(".xsd", ""); if (bundleSchemaType === "bundle") { - this.bundleVersions.push(bundleSchemaVersionNumber); - this.bundleVersion = bundleSchemaVersionNumber; - } - }.bind(this)); - }, - init(){ - var importAdminConfigsDefered=this.importAdminConfigs(); - importAdminConfigsDefered.promise.then(function(data){ - var configSettings = JSON.parse(data); - if (!(configSettings instanceof Object)) { - configSettings = JSON.parse(configSettings); + if(this.supportedVersions.get('bundle')){ + this.supportedVersions.get('bundle').pushObject(bundleSchemaVersionNumber); + }else{ + this.supportedVersions.set('bundle', [bundleSchemaVersionNumber]); + } } - this.setWfSchemaVersions(configSettings); - this.setCoordSchemaVersions(configSettings); - this.setBundleSchemaVersions(configSettings); - this.setDefaultActionVersions(); - }.bind(this)).catch(function(){ - this.setWorkflowVersions(["0.5","0.4.5","0.4","0.3","0.2.5","0.2","0.1"]); - this.setCurrentWorkflowVersion("0.5"); - this.setCoordinatorVersions(["0.4","0.3", "0.2","0.1"]); - this.setCurrentCoordinatorVersion("0.4"); - this.setBundleVersions(["0.2","0.1"]); - this.setCurrentBundleVersion("0.2"); - this.setDefaultActionVersions(); - console.error("There is some problem while importing schema versions. defaulting to known versions."); }.bind(this)); }, setDefaultActionVersions(){ @@ -145,51 +151,5 @@ export default Ember.Object.extend({ self.currentActionVersion.set(key,self.actionSchemaMap[key][0]); } }); - }, - getActionVersions(type){ - return this.actionVersions.get(type); - }, - getActionVersion(type){ - return this.currentActionVersion.get(type); - }, - getCurrentWorkflowVersion(){ - return this.workflowVersion; - }, - getWorkflowVersions(){ - return this.workflowVersions; - }, - getCurrentCoordinatorVersion(){ - return this.coordinatorVersion; - }, - getCoordinatorVersions(){ - return this.coordinatorVersions; - }, - getCurrentBundleVersion(){ - return this.bundleVersion; - }, - getBundleVersions(){ - return this.bundleVersions; - }, - setActionVersion(type, version){ - this.currentActionVersion.set(type, version); - }, - setCurrentWorkflowVersion(version){ - this.workflowVersion = version; - }, - setCurrentCoordinatorVersion(version){ - this.coordinatorVersion = version; - }, - setCurrentBundleVersion(version){ - this.bundleVersion = version; - }, - setWorkflowVersions(versions){ - this.workflowVersions = versions; - }, - setCoordinatorVersions(versions){ - this.coordinatorVersions = versions; - }, - setBundleVersions(versions){ - this.bundleVersions = versions; } - }); http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js index d001f38..ff75e7e 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js @@ -19,9 +19,12 @@ import Ember from 'ember'; import CommonUtils from "../utils/common-utils"; import {Workflow} from '../domain/workflow'; import {WorkflowXmlMapper} from '../domain/workflow_xml_mapper'; +import SchemaVersions from '../domain/schema-versions'; + var WorkflowImporter= Ember.Object.extend({ workflowMapper:null, x2js : new X2JS(), + schemaVersions : SchemaVersions.create({}), importWorkflow(workflowXml){ var workflow=Workflow.create({}); var errors=[]; @@ -36,7 +39,12 @@ var WorkflowImporter= Ember.Object.extend({ } var workflowAppJson=workflowJson["workflow-app"]; var workflowVersion=CommonUtils.extractSchemaVersion(workflowAppJson._xmlns); - workflow.schemaVersions.setCurrentWorkflowVersion(workflowVersion); + var maxWorkflowVersion = Math.max.apply(Math, this.get('schemaVersions').getSupportedVersions('workflow')); + if (workflowVersion > maxWorkflowVersion) { + errors.push({message: "Unsupported workflow version - " + workflowVersion}); + } else { + workflow.schemaVersions.workflowVersion = workflowVersion; + } this.processWorkflowActionVersions(workflowAppJson, workflow, errors); if (workflowAppJson.info && workflowAppJson.info.__prefix==="sla") { @@ -69,13 +77,16 @@ var WorkflowImporter= Ember.Object.extend({ }); importedWfActionVersions._keys.forEach(function(wfActionType){ - var maxImportedActionVersion = Math.max.apply(Math, importedWfActionVersions.get(wfActionType)) - if (workflow.schemaVersions.getActionVersion(wfActionType) < maxImportedActionVersion) { - errors.push({message: "Unsupported " + wfActionType + " version - " + maxImportedActionVersion}); - } else { - workflow.schemaVersions.setActionVersion(wfActionType, maxImportedActionVersion.toString()); - } - }); + var maxImportedActionVersion = Math.max(...importedWfActionVersions.get(wfActionType)); + var supportedVersions = this.get('schemaVersions').getSupportedVersions(wfActionType); + importedWfActionVersions.get(wfActionType).forEach((version)=>{ + if(supportedVersions.indexOf(version) === -1){ + errors.push({message: "Unsupported " + wfActionType + " version - " + maxImportedActionVersion}); + }else{ + workflow.schemaVersions.actionVersions.set(wfActionType, maxImportedActionVersion); + } + }, this); + }, this); }, processActionNode(nodeMap,action){ var actionMapper=this.get("workflowMapper").getNodeHandler("action"); http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-json-importer.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-json-importer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-json-importer.js index fa428bb..527badf 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-json-importer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-json-importer.js @@ -28,6 +28,8 @@ var WorkflowJsonImporter= Ember.Object.extend({ var workflow=Workflow.create({}); workflow.initialize(); workflow.set("name",workflowJson.name); + workflow.schemaVersions.workflowVersion = workflowJson.schemaVersions.workflowVersion; + workflow.schemaVersions.actionVersions = new Map(JSON.parse(workflowJson.schemaVersions.actionVersions)); this.restoreKillNodes(workflowJson.killNodes,workflow); var nodeMap= new Map(); var startNode=this.visitNode(workflowJson.startNode,nodeMap); http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js index 012e7ac..b9e4307 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js @@ -51,7 +51,7 @@ var WorkflowGenerator= Ember.Object.extend({ var targetWorkflowApp=reordered["workflow-app"]; targetWorkflowApp["_name"]=this.workflow.get("name"); this.copyProp(srcWorkflowApp,targetWorkflowApp,["parameters","global","credentials","start","decision","fork","join","action","kill","end","info"]); - targetWorkflowApp["_xmlns"]="uri:oozie:workflow:"+this.workflow.get("schemaVersions").getCurrentWorkflowVersion(); + targetWorkflowApp["_xmlns"]="uri:oozie:workflow:"+this.workflow.schemaVersions.workflowVersion; if (this.slaInfoExists(targetWorkflowApp)){ targetWorkflowApp["_xmlns:sla"]="uri:oozie:sla:0.2"; } http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js index f4fc20d..3c89f5c 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js @@ -31,11 +31,21 @@ var Workflow= Ember.Object.extend(FindNodeMixin,{ killNodes : null, nodeVisitor : null, nodeFactory:NodeFactory.create({}), - schemaVersions:SchemaVersions.create({}), sla : SlaInfo.create({}), credentials : Ember.A([]), initialize(){ this.nodeVisitor=NodeVisitor.create({}); + var schemaVersions=SchemaVersions.create({}); + this.schemaVersions = {}; + this.schemaVersions.workflowVersion = schemaVersions.getDefaultVersion('workflow'); + var actionsMap = new Map(); + Object.keys(Constants.actions).forEach((key)=>{ + var action = Constants.actions[key]; + if(action.supportsSchema){ + actionsMap.set(action.name, schemaVersions.getDefaultVersion(action.name)); + } + }); + this.schemaVersions.actionVersions = actionsMap; var src =this.nodeFactory.createStartNode(); var dest =this.nodeFactory.createEndNode("end"); this.set("startNode", src); http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/routes/design.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/routes/design.js b/contrib/views/wfmanager/src/main/resources/ui/app/routes/design.js index 10f745a..d557625 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/routes/design.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/routes/design.js @@ -16,6 +16,7 @@ */ import Ember from 'ember'; +import SchemaVersions from '../domain/schema-versions'; export default Ember.Route.extend(Ember.Evented, { @@ -23,7 +24,48 @@ export default Ember.Route.extend(Ember.Evented, { this.set("xmlAppPath", transition.queryParams.appPath); this.controllerFor('design').set("xmlAppPath", transition.queryParams.appPath); }, + model(){ + if(!this.get('failedSchemaVersions')){ + return this.importAdminConfigs(); + }else{ + return []; + } + }, + afterModel(model){ + if(!this.get('failedSchemaVersions')){ + SchemaVersions.reopen({ + adminConfig : JSON.parse(model) + }); + } + }, + importAdminConfigs(){ + return new Ember.RSVP.Promise((resolve, reject) => { + var url = Ember.ENV.API_URL + "/v1/admin/configuration"; + var deferred = Ember.$.ajax({ + url: url, + method: "GET", + dataType: "text", + contentType: "text/plain;charset=utf-8", + beforeSend: function(request) { + request.setRequestHeader("X-Requested-By", "workflow-designer"); + }, + success : function(response){ + resolve(JSON.parse(response)); + }, + error : function(response){ + reject(response); + } + }); + }); + }, actions : { + error(error, transition){ + SchemaVersions.reopen({ + useDefaultSettings : true + }); + this.set('failedSchemaVersions', true); + transition.retry(); + }, editWorkflow(path){ this.trigger('openNewTab', path); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs index 93a0541..249877b 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs @@ -130,5 +130,5 @@ {{#preview-dialog title="Bundle XML Preview" previewXml=previewXml closePreview="closePreview"}}{{/preview-dialog}} {{/if}} {{#if showVersionSettings}} - {{bundle-version-settings schemaVersions=bundle.schemaVersions showVersionSettings="showVersionSettings" }} + {{bundle-version-settings bundle=bundle showVersionSettings="showVersionSettings" }} {{/if}} http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-version-settings.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-version-settings.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-version-settings.hbs index 6d6f675..242b89f 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-version-settings.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-version-settings.hbs @@ -27,9 +27,9 @@ <div class="form-group"> <label class="control-label col-xs-3"> Bundle Version</label> <div class="col-xs-7"> - <select onchange={{action (mut currentBundleVersion) value="target.value"}} name="select-version" class="form-control"> + <select onchange={{action (mut selectedBundleVersion) value="target.value"}} name="select-version" class="form-control"> {{#each bundleSchemaVersions as |version index|}} - <option value={{version}} selected={{eq currentBundleVersion version}}>{{version}}</option> + <option value={{version}} selected={{eq selectedBundleVersion version}}>{{version}}</option> {{/each}} </select> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs index fff8c8c..5b5cd68 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs @@ -329,7 +329,7 @@ okBtnText="Continue" cancelBtnText="Cancel" onOk="resetCoordinator"}}{{/confirma {{#workflow-parameters type='coord' closeWorkFlowParam="closeWorkFlowParam" saveWorkFlowParam="saveWorkFlowParam" parameters=parameters}}{{/workflow-parameters}} {{/if}} {{#if showVersionSettings}} - {{coord-version-settings schemaVersions=coordinator.schemaVersions showVersionSettings="showVersionSettings" }} + {{coord-version-settings coordinator=coordinator showVersionSettings="showVersionSettings" }} {{/if}} {{#if showControlConfig}} <div id="control-dialog" class="modal fade" role="dialog"> http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-version-settings.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-version-settings.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-version-settings.hbs index be862ac..b1b192d 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-version-settings.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-version-settings.hbs @@ -27,9 +27,9 @@ <div class="form-group"> <label class="control-label col-xs-3"> Coordinator Version</label> <div class="col-xs-7"> - <select onchange={{action (mut currentCoordinatorVersion) value="target.value"}} name="select-version" class="form-control"> + <select onchange={{action (mut selectedCoordinatorVersion) value="target.value"}} name="select-version" class="form-control"> {{#each coordinatorSchemaVersions as |version index|}} - <option value={{version}} selected={{eq currentCoordinatorVersion version}}>{{version}}</option> + <option value={{version}} selected={{eq selectedCoordinatorVersion version}}>{{version}}</option> {{/each}} </select> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-errors.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-errors.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-errors.hbs index 8438255..8b2911b 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-errors.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-errors.hbs @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. }} -<div id="designer-errors"> +<div id="designer-errors" class="paddingtop10"> {{#if (or (gt errors.length 0) (gt validationErrors.length 0))}} <div id="alert"class="alert alert-danger alert-dismissible fade in workflow-error" role="alert"> {{#if (gt errors.length 0)}} http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs index 7449f27..6e1b054 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs @@ -402,7 +402,7 @@ {{#workflow-sla showWorkflowSla="showWorkflowSla" workflowSla=workflow.sla workflowSlaEnabled=workflow.slaEnabled}}{{/workflow-sla}} {{/if}} {{#if showVersionSettings}} - {{version-settings schemaVersions=workflow.schemaVersions showVersionSettings="showVersionSettings" }} + {{version-settings showVersionSettings="showVersionSettings" workflow=workflow}} {{/if}} {{#if showCredentials}} {{#workflow-credentials showCredentials="showCredentials" workflowCredentials=workflow.credentials}}{{/workflow-credentials}} http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs index 145f81b..4548258 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs @@ -27,9 +27,9 @@ <div class="form-group"> <label class="control-label col-xs-3"> Workflow Version</label> <div class="col-xs-7"> - <select onchange={{action (mut currentWorkflowVersion) value="target.value"}} name="select-version" class="form-control"> + <select onchange={{action (mut selectedWorkflowVersion) value="target.value"}} name="select-version" class="form-control"> {{#each workflowSchemaVersions as |version index|}} - <option value={{version}} selected={{eq currentWorkflowVersion version}}>{{version}}</option> + <option value={{version}} selected={{eq selectedWorkflowVersion version}}>{{version}}</option> {{/each}} </select> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs index d52c893..e39ba8d 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs @@ -15,4 +15,5 @@ * See the License for the specific language governing permissions and * limitations under the License. }} -{{designer-workspace xmlAppPath=xmlAppPath showDashboard="showDashboard" hideDashboard="hideDashboard"}} +{{designer-workspace xmlAppPath=xmlAppPath showDashboard="showDashboard" + hideDashboard="hideDashboard" adminConfig=model.adminConfig}}
