You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by pa...@apache.org on 2017/02/22 07:46:22 UTC

ambari git commit: AMBARI-20111. Hive2: Query in query editor is getting modified while navigating across different tabs (pallavkul)

Repository: ambari
Updated Branches:
  refs/heads/trunk c655d7c08 -> 0ffa89532


AMBARI-20111. Hive2: Query in query editor is getting modified while navigating across different tabs (pallavkul)


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

Branch: refs/heads/trunk
Commit: 0ffa89532854e8760f543acd3434952eebc24f8c
Parents: c655d7c
Author: pallavkul <pa...@gmail.com>
Authored: Wed Feb 22 13:15:35 2017 +0530
Committer: pallavkul <pa...@gmail.com>
Committed: Wed Feb 22 13:15:35 2017 +0530

----------------------------------------------------------------------
 .../main/resources/ui/app/configs/result-tabs.js   |  6 +++---
 .../main/resources/ui/app/routes/queries/query.js  | 17 ++++++++++++-----
 .../main/resources/ui/app/routes/savedqueries.js   |  3 ---
 .../resources/ui/app/templates/savedqueries.hbs    |  1 -
 4 files changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0ffa8953/contrib/views/hive20/src/main/resources/ui/app/configs/result-tabs.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/configs/result-tabs.js b/contrib/views/hive20/src/main/resources/ui/app/configs/result-tabs.js
index f48dcd8..3284533 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/configs/result-tabs.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/configs/result-tabs.js
@@ -23,19 +23,19 @@ let resultsTabs = [
     name: 'results',
     label: 'RESULTS',
     link: 'queries.query.results',
-    faIcon: 'paper-plane'
+    faIcon: 'file-text-o'
   }),
   Ember.Object.create({
     name: 'log',
     label: 'LOG',
     link: 'queries.query.log',
-    faIcon: 'paper-plane'
+    faIcon: 'list'
   }),
   Ember.Object.create({
     name: 'visual-explain',
     label: 'VISUAL EXPLAIN',
     link: 'queries.query.visual-explain',
-    faIcon: 'paper-plane'
+    faIcon: 'link'
   }),
   Ember.Object.create({
     name: 'tez-ui',

http://git-wip-us.apache.org/repos/asf/ambari/blob/0ffa8953/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js
index 9196d8b..c549d7b 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js
@@ -211,8 +211,8 @@ export default Ember.Route.extend(UILoggerMixin, {
         this.get('controller').set('isVisualExplainQuery', false);
       }
 
-
-      let queryInput = this.get('controller').get('currentQuery');
+      let originalQuery = this.get('controller').get('currentQuery');
+      let queryInput = originalQuery;
 
       if (isVisualExplainQuery) {
         queryInput = "";
@@ -233,16 +233,23 @@ export default Ember.Route.extend(UILoggerMixin, {
         }
       }
 
-      this.get('controller.model').set('query', queryInput);
+      this.get('controller.model').set('query', originalQuery);
 
       let dbid = this.get('controller.model').get('selectedDb');
       let worksheetTitle = this.get('controller.model').get('title');
 
       this.get('controller.model').set('jobData', []);
+      self.get('controller.model').set('currentPage', 0);
+      self.get('controller.model').set('previousPage', -1 );
+      self.get('controller.model').set('nextPage', 1);
+      self.get('controller.model').set('queryResult', {'schema' :[], 'rows' :[]});
+      self.get('controller.model').set('visualExplainJson', null);
+
+
       this.get('controller.model').set('isQueryRunning', true);
 
-      this.get('controller').set('queryResult', self.get('controller').get('queryResult'));
-      this.get('controller.model').set('queryResult', self.get('controller').get('queryResult'));
+      //this.get('controller').set('queryResult', self.get('controller').get('queryResult'));
+      //this.get('controller.model').set('queryResult', self.get('controller').get('queryResult'));
 
       let globalSettings = this.get('globalSettings');
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0ffa8953/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js b/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js
index c2a0c8c..7b18424 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js
@@ -36,9 +36,6 @@ export default Ember.Route.extend({
   },
 
   actions: {
-    historySavedQuery(id){
-      console.log('historySavedQuery', id);
-    },
 
     deleteSavedQuery(){
       let queryId = this.get('controller').get('selectedSavedQueryId');

http://git-wip-us.apache.org/repos/asf/ambari/blob/0ffa8953/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
index c3d907d..c0b5e82 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
@@ -39,7 +39,6 @@
               <div class="dropdown">
                 <a class="dropdown-toggle" id="dropdownMenu1121" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">{{fa-icon "cog"}}</a>
                 <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu">
-                  <li><a href="#" {{action "historySavedQuery" savedQuery.id }} class="text-uppercase">{{fa-icon "history"}} History</a></li>
                   <li><a href="#" {{action "openDeleteSavedQueryModal" savedQuery.id}} class="text-uppercase">{{fa-icon "remove"}} Delete</a></li>
                   <li><a href="#" {{action "openAsWorksheet" savedQuery }} class="text-uppercase">{{fa-icon "folder-open-o"}} Open as worksheet</a></li>
                 </ul>