fixes for select_instrument
This commit is contained in:
@ -78,8 +78,8 @@ new Settings()
|
||||
.treat("hideRightPart", "hr", to_bool, false) //used to completely disable the right part
|
||||
.treat("wideGraphs", "wg", to_bool, false) //used to toggle the size of the graphs part
|
||||
.treat("showAsync", "sa", to_bool, false)
|
||||
.treat("device", "dev", 0, "")
|
||||
.treat("server", "srv", 0, "")
|
||||
.treat("device", "device", 0, "")
|
||||
.treat("stream", "stream", 0, "")
|
||||
.treat("instrument", "instrument", 0, "")
|
||||
.treat("timerange", "time", 0, "-1800,0")
|
||||
|
||||
@ -87,7 +87,7 @@ if (window.instrument) {
|
||||
window.clientTags = "&instrument=" + window.instrument;
|
||||
} else {
|
||||
let args = '';
|
||||
if (window.server) { args += "&stream=" + window.server; }
|
||||
if (window.stream) { args += "&stream=" + window.stream; }
|
||||
if (window.device) { args += "&device=" + window.device; }
|
||||
window.clientTags = args;
|
||||
}
|
||||
|
@ -160,6 +160,8 @@ class InfluxGraph(HandlerBase):
|
||||
if self.instrument:
|
||||
streams, tags, self.device_name = self.server.lookup_streams(self.instrument, **self.init_tags)
|
||||
self.tags = {**self.init_tags, **tags}
|
||||
else:
|
||||
self.tags = self.init_tags
|
||||
blocks = self.get_available_variables(start_time, end_time, self.chart_configs, userconfiguration)
|
||||
# initialize self.last_values to keep track of the available variables
|
||||
self.last_values = {var["name"]: [0, None] for block in blocks for var in block["curves"]}
|
||||
|
@ -297,7 +297,7 @@ def replace_by_empty(file):
|
||||
|
||||
@app.route('/')
|
||||
def default():
|
||||
if not any(flask.request.values.get(k) for k in ('instrument', 'server', 'device')):
|
||||
if not any(flask.request.values.get(k) for k in ('instrument', 'stream', 'device')):
|
||||
if not server.single_instrument:
|
||||
return select_experiment()
|
||||
return general_file('SEAWebClient.html')
|
||||
|
Reference in New Issue
Block a user