AMBARI-20411. Export workflow will create a workflow with workflow name (Venkata Sairam via pallavkul)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/73a8633d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/73a8633d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/73a8633d Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 73a8633db300c352228c363364b7795d3ad47543 Parents: 8f579c1 Author: pallavkul <pallav....@gmail.com> Authored: Mon Mar 13 18:37:32 2017 +0530 Committer: pallavkul <pallav....@gmail.com> Committed: Mon Mar 13 18:38:23 2017 +0530 ---------------------------------------------------------------------- .../src/main/resources/ui/app/components/flow-designer.js | 10 +++++++--- .../wfmanager/src/main/resources/ui/app/styles/app.less | 9 +++++++++ .../ui/app/templates/components/designer-workspace.hbs | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/73a8633d/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 f542c07..5f885e7 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 @@ -222,10 +222,14 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { }); }, workflowXmlDownload(workflowXml){ - var link = document.createElement("a"); + let link = document.createElement("a"), val = this.get('workflow.name'); + if(Ember.isBlank(val)) { link.download = "workflow.xml"; - link.href = "data:text/xml,"+encodeURIComponent(vkbeautify.xml(workflowXml)); - link.click(); + } else { + link.download = val.replace(/\s/g, '_'); + } + link.href = "data:text/xml,"+encodeURIComponent(vkbeautify.xml(workflowXml)); + link.click(); }, nodeRendered: function(){ if (this.get("isNew")){ http://git-wip-us.apache.org/repos/asf/ambari/blob/73a8633d/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less index 5577239..0d96af4 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less +++ b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less @@ -1765,4 +1765,13 @@ input:invalid { #projectsDeleteConfirmation .modal-body { max-height: 70vh; overflow: auto; + } +.tab-name { + display: inline-block; + max-width: 100px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + top: 5px; + position: relative; } http://git-wip-us.apache.org/repos/asf/ambari/blob/73a8633d/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-workspace.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-workspace.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-workspace.hbs index c190511..3fb644a 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-workspace.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-workspace.hbs @@ -125,7 +125,7 @@ {{else}} <i class="fa fa-th marginright5"></i> {{/if}} - {{tab.name}} + <div class="tab-name">{{tab.name}}</div> <span class="closeTab" {{action "showWarning" index bubbles=false }}>x</span> </a> </li>