ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pallav...@apache.org
Subject ambari git commit: AMBARI-20411. Export workflow will create a workflow with workflow name (Venkata Sairam via pallavkul)
Date Mon, 13 Mar 2017 13:09:28 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 be10018f6 -> b099a2c32


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/b099a2c3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b099a2c3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b099a2c3

Branch: refs/heads/branch-2.5
Commit: b099a2c323ae6dfd4bb8cee8b0ebcf58dc69fcb2
Parents: be10018
Author: pallavkul <pallav.kul@gmail.com>
Authored: Mon Mar 13 18:37:32 2017 +0530
Committer: pallavkul <pallav.kul@gmail.com>
Committed: Mon Mar 13 18:39:11 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/b099a2c3/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/b099a2c3/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/b099a2c3/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>


Mime
View raw message