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 e2745d94 authored by usov_i's avatar usov_i
Browse files

Add button for config upload

parent f0a4d4f0
No related branches found
No related tags found
No related merge requests found
import base64
import io
import re
import tempfile
from bokeh.io import curdoc
from bokeh.layouts import column, row
from bokeh.models import Button, Panel, RadioButtonGroup, Select, TextAreaInput, TextInput
from bokeh.models import (
Button,
FileInput,
Panel,
RadioButtonGroup,
Select,
TextAreaInput,
TextInput,
)
import pyzebra
......@@ -87,6 +97,13 @@ def create():
fileinput = TextInput(title="Path to XML configuration file:", width=600)
fileinput.on_change("value", fileinput_callback)
def upload_button_callback(_attr, _old, new):
with io.BytesIO(base64.b64decode(new)) as file:
fileinput_callback(None, None, file)
upload_button = FileInput(accept=".xml")
upload_button.on_change("value", upload_button_callback)
# General parameters
# ---- logfile
def logfile_textinput_callback(_attr, _old, new):
......@@ -340,6 +357,7 @@ def create():
tab_layout = row(
column(
fileinput,
upload_button,
row(logfile_textinput, logfile_verbosity_select),
row(filelist_type, filelist_format_textinput),
filelist_datapath_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