executions overview screen: workflow link

* added the ability navigating to workflow-
  overview screen by clicking on the specific
  workflow name under execution overview screen

screenshot: http://pasteboard.co/1JC3kvaD.png

Partially implements blueprint: mistral-dashboard-executions-screen

Change-Id: Ia139311d63cc7db8e0bf193a3c99d6d8e582d5c7
This commit is contained in:
Gal Margalit 2015-10-29 09:46:28 +00:00
parent caf63a6890
commit 2d938b9677
2 changed files with 9 additions and 1 deletions

View File

@ -24,7 +24,12 @@
<dd>{{ execution.description }}</dd>
{% endif %}
<dt>{% trans "Worflow Name" %}</dt>
<dd>{{ execution.workflow_name }}</dd>
<dd>
<a href="{{ execution.workflow_url }}"
title="{{execution.workflow_name}} {% trans "overview" %}">
{{ execution.workflow_name }}
</a>
</dd>
<dt>{% trans "Updated At" %}</dt>
<dd>{{ execution.updated_at }}</dd>
<dt>{% trans "Params" %}</dt>

View File

@ -61,10 +61,13 @@ class TaskView(tables.DataTableView):
class DetailView(generic.TemplateView):
template_name = 'mistral/executions/detail.html'
page_title = _("Execution Overview")
workflow_url = 'horizon:mistral:workflows:detail'
def get_context_data(self, **kwargs):
context = super(DetailView, self).get_context_data(**kwargs)
execution = get_execution_data(self.request, kwargs['execution_id'])
execution.workflow_url = reverse(self.workflow_url,
args=[execution.workflow_name])
execution.input = prettyprint(execution.input)
execution.output = prettyprint(execution.output)
execution.params = prettyprint(execution.params)