From 38a46a9d468c749172be97b25df6d8361171c7c1 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Sat, 19 May 2018 08:36:47 +0200 Subject: [PATCH] change default values in the UI 1. yRange is set to 0-120 minutes. This makes the gallery plots easier to compare. 2. Set groupBy to pod/method/build. That is what I use the most and I think this will help in most cases. --- pdb-ui/src/main/resources/resources/js/ui.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pdb-ui/src/main/resources/resources/js/ui.js b/pdb-ui/src/main/resources/resources/js/ui.js index e3ce3e5..b54cbb5 100644 --- a/pdb-ui/src/main/resources/resources/js/ui.js +++ b/pdb-ui/src/main/resources/resources/js/ui.js @@ -775,7 +775,7 @@ var rootView = new Vue({ response.forEach( (item, index) => { options.push({text: item, value: item}); } ); - const groupByDefaults = GetURLParameterArray('groupBy'); + const groupByDefaults = GetURLParameterArray('groupBy', ['pod', 'method', 'build']); for (var i = 0; i < 3; i++){ self.searchBar.groupByKeys.push({ @@ -819,8 +819,8 @@ var data = { aggregate: GetURLParameter('aggregate','NONE'), yRange: { min: GetURLParameter('yRangeMin','0'), - max: GetURLParameter('yRangeMax','999'), - unit: GetURLParameter('yRangeUnit','AUTOMATIC') + max: GetURLParameter('yRangeMax','120'), + unit: GetURLParameter('yRangeUnit','MINUTES') }, keyOutside: GetURLParameterBoolean('keyOutside', 'false'), @@ -1133,9 +1133,9 @@ function GetURLParameter(paramName, defaultValue) return defaultValue; } -function GetURLParameterArray(paramName) +function GetURLParameterArray(paramName, defaults) { - var result = []; + var result = defaults != undefined ? defaults : []; var pageURL = window.location.search.substring(1); var URLVariables = pageURL.split('&'); for (var i = 0; i < URLVariables.length; i++)