From e8e2aab8e3e3653a3797a37c86a3d785222a8c2b Mon Sep 17 00:00:00 2001 From: Amir Nissim Date: Mon, 10 Mar 2014 17:10:55 +0200 Subject: [PATCH] #121: source button to play nice with hashes --- rd_ui/app/scripts/controllers/query_view.js | 8 +++----- rd_ui/app/views/queryview.html | 13 ++++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/rd_ui/app/scripts/controllers/query_view.js b/rd_ui/app/scripts/controllers/query_view.js index c47e1988ef..8cd0fa323a 100644 --- a/rd_ui/app/scripts/controllers/query_view.js +++ b/rd_ui/app/scripts/controllers/query_view.js @@ -13,6 +13,9 @@ $scope.isSourceVisible = route.locals.viewSource; + $scope.sourceHref = $scope.isSourceVisible ? + $location.url().replace('src', '') : $location.path() + '/src#' + $location.hash(); + $scope.queryExecuting = false; $scope.newVisualization = undefined; @@ -223,11 +226,6 @@ $scope.dirty = (newHash !== pristineHash); }); - $scope.toggleSource = function() { - var url = $location.url(); - $location.path($scope.isSourceVisible ? url.replace('src', '') : url + '/src'); - }; - $scope.executeQuery = function() { $scope.queryResult = $scope.query.getQueryResult(0); $scope.lockButton(true); diff --git a/rd_ui/app/views/queryview.html b/rd_ui/app/views/queryview.html index 9f79a70e91..0ec79117a6 100644 --- a/rd_ui/app/views/queryview.html +++ b/rd_ui/app/views/queryview.html @@ -6,7 +6,7 @@

- + Source

@@ -52,7 +52,7 @@

- @@ -71,7 +71,7 @@

- + Last update

@@ -80,7 +80,7 @@

Created By {{query.user.name}}

- + Runtime {{queryResult.getRuntime() | durationHumanize}} Running… @@ -89,11 +89,14 @@

Rows {{queryResult.getData().length}}

-

+ + Refresh Interval

+
+