meerschaum 2.8.3__py3-none-any.whl → 2.9.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 (66) hide show
  1. meerschaum/_internal/arguments/_parser.py +5 -0
  2. meerschaum/actions/drop.py +1 -1
  3. meerschaum/actions/start.py +14 -6
  4. meerschaum/actions/sync.py +9 -0
  5. meerschaum/api/__init__.py +9 -3
  6. meerschaum/api/_chunks.py +67 -0
  7. meerschaum/api/dash/callbacks/__init__.py +5 -2
  8. meerschaum/api/dash/callbacks/custom.py +21 -8
  9. meerschaum/api/dash/callbacks/dashboard.py +26 -4
  10. meerschaum/api/dash/callbacks/settings/__init__.py +8 -0
  11. meerschaum/api/dash/callbacks/settings/password_reset.py +76 -0
  12. meerschaum/api/dash/components.py +136 -25
  13. meerschaum/api/dash/pages/__init__.py +1 -0
  14. meerschaum/api/dash/pages/dashboard.py +11 -9
  15. meerschaum/api/dash/pages/plugins.py +31 -27
  16. meerschaum/api/dash/pages/settings/__init__.py +8 -0
  17. meerschaum/api/dash/pages/settings/password_reset.py +63 -0
  18. meerschaum/api/dash/webterm.py +6 -3
  19. meerschaum/api/resources/static/css/dash.css +8 -1
  20. meerschaum/api/resources/templates/termpage.html +4 -0
  21. meerschaum/api/routes/_pipes.py +234 -82
  22. meerschaum/config/_default.py +4 -0
  23. meerschaum/config/_version.py +1 -1
  24. meerschaum/connectors/__init__.py +1 -0
  25. meerschaum/connectors/api/_APIConnector.py +12 -1
  26. meerschaum/connectors/api/_pipes.py +106 -45
  27. meerschaum/connectors/api/_plugins.py +51 -45
  28. meerschaum/connectors/api/_request.py +1 -1
  29. meerschaum/connectors/parse.py +1 -2
  30. meerschaum/connectors/sql/_SQLConnector.py +4 -1
  31. meerschaum/connectors/sql/_cli.py +1 -0
  32. meerschaum/connectors/sql/_create_engine.py +51 -4
  33. meerschaum/connectors/sql/_pipes.py +38 -6
  34. meerschaum/connectors/sql/_sql.py +35 -4
  35. meerschaum/connectors/valkey/_ValkeyConnector.py +2 -0
  36. meerschaum/connectors/valkey/_pipes.py +51 -39
  37. meerschaum/core/Pipe/__init__.py +1 -0
  38. meerschaum/core/Pipe/_data.py +1 -2
  39. meerschaum/core/Pipe/_sync.py +64 -4
  40. meerschaum/core/Pipe/_verify.py +23 -8
  41. meerschaum/jobs/systemd.py +1 -1
  42. meerschaum/plugins/_Plugin.py +21 -5
  43. meerschaum/plugins/__init__.py +32 -8
  44. meerschaum/utils/dataframe.py +139 -2
  45. meerschaum/utils/dtypes/__init__.py +211 -1
  46. meerschaum/utils/dtypes/sql.py +296 -5
  47. meerschaum/utils/formatting/_shell.py +1 -4
  48. meerschaum/utils/misc.py +1 -1
  49. meerschaum/utils/packages/_packages.py +8 -2
  50. meerschaum/utils/process.py +27 -3
  51. meerschaum/utils/schedule.py +3 -3
  52. meerschaum/utils/sql.py +140 -12
  53. meerschaum/utils/venv/__init__.py +10 -2
  54. {meerschaum-2.8.3.dist-info → meerschaum-2.9.0.dist-info}/METADATA +17 -3
  55. {meerschaum-2.8.3.dist-info → meerschaum-2.9.0.dist-info}/RECORD +61 -61
  56. {meerschaum-2.8.3.dist-info → meerschaum-2.9.0.dist-info}/WHEEL +1 -1
  57. meerschaum/_internal/gui/__init__.py +0 -43
  58. meerschaum/_internal/gui/app/__init__.py +0 -50
  59. meerschaum/_internal/gui/app/_windows.py +0 -74
  60. meerschaum/_internal/gui/app/actions.py +0 -30
  61. meerschaum/_internal/gui/app/pipes.py +0 -47
  62. {meerschaum-2.8.3.dist-info → meerschaum-2.9.0.dist-info}/LICENSE +0 -0
  63. {meerschaum-2.8.3.dist-info → meerschaum-2.9.0.dist-info}/NOTICE +0 -0
  64. {meerschaum-2.8.3.dist-info → meerschaum-2.9.0.dist-info}/entry_points.txt +0 -0
  65. {meerschaum-2.8.3.dist-info → meerschaum-2.9.0.dist-info}/top_level.txt +0 -0
  66. {meerschaum-2.8.3.dist-info → meerschaum-2.9.0.dist-info}/zip-safe +0 -0
