ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gna...@apache.org
Subject ambari git commit: AMBARI-19774. Undo Add Node feature needed for workflow designer similar to Undo Delete(Padma Priya N via gauravn7)
Date Mon, 30 Jan 2017 12:08:08 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 589f567e3 -> ff34b053d


AMBARI-19774. Undo Add Node feature needed for workflow designer similar to Undo Delete(Padma
Priya N via gauravn7)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ff34b053
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ff34b053
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ff34b053

Branch: refs/heads/trunk
Commit: ff34b053d047889d261524f4b676b915a9176934
Parents: 589f567
Author: Gaurav Nagar <grvngr@gmail.com>
Authored: Mon Jan 30 17:36:57 2017 +0530
Committer: Gaurav Nagar <grvngr@gmail.com>
Committed: Mon Jan 30 17:37:49 2017 +0530

----------------------------------------------------------------------
 .../src/main/resources/ui/app/components/flow-designer.js    | 5 +++--
 .../resources/ui/app/templates/components/flow-designer.hbs  | 8 +++++---
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ff34b053/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 1292832..f863656 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
@@ -616,7 +616,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, {
     }
     this.rerender();
     this.doValidation();
-    this.showUndo('node');
+    this.showUndo('nodeDeleted');
   },
   addWorkflowBranch(node){
     this.createSnapshot();
@@ -846,6 +846,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, {
       this.rerender();
       this.doValidation();
       this.scrollToNewPosition();
+      this.showUndo('nodeAdded');
     },
     nameChanged(){
       this.doValidation();
@@ -1095,7 +1096,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, {
       this.persistWorkInProgress();
     },
 
-    undoDelete () {
+    undo () {
       var workflowImporter = WorkflowJsonImporter.create({});
       var workflow = workflowImporter.importWorkflow(this.get('workflowSnapshot'));
       this.resetDesigner();

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff34b053/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 2b8844e..df0a9ba 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
@@ -141,10 +141,12 @@
       {{designer-errors errors=errors validationErrors=validationErrors}}
       {{#if undoAvailable}}
         <div id="alert"class="alert alert-warning" role="alert">
-          {{#if (eq undoType 'node')}}
-            <label>Node <i>{{deletedNode.name}}</i> deleted <span class="undo"
{{action 'undoDelete'}}><u>Undo</u></span></label>
+          {{#if (eq undoType 'nodeDeleted')}}
+            <label>Node deleted <span class="undo" {{action 'undo'}}><u>Undo</u></span></label>
+          {{else if (eq undoType 'nodeAdded')}}
+            <label>Node added <span class="undo" {{action 'undo'}}><u>Undo</u></span></label>
           {{else}}
-            <label>Transition deleted <span class="undo" {{action 'undoDelete'}}><u>Undo</u></span></label>
+            <label>Transition deleted <span class="undo" {{action 'undo'}}><u>Undo</u></span></label>
           {{/if}}
         </div>
       {{/if}}


Mime
View raw message