You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/02/13 21:03:50 UTC

[16/50] [abbrv] ambari git commit: AMBARI-19931. HiveView2.0: DB panel shows up on Query result full screen (pallavkul)

AMBARI-19931. HiveView2.0: DB panel shows up on Query result full screen (pallavkul)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 77b5b16e2bd68ed18e193104b56ad0bb434ee505
Parents: 1d1253a
Author: pallavkul <pa...@gmail.com>
Authored: Sat Feb 11 17:17:12 2017 +0530
Committer: pallavkul <pa...@gmail.com>
Committed: Sat Feb 11 17:17:12 2017 +0530

----------------------------------------------------------------------
 .../resources/ui/app/routes/queries/query.js    | 43 +++++++++++++++++---
 .../src/main/resources/ui/app/services/query.js |  2 -
 .../src/main/resources/ui/app/styles/app.scss   |  1 -
 .../ui/app/templates/queries/query.hbs          |  4 +-
 4 files changed, 40 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/77b5b16e/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 72682f5..88202ff 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
@@ -24,6 +24,9 @@ export default Ember.Route.extend({
   jobs: Ember.inject.service(),
   savedQueries: Ember.inject.service(),
 
+  isQueryEdidorPaneExpanded: false,
+  isQueryResultPanelExpanded: false,
+
   beforeModel(){
     let existingWorksheets = this.store.peekAll('worksheet');
     existingWorksheets.setEach('selected', false);
@@ -161,7 +164,6 @@ export default Ember.Route.extend({
       this.get('controller.model').set('selectedDb', db);
     },
 
-
     visualExplainQuery(){
       this.get('controller').set('isVisualExplainQuery', true );
       this.send('executeQuery');
@@ -389,15 +391,46 @@ export default Ember.Route.extend({
     },
 
     expandQueryEdidorPanel(){
+
+      if(!this.get('isQueryEdidorPaneExpanded')){
+        this.set('isQueryEdidorPaneExpanded', true);
+      } else {
+        this.set('isQueryEdidorPaneExpanded', false);
+      }
       Ember.$('.query-editor-panel').toggleClass('query-editor-full-width');
       Ember.$('.database-panel').toggleClass("hide");
+
     },
 
     expandQueryResultPanel(){
-      Ember.$('.query-editor-panel').toggleClass('query-editor-full-width');
-      Ember.$('.query-editor-container').toggleClass("hide");
-      Ember.$('.database-panel').toggleClass("hide");
-      this.send('adjustPanelSize');
+
+      if(!this.get('isQueryResultPanelExpanded')){
+
+        if(!this.get('isQueryEdidorPaneExpanded')){
+          Ember.$('.query-editor-container').addClass("hide");
+          Ember.$('.database-panel').addClass("hide");
+          Ember.$('.query-editor-panel').addClass('query-editor-full-width');
+        } else {
+
+          Ember.$('.query-editor-container').addClass("hide");
+        }
+        this.set('isQueryResultPanelExpanded', true);
+
+      } else {
+
+        if(!this.get('isQueryEdidorPaneExpanded')){
+          Ember.$('.query-editor-container').removeClass("hide");
+          Ember.$('.database-panel').removeClass("hide");
+          Ember.$('.query-editor-panel').removeClass('query-editor-full-width');
+        } else {
+
+          Ember.$('.query-editor-container').removeClass("hide");
+
+        }
+        this.set('isQueryResultPanelExpanded', false);
+
+      }
+
     },
 
     adjustPanelSize(){

http://git-wip-us.apache.org/repos/asf/ambari/blob/77b5b16e/contrib/views/hive20/src/main/resources/ui/app/services/query.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/services/query.js b/contrib/views/hive20/src/main/resources/ui/app/services/query.js
index b484c74..42d4fb0 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/services/query.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/services/query.js
@@ -80,6 +80,4 @@ export default Ember.Service.extend({
     });
   }
 
-
-
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/77b5b16e/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
index 6469b2e..a9c91c7 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
+++ b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
@@ -322,7 +322,6 @@ pre {
 }
 
 .query-result-table {
-  border-top: 1px solid darken($database-search-background, 25%);
   padding-top:10px;
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/77b5b16e/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
index 84992d7..5b2b5c2 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
@@ -54,12 +54,12 @@
         <div>
           <ul class="row nav nav-tabs inverse">
             <li class="editor-result-list active">
-              <a href="javascript:void(0)" class="editor-result-list-anchor" {{action 'showQueryEditorResult' }}>
+              <a href="javascript:void(0)" class="editor-result-list-anchor active" {{action 'showQueryEditorResult' }}>
                 {{fa-icon "file-text-o"}}&nbsp;&nbsp;RESULT
               </a>
             </li>
             <li class="log-list">
-              <a href="javascript:void(0)" class="log-list-anchor active" {{action 'showQueryEditorLog' }}>
+              <a href="javascript:void(0)" class="log-list-anchor" {{action 'showQueryEditorLog' }}>
                 {{fa-icon "list"}}&nbsp;&nbsp;LOG
               </a>
             </li>