meerschaum 2.9.5__py3-none-any.whl → 3.0.0__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.
Files changed (200) hide show
  1. meerschaum/__init__.py +5 -2
  2. meerschaum/_internal/__init__.py +1 -0
  3. meerschaum/_internal/arguments/_parse_arguments.py +4 -4
  4. meerschaum/_internal/arguments/_parser.py +33 -4
  5. meerschaum/_internal/cli/__init__.py +6 -0
  6. meerschaum/_internal/cli/daemons.py +103 -0
  7. meerschaum/_internal/cli/entry.py +220 -0
  8. meerschaum/_internal/cli/workers.py +435 -0
  9. meerschaum/_internal/docs/index.py +48 -2
  10. meerschaum/_internal/entry.py +50 -14
  11. meerschaum/_internal/shell/Shell.py +121 -29
  12. meerschaum/_internal/shell/__init__.py +4 -1
  13. meerschaum/_internal/static.py +359 -0
  14. meerschaum/_internal/term/TermPageHandler.py +1 -2
  15. meerschaum/_internal/term/__init__.py +40 -6
  16. meerschaum/_internal/term/tools.py +33 -8
  17. meerschaum/actions/__init__.py +6 -4
  18. meerschaum/actions/api.py +53 -13
  19. meerschaum/actions/attach.py +1 -0
  20. meerschaum/actions/bootstrap.py +8 -8
  21. meerschaum/actions/delete.py +4 -2
  22. meerschaum/actions/edit.py +171 -25
  23. meerschaum/actions/login.py +8 -8
  24. meerschaum/actions/register.py +143 -6
  25. meerschaum/actions/reload.py +22 -5
  26. meerschaum/actions/restart.py +14 -0
  27. meerschaum/actions/show.py +184 -31
  28. meerschaum/actions/start.py +166 -17
  29. meerschaum/actions/stop.py +38 -2
  30. meerschaum/actions/sync.py +7 -2
  31. meerschaum/actions/tag.py +9 -8
  32. meerschaum/actions/verify.py +5 -8
  33. meerschaum/api/__init__.py +45 -15
  34. meerschaum/api/_events.py +46 -4
  35. meerschaum/api/_oauth2.py +162 -9
  36. meerschaum/api/_tokens.py +102 -0
  37. meerschaum/api/dash/__init__.py +0 -3
  38. meerschaum/api/dash/callbacks/__init__.py +1 -0
  39. meerschaum/api/dash/callbacks/custom.py +4 -3
  40. meerschaum/api/dash/callbacks/dashboard.py +198 -118
  41. meerschaum/api/dash/callbacks/jobs.py +14 -7
  42. meerschaum/api/dash/callbacks/login.py +10 -1
  43. meerschaum/api/dash/callbacks/pipes.py +194 -14
  44. meerschaum/api/dash/callbacks/plugins.py +0 -1
  45. meerschaum/api/dash/callbacks/register.py +10 -3
  46. meerschaum/api/dash/callbacks/settings/password_reset.py +2 -2
  47. meerschaum/api/dash/callbacks/tokens.py +389 -0
  48. meerschaum/api/dash/components.py +36 -15
  49. meerschaum/api/dash/jobs.py +1 -1
  50. meerschaum/api/dash/keys.py +35 -93
  51. meerschaum/api/dash/pages/__init__.py +2 -1
  52. meerschaum/api/dash/pages/dashboard.py +1 -20
  53. meerschaum/api/dash/pages/{job.py → jobs.py} +10 -7
  54. meerschaum/api/dash/pages/login.py +2 -2
  55. meerschaum/api/dash/pages/pipes.py +16 -5
  56. meerschaum/api/dash/pages/settings/password_reset.py +1 -1
  57. meerschaum/api/dash/pages/tokens.py +53 -0
  58. meerschaum/api/dash/pipes.py +382 -95
  59. meerschaum/api/dash/sessions.py +12 -0
  60. meerschaum/api/dash/tokens.py +603 -0
  61. meerschaum/api/dash/websockets.py +1 -1
  62. meerschaum/api/dash/webterm.py +18 -6
  63. meerschaum/api/models/__init__.py +23 -3
  64. meerschaum/api/models/_actions.py +22 -0
  65. meerschaum/api/models/_pipes.py +91 -7
  66. meerschaum/api/models/_tokens.py +81 -0
  67. meerschaum/api/resources/static/js/terminado.js +3 -0
  68. meerschaum/api/resources/static/js/xterm-addon-unicode11.js +2 -0
  69. meerschaum/api/resources/templates/termpage.html +13 -0
  70. meerschaum/api/routes/__init__.py +1 -0
  71. meerschaum/api/routes/_actions.py +3 -4
  72. meerschaum/api/routes/_connectors.py +3 -7
  73. meerschaum/api/routes/_jobs.py +26 -35
  74. meerschaum/api/routes/_login.py +120 -15
  75. meerschaum/api/routes/_misc.py +5 -10
  76. meerschaum/api/routes/_pipes.py +178 -143
  77. meerschaum/api/routes/_plugins.py +38 -28
  78. meerschaum/api/routes/_tokens.py +236 -0
  79. meerschaum/api/routes/_users.py +47 -35
  80. meerschaum/api/routes/_version.py +3 -3
  81. meerschaum/api/routes/_webterm.py +3 -3
  82. meerschaum/config/__init__.py +100 -30
  83. meerschaum/config/_default.py +132 -64
  84. meerschaum/config/_edit.py +38 -32
  85. meerschaum/config/_formatting.py +2 -0
  86. meerschaum/config/_patch.py +10 -8
  87. meerschaum/config/_paths.py +133 -13
  88. meerschaum/config/_read_config.py +87 -36
  89. meerschaum/config/_sync.py +6 -3
  90. meerschaum/config/_version.py +1 -1
  91. meerschaum/config/environment.py +262 -0
  92. meerschaum/config/stack/__init__.py +37 -15
  93. meerschaum/config/static.py +18 -0
  94. meerschaum/connectors/_Connector.py +11 -6
  95. meerschaum/connectors/__init__.py +41 -22
  96. meerschaum/connectors/api/_APIConnector.py +34 -6
  97. meerschaum/connectors/api/_actions.py +2 -2
  98. meerschaum/connectors/api/_jobs.py +12 -1
  99. meerschaum/connectors/api/_login.py +33 -7
  100. meerschaum/connectors/api/_misc.py +2 -2
  101. meerschaum/connectors/api/_pipes.py +23 -32
  102. meerschaum/connectors/api/_plugins.py +2 -2
  103. meerschaum/connectors/api/_request.py +1 -1
  104. meerschaum/connectors/api/_tokens.py +146 -0
  105. meerschaum/connectors/api/_users.py +70 -58
  106. meerschaum/connectors/instance/_InstanceConnector.py +83 -0
  107. meerschaum/connectors/instance/__init__.py +10 -0
  108. meerschaum/connectors/instance/_pipes.py +442 -0
  109. meerschaum/connectors/instance/_plugins.py +159 -0
  110. meerschaum/connectors/instance/_tokens.py +317 -0
  111. meerschaum/connectors/instance/_users.py +188 -0
  112. meerschaum/connectors/parse.py +5 -2
  113. meerschaum/connectors/sql/_SQLConnector.py +22 -5
  114. meerschaum/connectors/sql/_cli.py +12 -11
  115. meerschaum/connectors/sql/_create_engine.py +12 -168
  116. meerschaum/connectors/sql/_fetch.py +2 -18
  117. meerschaum/connectors/sql/_pipes.py +295 -278
  118. meerschaum/connectors/sql/_plugins.py +29 -0
  119. meerschaum/connectors/sql/_sql.py +46 -21
  120. meerschaum/connectors/sql/_users.py +36 -2
  121. meerschaum/connectors/sql/tables/__init__.py +254 -122
  122. meerschaum/connectors/valkey/_ValkeyConnector.py +5 -7
  123. meerschaum/connectors/valkey/_pipes.py +60 -31
  124. meerschaum/connectors/valkey/_plugins.py +2 -26
  125. meerschaum/core/Pipe/__init__.py +115 -85
  126. meerschaum/core/Pipe/_attributes.py +425 -124
  127. meerschaum/core/Pipe/_bootstrap.py +54 -24
  128. meerschaum/core/Pipe/_cache.py +555 -0
  129. meerschaum/core/Pipe/_clear.py +0 -11
  130. meerschaum/core/Pipe/_data.py +96 -68
  131. meerschaum/core/Pipe/_deduplicate.py +0 -13
  132. meerschaum/core/Pipe/_delete.py +12 -21
  133. meerschaum/core/Pipe/_drop.py +11 -23
  134. meerschaum/core/Pipe/_dtypes.py +49 -19
  135. meerschaum/core/Pipe/_edit.py +14 -4
  136. meerschaum/core/Pipe/_fetch.py +1 -1
  137. meerschaum/core/Pipe/_index.py +8 -14
  138. meerschaum/core/Pipe/_show.py +5 -5
  139. meerschaum/core/Pipe/_sync.py +123 -204
  140. meerschaum/core/Pipe/_verify.py +4 -4
  141. meerschaum/{plugins → core/Plugin}/_Plugin.py +16 -12
  142. meerschaum/core/Plugin/__init__.py +1 -1
  143. meerschaum/core/Token/_Token.py +220 -0
  144. meerschaum/core/Token/__init__.py +12 -0
  145. meerschaum/core/User/_User.py +35 -10
  146. meerschaum/core/User/__init__.py +9 -1
  147. meerschaum/core/__init__.py +1 -0
  148. meerschaum/jobs/_Executor.py +88 -4
  149. meerschaum/jobs/_Job.py +149 -38
  150. meerschaum/jobs/__init__.py +3 -2
  151. meerschaum/jobs/systemd.py +8 -3
  152. meerschaum/models/__init__.py +35 -0
  153. meerschaum/models/pipes.py +247 -0
  154. meerschaum/models/tokens.py +38 -0
  155. meerschaum/models/users.py +26 -0
  156. meerschaum/plugins/__init__.py +301 -88
  157. meerschaum/plugins/bootstrap.py +510 -4
  158. meerschaum/utils/_get_pipes.py +97 -30
  159. meerschaum/utils/daemon/Daemon.py +199 -43
  160. meerschaum/utils/daemon/FileDescriptorInterceptor.py +0 -1
  161. meerschaum/utils/daemon/RotatingFile.py +63 -36
  162. meerschaum/utils/daemon/StdinFile.py +53 -13
  163. meerschaum/utils/daemon/__init__.py +47 -6
  164. meerschaum/utils/daemon/_names.py +6 -3
  165. meerschaum/utils/dataframe.py +479 -81
  166. meerschaum/utils/debug.py +49 -19
  167. meerschaum/utils/dtypes/__init__.py +476 -34
  168. meerschaum/utils/dtypes/sql.py +369 -29
  169. meerschaum/utils/formatting/__init__.py +5 -2
  170. meerschaum/utils/formatting/_jobs.py +1 -1
  171. meerschaum/utils/formatting/_pipes.py +52 -50
  172. meerschaum/utils/formatting/_pprint.py +1 -0
  173. meerschaum/utils/formatting/_shell.py +44 -18
  174. meerschaum/utils/misc.py +268 -186
  175. meerschaum/utils/packages/__init__.py +25 -40
  176. meerschaum/utils/packages/_packages.py +42 -34
  177. meerschaum/utils/pipes.py +213 -0
  178. meerschaum/utils/process.py +2 -2
  179. meerschaum/utils/prompt.py +175 -144
  180. meerschaum/utils/schedule.py +2 -1
  181. meerschaum/utils/sql.py +134 -47
  182. meerschaum/utils/threading.py +42 -0
  183. meerschaum/utils/typing.py +1 -4
  184. meerschaum/utils/venv/_Venv.py +2 -2
  185. meerschaum/utils/venv/__init__.py +7 -7
  186. meerschaum/utils/warnings.py +19 -13
  187. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0.dist-info}/METADATA +94 -96
  188. meerschaum-3.0.0.dist-info/RECORD +289 -0
  189. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0.dist-info}/WHEEL +1 -1
  190. meerschaum-3.0.0.dist-info/licenses/NOTICE +2 -0
  191. meerschaum/api/models/_interfaces.py +0 -15
  192. meerschaum/api/models/_locations.py +0 -15
  193. meerschaum/api/models/_metrics.py +0 -15
  194. meerschaum/config/_environment.py +0 -145
  195. meerschaum/config/static/__init__.py +0 -186
  196. meerschaum-2.9.5.dist-info/RECORD +0 -263
  197. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0.dist-info}/entry_points.txt +0 -0
  198. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0.dist-info}/licenses/LICENSE +0 -0
  199. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0.dist-info}/top_level.txt +0 -0
  200. {meerschaum-2.9.5.dist-info → meerschaum-3.0.0.dist-info}/zip-safe +0 -0
