Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 2291fac4 authored by usov_i's avatar usov_i
Browse files

Remove filepath input for xml config

Uploading local configs is the way to go
parent 62da620e
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ from bokeh.io import curdoc
from bokeh.layouts import column, row
from bokeh.models import (
Button,
Div,
FileInput,
Panel,
RadioButtonGroup,
......@@ -21,8 +22,8 @@ import pyzebra
def create():
config = pyzebra.AnatricConfig()
def fileinput_callback(_attr, _old, new):
config.load_from_file(new)
def _load_config_file(file):
config.load_from_file(file)
logfile_textinput.value = config.logfile
logfile_verbosity_select.value = config.logfile_verbosity
......@@ -94,12 +95,11 @@ def create():
minPeakCount_textinput.disabled = disable_adaptivedynamic
displacementCurve_textinput.disabled = disable_adaptivedynamic
fileinput = TextInput(title="Path to XML configuration file:", width=600)
fileinput.on_change("value", fileinput_callback)
upload_div = Div(text="Open XML configuration file:")
def upload_button_callback(_attr, _old, new):
with io.BytesIO(base64.b64decode(new)) as file:
fileinput_callback(None, None, file)
_load_config_file(file)
upload_button = FileInput(accept=".xml")
upload_button.on_change("value", upload_button_callback)
......@@ -361,7 +361,7 @@ def create():
tab_layout = row(
column(
fileinput,
upload_div,
upload_button,
row(logfile_textinput, logfile_verbosity_select),
row(filelist_type, filelist_format_textinput),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment