Loading services/webapp/code/rosetta/core_app/templates/components/task_card.html +9 −5 Original line number Diff line number Diff line <div style="width:350px; display:block; border: #e0e0e0 solid 1px; margin:10px; background:#f8f8f8; margin-bottom:20px"> <div style="width:350px; float:left; border: #e0e0e0 solid 1px; margin:10px; background:#f8f8f8; margin-bottom:20px"> {% if data.task %} <div style="margin-top:5px; padding:10px; text-align:center; border-bottom: #f8f8f8 solid 1px; "> <b>{{data.task.name}}</b> Loading Loading @@ -33,7 +33,11 @@ {% if task.status == "stopped" or task.status == "created" %} <a href="?uuid={{task.uuid}}&action=delete" class="btn btn-action">Delete</a> {% else %} <a href="?uuid={{task.uuid}}&action=stop&fromlist={{fromlist}}" class="btn btn-action">Stop</a> {% if data.task %} <a href="?uuid={{task.uuid}}&action=stop" class="btn btn-action">Stop</a> {% else %} <a href="?uuid={{task.uuid}}&action=stop&fromlist=True" class="btn btn-action">Stop</a> {% endif %} {% endif %} <!-- Connect --> {% if task.interface_port %} Loading @@ -46,10 +50,10 @@ {% endif %} {% endif %} <!-- View log --> {% if task.status == "running" %} <a href="/task_log/?uuid={{task.uuid}}&action=viewlog" class="btn btn-action">Logs</a> {% else %} {% if task.status == "created" or task.status == "submitted" %} <a href="" class="btn btn-disabled">Logs</a> {% else %} <a href="/task_log/?uuid={{task.uuid}}&action=viewlog" class="btn btn-action">Logs</a> {% endif %} </div> </div> Loading services/webapp/code/rosetta/core_app/views.py +1 −3 Original line number Diff line number Diff line Loading @@ -555,8 +555,8 @@ def tasks(request): data['error'] = 'Error in deleting the task' logger.error('Error in deleting task with uuid="{}": "{}"'.format(uuid, e)) return render(request, 'error.html', {'data': data}) return redirect('/tasks/') return redirect('/tasks/') # Handle stop action elif action=='stop': Loading @@ -577,9 +577,7 @@ def tasks(request): data['error'] = 'Error in getting the task or performing the required action' logger.error('Error in getting the task with uuid="{}" or performing the required action: "{}"'.format(uuid, e)) return render(request, 'error.html', {'data': data}) return redirect('/tasks/?uuid={}'.format(task.uuid)) # Redirect if fromlist: return redirect('/tasks') else: Loading Loading
services/webapp/code/rosetta/core_app/templates/components/task_card.html +9 −5 Original line number Diff line number Diff line <div style="width:350px; display:block; border: #e0e0e0 solid 1px; margin:10px; background:#f8f8f8; margin-bottom:20px"> <div style="width:350px; float:left; border: #e0e0e0 solid 1px; margin:10px; background:#f8f8f8; margin-bottom:20px"> {% if data.task %} <div style="margin-top:5px; padding:10px; text-align:center; border-bottom: #f8f8f8 solid 1px; "> <b>{{data.task.name}}</b> Loading Loading @@ -33,7 +33,11 @@ {% if task.status == "stopped" or task.status == "created" %} <a href="?uuid={{task.uuid}}&action=delete" class="btn btn-action">Delete</a> {% else %} <a href="?uuid={{task.uuid}}&action=stop&fromlist={{fromlist}}" class="btn btn-action">Stop</a> {% if data.task %} <a href="?uuid={{task.uuid}}&action=stop" class="btn btn-action">Stop</a> {% else %} <a href="?uuid={{task.uuid}}&action=stop&fromlist=True" class="btn btn-action">Stop</a> {% endif %} {% endif %} <!-- Connect --> {% if task.interface_port %} Loading @@ -46,10 +50,10 @@ {% endif %} {% endif %} <!-- View log --> {% if task.status == "running" %} <a href="/task_log/?uuid={{task.uuid}}&action=viewlog" class="btn btn-action">Logs</a> {% else %} {% if task.status == "created" or task.status == "submitted" %} <a href="" class="btn btn-disabled">Logs</a> {% else %} <a href="/task_log/?uuid={{task.uuid}}&action=viewlog" class="btn btn-action">Logs</a> {% endif %} </div> </div> Loading
services/webapp/code/rosetta/core_app/views.py +1 −3 Original line number Diff line number Diff line Loading @@ -555,8 +555,8 @@ def tasks(request): data['error'] = 'Error in deleting the task' logger.error('Error in deleting task with uuid="{}": "{}"'.format(uuid, e)) return render(request, 'error.html', {'data': data}) return redirect('/tasks/') return redirect('/tasks/') # Handle stop action elif action=='stop': Loading @@ -577,9 +577,7 @@ def tasks(request): data['error'] = 'Error in getting the task or performing the required action' logger.error('Error in getting the task with uuid="{}" or performing the required action: "{}"'.format(uuid, e)) return render(request, 'error.html', {'data': data}) return redirect('/tasks/?uuid={}'.format(task.uuid)) # Redirect if fromlist: return redirect('/tasks') else: Loading