Эх сурвалжийг харах

[oozie] Display and select available workflow credentials

Romain Rigaux 10 жил өмнө
parent
commit
19beda7037

+ 1 - 1
apps/oozie/src/oozie/static/oozie/js/workflow-editor.ko.js

@@ -481,7 +481,7 @@ var WorkflowEditorViewModel = function (layout_json, workflow_json, credentials_
 
   self.previewColumns = ko.observable("");
   self.workflow = new Workflow(self, workflow_json);
-  self.credentials = ko.mapping.fromJSON(credentials_json);
+  self.credentials = ko.mapping.fromJS(credentials_json);
 
   self.inited = ko.observable(self.oozieColumns().length > 0);
   self.init = function (callback) {

+ 1 - 1
apps/oozie/src/oozie/templates/editor2/common_workflow.mako

@@ -498,7 +498,7 @@
 
 <script type="text/html" id="common-action-credentials">
   <em data-bind="visible: $root.credentials() == null || $root.credentials().length == 0">${ _('No available credentials.') }</em>
-  <select data-bind="visible: $root.credentials() != null && $root.credentials().length > 0, options: $root.credentials, value: properties.credentials" size="5" multiple="true"></select>
+  <select data-bind="visible: $root.credentials() != null && $root.credentials().length > 0, options: $root.credentials, selectedOptions: properties.credentials" size="5" multiple="true"></select>
 </script>
 
 

+ 1 - 1
apps/oozie/src/oozie/templates/editor2/gen/workflow-common.xml.mako

@@ -24,7 +24,7 @@
 <%def name="filelink(path)">${ '#' in path and path or path + '#' + posixpath.basename(path) }</%def>
 
 
-<%def name="credentials(credentials)">${ ' cred="%s"' % ','.join([cred['name'] for cred in credentials if cred['value']]) if credentials else '' | n,unicode }</%def>
+<%def name="credentials(credentials)">${ ' cred="%s"' % ','.join(credentials) if credentials else '' | n,unicode }</%def>
 
 
 <%def name="prepares(prepares)">