Commit 1af50265 authored by Martin Schorb's avatar Martin Schorb
Browse files

loading indicators, fix MT generation

parent ea675112
Pipeline #32615 passed with stage
in 25 seconds
......@@ -161,8 +161,8 @@ for idx in range(params.max_tileviews):
if thispage not in hf.trigger(key='module'):
raise PreventUpdate
trigger = hf.trigger()
tileim_index = trigger.split('_')[-1]
ol = dash.callback_context.outputs_list
tileim_index = ol[0]['id']['component'].split('_')[-1]
url = params.render_base_url + params.render_version + 'owner/' + owner + '/project/' + project \
+ '/stack/' + stack
......@@ -177,7 +177,7 @@ for idx in range(params.max_tileviews):
raise PreventUpdate
t_labels = tiles.copy()
tile = tiles[int(len(tiles) / 2)]
tile = tiles[int(len(tiles) / 2 + int(tileim_index))]
if prev_tile is None:
prev_tile = tile
......
......@@ -48,7 +48,11 @@ matchtrial = html.Div([pages.tile_view(parent, numpanel=2, showlink=True),
html.A(' - ',
id=label + 'mt_link',
target="_blank"),
html.Div('', id=label + 'mt_jscaller', style={'display': 'none'})
dcc.Loading(
id=label + "link_loading",
type="dot",
children=html.Div('', id=label + 'mt_jscaller', style={'display': 'none'})
)
]),
html.Br(),
......
......@@ -52,7 +52,16 @@ def new_matchtrial(matchID, urls, clippos='LEFT', owner=params.mt_owner, ):
matchtrial['matches'] = []
matchtrial['stats'] = {}
matchtrial['parameters']['featureAndMatchParameters']['pClipPosition'] = clippos
if clippos == 'NO CLIP':
matchtrial['parameters']['featureAndMatchParameters'].pop('pClipPosition')
matchtrial['parameters']['featureAndMatchParameters'].pop('clipPixels')
else:
matchtrial['parameters']['featureAndMatchParameters']['pClipPosition'] = clippos
if 'clipPixels' not in matchtrial['parameters']['featureAndMatchParameters'].keys():
matchtrial['parameters']['featureAndMatchParameters']['clipPixels'] = 400
matchtrial['parameters']['pRenderParametersUrl'] = urls[0]
matchtrial['parameters']['qRenderParametersUrl'] = urls[1]
......@@ -62,10 +71,10 @@ def new_matchtrial(matchID, urls, clippos='LEFT', owner=params.mt_owner, ):
res = {}
try:
res = requests.post(url, json=matchtrial['parameters']).json()
except:
json.decoder.JSONDecodeError
# try:
res = requests.post(url, json=matchtrial['parameters']).json()
# except json.decoder.JSONDecodeError:
# print('Error while parsing MatchTrial')
if 'id' in res.keys():
matchtrial = res['parameters']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment