navigation bar should be enabled when we are in plot mode

Bug was, that the navigation bar was disabled when no results were
found.
This commit is contained in:
2018-04-30 18:49:23 +02:00
parent 2903b5a828
commit 3d4129ec48

View File

@@ -285,7 +285,7 @@ Vue.component('navigation-bar-dashboard', {
}, },
computed: { computed: {
navigationVisible: function() { navigationVisible: function() {
return data.dashboard.tiles.length > 0; return data.mode == 'dashboard';
}, },
showProgressBar: function(){ showProgressBar: function(){
return data.dashboard.toBeRendered.length > 0; return data.dashboard.toBeRendered.length > 0;
@@ -502,10 +502,10 @@ Vue.component('navigation-bar', {
}, },
computed: { computed: {
navigationDisabled: function() { navigationDisabled: function() {
return !data.resultView.imageUrl; return data.mode != 'plot';
}, },
navigationVisible: function() { navigationVisible: function() {
return data.dashboard.tiles.length == 0; return data.mode != 'dashboard';
} }
}, },
template: ` template: `
@@ -538,6 +538,7 @@ Vue.component('search-bar', {
methods: { methods: {
plot: function (event) { plot: function (event) {
var vm = this; var vm = this;
data.mode = 'plot';
if (this.searchBar.splitByKeys.selected){ if (this.searchBar.splitByKeys.selected){
this.splitQueries(function (fieldValues) { this.splitQueries(function (fieldValues) {
data.searchBar.splitBy['values'] = fieldValues; data.searchBar.splitBy['values'] = fieldValues;
@@ -551,6 +552,7 @@ Vue.component('search-bar', {
} }
}, },
createNewDashboard: function (event) { createNewDashboard: function (event) {
data.mode = 'dashboard';
createDashboard(this); createDashboard(this);
}, },
enableSplitBy: function(fieldValues) { enableSplitBy: function(fieldValues) {
@@ -760,6 +762,7 @@ initInvaders('result');
var data = { var data = {
mode: '', // 'plot' or 'dashboard', depending on what is currently active. Initially empty.
searchBar: { searchBar: {
query: GetURLParameter('query', 'pod=vapfinra01 and method = ViewService.findFieldViewGroup'), query: GetURLParameter('query', 'pod=vapfinra01 and method = ViewService.findFieldViewGroup'),
proposals: [], proposals: [],