@@ -10,10 +10,10 @@ from __future__ import annotations
10
10
 
11
11
  from meerschaum.utils.packages import attempt_import, import_dcc, import_html
12
12
  from meerschaum.utils.typing import SuccessTuple, List
13
- from meerschaum.config.static import STATIC_CONFIG
13
+ from meerschaum._internal.static import STATIC_CONFIG
14
14
  from meerschaum.utils.misc import remove_ansi
15
15
  from meerschaum._internal.shell.Shell import get_shell_intro
16
- from meerschaum.api import endpoints, CHECK_UPDATE, docs_enabled
16
+ from meerschaum.api import endpoints, CHECK_UPDATE, docs_enabled, get_api_connector
17
17
  from meerschaum.connectors import instance_types, _load_builtin_custom_connectors
18
18
  from meerschaum.utils.misc import get_connector_labels
19
19
  from meerschaum.config import __doc__ as doc
@@ -104,7 +104,7 @@ instance_select = dbc.Select(
104
104
  id='instance-select',
105
105
  size='sm',
106
106
  options=[
107
- {'label': i, 'value': i}
107
+ {'label': (i[:32] + '…') if len(i) > 32 else i, 'value': i}
108
108
  for i in get_connector_labels(*instance_types)
109
109
  ],
110
110
  class_name='dbc_dark custom-select custom-select-sm',
@@ -163,6 +163,7 @@ pages_navbar = html.Div(
163
163
  id='pages-navbar-div',
164
164
  )
165
165
 
166
+
166
167
  navbar = dbc.Navbar(
167
168
  dbc.Container(
168
169
  [
@@ -171,13 +172,11 @@ navbar = dbc.Navbar(
171
172
  dbc.Collapse(
172
173
  dbc.Row(
173
174
  [
174
- dbc.Col(instance_select),
175
- dbc.Col(
176
- sign_out_button,
177
- className="ms-auto",
178
- ),
175
+ dbc.Col(instance_select, width="auto"),
176
+ dbc.Col(sign_out_button, width="auto"),
179
177
  ],
180
178
  className="g-0 ms-auto flex-nowrap mt-3 mt-md-0",
179
+ align="center",
181
180
  ),
182
181
  id='navbar-collapse',
183
182
  is_open=False,
@@ -267,6 +266,26 @@ def build_pages_offcanvas_children():
267
266
 
268
267
  plugins_accordion_items = []
269
268
  for page_group, pages_dicts in _plugin_endpoints_to_pages.items():
269
+ if len(pages_dicts) == 1:
270
+ page_href, page_dict = list(pages_dicts.items())[0]
271
+ if page_dict['page_key'].lower() == page_group.lower():
272
+ pages_listgroup_items.append(
273
+ dbc.ListGroupItem(
274
+ dbc.Button(
275
+ ' '.join([word.capitalize() for word in page_dict['page_key'].split(' ')]),
276
+ style={
277
+ 'width': '100%',
278
+ 'text-align': 'left',
279
+ 'text-decoration': 'none',
280
+ 'padding-left': '0',
281
+ },
282
+ href=page_href,
283
+ color='dark',
284
+ )
285
+ )
286
+ )
287
+ continue
288
+
270
289
  plugin_listgroup_items = [
271
290
  dbc.ListGroupItem(
272
291
  dbc.Button(
@@ -294,13 +313,15 @@ def build_pages_offcanvas_children():
294
313
  class_name='pages-offcanvas-accordion',
295
314
  )
296
315
  plugins_accordion_items.append(plugin_accordion_item)
297
- plugins_accordion = dbc.Accordion(
298
- plugins_accordion_items,
299
- start_collapsed=True,
300
- flush=True,
301
- always_open=True,
302
- )
303
- pages_listgroup_items.append(plugins_accordion)
316
+
317
+ if plugins_accordion_items:
318
+ plugins_accordion = dbc.Accordion(
319
+ plugins_accordion_items,
320
+ start_collapsed=True,
321
+ flush=True,
322
+ always_open=True,
323
+ )
324
+ pages_listgroup_items.append(plugins_accordion)
304
325
 
305
326
  pages_children = dbc.Card(
306
327
  dbc.ListGroup(
@@ -98,7 +98,7 @@ def build_job_card(
98
98
  html.B(
99
99
  html.A(
100
100
  "🔗 " + job.name,
101
- href=f"/dash/job/{job.name}",
101
+ href=f"/dash/jobs/{job.name}",
102
102
  target="_blank",
103
103
  style={
104
104
  'color': 'white',
@@ -16,13 +16,10 @@ dbc = attempt_import('dash_bootstrap_components', lazy=False, check_update=CHECK
16
16
  html, dcc = import_html(check_update=CHECK_UPDATE), import_dcc(check_update=CHECK_UPDATE)
17
17
 
18
18
  placeholders = {
19
- 'ck' : 'Connectors',
20
- 'mk' : 'Metrics',
21
- 'lk' : 'Locations',
22
- 'params' : (
23
- 'Additional search parameters. ' +
24
- 'Simple dictionary format or JSON accepted.'
25
- ),
19
+ 'ck': 'Connectors',
20
+ 'mk': 'Metrics',
21
+ 'lk': 'Locations',
22
+ 'tags': 'Tags',
26
23
  }
27
24
  widths = {
28
25
  'flags' : {'size' : 12},
@@ -212,11 +209,41 @@ dropdown_keys_row = dbc.Row(
212
209
  ),
213
210
  ] ### end of filters row children
214
211
  )
212
+ tags_dropdown = html.Div(
213
+ dcc.Dropdown(
214
+ id='tags-dropdown',
215
+ options=[],
216
+ placeholder=placeholders['tags'],
217
+ multi=True,
218
+ searchable=True,
219
+ ),
220
+ className="dbc_dark",
221
+ id="tags-dropdown-div",
222
+ )
223
+
215
224
  dropdown_tab_content = html.Div([
216
225
  dbc.Card(
217
226
  dbc.CardBody(
218
227
  [
219
228
  dropdown_keys_row,
229
+ html.Br(),
230
+ dbc.Row(
231
+ [
232
+ dbc.Col(tags_dropdown, width=True),
233
+ dbc.Col(
234
+ dbc.Button(
235
+ "Clear all",
236
+ id='clear-all-keys-button',
237
+ color='link',
238
+ size='sm',
239
+ style={'text-decoration': 'none'},
240
+ ),
241
+ width='auto',
242
+ ),
243
+ ],
244
+ className='g-0',
245
+ align='center',
246
+ ),
220
247
  ], ### end of card children
221
248
  className='card-text',
222
249
  )
@@ -232,94 +259,9 @@ dropdown_tab_content = html.Div([
232
259
  ),
233
260
  ])
234
261
 
235
- text_tab_content = dbc.Card(
236
- dbc.CardBody(
237
- [
238
- dbc.Row(
239
- [
240
- dbc.Col(html.Div(className='dbc_dark', children=[
241
- dbc.InputGroup(
242
- [
243
- dbc.Button(
244
- 'Clear',
245
- id='clear-connector-keys-input-button',
246
- color='link',
247
- size='sm',
248
- ),
249
- dbc.Input(
250
- id='connector-keys-input',
251
- placeholder=placeholders['ck'],
252
- type='text',
253
- value='',
254
- list='connector-keys-list',
255
- className='dbc_dark'
256
- ),
257
- ],
258
- size=input_group_sizes['ck'],
259
- )]),
260
- width=4,
261
- ),
262
- dbc.Col(
263
- dbc.InputGroup(
264
- [
265
- dbc.Button(
266
- 'Clear',
267
- id='clear-metric-keys-input-button',
268
- color='link',
269
- size='sm',
270
- ),
271
- dbc.Input(
272
- id='metric-keys-input',
273
- placeholder=placeholders['mk'],
274
- type='text',
275
- value='',
276
- list='metric-keys-list',
277
- ),
278
- ],
279
- size=input_group_sizes['mk'],
280
- ),
281
- width=4,
282
- ),
283
- dbc.Col(
284
- dbc.InputGroup(
285
- [
286
- dbc.Button(
287
- 'Clear',
288
- id='clear-location-keys-input-button',
289
- color='link',
290
- size='sm',
291
- ),
292
- dbc.Input(
293
- id='location-keys-input',
294
- placeholder=placeholders['lk'],
295
- type='text',
296
- value='',
297
- list='location-keys-list',
298
- ),
299
- ],
300
- size=input_group_sizes['lk'],
301
- ),
302
- width=4,
303
- ),
304
- ]
305
- ),
306
- html.Br(),
307
- dbc.Row(
308
- dbc.Col(
309
- dbc.InputGroup(
310
- [
311
- search_parameters_editor,
312
- ],
313
- size=input_group_sizes['params'],
314
- )
315
- )
316
- ),
317
- ]
318
- )
319
- )
320
-
321
262
  keys_lists_content = html.Div([
322
263
  html.Datalist(id='connector-keys-list'),
323
264
  html.Datalist(id='metric-keys-list'),
324
265
  html.Datalist(id='location-keys-list'),
266
+ html.Datalist(id='tags-list'),
325
267
  ], hidden=True)
@@ -9,7 +9,8 @@ import meerschaum.api.dash.pages.error
9
9
  import meerschaum.api.dash.pages.login
10
10
  import meerschaum.api.dash.pages.dashboard
11
11
  import meerschaum.api.dash.pages.plugins
12
+ import meerschaum.api.dash.pages.tokens
12
13
  import meerschaum.api.dash.pages.register
13
14
  import meerschaum.api.dash.pages.pipes
14
- import meerschaum.api.dash.pages.job
15
+ import meerschaum.api.dash.pages.jobs
15
16
  import meerschaum.api.dash.pages.settings
@@ -6,7 +6,6 @@
6
6
  The main dashboard layout.
7
7
  """
8
8
 
9
- import uuid
10
9
  from meerschaum.config import __doc__ as doc, get_config
11
10
  from meerschaum.utils.misc import get_connector_labels
12
11
  from meerschaum.utils.packages import attempt_import, import_html, import_dcc, import_pandas
@@ -43,7 +42,6 @@ from meerschaum.api.dash.components import (
43
42
  )
44
43
  from meerschaum.api.dash.keys import (
45
44
  keys_lists_content,
46
- text_tab_content,
47
45
  dropdown_tab_content,
48
46
  )
49
47
 
@@ -62,24 +60,7 @@ layout = html.Div(
62
60
  children=[
63
61
  dbc.Col(
64
62
  children=[
65
- dbc.Tabs(
66
- id='pipes-filter-tabs',
67
- children=[
68
- dbc.Tab(
69
- dropdown_tab_content,
70
- label='Filters',
71
- id='pipes-filter-dropdown-tab',
72
- tab_id='dropdown',
73
- ),
74
- dbc.Tab(
75
- text_tab_content,
76
- label='Text',
77
- id='pipes-filter-input-tab',
78
- tab_id='input',
79
- tab_style={"display": "none"},
80
- ),
81
- ]
82
- ),
63
+ dropdown_tab_content,
83
64
  html.Br(),
84
65
  bottom_buttons_content,
85
66
  test_button,
@@ -11,11 +11,14 @@ from meerschaum.utils.packages import import_html, import_dcc
11
11
  html, dcc = import_html(check_update=CHECK_UPDATE), import_dcc(check_update=CHECK_UPDATE)
12
12
  import dash_bootstrap_components as dbc
13
13
 
14
- from meerschaum.api.dash.components import download_logs, refresh_jobs_interval
14
+ from meerschaum.api.dash.components import download_logs, refresh_jobs_interval, pages_navbar
15
15
 
16
- layout = dbc.Container([
17
- dcc.Location('job-location'),
18
- html.Div(id='job-output-div'),
19
- download_logs,
20
- refresh_jobs_interval,
21
- ])
16
+ layout = [
17
+ pages_navbar,
18
+ dbc.Container([
19
+ dcc.Location('job-location'),
20
+ html.Div(id='job-output-div'),
21
+ download_logs,
22
+ refresh_jobs_interval,
23
+ ]),
24
+ ]
@@ -49,11 +49,11 @@ registration_div = html.Div(
49
49
  html.Code('mrsm register user newuser -i sql:main', className='codeblock'),
50
50
  ),
51
51
  dcc.Markdown("""
52
- To enable online registration, open the `system` configuration file and""" +
52
+ To enable online registration, open the `api` configuration file and""" +
53
53
  """ set the permissions to `true`:"""
54
54
  ),
55
55
  html.Pre(
56
- html.Code('mrsm edit config system', className='codeblock'),
56
+ html.Code('mrsm edit config api', className='codeblock'),
57
57
  ),
58
58
  html.Br(),
59
59
  dcc.Markdown('The settings file should look something like this:'),
@@ -7,16 +7,27 @@ Display pipes via a shareable URL.
7
7
 
8
8
  from meerschaum.api import CHECK_UPDATE
9
9
  from meerschaum.utils.packages import import_html, import_dcc
10
- from meerschaum.api.dash.components import download_dataframe, pages_navbar
10
+ from meerschaum.api.dash.components import (
11
+ download_dataframe,
12
+ )
11
13
 
12
14
  html, dcc = import_html(check_update=CHECK_UPDATE), import_dcc(check_update=CHECK_UPDATE)
13
15
  import dash_bootstrap_components as dbc
14
16
 
15
17
  layout = [
16
- pages_navbar,
18
+ html.Div(id='pipes-navbar-div'),
19
+ dcc.Location('pipes-location'),
20
+ download_dataframe,
17
21
  dbc.Container([
18
- dcc.Location('pipes-location'),
19
- download_dataframe,
20
- html.Div(id='pipe-output-div'),
22
+ dcc.Loading(
23
+ html.Div(id='pipe-output-div'),
24
+ id='pipes-loading',
25
+ type='circle',
26
+ delay_hide=1000,
27
+ delay_show=1000,
28
+ style={
29
+ 'padding-top': '100px',
30
+ },
31
+ ),
21
32
  ])
22
33
  ]
@@ -14,7 +14,7 @@ from meerschaum.plugins import web_page
14
14
  @web_page('password-reset', login_required=True, page_group='Settings')
15
15
  def page_layout():
16
16
  """
17
- Return the layout for this page.
17
+ Return the layout for the password reset page.
18
18
  """
19
19
  return dbc.Container([
20
20
  html.Br(),
@@ -0,0 +1,53 @@
1
+ #! /usr/bin/env python3
2
+ # vim:fenc=utf-8
3
+
4
+ """
5
+ Define the tokens page layout.
6
+ """
7
+
8
+ import dash_bootstrap_components as dbc
9
+ import dash.html as html
10
+ import dash.dcc as dcc
11
+ from meerschaum._internal.static import STATIC_CONFIG
12
+ from meerschaum.api.dash.components import pages_navbar
13
+
14
+
15
+ layout = [
16
+ pages_navbar,
17
+ dbc.Container([
18
+ html.Br(),
19
+ html.H3('Tokens'),
20
+ html.Div(id="tokens-alert-div"),
21
+ dbc.Modal(
22
+ id="tokens-register-input-modal",
23
+ size='lg',
24
+ is_open=False,
25
+ ),
26
+ dbc.Modal(
27
+ id="tokens-register-output-modal",
28
+ size='lg',
29
+ is_open=False,
30
+ backdrop='static',
31
+ ),
32
+ html.Div(id='tokens-register-output-modal-div'),
33
+ html.Div(
34
+ [
35
+ dbc.Button(
36
+ "⟳",
37
+ color='black',
38
+ size='sm',
39
+ id='tokens-refresh-button',
40
+ ),
41
+ dbc.Button(
42
+ html.B('+'),
43
+ color='black',
44
+ size='sm',
45
+ id='tokens-create-button',
46
+ ),
47
+ ],
48
+ id='tokens-controls-div',
49
+ style={'text-align': 'right'},
50
+ ),
51
+ html.Div(id='tokens-output-div'),
52
+ ]),
53
+ ]