Skip to content

Commit

Permalink
Fix button activation, urls
Browse files Browse the repository at this point in the history
  • Loading branch information
NaniteBased committed Apr 22, 2021
1 parent 4f479e4 commit 08d901e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/execution/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from REST import DispatcherApi, ElcmApi, AnalyticsApi


@bp.route('/<executionId>', methods=['GET'])
@bp.route('/<int:executionId>', methods=['GET'])
@login_required
def execution(executionId: int):
def _responseToLogList(response):
Expand All @@ -32,7 +32,7 @@ def _responseToLogList(response):
if status == 'Success':
localLogs = _responseToLogList(localResponse)
remoteLogs = None
analyticsUrl = AnalyticsApi().GetUrl(experiment.id, current_user)
analyticsUrl = AnalyticsApi().GetUrl(executionId, current_user)

if experiment.remoteDescriptor is not None:
success = False
Expand Down
2 changes: 1 addition & 1 deletion app/experiment/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def experiment(experimentId: int):
analyticsApi = AnalyticsApi()
analyticsUrls = {}
for execution in executions:
analyticsUrls[execution.id] = analyticsApi.GetToken(execution.id, current_user)
analyticsUrls[execution.id] = analyticsApi.GetUrl(execution.id, current_user)

return render_template('experiment/experiment.html', title=f'Experiment: {exp.name}', experiment=exp,
executions=executions, formRun=formRun, grafanaUrl=config.GrafanaUrl,
Expand Down
2 changes: 1 addition & 1 deletion app/templates/execution/_execution.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<a class="btn btn-blue btn-sm {{ "" if hasDashboard else "disabled"}}"
href="{{ grafanaUrl }}{{ execution.dashboard_url }}" role="button" target="_blank">📊</a>

<a class="btn btn-blue btn-sm {{ "" if hasDashboard else "disabled"}}"
<a class="btn btn-blue btn-sm {{ "" if finished else "disabled"}}"
href="{{ analyticsUrls[execution.id] }}" role="button" target="_blank">📈</a>

<a class="btn btn-blue btn-sm {{ "" if finished else "disabled"}}"
Expand Down
2 changes: 1 addition & 1 deletion app/templates/execution/execution.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h2>Execution {{ execution.id }}</h2>
<a class="btn btn-blue btn-sm {{ "" if hasDashboard else "disabled"}}"
href="{{ grafanaUrl }}{{ execution.dashboard_url }}" role="button" target="_blank">📊</a>

<a class="btn btn-blue btn-sm {{ "" if hasDashboard else "disabled"}}"
<a class="btn btn-blue btn-sm {{ "" if finished else "disabled"}}"
href="{{ analyticsUrl }}" role="button" target="_blank">📈</a>

<a class="btn btn-blue btn-sm {{ "" if finished else "disabled"}}"
Expand Down

0 comments on commit 08d901e

Please sign in to comment.