add select_experiment

This commit is contained in:
2025-02-27 10:41:17 +01:00
parent 2c59e37074
commit 5b6684fcef
5 changed files with 96 additions and 22 deletions

View File

@ -406,8 +406,9 @@ function successHandler(s, message) {
begin = timeRange[0] - timeRange[1];
select.value = begin;
// Server-request for variable-list.*/
console.log('TIME', window['clientTags'], timeRange)
reqJSONPOST(0, "http://" + hostPort + "/getvars",
"time=" + timeRange[1]
"time=" + timeRange[0] + ',' + timeRange[1]
+ window['clientTags']
+ "&userconfiguration=" + JSON.stringify(getFormattedUserConfigurationFromLocalStorage())
+ "&id=" + clientID, successHandler, errorHandler);

View File

@ -1073,7 +1073,7 @@ let graphs = (function (){
currentMaxTime = maxTime;
currentMinTime = minTime;
}
AJAX("http://" + hostPort + "/gettime?time=-1800,0&id="+ clientID).getJSON().then(function(data){
AJAX("http://" + hostPort + "/gettime?time=" + window['timerange'] + "&id="+ clientID).getJSON().then(function(data){
startTime = data.time[1]*1000;
maxTime = startTime;
currentMaxTime = maxTime + 60000;

View File

@ -93,7 +93,8 @@ new Settings()
.treat("showAsync", "sa", to_bool, false)
.treat("device", "dev", 0, "*")
.treat("server", "srv", 0, "*")
.treat("instrument", "ins", 0, "")
.treat("instrument", "instrument", 0, "")
.treat("timerange", "time", 0, "-1800,0")
if (window['instrument']) {
window['clientTags'] = "&instrument=" + window["instrument"];
@ -111,11 +112,11 @@ function loadFirstBlocks() {
if (showMain) pushInitCommand("getblock?path=main&", "main")
if (showConsole) pushInitCommand("console?", "console")
if (nColumns == 1) { // probably mobile phone}
if (showGraphics) pushInitCommand("gettime?time=-1800,0&", "graphics")
if (showGraphics) pushInitCommand("gettime?time=" + window["timerange"] + "&", "graphics")
if (showOverview) pushInitCommand("getblock?path=_overview&", "overview")
} else {
if (showOverview) pushInitCommand("getblock?path=_overview&", "overview")
if (showGraphics) pushInitCommand("gettime?time=-1800,0&", "graphics")
if (showGraphics) pushInitCommand("gettime?time=" + window["timerange"] + "&", "graphics")
// last is shown first
}
}