meerschaum 2.7.1__py3-none-any.whl → 2.7.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,7 +60,6 @@ dash_app = enrich.DashProxy(
60
60
  dash_app.layout = html.Div([
61
61
  location,
62
62
  dcc.Store(id='session-store', storage_type='local', data={}),
63
- dcc.Store(id='instance-store', storage_type='session', data={}),
64
63
  html.Div([], id='page-layout-div'),
65
64
  ])
66
65
 
@@ -486,19 +486,18 @@ def update_flags(input_flags_dropdown_values, n_clicks, input_flags_texts):
486
486
  Output('location-keys-dropdown', 'value'),
487
487
  Output('instance-select', 'value'),
488
488
  Output('instance-alert-div', 'children'),
489
- Output('instance-store', 'data'),
490
489
  Input('connector-keys-dropdown', 'value'),
491
490
  Input('metric-keys-dropdown', 'value'),
492
491
  Input('location-keys-dropdown', 'value'),
493
492
  Input('instance-select', 'value'),
494
- State('instance-store', 'data'),
493
+ *keys_state ### NOTE: Necessary for `ctx.states`.
495
494
  )
496
495
  def update_keys_options(
497
496
  connector_keys: Optional[List[str]],
498
497
  metric_keys: Optional[List[str]],
499
498
  location_keys: Optional[List[str]],
500
499
  instance_keys: Optional[str],
501
- instance_store_data: Optional[Dict[str, Any]],
500
+ *keys
502
501
  ):
503
502
  """
504
503
  Update the keys dropdown menus' options.
@@ -507,8 +506,6 @@ def update_keys_options(
507
506
  trigger = ctx.triggered[0]['prop_id'].split('.')[0]
508
507
  instance_click = trigger == 'instance-select'
509
508
 
510
- session_instance = instance_store_data.get('session_instance', None)
511
-
512
509
  ### Update the instance first.
513
510
  update_instance_keys = False
514
511
  if not instance_keys:
@@ -517,11 +514,6 @@ def update_keys_options(
517
514
  instance_keys = str(get_api_connector())
518
515
  update_instance_keys = True
519
516
 
520
- instance_store_data_to_return = (
521
- {**(instance_store_data or {}), **{'session_instance': instance_keys}}
522
- if update_instance_keys or session_instance != instance_keys
523
- else dash.no_update
524
- )
525
517
  if not trigger and not update_instance_keys:
526
518
  raise PreventUpdate
527
519
 
@@ -626,7 +618,6 @@ def update_keys_options(
626
618
  location_keys,
627
619
  (instance_keys if update_instance_keys else dash.no_update),
628
620
  instance_alerts,
629
- instance_store_data_to_return,
630
621
  )
631
622
 
632
623
  dash_app.clientside_callback(
@@ -7,15 +7,16 @@ Functions for interacting with Meerschaum connectors via the Web Interface.
7
7
  """
8
8
 
9
9
  from __future__ import annotations
10
- from meerschaum.utils.typing import WebState, Union, Optional
10
+
11
+ import meerschaum as mrsm
12
+ from meerschaum.utils.typing import WebState, Union
11
13
  from meerschaum.connectors.parse import parse_instance_keys
12
- from meerschaum.config import get_config
13
14
  from meerschaum.api import debug, get_api_connector
14
15
 
15
- def get_web_connector(state : WebState) -> Union[
16
- meerschaum.connectors.api.APIConnector,
17
- meerschaum.connectors.sql.SQLConnector,
18
- ]:
16
+ def get_web_connector(state: WebState) -> Union[
17
+ mrsm.connectors.api.APIConnector,
18
+ mrsm.connectors.sql.SQLConnector,
19
+ ]:
19
20
  """
20
21
  Parse the web instance keys into a connector.
21
22
  """
@@ -24,7 +25,4 @@ def get_web_connector(state : WebState) -> Union[
24
25
  if not state.get('instance-select.value', None)
25
26
  else state['instance-select.value']
26
27
  )
27
-
28
28
  return parse_instance_keys(instance_keys, debug=debug)
29
-
30
-
@@ -37,7 +37,7 @@ window.addEventListener(
37
37
  connector_keys_str += " " + quote_str + ck + quote_str;
38
38
  }
39
39
  }
40
- if (connector_keys.length === 0){
40
+ if (connector_keys_str === " -c"){
41
41
  connector_keys_str = "";
42
42
  }
43
43
  let metric_keys_str = " -m";
@@ -47,7 +47,7 @@ window.addEventListener(
47
47
  metric_keys_str += " " + quote_str + mk + quote_str;
48
48
  }
49
49
  }
50
- if (metric_keys.length === 0){
50
+ if (metric_keys_str === " -m"){
51
51
  metric_keys_str = "";
52
52
  }
53
53
  let location_keys_str = " -l";
@@ -57,7 +57,7 @@ window.addEventListener(
57
57
  location_keys_str += " " + quote_str + lk + quote_str;
58
58
  }
59
59
  }
