Repository: ambari Updated Branches: refs/heads/trunk 878a0dd88 -> 251c741bc
AMBARI-14559. Hive View Visual explain caches and doesn't account for settings changes (pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/251c741b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/251c741b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/251c741b Branch: refs/heads/trunk Commit: 251c741bc52741ea96372a444ba8da6adf8506d1 Parents: 878a0dd Author: Pallav Kulshreshtha <[email protected]> Authored: Mon Apr 11 16:00:07 2016 +0530 Committer: Pallav Kulshreshtha <[email protected]> Committed: Mon Apr 11 16:00:07 2016 +0530 ---------------------------------------------------------------------- .../ui/hive-web/app/controllers/visual-explain.js | 12 ++---------- .../ui/hive-web/app/templates/visual-explain.hbs | 12 ++++++------ .../resources/ui/hive-web/app/views/visual-explain.js | 11 +++++++---- 3 files changed, 15 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/251c741b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/visual-explain.js ---------------------------------------------------------------------- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/visual-explain.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/visual-explain.js index 509fe85..272aa11 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/visual-explain.js +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/visual-explain.js @@ -41,6 +41,7 @@ export default Ember.Controller.extend({ } // Introducing a common function var getVisualExplainJson = function(){ + self.set('showSpinner', undefined); self.set('rerender'); self.get('index')._executeQuery(constants.jobReferrer.visualExplain, true, true).then(function (json) { //this condition should be changed once we change the way of retrieving this json @@ -56,16 +57,7 @@ export default Ember.Controller.extend({ self.toggleProperty('shouldChangeGraph'); } - if(this.get('json') == undefined) { - getVisualExplainJson(); - - } else if (this.get('shouldChangeGraph')){ - getVisualExplainJson(); - - } else { - this.set('rerender', true); - return; - } + getVisualExplainJson(); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/251c741b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs index 119d95d..bef0693 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs @@ -19,12 +19,12 @@ <div id="visual-explain" class="index-overlay"> {{#panel-widget headingTranslation="titles.query.visualExplain"}} - {{#unless json}} - {{#if noquery}} - <div class="alert alert-danger" role="alert"><strong>{{tb-helper 'hive.errors.no.query'}}</strong></div> - {{else}} - <div class="spinner"></div> - {{/if}} + {{#if noquery}} + <div class="alert alert-danger" role="alert"><strong>{{tb-helper 'hive.errors.no.query'}}</strong></div> + {{/if}} + + {{#unless showSpinner}} + <div class="spinner"></div> {{/unless}} <div id="no-visual-explain-graph"></div> http://git-wip-us.apache.org/repos/asf/ambari/blob/251c741b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visual-explain.js ---------------------------------------------------------------------- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visual-explain.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visual-explain.js index 76cc35f..94cb05a 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visual-explain.js +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visual-explain.js @@ -442,10 +442,13 @@ export default Ember.View.extend({ g.setDefaultEdgeLabel(function () { return {}; }); this.setNodes(vertices) - .setEdges(edges) - .setTableNodesAndEdges(vertices) - .createNodeGroups() - .renderEdges(); + .setEdges(edges) + .setTableNodesAndEdges(vertices) + .createNodeGroups() + .renderEdges(); + + this.set('controller.showSpinner', true); + } else { if(!this.get('controller.noquery')) {
