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-20097. Hive 2: Visual Explain - Remove children in the JSON dump (pallavkul)
Date Tue, 21 Feb 2017 16:45:08 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 70ef0d04c -> 21272d8ba


AMBARI-20097. Hive 2: Visual Explain - Remove children in the JSON dump (pallavkul)


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

Branch: refs/heads/branch-2.5
Commit: 21272d8baadfe3192801e6a2b7b91bb80465a4f2
Parents: 70ef0d0
Author: pallavkul <pallav.kul@gmail.com>
Authored: Tue Feb 21 22:13:24 2017 +0530
Committer: pallavkul <pallav.kul@gmail.com>
Committed: Tue Feb 21 22:14:52 2017 +0530

----------------------------------------------------------------------
 .../resources/ui/app/components/visual-explain.js  |  2 ++
 .../main/resources/ui/app/routes/queries/query.js  | 17 +++++++++++++----
 .../src/main/resources/ui/app/styles/app.scss      |  4 ++++
 .../ui/app/templates/components/visual-explain.hbs |  2 +-
 .../resources/ui/app/templates/queries/query.hbs   |  2 +-
 .../ui/app/utils/hive-explainer/renderer.js        |  2 +-
 6 files changed, 22 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/21272d8b/contrib/views/hive20/src/main/resources/ui/app/components/visual-explain.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/visual-explain.js b/contrib/views/hive20/src/main/resources/ui/app/components/visual-explain.js
index 2800c09..fc7cf64 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/visual-explain.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/visual-explain.js
@@ -25,6 +25,8 @@ export default Ember.Component.extend({
 
   showDetailsModal: false,
 
+  classNames:['visual-explain-container'],
+
   explainDetailData: '',
 
   visualExplainInput: Ember.computed('visualExplainJson', function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/21272d8b/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 d3768c1..9196d8b 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
@@ -190,8 +190,7 @@ export default Ember.Route.extend(UILoggerMixin, {
     },
 
     visualExplainQuery(){
-      this.get('controller').set('isVisualExplainQuery', true );
-      this.send('executeQuery');
+      this.send('executeQuery', true);
     },
 
     updateQuery(query){
@@ -199,12 +198,19 @@ export default Ember.Route.extend(UILoggerMixin, {
       this.get('controller.model').set('query', query);
     },
 
-    executeQuery(){
+    executeQuery(isVisualExplainQuery){
 
       let self = this;
       this.get('controller').set('currentJobId', null);
 
-      let isVisualExplainQuery = this.get('controller').get('isVisualExplainQuery');
+      if(!Ember.isEmpty(isVisualExplainQuery)){
+        var isVisualExplainQuery = true;
+        this.get('controller').set('isVisualExplainQuery', true);
+      } else {
+        var isVisualExplainQuery = false;
+        this.get('controller').set('isVisualExplainQuery', false);
+      }
+
 
       let queryInput = this.get('controller').get('currentQuery');
 
@@ -260,6 +266,7 @@ export default Ember.Route.extend(UILoggerMixin, {
           .then((status) => {
             self.get('controller').set('isJobSuccess', true);
             self.send('getJobResult', data, payload.title);
+            self.transitionTo('queries.query.loading');
           }, (error) => {
             console.log('error', error);
             self.get('logger').danger('Failed to execute query.', self.extractError(error));
@@ -305,6 +312,8 @@ export default Ember.Route.extend(UILoggerMixin, {
 
         if(isVisualExplainQuery){
           self.send('showVisualExplain', payloadTitle);
+        } else {
+          self.get('controller.model').set('visualExplainJson', null);
         }
 
         if( self.paramsFor('queries.query').worksheetId == payloadTitle){

http://git-wip-us.apache.org/repos/asf/ambari/blob/21272d8b/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 fd1f0eb..5371aa3 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
@@ -821,6 +821,10 @@ ul.dropdown-menu {
   word-break: break-all;
 }
 
+.visual-explain-container{
+  position: relative;
+}
+
 .visual-explain-detail-container {
   width: 500px;
   position: absolute;

http://git-wip-us.apache.org/repos/asf/ambari/blob/21272d8b/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain.hbs
b/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain.hbs
index 905e73c..30f9405 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain.hbs
@@ -17,7 +17,7 @@
 }}
 
 
-<div style="position: relative;">
+<div>
   <button class="btn btn-default" title="Expand/Collspse" {{action "expandQueryResultPanel"
}} style="position: absolute;top: 10px; right: 10px;">{{fa-icon "expand"}}</button>
 </div>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/21272d8b/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 d62c781..bf485ca 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
@@ -42,7 +42,7 @@
               {{/each}}
             </ul>
         </div>
-        <button class="btn btn-default" {{action "visualExplainQuery" }}>{{fa-icon
"link"}} Visual Explain</button>
+        <button class="btn btn-default" {{action "visualExplainQuery" }} disabled={{ worksheet.isQueryRunning}}>{{fa-icon
"link"}} Visual Explain</button>
 
         {{#if worksheet.isQueryRunning}}
           {{fa-icon "spinner fa-1-5" spin=true}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/21272d8b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
index 3dedd8f..a332802 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
@@ -317,7 +317,7 @@ function doClean(node) {
   } else {
     return (
       Object.keys(node)
-        .filter(cNodeKey => cNodeKey !== '_children')
+        .filter(cNodeKey => cNodeKey !== '_children' && cNodeKey !== '_uuid')
         .reduce((accumulator, cNodeKey) => {
           accumulator[cNodeKey] = node[cNodeKey];
           return accumulator;


Mime
View raw message