From 3d4129ec48b4bca6d36f94e761d1c362fabbc2b4 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Mon, 30 Apr 2018 18:49:23 +0200 Subject: [PATCH] navigation bar should be enabled when we are in plot mode Bug was, that the navigation bar was disabled when no results were found. --- pdb-ui/src/main/resources/resources/js/ui.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pdb-ui/src/main/resources/resources/js/ui.js b/pdb-ui/src/main/resources/resources/js/ui.js index 03ebae5..3a53feb 100644 --- a/pdb-ui/src/main/resources/resources/js/ui.js +++ b/pdb-ui/src/main/resources/resources/js/ui.js @@ -285,7 +285,7 @@ Vue.component('navigation-bar-dashboard', { }, computed: { navigationVisible: function() { - return data.dashboard.tiles.length > 0; + return data.mode == 'dashboard'; }, showProgressBar: function(){ return data.dashboard.toBeRendered.length > 0; @@ -502,10 +502,10 @@ Vue.component('navigation-bar', { }, computed: { navigationDisabled: function() { - return !data.resultView.imageUrl; + return data.mode != 'plot'; }, navigationVisible: function() { - return data.dashboard.tiles.length == 0; + return data.mode != 'dashboard'; } }, template: ` @@ -538,6 +538,7 @@ Vue.component('search-bar', { methods: { plot: function (event) { var vm = this; + data.mode = 'plot'; if (this.searchBar.splitByKeys.selected){ this.splitQueries(function (fieldValues) { data.searchBar.splitBy['values'] = fieldValues; @@ -551,6 +552,7 @@ Vue.component('search-bar', { } }, createNewDashboard: function (event) { + data.mode = 'dashboard'; createDashboard(this); }, enableSplitBy: function(fieldValues) { @@ -760,6 +762,7 @@ initInvaders('result'); var data = { + mode: '', // 'plot' or 'dashboard', depending on what is currently active. Initially empty. searchBar: { query: GetURLParameter('query', 'pod=vapfinra01 and method = ViewService.findFieldViewGroup'), proposals: [],