meerschaum 2.3.5.dev0__py3-none-any.whl → 2.4.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.
- meerschaum/_internal/arguments/__init__.py +2 -1
- meerschaum/_internal/arguments/_parse_arguments.py +88 -12
- meerschaum/_internal/docs/index.py +3 -2
- meerschaum/_internal/entry.py +42 -20
- meerschaum/_internal/shell/Shell.py +38 -44
- meerschaum/_internal/term/TermPageHandler.py +2 -3
- meerschaum/_internal/term/__init__.py +13 -11
- meerschaum/actions/api.py +26 -23
- meerschaum/actions/bootstrap.py +38 -11
- meerschaum/actions/copy.py +3 -3
- meerschaum/actions/delete.py +4 -1
- meerschaum/actions/register.py +1 -3
- meerschaum/actions/stack.py +24 -19
- meerschaum/actions/start.py +41 -41
- meerschaum/actions/sync.py +53 -52
- meerschaum/api/__init__.py +48 -14
- meerschaum/api/_events.py +26 -17
- meerschaum/api/_oauth2.py +2 -2
- meerschaum/api/_websockets.py +5 -4
- meerschaum/api/dash/__init__.py +7 -16
- meerschaum/api/dash/callbacks/__init__.py +1 -0
- meerschaum/api/dash/callbacks/dashboard.py +52 -58
- meerschaum/api/dash/callbacks/jobs.py +15 -16
- meerschaum/api/dash/callbacks/login.py +16 -10
- meerschaum/api/dash/callbacks/pipes.py +41 -0
- meerschaum/api/dash/callbacks/plugins.py +1 -1
- meerschaum/api/dash/callbacks/register.py +15 -11
- meerschaum/api/dash/components.py +54 -59
- meerschaum/api/dash/jobs.py +5 -9
- meerschaum/api/dash/pages/__init__.py +1 -0
- meerschaum/api/dash/pages/pipes.py +19 -0
- meerschaum/api/dash/pipes.py +86 -58
- meerschaum/api/dash/plugins.py +6 -4
- meerschaum/api/dash/sessions.py +176 -0
- meerschaum/api/dash/users.py +3 -41
- meerschaum/api/dash/webterm.py +12 -17
- meerschaum/api/resources/static/js/terminado.js +1 -1
- meerschaum/api/routes/_actions.py +4 -118
- meerschaum/api/routes/_jobs.py +45 -24
- meerschaum/api/routes/_login.py +4 -4
- meerschaum/api/routes/_pipes.py +3 -3
- meerschaum/api/routes/_webterm.py +5 -6
- meerschaum/config/_default.py +15 -3
- meerschaum/config/_version.py +1 -1
- meerschaum/config/stack/__init__.py +64 -21
- meerschaum/config/static/__init__.py +6 -0
- meerschaum/connectors/{Connector.py → _Connector.py} +19 -13
- meerschaum/connectors/__init__.py +24 -14
- meerschaum/connectors/api/{APIConnector.py → _APIConnector.py} +3 -1
- meerschaum/connectors/api/__init__.py +2 -1
- meerschaum/connectors/api/_actions.py +22 -36
- meerschaum/connectors/api/_jobs.py +1 -0
- meerschaum/connectors/parse.py +18 -16
- meerschaum/connectors/poll.py +30 -24
- meerschaum/connectors/sql/__init__.py +3 -1
- meerschaum/connectors/sql/_pipes.py +172 -197
- meerschaum/connectors/sql/_plugins.py +45 -43
- meerschaum/connectors/sql/_users.py +46 -38
- meerschaum/connectors/valkey/_ValkeyConnector.py +535 -0
- meerschaum/connectors/valkey/__init__.py +10 -0
- meerschaum/connectors/valkey/_fetch.py +75 -0
- meerschaum/connectors/valkey/_pipes.py +844 -0
- meerschaum/connectors/valkey/_plugins.py +265 -0
- meerschaum/connectors/valkey/_users.py +305 -0
- meerschaum/core/Pipe/__init__.py +3 -0
- meerschaum/core/Pipe/_attributes.py +1 -2
- meerschaum/core/Pipe/_clear.py +16 -13
- meerschaum/core/Pipe/_copy.py +106 -0
- meerschaum/core/Pipe/_data.py +165 -101
- meerschaum/core/Pipe/_drop.py +4 -4
- meerschaum/core/Pipe/_dtypes.py +14 -14
- meerschaum/core/Pipe/_edit.py +15 -14
- meerschaum/core/Pipe/_sync.py +134 -53
- meerschaum/core/Pipe/_verify.py +11 -11
- meerschaum/core/User/_User.py +14 -12
- meerschaum/jobs/_Job.py +27 -14
- meerschaum/jobs/__init__.py +7 -2
- meerschaum/jobs/systemd.py +20 -8
- meerschaum/plugins/_Plugin.py +17 -13
- meerschaum/utils/_get_pipes.py +14 -20
- meerschaum/utils/dataframe.py +291 -101
- meerschaum/utils/dtypes/__init__.py +31 -6
- meerschaum/utils/dtypes/sql.py +4 -4
- meerschaum/utils/formatting/_shell.py +5 -6
- meerschaum/utils/misc.py +3 -3
- meerschaum/utils/packages/__init__.py +14 -9
- meerschaum/utils/packages/_packages.py +2 -0
- meerschaum/utils/prompt.py +1 -1
- meerschaum/utils/schedule.py +1 -0
- {meerschaum-2.3.5.dev0.dist-info → meerschaum-2.4.0.dist-info}/METADATA +7 -1
- {meerschaum-2.3.5.dev0.dist-info → meerschaum-2.4.0.dist-info}/RECORD +98 -89
- {meerschaum-2.3.5.dev0.dist-info → meerschaum-2.4.0.dist-info}/WHEEL +1 -1
- meerschaum/api/dash/actions.py +0 -255
- /meerschaum/connectors/sql/{SQLConnector.py → _SQLConnector.py} +0 -0
- {meerschaum-2.3.5.dev0.dist-info → meerschaum-2.4.0.dist-info}/LICENSE +0 -0
- {meerschaum-2.3.5.dev0.dist-info → meerschaum-2.4.0.dist-info}/NOTICE +0 -0
- {meerschaum-2.3.5.dev0.dist-info → meerschaum-2.4.0.dist-info}/entry_points.txt +0 -0
- {meerschaum-2.3.5.dev0.dist-info → meerschaum-2.4.0.dist-info}/top_level.txt +0 -0
- {meerschaum-2.3.5.dev0.dist-info → meerschaum-2.4.0.dist-info}/zip-safe +0 -0
@@ -7,14 +7,17 @@ Callbacks for the login page.
|
|
7
7
|
"""
|
8
8
|
|
9
9
|
from __future__ import annotations
|
10
|
-
from meerschaum.api import endpoints, no_auth, CHECK_UPDATE
|
11
|
-
from meerschaum.utils.packages import attempt_import, import_html, import_dcc
|
12
|
-
dash = attempt_import('dash', lazy=False, check_update=CHECK_UPDATE)
|
13
10
|
import uuid
|
11
|
+
|
12
|
+
from meerschaum.api import CHECK_UPDATE
|
13
|
+
from meerschaum.utils.packages import attempt_import, import_html, import_dcc
|
14
14
|
from meerschaum.utils.typing import Optional
|
15
|
+
|
16
|
+
dash = attempt_import('dash', lazy=False, check_update=CHECK_UPDATE)
|
15
17
|
from dash.exceptions import PreventUpdate
|
16
18
|
from dash.dependencies import Input, Output, State
|
17
|
-
from meerschaum.api.dash import dash_app, debug, pipes, _get_pipes
|
19
|
+
from meerschaum.api.dash import dash_app, debug, pipes, _get_pipes
|
20
|
+
from meerschaum.api.dash.sessions import set_session
|
18
21
|
from meerschaum.api.dash.connectors import get_web_connector
|
19
22
|
from meerschaum.api.routes._login import login
|
20
23
|
from meerschaum.api.dash.components import alert_from_success_tuple
|
@@ -23,6 +26,7 @@ from fastapi.exceptions import HTTPException
|
|
23
26
|
dbc = attempt_import('dash_bootstrap_components', lazy=False, check_update=CHECK_UPDATE)
|
24
27
|
html, dcc = import_html(check_update=CHECK_UPDATE), import_dcc(check_update=CHECK_UPDATE)
|
25
28
|
|
29
|
+
|
26
30
|
@dash_app.callback(
|
27
31
|
Output('user-registration-disabled-collapse', 'is_open'),
|
28
32
|
Input('show-user-registration-disabled-button', 'n_clicks'),
|
@@ -36,18 +40,19 @@ def show_registration_disabled_collapse(n_clicks, is_open):
|
|
36
40
|
return not is_open
|
37
41
|
return is_open
|
38
42
|
|
43
|
+
|
39
44
|
@dash_app.callback(
|
40
45
|
Output('session-store', 'data'),
|
41
46
|
Output('username-input', 'className'),
|
42
|
-
Output('location', 'pathname'),
|
47
|
+
Output('mrsm-location', 'pathname'),
|
43
48
|
Output('login-alert-div', 'children'),
|
44
49
|
Input('username-input', 'n_submit'),
|
45
50
|
Input('password-input', 'n_submit'),
|
46
51
|
Input('login-button', 'n_clicks'),
|
47
52
|
State('username-input', 'value'),
|
48
53
|
State('password-input', 'value'),
|
49
|
-
State('location', 'href'),
|
50
|
-
State('location', 'pathname'),
|
54
|
+
State('mrsm-location', 'href'),
|
55
|
+
State('mrsm-location', 'pathname'),
|
51
56
|
)
|
52
57
|
def login_button_click(
|
53
58
|
username_submit,
|
@@ -69,11 +74,12 @@ def login_button_click(
|
|
69
74
|
|
70
75
|
try:
|
71
76
|
_ = login({'username': username, 'password': password})
|
77
|
+
session_id = str(uuid.uuid4())
|
72
78
|
session_data = {
|
73
|
-
'session-id':
|
74
|
-
'location.href': location_href,
|
79
|
+
'session-id': session_id,
|
80
|
+
'mrsm-location.href': location_href,
|
75
81
|
}
|
76
|
-
|
82
|
+
set_session(session_id, {'username': username})
|
77
83
|
alerts = []
|
78
84
|
except HTTPException:
|
79
85
|
form_class += ' is-invalid'
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#! /usr/bin/env python3
|
2
|
+
# vim:fenc=utf-8
|
3
|
+
|
4
|
+
"""
|
5
|
+
Define callbacks for the `/dash/pipes/` page.
|
6
|
+
"""
|
7
|
+
|
8
|
+
from dash.dependencies import Input, Output
|
9
|
+
from dash import no_update
|
10
|
+
|
11
|
+
import meerschaum as mrsm
|
12
|
+
from meerschaum.api.dash import dash_app
|
13
|
+
from meerschaum.api.dash.pipes import build_pipe_card
|
14
|
+
from meerschaum.api import CHECK_UPDATE
|
15
|
+
from meerschaum.utils.packages import import_html, import_dcc
|
16
|
+
html, dcc = import_html(check_update=CHECK_UPDATE), import_dcc(check_update=CHECK_UPDATE)
|
17
|
+
|
18
|
+
|
19
|
+
@dash_app.callback(
|
20
|
+
Output('pipe-output-div', 'children'),
|
21
|
+
Input('pipes-location', 'pathname'),
|
22
|
+
)
|
23
|
+
def render_page_from_url(pathname):
|
24
|
+
if not str(pathname).startswith('/dash/pipes'):
|
25
|
+
return no_update
|
26
|
+
|
27
|
+
keys = pathname.replace('/dash/pipes', '').lstrip('/').rstrip('/').split('/')
|
28
|
+
if len(keys) not in (2, 3):
|
29
|
+
return no_update
|
30
|
+
|
31
|
+
ck = keys[0]
|
32
|
+
mk = keys[1]
|
33
|
+
lk = keys[2] if len(keys) == 3 else None
|
34
|
+
|
35
|
+
pipe = mrsm.Pipe(ck, mk, lk)
|
36
|
+
### TODO Check if logged in
|
37
|
+
return [
|
38
|
+
html.Br(),
|
39
|
+
build_pipe_card(pipe, authenticated=False),
|
40
|
+
html.Br(),
|
41
|
+
]
|
@@ -9,7 +9,7 @@ Callbacks for the plugins page.
|
|
9
9
|
from __future__ import annotations
|
10
10
|
import json
|
11
11
|
from meerschaum.utils.typing import Optional, Dict, Any
|
12
|
-
from meerschaum.api.dash import dash_app, debug
|
12
|
+
from meerschaum.api.dash import dash_app, debug
|
13
13
|
from meerschaum.api import get_api_connector, endpoints, CHECK_UPDATE
|
14
14
|
from meerschaum.core import Plugin
|
15
15
|
from meerschaum.utils.packages import attempt_import, import_dcc, import_html
|
@@ -8,7 +8,8 @@ Callbacks for the registration page.
|
|
8
8
|
|
9
9
|
import uuid
|
10
10
|
from meerschaum.api import get_api_connector, endpoints, CHECK_UPDATE
|
11
|
-
from meerschaum.api.dash import dash_app, debug
|
11
|
+
from meerschaum.api.dash import dash_app, debug
|
12
|
+
from meerschaum.api.dash.sessions import set_session
|
12
13
|
from dash.dependencies import Input, Output, State, ALL, MATCH
|
13
14
|
from dash.exceptions import PreventUpdate
|
14
15
|
from meerschaum.core import User
|
@@ -57,7 +58,7 @@ def validate_email(email):
|
|
57
58
|
@dash_app.callback(
|
58
59
|
Output('session-store', 'data'),
|
59
60
|
Output('register-username-input', 'className'),
|
60
|
-
Output('location', 'pathname'),
|
61
|
+
Output('mrsm-location', 'pathname'),
|
61
62
|
Input('register-username-input', 'n_submit'),
|
62
63
|
Input('register-password-input', 'n_submit'),
|
63
64
|
Input('register-button', 'n_clicks'),
|
@@ -66,13 +67,16 @@ def validate_email(email):
|
|
66
67
|
State("register-email-input", "value"),
|
67
68
|
)
|
68
69
|
def register_button_click(
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
70
|
+
username_submit,
|
71
|
+
password_submit,
|
72
|
+
n_clicks,
|
73
|
+
username,
|
74
|
+
password,
|
75
|
+
email,
|
76
|
+
):
|
77
|
+
"""
|
78
|
+
Register the user and redirect to the console.
|
79
|
+
"""
|
76
80
|
if not n_clicks:
|
77
81
|
raise PreventUpdate
|
78
82
|
form_class = 'form-control'
|
@@ -93,9 +97,9 @@ def register_button_click(
|
|
93
97
|
form_class += ' is-invalid'
|
94
98
|
return {}, form_class, dash.no_update
|
95
99
|
try:
|
96
|
-
|
100
|
+
_ = login({'username': username, 'password': password})
|
97
101
|
session_data = {'session-id': str(uuid.uuid4())}
|
98
|
-
|
102
|
+
set_session(session_data['session-id'], {'username': username})
|
99
103
|
except HTTPException as e:
|
100
104
|
form_class += ' is-invalid'
|
101
105
|
session_data = None
|
@@ -7,27 +7,24 @@ Custom components are defined here.
|
|
7
7
|
"""
|
8
8
|
|
9
9
|
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
13
|
from meerschaum.config.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
16
|
from meerschaum.api import endpoints, CHECK_UPDATE
|
17
|
-
from meerschaum.connectors import instance_types
|
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
|
20
20
|
dbc = attempt_import('dash_bootstrap_components', lazy=False, check_update=CHECK_UPDATE)
|
21
21
|
html, dcc = import_html(check_update=CHECK_UPDATE), import_dcc(check_update=CHECK_UPDATE)
|
22
22
|
dex = attempt_import('dash_extensions', lazy=False, check_update=CHECK_UPDATE)
|
23
23
|
dash_ace = attempt_import('dash_ace', lazy=False, check_update=CHECK_UPDATE)
|
24
|
-
|
25
|
-
component_ids = {
|
26
|
-
|
27
|
-
}
|
24
|
+
_load_builtin_custom_connectors()
|
28
25
|
|
29
26
|
go_button = dbc.Button('Execute', id='go-button', color='primary', style={'width': '100%'})
|
30
|
-
test_button = dbc.Button('Test', id='test-button', color='danger', style={'display'
|
27
|
+
test_button = dbc.Button('Test', id='test-button', color='danger', style={'display': 'none'})
|
31
28
|
get_items_menu = dbc.DropdownMenu(
|
32
29
|
label='More', id='get-items-menu', children=[
|
33
30
|
dbc.DropdownMenuItem("Plugins", id='get-plugins-button'),
|
@@ -42,21 +39,21 @@ get_items_menu = dbc.DropdownMenu(
|
|
42
39
|
)
|
43
40
|
show_pipes_button = dbc.Button(
|
44
41
|
'Pipes',
|
45
|
-
id
|
46
|
-
color
|
47
|
-
style
|
42
|
+
id='get-pipes-button',
|
43
|
+
color='info',
|
44
|
+
style={'width': '100%'},
|
48
45
|
)
|
49
46
|
show_jobs_button = dbc.Button(
|
50
47
|
'Jobs',
|
51
|
-
id
|
52
|
-
color
|
53
|
-
style
|
48
|
+
id='get-jobs-button',
|
49
|
+
color='success',
|
50
|
+
style={'width': '100%'},
|
54
51
|
)
|
55
52
|
cancel_button = dbc.Button(
|
56
53
|
'Terminal',
|
57
|
-
id
|
58
|
-
color
|
59
|
-
style
|
54
|
+
id='cancel-button',
|
55
|
+
color='dark',
|
56
|
+
style={'width': '100%', 'background-color': 'black', 'display': 'none'},
|
60
57
|
)
|
61
58
|
bottom_buttons_content = dbc.Card(
|
62
59
|
dbc.CardBody(
|
@@ -70,28 +67,26 @@ bottom_buttons_content = dbc.Card(
|
|
70
67
|
)
|
71
68
|
)
|
72
69
|
console_div = html.Div(
|
73
|
-
id
|
74
|
-
children
|
70
|
+
id='console-div',
|
71
|
+
children=[html.Pre(get_shell_intro(), id='console-pre')],
|
75
72
|
)
|
76
73
|
|
77
|
-
location = dcc.Location(id='location', refresh=False)
|
74
|
+
location = dcc.Location(id='mrsm-location', refresh=False)
|
78
75
|
|
79
76
|
search_parameters_editor = dash_ace.DashAceEditor(
|
80
|
-
id
|
81
|
-
theme
|
82
|
-
mode
|
83
|
-
tabSize
|
84
|
-
placeholder
|
77
|
+
id='search-parameters-editor',
|
78
|
+
theme='monokai',
|
79
|
+
mode='json',
|
80
|
+
tabSize=2,
|
81
|
+
placeholder=(
|
85
82
|
'Additional search parameters. ' +
|
86
83
|
'Simple dictionary format or JSON accepted.'
|
87
84
|
),
|
88
|
-
style
|
85
|
+
style={'height': 100},
|
89
86
|
)
|
90
87
|
|
91
88
|
sidebar = dbc.Offcanvas(
|
92
|
-
children=[
|
93
|
-
|
94
|
-
],
|
89
|
+
children=[],
|
95
90
|
title='Pages',
|
96
91
|
)
|
97
92
|
|
@@ -99,13 +94,13 @@ download_dataframe = dcc.Download(id='download-dataframe-csv')
|
|
99
94
|
download_logs = dcc.Download(id='download-logs')
|
100
95
|
|
101
96
|
instance_select = dbc.Select(
|
102
|
-
id
|
103
|
-
size
|
104
|
-
options
|
97
|
+
id='instance-select',
|
98
|
+
size='sm',
|
99
|
+
options=[
|
105
100
|
{'label': i, 'value': i}
|
106
101
|
for i in get_connector_labels(*instance_types)
|
107
102
|
],
|
108
|
-
class_name
|
103
|
+
class_name='dbc_dark custom-select custom-select-sm',
|
109
104
|
)
|
110
105
|
|
111
106
|
|
@@ -116,17 +111,17 @@ navbar = dbc.Navbar(
|
|
116
111
|
dbc.Row(
|
117
112
|
[
|
118
113
|
dbc.Col(
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
114
|
+
html.Img(
|
115
|
+
src=endpoints['dash'] + "/assets/logo_48x48.png",
|
116
|
+
title=doc,
|
117
|
+
),
|
123
118
|
),
|
124
119
|
],
|
125
|
-
align
|
126
|
-
className
|
120
|
+
align='center',
|
121
|
+
className='g-0 navbar-logo-row',
|
127
122
|
),
|
128
|
-
href
|
129
|
-
style
|
123
|
+
href='/docs',
|
124
|
+
style={"textDecoration": "none"},
|
130
125
|
),
|
131
126
|
dbc.NavbarToggler(id="navbar-toggler", n_clicks=0),
|
132
127
|
dbc.Collapse(
|
@@ -136,30 +131,30 @@ navbar = dbc.Navbar(
|
|
136
131
|
dbc.Col(
|
137
132
|
dbc.Button(
|
138
133
|
"Sign out",
|
139
|
-
color
|
140
|
-
style
|
141
|
-
id
|
134
|
+
color='link',
|
135
|
+
style={'margin-left': '30px'},
|
136
|
+
id='sign-out-button',
|
142
137
|
),
|
143
138
|
),
|
144
139
|
],
|
145
|
-
className
|
140
|
+
className="g-0 ms-auto flex-nowrap mt-3 mt-md-0",
|
146
141
|
),
|
147
|
-
id
|
148
|
-
is_open
|
149
|
-
navbar
|
142
|
+
id='navbar-collapse',
|
143
|
+
is_open=False,
|
144
|
+
navbar=True,
|
150
145
|
),
|
151
146
|
],
|
152
|
-
style
|
147
|
+
style={'max-width': '96%'},
|
153
148
|
),
|
154
|
-
color
|
155
|
-
style
|
149
|
+
color='dark', dark=True,
|
150
|
+
style={'width': '100% !important'},
|
156
151
|
)
|
157
152
|
|
158
153
|
refresh_jobs_interval = dcc.Interval(
|
159
|
-
id
|
160
|
-
interval
|
161
|
-
n_intervals
|
162
|
-
disabled
|
154
|
+
id='refresh-jobs-interval',
|
155
|
+
interval=(1 * 1000),
|
156
|
+
n_intervals=0,
|
157
|
+
disabled=False,
|
163
158
|
)
|
164
159
|
|
165
160
|
def alert_from_success_tuple(success: SuccessTuple) -> dbc.Alert:
|
@@ -169,11 +164,11 @@ def alert_from_success_tuple(success: SuccessTuple) -> dbc.Alert:
|
|
169
164
|
return dbc.Alert('', is_open=False) if not isinstance(success, tuple) else (
|
170
165
|
dbc.Alert(
|
171
166
|
remove_ansi(success[1]),
|
172
|
-
id
|
173
|
-
dismissable
|
174
|
-
fade
|
175
|
-
is_open
|
176
|
-
color
|
167
|
+
id='success-alert',
|
168
|
+
dismissable=True,
|
169
|
+
fade=True,
|
170
|
+
is_open=(success[1] not in STATIC_CONFIG['system']['success']['ignore']),
|
171
|
+
color='success' if success[0] else 'danger',
|
177
172
|
)
|
178
173
|
)
|
179
174
|
|
meerschaum/api/dash/jobs.py
CHANGED
@@ -7,24 +7,20 @@ Functions for interacting with jobs via the web interface.
|
|
7
7
|
"""
|
8
8
|
|
9
9
|
from __future__ import annotations
|
10
|
-
from
|
11
|
-
from meerschaum.utils.typing import List, Optional, Dict, Any, Tuple, Union, WebState
|
10
|
+
from meerschaum.utils.typing import List, Dict, WebState
|
12
11
|
from meerschaum.utils.packages import attempt_import, import_html, import_dcc
|
13
|
-
from meerschaum.api.dash.
|
14
|
-
from meerschaum.api.dash.users import is_session_authenticated
|
12
|
+
from meerschaum.api.dash.sessions import is_session_authenticated
|
15
13
|
from meerschaum.api import CHECK_UPDATE
|
16
|
-
dbc = attempt_import('dash_bootstrap_components', lazy=False, check_update=CHECK_UPDATE)
|
17
|
-
html, dcc = import_html(), import_dcc()
|
18
14
|
from meerschaum.jobs import (
|
19
15
|
get_jobs,
|
20
|
-
get_running_jobs,
|
21
|
-
get_paused_jobs,
|
22
|
-
get_stopped_jobs,
|
23
16
|
get_executor_keys_from_context,
|
24
17
|
Job,
|
25
18
|
)
|
26
19
|
from meerschaum.config import get_config
|
27
20
|
from meerschaum.utils.misc import sorted_dict
|
21
|
+
from dash.dependencies import Input, Output, State
|
22
|
+
dbc = attempt_import('dash_bootstrap_components', lazy=False, check_update=CHECK_UPDATE)
|
23
|
+
html, dcc = import_html(), import_dcc()
|
28
24
|
|
29
25
|
STATUS_EMOJI: Dict[str, str] = {
|
30
26
|
'running': get_config('formatting', 'emoji', 'running'),
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#! /usr/bin/env python3
|
2
|
+
# vim:fenc=utf-8
|
3
|
+
|
4
|
+
"""
|
5
|
+
Display pipes via a shareable URL.
|
6
|
+
"""
|
7
|
+
|
8
|
+
from meerschaum.api import CHECK_UPDATE
|
9
|
+
from meerschaum.utils.packages import import_html, import_dcc
|
10
|
+
from meerschaum.api.dash.components import download_dataframe
|
11
|
+
|
12
|
+
html, dcc = import_html(check_update=CHECK_UPDATE), import_dcc(check_update=CHECK_UPDATE)
|
13
|
+
import dash_bootstrap_components as dbc
|
14
|
+
|
15
|
+
layout = dbc.Container([
|
16
|
+
dcc.Location('pipes-location'),
|
17
|
+
download_dataframe,
|
18
|
+
html.Div(id='pipe-output-div'),
|
19
|
+
])
|