60
- if (location_keys.length === 0){
60
+ if (location_keys_str === " -l"){
61
61
  location_keys_str = "";
62
62
  }
63
63
 
@@ -2,4 +2,4 @@
2
2
  Specify the Meerschaum release version.
3
3
  """
4
4
 
5
- __version__ = "2.7.1"
5
+ __version__ = "2.7.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: meerschaum
3
- Version: 2.7.1
3
+ Version: 2.7.2
4
4
  Summary: Sync Time-Series Pipes with Meerschaum
5
5
  Home-page: https://meerschaum.io
6
6
  Author: Bennett Meares
@@ -56,9 +56,9 @@ meerschaum/api/_chain.py,sha256=h8-WXUGXX6AqzdALfsBC5uv0FkAcLdHJXCGzqzuq89k,875
56
56
  meerschaum/api/_events.py,sha256=f-98AXHU10IL9zRGX1FrZFANxxiMz5ryeJnfFWaU8R8,2232
57
57
  meerschaum/api/_oauth2.py,sha256=dJTIVlPpX3sAVW-PcN6pXRNy2RR5QAalu2RHp3l14YU,1683
58
58
  meerschaum/api/_websockets.py,sha256=EMT9wB3yELu_WyCMqn9ZpgMDh23spUUchouRLCCLVuw,1509
59
- meerschaum/api/dash/__init__.py,sha256=jL08XtzNAzsrXJthDRqq-DlJjg6OpoyqeLeNjkp_bnA,2147
59
+ meerschaum/api/dash/__init__.py,sha256=29vMm_m5gSDYG0lahh-8yVfhqg9kUFnUrYyw_9jC2Y0,2078
60
60
  meerschaum/api/dash/components.py,sha256=t2goHW7oioao5Ew6Dro9U4LZDnHF-YWb4flLPx46GP8,6293
61
- meerschaum/api/dash/connectors.py,sha256=nJxBOFldtCMJLYjUSVYZwX5BO-LNjTNHgoEaXe-0XMo,843
61
+ meerschaum/api/dash/connectors.py,sha256=-Wd40ieYJI2nOASXi4V1C4bvLekjnN_tj6zp7HgZDl0,791
62
62
  meerschaum/api/dash/graphs.py,sha256=wJUDWzcLN8-C3xko6rj0F2v7Rt8YDkSXoVkkXJjYGIk,2046
63
63
  meerschaum/api/dash/jobs.py,sha256=mj9STE6AaQY4fwkjD1JcYRG0iW3VEcP04bO1SlKgiXw,7681
64
64
  meerschaum/api/dash/keys.py,sha256=hzEVeN60SAfVTVSO5lajGaykxRIKGhj9Ph00HRJnNoE,12598
@@ -77,7 +77,7 @@ meerschaum/api/dash/assets/logo_48x48.png,sha256=hTR5BHUHEN4yP2xiqAcDciuigoII9T3
77
77
  meerschaum/api/dash/assets/logo_500x500.png,sha256=9EUtf6wQcEZTXHKfQ2kjNXod6Rn_4DTB_BkTgxggq00,67702
78
78
  meerschaum/api/dash/callbacks/__init__.py,sha256=5nLDkziaWWWt5ivmuMNG3kVBMOfqB6KQNIAS8f16bmA,493
79
79
  meerschaum/api/dash/callbacks/custom.py,sha256=N9pVolAF8sIuJD3V6xBSgS7k8THJo_f8d1qAoh1Kg60,1161
80
- meerschaum/api/dash/callbacks/dashboard.py,sha256=-qTzDG7Gnc597A-I5KBaPu6myXhW9ow0fm5gxErtUMM,33171
80
+ meerschaum/api/dash/callbacks/dashboard.py,sha256=UNbMG1w8sOTyOFLIRSJwnKZ5B1IuGZI8OHjiUTEgrfA,32777
81
81
  meerschaum/api/dash/callbacks/jobs.py,sha256=JYTrDcUEte_MIT3EegLDmQDsmU_Mxqw8L60dvF71ho4,8418
82
82
  meerschaum/api/dash/callbacks/login.py,sha256=mEvMgV-f85H6DvqNdTvJPoiwHqTnhWY2nf_zLB26ipE,2876
83
83
  meerschaum/api/dash/callbacks/pipes.py,sha256=byphQn-wJOe8ft-fGU9wac0n5xsMjVHJzNvYYb9NsKU,1693
@@ -116,7 +116,7 @@ meerschaum/api/resources/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
116
116
  meerschaum/api/resources/templates/index.html,sha256=Ck-S0U5abJgB-wTOKIGg0ispGzKlXXqvFUoNAAByzLA,1019
117
117
  meerschaum/api/resources/templates/old_index.html,sha256=BDeOlcXhSsBH3-NaRtuX4Z1sDuhOoCMa_Dq-6g5RMpc,1711
118
118
  meerschaum/api/resources/templates/secret.html,sha256=0QWkm4ZoN81Aw1pd2-62rGCvx3nXPHfFUoegj3Iy8Ls,141
119
- meerschaum/api/resources/templates/termpage.html,sha256=4npmhCrZtPqxDE9hK7tzKjbLUZyUzu-X73vKg3_C6lc,4807
119
+ meerschaum/api/resources/templates/termpage.html,sha256=A9YmJurFFliI0se9T4z0SBMIuoQqANyKSUJzZh8dcGo,4810
120
120
  meerschaum/api/routes/__init__.py,sha256=jbkeFNl51Tg8aT5gWe560ZLZLojFJsLMe5IENRjRkb0,606
121
121
  meerschaum/api/routes/_actions.py,sha256=VUasS1dpr4d3TXHcR1CXlRZPAqvGKKuHv_f9PsOkQ5c,1732
122
122
  meerschaum/api/routes/_connectors.py,sha256=NNbcn5xWhKqw2PqueSEaqRaZ95hFGDKazG5lE7gsssc,1849
@@ -143,7 +143,7 @@ meerschaum/config/_preprocess.py,sha256=-AEA8m_--KivZwTQ1sWN6LTn5sio_fUr2XZ51BO6
143
143
  meerschaum/config/_read_config.py,sha256=RLC3HHi_1ndj7ITVDKLD9_uULY3caGRwSz3ATYE-ixA,15014
144
144
  meerschaum/config/_shell.py,sha256=46_m49Txc5q1rGfCgO49ca48BODx45DQJi8D0zz1R18,4245
145
145
  meerschaum/config/_sync.py,sha256=jHcWRkxd82_BgX8Xo8agsWvf7BSbv3qHLWmYl6ehp_0,4242
146
- meerschaum/config/_version.py,sha256=KZzrNL20ForXO9e1OCdiNBZ0WcwZ4I9Z_8Rz0oMe8d8,71
146
+ meerschaum/config/_version.py,sha256=1xtNmQSH6cdwmiJLMPpwjpoQUlVu9nsvSoAacNis2YE,71
147
147
  meerschaum/config/paths.py,sha256=JjibeGN3YAdSNceRwsd42aNmeUrIgM6ndzC8qZAmNI0,621
148
148
  meerschaum/config/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
149
149
  meerschaum/config/stack/__init__.py,sha256=2UukC0Lmk-aVL1o1qXzumqmuIrw3vu9fD7iCuz4XD4I,10544
@@ -251,11 +251,11 @@ meerschaum/utils/packages/_packages.py,sha256=ykannoLv2Fm4iwZwiIlNAGZvt654cMJhjX
251
251
  meerschaum/utils/packages/lazy_loader.py,sha256=VHnph3VozH29R4JnSSBfwtA5WKZYZQFT_GeQSShCnuc,2540
252
252
  meerschaum/utils/venv/_Venv.py,sha256=QsnDGEE_YBqXIq53NTWi2TANA1FbkqJBl_xQi9jQP_U,3537
253
253
  meerschaum/utils/venv/__init__.py,sha256=eup-zUBdHBdNbu_G1qgA8iRzJvlAXyGhY7pG-SEvbHs,25347
254
- meerschaum-2.7.1.dist-info/LICENSE,sha256=jG2zQEdRNt88EgHUWPpXVWmOrOduUQRx7MnYV9YIPaw,11359
255
- meerschaum-2.7.1.dist-info/METADATA,sha256=rIEPTlucCyhBXjRB_ohMKVry1H7qOveF7ojFnrr1TcM,24224
256
- meerschaum-2.7.1.dist-info/NOTICE,sha256=OTA9Fcthjf5BRvWDDIcBC_xfLpeDV-RPZh3M-HQBRtQ,114
257
- meerschaum-2.7.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
258
- meerschaum-2.7.1.dist-info/entry_points.txt,sha256=5YBVzibw-0rNA_1VjB16z5GABsOGf-CDhW4yqH8C7Gc,88
259
- meerschaum-2.7.1.dist-info/top_level.txt,sha256=bNoSiDj0El6buocix-FRoAtJOeq1qOF5rRm2u9i7Q6A,11
260
- meerschaum-2.7.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
261
- meerschaum-2.7.1.dist-info/RECORD,,
254
+ meerschaum-2.7.2.dist-info/LICENSE,sha256=jG2zQEdRNt88EgHUWPpXVWmOrOduUQRx7MnYV9YIPaw,11359
255
+ meerschaum-2.7.2.dist-info/METADATA,sha256=sMJL8F_pnYQOFhtyZ4LkrtOmwlzaHN-uXYiLHC1eEMM,24224
256
+ meerschaum-2.7.2.dist-info/NOTICE,sha256=OTA9Fcthjf5BRvWDDIcBC_xfLpeDV-RPZh3M-HQBRtQ,114
257
+ meerschaum-2.7.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
258
+ meerschaum-2.7.2.dist-info/entry_points.txt,sha256=5YBVzibw-0rNA_1VjB16z5GABsOGf-CDhW4yqH8C7Gc,88
259
+ meerschaum-2.7.2.dist-info/top_level.txt,sha256=bNoSiDj0El6buocix-FRoAtJOeq1qOF5rRm2u9i7Q6A,11
260
+ meerschaum-2.7.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
261
+ meerschaum-2.7.2.dist-info/RECORD,,