Skip to content

Commit

Permalink
MRG: Merge pull request #34 from aerosense-ai/feature/remove-get-node…
Browse files Browse the repository at this point in the history
…s-option

Make node IDs list static
  • Loading branch information
time-trader authored Jun 23, 2023
2 parents ebd6282 + f0ae5f8 commit f3d92a7
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 f3d92a7

Please sign in to comment.