Skip to content

Commit

Permalink
ENH: Make node IDs list static
Browse files Browse the repository at this point in the history
  • Loading branch information
time-trader committed Jun 23, 2023
1 parent ebd6282 commit f0ae5f8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
25 changes: 0 additions & 25 deletions dashboard/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,31 +276,6 @@ def update_installation_selector(refresh):
"""
return BigQuery().get_installations()

@app.callback(
[
Output("node-select", "options"),
Output("node-select", "value"),
],
[
Input("installation-select", "value"),
],
)
@cache.memoize(timeout=cache_timeout)
def update_node_selector(installation_reference):
"""Update the node selector options with the IDs of the nodes available for the given installation.
:param str installation_reference:
:return list(str):
"""
nodes = BigQuery().get_nodes(installation_reference)

try:
first_option = nodes[0]
except IndexError:
first_option = None

return nodes, first_option

@app.callback(
Output("sensor-coordinates-select", "options"),
Input("sensor-coordinates-check-button", "n_clicks"),
Expand Down
2 changes: 1 addition & 1 deletion dashboard/components/node_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

def NodeSelect():
return dcc.Dropdown(
options=["0"],
options=["1", "2", "3", "4", "5"],
id="node-select",
persistence=True,
)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[tool.poetry]
name = "aerosense-dashboard"
version = "0.6.1"
version = "0.6.2"
description = "High-level visualisation for aerosense"
authors = ["Tom Clark", "Marcus Lugg", "Yuriy Marykovsky"]
license = "BSD-3"
Expand Down

0 comments on commit f0ae5f8

Please sign in to comment.