@@ -37,6 +37,7 @@ from meerschaum.api.dash.components import (
37
37
  console_div,
38
38
  download_dataframe,
39
39
  navbar,
40
+ pages_offcanvas,
40
41
  download_logs,
41
42
  refresh_jobs_interval,
42
43
  )
@@ -47,22 +48,23 @@ from meerschaum.api.dash.keys import (
47
48
  )
48
49
 
49
50
  layout = html.Div(
50
- id = 'main-div',
51
- children = [
51
+ id='main-div',
52
+ children=[
52
53
  keys_lists_content,
53
54
  download_dataframe,
54
55
  download_logs,
55
56
  refresh_jobs_interval,
56
57
  navbar,
58
+ pages_offcanvas,
57
59
  html.Div(
58
60
  dbc.Row(
59
- id = 'content-row',
60
- children = [
61
+ id='content-row',
62
+ children=[
61
63
  dbc.Col(
62
- children = [
64
+ children=[
63
65
  dbc.Tabs(
64
- id = 'pipes-filter-tabs',
65
- children = [
66
+ id='pipes-filter-tabs',
67
+ children=[
66
68
  dbc.Tab(
67
69
  dropdown_tab_content,
68
70
  label='Filters',
@@ -107,9 +109,9 @@ layout = html.Div(
107
109
  id='content-col-right',
108
110
  ),
109
111
  ],
110
- style = {'max-width': '100%', 'padding': '15px'},
112
+ style={'max-width': '100%', 'padding': '15px'},
111
113
  ), ### end of Row
112
- className = 'container-fluid',
114
+ className='container-fluid',
113
115
  ), ### end of Div
114
116
  html.P('', id='line-buffer', style={'display': 'none'}),
115
117
  ],
@@ -13,6 +13,7 @@ html, dcc = import_html(check_update=CHECK_UPDATE), import_dcc(check_update=CHEC
13
13
  import dash_bootstrap_components as dbc
14
14
  from meerschaum.core import Plugin
15
15
  from meerschaum.utils.typing import Optional
16
+ from meerschaum.api.dash.components import pages_navbar
16
17
 
17
18
  search_box = dbc.Input(
18
19
  id = "search-plugins-input",
@@ -20,32 +21,35 @@ search_box = dbc.Input(
20
21
  type = "text",
21
22
  )
22
23
 
23
- layout = dbc.Container([
24
- html.Div([
25
- html.Br(),
26
- html.Div(
27
- dbc.Container([
28
- html.H3('Plugins'),
29
- html.P([
30
- (
31
- 'Plugins extend the functionality of Meerschaum.'
32
- + ' To find out more, check out the '
33
- ),
34
- html.A(
35
- 'plugins documentation',
36
- href = 'https://meerschaum.io/reference/plugins/',
37
- rel = "noreferrer noopener",
38
- target = "_blank",
39
- ),
40
- '.',
24
+ layout = [
25
+ pages_navbar,
26
+ dbc.Container([
27
+ html.Div([
28
+ html.Br(),
29
+ html.Div(
30
+ dbc.Container([
31
+ html.H3('Plugins'),
32
+ html.P([
33
+ (
34
+ 'Plugins extend the functionality of Meerschaum.'
35
+ ' To find out more, check out the '
36
+ ),
37
+ html.A(
38
+ 'plugins documentation',
39
+ href='https://meerschaum.io/reference/plugins/',
40
+ rel="noreferrer noopener",
41
+ target="_blank",
42
+ ),
43
+ '.',
44
+ ]),
41
45
  ]),
42
- ]),
43
- className = 'page-header',
44
- style = {'background-color': 'var(--dark)', 'padding': '1em'},
45
- ),
46
- html.Br(),
47
- search_box,
48
- html.Br(),
49
- html.Div([], id='plugins-cards-div'),
46
+ className='page-header',
47
+ style={'background-color': 'var(--dark)', 'padding': '1em'},
48
+ ),
49
+ html.Br(),
50
+ search_box,
51
+ html.Br(),
52
+ html.Div([], id='plugins-cards-div'),
53
+ ])
50
54
  ])
51
- ])
55
+ ]
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env python3
2
+ # vim:fenc=utf-8
3
+
4
+ """
5
+ Define the layouts for the `settings` pages.
6
+ """
7
+
8
+ import meerschaum.api.dash.pages.settings.password_reset
@@ -0,0 +1,63 @@
1
+ #! /usr/bin/env python3
2
+ # vim:fenc=utf-8
3
+
4
+ """
5
+ Define the password reset 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.plugins import web_page
12
+
13
+
14
+ @web_page('password-reset', login_required=True, page_group='Settings')
15
+ def page_layout():
16
+ """
17
+ Return the layout for this page.
18
+ """
19
+ return dbc.Container([
20
+ html.Br(),
21
+ html.H3('Password Reset'),
22
+ html.Br(),
23
+ html.Div(id="password-reset-alert-div"),
24
+ dbc.Form([
25
+ dbc.Row(
26
+ [
27
+ dbc.Label("New Password", html_for="password-reset-input", width=2),
28
+ dbc.Col(
29
+ dbc.Input(
30
+ type="password",
31
+ id="password-reset-input",
32
+ placeholder="Enter new password",
33
+ ),
34
+ width=10,
35
+ ),
36
+ ],
37
+ className="mb-3",
38
+ ),
39
+ dbc.Row(
40
+ [
41
+ dbc.Label("Confirm Password", html_for="password-reset-confirm-input", width=2),
42
+ dbc.Col(
43
+ dbc.Input(
44
+ type="password",
45
+ id="password-reset-confirm-input",
46
+ placeholder="Confirm new password",
47
+ ),
48
+ width=10,
49
+ ),
50
+ ],
51
+ className="mb-3",
52
+ ),
53
+ dbc.Row(
54
+ [
55
+ dbc.Col(
56
+ dbc.Button("Submit", id="password-reset-button", disabled=True),
57
+ ),
58
+ ],
59
+ justify="end",
60
+ className="mb-3",
61
+ ),
62
+ ]),
63
+ ])
@@ -53,19 +53,22 @@ def get_webterm(state: WebState) -> Tuple[Any, Any]:
53
53
  html.Div(
54
54
  [
55
55
  dbc.Button(
56
- 'Refresh',
56
+ "⟳",
57
57
  color='black',
58
+ size='sm',
58
59
  id='webterm-refresh-button',
59
60
  ),
60
61
  dbc.Button(
61
- 'Full View',
62
+ '',
62
63
  color='black',
64
+ size='sm',
63
65
  id='webterm-fullscreen-button',
64
66
  ),
65
67
  ] + [
66
68
  dbc.Button(
67
- 'New Tab',
69
+ html.B('+'),
68
70
  color='black',
71
+ size='sm',
69
72
  id='webterm-new-tab-button',
70
73
  ),
71
74
  ] if TMUX_IS_ENABLED else [],
@@ -23,7 +23,7 @@ a {
23
23
  padding: 0.5em;
24
24
  }
25
25
  #webterm-iframe {
26
- width: 102%;
26
+ width: 100%;
27
27
  height: 83vh !important;
28
28
  max-height: 83vh;
29
29
  }
@@ -73,3 +73,10 @@ a {
73
73
  .input-text {
74
74
  font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif !important;
75
75
  }
76
+ .pages-offcanvas-accordion button {
77
+ background-color: var(--bs-dark) !important;
78
+ color: white !important;
79
+ }
80
+ .pages-offcanvas-accordion div {
81
+ padding: 0 !important;
82
+ }
@@ -111,6 +111,10 @@ window.addEventListener(
111
111
  false,
112
112
  );
113
113
 
114
+ document.addEventListener('contextmenu', function(e) {
115
+ e.preventDefault();
116
+ });
117
+
114
118
  let reconnectTimeout;
115
119
 
116
120
  function cleanUpWebSocket(socket) {