arbok-inspector 1.3.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.
- arbok_inspector/__init__.py +1 -0
- arbok_inspector/analysis/analysis_base.py +29 -0
- arbok_inspector/analysis/prepare_data.py +118 -0
- arbok_inspector/classes/base_run.py +275 -0
- arbok_inspector/classes/dim.py +26 -0
- arbok_inspector/classes/native_run.py +172 -0
- arbok_inspector/classes/qcodes_run.py +65 -0
- arbok_inspector/cli.py +4 -0
- arbok_inspector/configurations/1d_plot.json +49 -0
- arbok_inspector/configurations/2d_plot.json +60 -0
- arbok_inspector/dev.py +19 -0
- arbok_inspector/helpers/string_formaters.py +37 -0
- arbok_inspector/helpers/unit_formater.py +29 -0
- arbok_inspector/main.py +15 -0
- arbok_inspector/pages/__init__.py +2 -0
- arbok_inspector/pages/database_browser.py +139 -0
- arbok_inspector/pages/greeter.py +93 -0
- arbok_inspector/pages/run_view.py +259 -0
- arbok_inspector/state.py +101 -0
- arbok_inspector/test.db +0 -0
- arbok_inspector/test_main.py +65 -0
- arbok_inspector/widgets/build_run_selecter.py +163 -0
- arbok_inspector/widgets/build_run_view_actions.py +104 -0
- arbok_inspector/widgets/build_xarray_grid.py +145 -0
- arbok_inspector/widgets/build_xarray_html.py +57 -0
- arbok_inspector/widgets/json_plot_settings_dialog.py +77 -0
- arbok_inspector/widgets/update_day_selecter.py +64 -0
- arbok_inspector-1.3.0.dist-info/METADATA +90 -0
- arbok_inspector-1.3.0.dist-info/RECORD +33 -0
- arbok_inspector-1.3.0.dist-info/WHEEL +5 -0
- arbok_inspector-1.3.0.dist-info/entry_points.txt +2 -0
- arbok_inspector-1.3.0.dist-info/licenses/LICENSE +21 -0
- arbok_inspector-1.3.0.dist-info/top_level.txt +1 -0
arbok_inspector/cli.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [],
|
|
3
|
+
"layout": {
|
|
4
|
+
"template": "plotly_dark",
|
|
5
|
+
"autosize": true,
|
|
6
|
+
"margin": {
|
|
7
|
+
"l": 40,
|
|
8
|
+
"r": 40,
|
|
9
|
+
"t": 40,
|
|
10
|
+
"b": 40
|
|
11
|
+
},
|
|
12
|
+
"xaxis": {
|
|
13
|
+
"type": "linear",
|
|
14
|
+
"title": {
|
|
15
|
+
"text": "placeholder x-axis",
|
|
16
|
+
"font": {
|
|
17
|
+
"size": 12
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"yaxis": {
|
|
22
|
+
"type": "linear",
|
|
23
|
+
"title": {
|
|
24
|
+
"text": "placeholder y-axis",
|
|
25
|
+
"font": {
|
|
26
|
+
"size": 12
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"title": {
|
|
31
|
+
"text": "placeholder title",
|
|
32
|
+
"x": 0.5,
|
|
33
|
+
"xanchor": "center",
|
|
34
|
+
"yanchor": "bottom",
|
|
35
|
+
"font": {
|
|
36
|
+
"size": 16
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"legend": {
|
|
40
|
+
"x": 1,
|
|
41
|
+
"y": 1,
|
|
42
|
+
"xanchor": "right",
|
|
43
|
+
"yanchor": "top",
|
|
44
|
+
"bgcolor": "rgba(0,0,0,0.5)",
|
|
45
|
+
"bordercolor": "white",
|
|
46
|
+
"borderwidth": 1
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"type": "heatmap",
|
|
5
|
+
"z": null,
|
|
6
|
+
"x": null,
|
|
7
|
+
"y": null,
|
|
8
|
+
"colorscale": "magma",
|
|
9
|
+
"colorbar": {
|
|
10
|
+
"thickness": 10,
|
|
11
|
+
"xanchor": "left",
|
|
12
|
+
"x": 1.0
|
|
13
|
+
},
|
|
14
|
+
"showscale": true
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"layout": {
|
|
18
|
+
"template": "plotly_dark",
|
|
19
|
+
"autosize": true,
|
|
20
|
+
"margin": {
|
|
21
|
+
"l": 40,
|
|
22
|
+
"r": 40,
|
|
23
|
+
"t": 40,
|
|
24
|
+
"b": 40
|
|
25
|
+
},
|
|
26
|
+
"xaxis": {
|
|
27
|
+
"type": "linear",
|
|
28
|
+
"title": {
|
|
29
|
+
"text": "placeholder x-axis",
|
|
30
|
+
"font": {
|
|
31
|
+
"size": 12
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"tickfont": {
|
|
35
|
+
"size": 12
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"yaxis": {
|
|
39
|
+
"type": "linear",
|
|
40
|
+
"title": {
|
|
41
|
+
"text": "placeholder y-axis",
|
|
42
|
+
"font": {
|
|
43
|
+
"size": 12
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"tickfont": {
|
|
47
|
+
"size": 12
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"title": {
|
|
51
|
+
"text": "placeholder title",
|
|
52
|
+
"x": 0.5,
|
|
53
|
+
"xanchor": "center",
|
|
54
|
+
"yanchor": "bottom",
|
|
55
|
+
"font": {
|
|
56
|
+
"size": 12
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
arbok_inspector/dev.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from nicegui import ui
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
import asyncio
|
|
4
|
+
from typing import Optional
|
|
5
|
+
|
|
6
|
+
from arbok_inspector.state import inspector
|
|
7
|
+
from arbok_inspector.pages import greeter, database_browser
|
|
8
|
+
|
|
9
|
+
def main():
|
|
10
|
+
ui.run(
|
|
11
|
+
title='Arbok Inspector',
|
|
12
|
+
favicon='🐍',
|
|
13
|
+
dark=True,
|
|
14
|
+
show=True,
|
|
15
|
+
port=8090
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
if __name__ in {"__main__", "__mp_main__"}:
|
|
19
|
+
main()
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
import xarray as xr
|
|
3
|
+
from arbok_inspector.helpers.unit_formater import unit_formatter
|
|
4
|
+
|
|
5
|
+
def title_formater(run):
|
|
6
|
+
"""
|
|
7
|
+
Format title string for plots based on selected dimensions.
|
|
8
|
+
|
|
9
|
+
Args:
|
|
10
|
+
run: The Run object containing the data.
|
|
11
|
+
Returns:
|
|
12
|
+
A formatted title string.
|
|
13
|
+
"""
|
|
14
|
+
title = ""
|
|
15
|
+
for dim in run.dim_axis_option["select_value"]:
|
|
16
|
+
title += f"{dim.name} = {unit_formatter(run, dim, dim.select_index)}<br>"
|
|
17
|
+
return title
|
|
18
|
+
|
|
19
|
+
def axis_label_formater(ds: xr.DataArray, dim_name: str) -> str:
|
|
20
|
+
"""
|
|
21
|
+
Format axis label by replacing '__' with '.' and bolding the last part.
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
dim_name: The dimension name string.
|
|
25
|
+
Returns:
|
|
26
|
+
A formatted axis label string.
|
|
27
|
+
"""
|
|
28
|
+
dim_list = dim_name.split('__')
|
|
29
|
+
print(f"{dim_list=}")
|
|
30
|
+
if 'units' in ds.coords[dim_name].attrs:
|
|
31
|
+
unit = ds.coords[dim_name].attrs['units']
|
|
32
|
+
else:
|
|
33
|
+
unit = ""
|
|
34
|
+
if len(dim_list) > 1:
|
|
35
|
+
return f"{'.'.join(dim_list[:-1])}.<b>{dim_list[-1]}</b> ({unit})"
|
|
36
|
+
else:
|
|
37
|
+
return f"<b>{dim_list[0]}</b> ({unit})"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Helper functions for formatting units with SI prefixes."""
|
|
2
|
+
|
|
3
|
+
def unit_formatter(run, dim, index: int) -> str:
|
|
4
|
+
"""
|
|
5
|
+
If value is larger than 1e3, format with SI prefix.
|
|
6
|
+
Same if smaller than 1e-3.
|
|
7
|
+
|
|
8
|
+
Args:
|
|
9
|
+
run (Run): Run object containing the data
|
|
10
|
+
dim (Dim): Dimension object
|
|
11
|
+
index (int): Index of the value to format
|
|
12
|
+
"""
|
|
13
|
+
unit_tuples = [
|
|
14
|
+
('G', 1e9), ('M', 1e6), ('k', 1e3), ('m', 1e-3), ('µ', 1e-6), ('n', 1e-9)]
|
|
15
|
+
try:
|
|
16
|
+
value = run.full_data_set[dim.name].values[index]
|
|
17
|
+
unit = run.full_data_set[dim.name].attrs['units']
|
|
18
|
+
if abs(value) >= 1e3 or (abs(value) < 1e-3 and value != 0):
|
|
19
|
+
for prefix, factor in unit_tuples:
|
|
20
|
+
if abs(value) >= factor or (abs(value) < 1e-3 and value != 0 and factor < 1):
|
|
21
|
+
scaled_value = value / factor
|
|
22
|
+
return f'{scaled_value:.3f} {prefix}<b>{unit}</b>'
|
|
23
|
+
if unit is None or unit == '':
|
|
24
|
+
return f'{value:.3f}'
|
|
25
|
+
else:
|
|
26
|
+
return f'{value:.3f} ({unit})'
|
|
27
|
+
except Exception as e:
|
|
28
|
+
print(f"Error in unit_formatter: {e}")
|
|
29
|
+
return 'N/A'
|
arbok_inspector/main.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from nicegui import ui
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
import asyncio
|
|
4
|
+
from typing import Optional
|
|
5
|
+
|
|
6
|
+
from arbok_inspector.state import inspector
|
|
7
|
+
from arbok_inspector.pages import greeter, database_browser
|
|
8
|
+
|
|
9
|
+
ui.run(
|
|
10
|
+
title='Arbok Inspector',
|
|
11
|
+
favicon='🐍',
|
|
12
|
+
dark=True,
|
|
13
|
+
show=True,
|
|
14
|
+
port=8090
|
|
15
|
+
)
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import time
|
|
2
|
+
from nicegui import ui, app
|
|
3
|
+
|
|
4
|
+
from arbok_inspector.state import inspector
|
|
5
|
+
from arbok_inspector.pages.run_view import run_page
|
|
6
|
+
from arbok_inspector.widgets.update_day_selecter import update_day_selecter
|
|
7
|
+
from arbok_inspector.widgets.build_run_selecter import build_run_selecter
|
|
8
|
+
|
|
9
|
+
DAY_GRID_COLUMN_DEFS = [
|
|
10
|
+
{'headerName': 'Day', 'field': 'day'},
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
small_col_width = 30
|
|
14
|
+
RUN_GRID_COLUMN_DEFS = [
|
|
15
|
+
{'headerName': 'Run ID', 'field': 'run_id', "width": small_col_width},
|
|
16
|
+
{'headerName': 'Name', 'field': 'name'},
|
|
17
|
+
{'headerName': 'Exp ID', 'field': 'exp_id', "width": small_col_width},
|
|
18
|
+
{'headerName': '# Results', 'field': 'result_counter', "width": small_col_width},
|
|
19
|
+
{'headerName': 'Started', 'field': 'run_timestamp', "width": small_col_width},
|
|
20
|
+
{'headerName': 'Finish', 'field': 'completed_timestamp', "width": small_col_width},
|
|
21
|
+
]
|
|
22
|
+
# RUN_PARAM_DICT = {
|
|
23
|
+
# 'run_id': 'Run ID',
|
|
24
|
+
# 'exp_id': 'Experiment ID',
|
|
25
|
+
# 'result_counter': '# results',
|
|
26
|
+
# 'run_timestamp': 'Started',
|
|
27
|
+
# 'completed_timestamp': 'Completed',
|
|
28
|
+
# }
|
|
29
|
+
AGGRID_STYLE = 'height: 95%; min-height: 0;'
|
|
30
|
+
EXPANSION_CLASSES = 'w-full p-0 gap-1 border border-gray-400 rounded-lg no-wrap items-start'
|
|
31
|
+
|
|
32
|
+
@ui.page('/browser')
|
|
33
|
+
async def database_browser_page():
|
|
34
|
+
"""Database general page showing the selected database"""
|
|
35
|
+
_ = await ui.context.client.connected()
|
|
36
|
+
app.storage.general["avg_axis"] = 'iteration'
|
|
37
|
+
app.storage.general["result_keywords"] = None
|
|
38
|
+
app.storage.tab["avg_axis_input"] = None
|
|
39
|
+
app.storage.tab["result_keyword_input"] = None
|
|
40
|
+
offset_minutes = await ui.run_javascript('new Date().getTimezoneOffset()')
|
|
41
|
+
offset_hours = -float(offset_minutes) / 60
|
|
42
|
+
app.storage.general["timezone"] = offset_hours
|
|
43
|
+
print(f"TIMEZONE: UTC{offset_hours}")
|
|
44
|
+
|
|
45
|
+
grids = {'day': None, 'run': None}
|
|
46
|
+
with ui.column().classes('w-full h-screen'):
|
|
47
|
+
ui.add_head_html('<title>Arbok Inspector - Database general</title>')
|
|
48
|
+
with ui.row().classes('w-full items-center justify-between'):
|
|
49
|
+
ui.label('Arbok Inspector').classes('text-3xl font-bold mb-1')
|
|
50
|
+
|
|
51
|
+
with ui.expansion('Database info and settings', icon='info', value=True)\
|
|
52
|
+
.classes(EXPANSION_CLASSES).props('expand-separator'):
|
|
53
|
+
build_database_info_section(grids)
|
|
54
|
+
|
|
55
|
+
with ui.row().classes('w-full flex-1'):
|
|
56
|
+
build_day_selecter(grids)
|
|
57
|
+
app.storage.tab['run_selecter'] = ui.column().classes('flex-1').classes('h-full')
|
|
58
|
+
build_run_selecter(target_day = None)
|
|
59
|
+
|
|
60
|
+
def open_run_page(run_id: int):
|
|
61
|
+
# with ui.dialog() as dialog, ui.card():
|
|
62
|
+
# ui.label(f'loading run {run_id} ...').classes(
|
|
63
|
+
# 'text-3xl font-bold mb-1')
|
|
64
|
+
# app.storage.general["run"] = Run(run_id)
|
|
65
|
+
# time.sleep(2)
|
|
66
|
+
# dialog.close()
|
|
67
|
+
shared_data['test'] = "hello"
|
|
68
|
+
app.storage.general["avg_axis"] = app.storage.tab["avg_axis_input"].value
|
|
69
|
+
app.storage.general["result_keywords"] = app.storage.tab["result_keyword_input"].value
|
|
70
|
+
print(f"Result Keywords:")
|
|
71
|
+
print(app.storage.general['result_keywords'])
|
|
72
|
+
ui.navigate.to(f'/run/{run_id}', new_tab=True)
|
|
73
|
+
|
|
74
|
+
def build_database_info_section(grids):
|
|
75
|
+
"""Build the database information and settings section."""
|
|
76
|
+
with ui.row().classes('w-full'):
|
|
77
|
+
build_info_section()
|
|
78
|
+
build_settings_section(grids)
|
|
79
|
+
|
|
80
|
+
def build_info_section():
|
|
81
|
+
"""Build the database information section."""
|
|
82
|
+
with ui.column().classes('w-1/3'):
|
|
83
|
+
ui.label('Database Information').classes('text-xl font-semibold mb-4')
|
|
84
|
+
if inspector.qcodes_database_path:
|
|
85
|
+
ui.label(f'Database Path: {str(inspector.qcodes_database_path)}').classes()
|
|
86
|
+
else:
|
|
87
|
+
ui.label('No database selected').classes('text-lg text-red-500')
|
|
88
|
+
|
|
89
|
+
def build_settings_section(grids):
|
|
90
|
+
"""Build the database settings section."""
|
|
91
|
+
with ui.column().classes('w-1/2'):
|
|
92
|
+
with ui.row().classes('w-full'):
|
|
93
|
+
app.storage.tab["result_keyword_input"] = ui.input(
|
|
94
|
+
label = 'auto-plot keywords',
|
|
95
|
+
placeholder="e.g:\t\t[ ( 'Q1' , 'state' ), 'feedback' ]"
|
|
96
|
+
).props('rounded outlined dense')\
|
|
97
|
+
.classes('w-full')\
|
|
98
|
+
.tooltip("""
|
|
99
|
+
Selects all results that contain the specified keywords in their name.<br>
|
|
100
|
+
Can be a single keyword (string) or a tuple of keywords.<br>
|
|
101
|
+
The latter one requires all keywords to be present in the result name.<br>
|
|
102
|
+
|
|
103
|
+
The given example would select all results that contain 'Q1' and 'state' in their name<br>
|
|
104
|
+
or all results that contain 'feedback' in their name.
|
|
105
|
+
""").props('v-html')
|
|
106
|
+
app.storage.tab["avg_axis_input"] = ui.input(
|
|
107
|
+
label = 'average-axis keyword',
|
|
108
|
+
value = "iteration"
|
|
109
|
+
).props('rounded outlined dense')\
|
|
110
|
+
.classes('w-full')
|
|
111
|
+
with ui.row().classes('w-full justify-start'):
|
|
112
|
+
ui.button(
|
|
113
|
+
text = 'Select New Database',
|
|
114
|
+
on_click=lambda: ui.navigate.to('/'),
|
|
115
|
+
color='purple').classes()
|
|
116
|
+
ui.button(
|
|
117
|
+
text = 'Reload',
|
|
118
|
+
on_click=lambda: update_day_selecter(grids['day']),
|
|
119
|
+
color = '#4BA701'
|
|
120
|
+
).classes()
|
|
121
|
+
|
|
122
|
+
def build_day_selecter(grids):
|
|
123
|
+
"""Build the day selecter grid."""
|
|
124
|
+
with ui.column().style('width: 120px;').classes('h-full'):
|
|
125
|
+
grids['day'] = ui.aggrid(
|
|
126
|
+
{
|
|
127
|
+
'defaultColDef': {'flex': 1},
|
|
128
|
+
'columnDefs': DAY_GRID_COLUMN_DEFS,
|
|
129
|
+
'rowData': {},
|
|
130
|
+
'rowSelection': 'multiple',
|
|
131
|
+
},
|
|
132
|
+
theme = 'ag-theme-balham-dark')\
|
|
133
|
+
.classes('text-sm ag-theme-balham-dark')\
|
|
134
|
+
.style(AGGRID_STYLE)\
|
|
135
|
+
.on(
|
|
136
|
+
type = 'cellClicked',
|
|
137
|
+
handler = lambda event: build_run_selecter(event.args["value"])
|
|
138
|
+
)
|
|
139
|
+
update_day_selecter(grids['day'])
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
|
|
2
|
+
from nicegui import ui
|
|
3
|
+
from arbok_inspector.state import inspector
|
|
4
|
+
|
|
5
|
+
@ui.page('/')
|
|
6
|
+
async def greeter_page() -> None:
|
|
7
|
+
"""Main page that starts with file selection"""
|
|
8
|
+
|
|
9
|
+
# Show initial file selection dialog
|
|
10
|
+
with ui.dialog().classes('width=800px') as dialog:
|
|
11
|
+
dialog.props('persistent ') # width=800px max-width=90vw overflow-y-auto max-h-[90vh]
|
|
12
|
+
|
|
13
|
+
with ui.card().style('min-width: 300px; max-width: 1000px'):
|
|
14
|
+
inspector.initial_dialog = dialog
|
|
15
|
+
with ui.column().classes('items-center w-full justify-between max-w-5xl'):
|
|
16
|
+
ui.label('Welcome to Arbok Inspector 🐍🔎').classes(
|
|
17
|
+
'text-4xl text-center mb-6'
|
|
18
|
+
)
|
|
19
|
+
ui.label('Pick your database type:').classes(
|
|
20
|
+
'text-2xl font-bold text-center mb-6'
|
|
21
|
+
)
|
|
22
|
+
with ui.row().classes('w-full gap-4 items-stretch'):
|
|
23
|
+
with ui.card().classes('flex-1'):
|
|
24
|
+
build_qcodes_connection_section()
|
|
25
|
+
|
|
26
|
+
with ui.card().classes('flex-1 gap-4'):
|
|
27
|
+
build_native_arbok_connection_section()
|
|
28
|
+
dialog.open()
|
|
29
|
+
|
|
30
|
+
def build_qcodes_connection_section() -> None:
|
|
31
|
+
"""Build the QCoDeS database connection section."""
|
|
32
|
+
ui.label('Please enter the path to your QCoDeS database file'
|
|
33
|
+
).classes('text-body1 mb-4')
|
|
34
|
+
ui.image('https://microsoft.github.io/Qcodes/_images/qcodes_logo.png')
|
|
35
|
+
#ui.label('Database File Path').classes('text-subtitle2 mb-2')
|
|
36
|
+
path_input = ui.input(
|
|
37
|
+
label='Database file path',
|
|
38
|
+
placeholder='C:/path/to/your/database.db'
|
|
39
|
+
).classes('w-full mb-2')
|
|
40
|
+
ui.button(
|
|
41
|
+
text = 'Load Database',
|
|
42
|
+
on_click=lambda: inspector.connect_to_qcodes_database(path_input),
|
|
43
|
+
icon='folder_open',
|
|
44
|
+
color='purple').classes('mb-4 w-full')
|
|
45
|
+
ui.separator()
|
|
46
|
+
ui.label('Supported formats: .db, .sqlite, .sqlite3'
|
|
47
|
+
).classes('text-caption text-grey')
|
|
48
|
+
|
|
49
|
+
def build_native_arbok_connection_section() -> None:
|
|
50
|
+
# ui.label('Enter credentials to your native postgresql database and minio server'
|
|
51
|
+
# ).classes('text-body1 mb-4')
|
|
52
|
+
# ui.markdown('Visit [arbok-database](https://github.com/andncl/arbok_database) for more info.')
|
|
53
|
+
ui.markdown(
|
|
54
|
+
'Enter credentials to your native PostgreSQL database and MinIO server. '
|
|
55
|
+
'Visit [arbok-database](https://github.com/andncl/arbok_database) for more info.'
|
|
56
|
+
).classes('text-body1 mb-4')
|
|
57
|
+
database_url = ui.input(
|
|
58
|
+
label='Database address',
|
|
59
|
+
placeholder='"postgresql+psycopg2://<username>:<password>@<host>:<port>/<database>"'
|
|
60
|
+
).classes('w-full mb-2')
|
|
61
|
+
|
|
62
|
+
minio_url = ui.input(
|
|
63
|
+
label='MiniO address',
|
|
64
|
+
value='http://localhost:9000',
|
|
65
|
+
).classes('w-full mb-2')
|
|
66
|
+
|
|
67
|
+
minio_user = ui.input(
|
|
68
|
+
label='MiniO username',
|
|
69
|
+
value='minioadmin'
|
|
70
|
+
).classes('w-full mb-2')
|
|
71
|
+
|
|
72
|
+
minio_password = ui.input(
|
|
73
|
+
label='MiniO password',
|
|
74
|
+
value='minioadmin',
|
|
75
|
+
password=True
|
|
76
|
+
).classes('w-full')
|
|
77
|
+
|
|
78
|
+
minio_bucket = ui.input(
|
|
79
|
+
label='MiniO bucket',
|
|
80
|
+
placeholder='dev',
|
|
81
|
+
).classes('w-full')
|
|
82
|
+
|
|
83
|
+
ui.button(
|
|
84
|
+
text = 'Connect Database and bucket',
|
|
85
|
+
on_click=lambda: inspector.connect_to_arbok_database(
|
|
86
|
+
database_url.value,
|
|
87
|
+
minio_url.value,
|
|
88
|
+
minio_user.value,
|
|
89
|
+
minio_password.value,
|
|
90
|
+
minio_bucket.value
|
|
91
|
+
),
|
|
92
|
+
icon='folder_open',
|
|
93
|
+
color='#4BA701').classes('mb-4 w-full')
|