|
@@ -22,69 +22,94 @@
|
|
|
from django.utils.translation import ugettext as _
|
|
from django.utils.translation import ugettext as _
|
|
|
%>
|
|
%>
|
|
|
|
|
|
|
|
|
|
+<%def name="get_tab(form, action, control, css_box_class)">
|
|
|
|
|
+ <ul style="margin-bottom:0" class="nav nav-tabs">
|
|
|
|
|
+ <li class="active"><a style="line-height:10px
|
|
|
|
|
+ % if not action:
|
|
|
|
|
+ ;background-color: #F9F9F9;
|
|
|
|
|
+ % endif
|
|
|
|
|
+ " data-toggle="tab"><i class="fa ${css_box_class}" style="color:#DDD"></i> <strong style="color:#999">
|
|
|
|
|
+ % if action and action.externalId:
|
|
|
|
|
+ ${ form.instance.node_type }
|
|
|
|
|
+ % else:
|
|
|
|
|
+ ${ form.instance.__unicode__() }
|
|
|
|
|
+ % endif
|
|
|
|
|
+ </strong>
|
|
|
|
|
+ % if action and action.externalId:
|
|
|
|
|
+ <span class="label ${ utils.get_status(action.status) }">${ action.status }</span>
|
|
|
|
|
+ % elif control:
|
|
|
|
|
+ <span class="label ${ utils.get_status(control.status) }">${ control.status }</span>
|
|
|
|
|
+ % endif
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+</%def>
|
|
|
|
|
+
|
|
|
|
|
+<%def name="get_content(form, action, control, inverse=False)">
|
|
|
|
|
+ <div class="row-fluid">
|
|
|
|
|
+ % if action and action.externalId:
|
|
|
|
|
+ <div style="text-align:left; padding:10px;border:1px solid #DDD; border-top:0" class="span12">
|
|
|
|
|
+ <div style="font-size: 30px; margin-top:14px" class="pull-right"><a href="${ url('jobbrowser.views.job_single_logs', job=action.externalId) }" title="${ _('View the logs') }" rel="tooltip" data-row-selector-exclude="true"><i class="fa fa-tasks"></i></a></div>
|
|
|
|
|
+ <h4><a href="${ action.get_absolute_url() }" title="${ _('View workflow action') }" rel="tooltip">${ form.instance.__unicode__() }</a></h4>
|
|
|
|
|
+ <span class="muted">${ form.instance.description } </span>
|
|
|
|
|
+ % if action:
|
|
|
|
|
+ ${ action.errorMessage or '' }
|
|
|
|
|
+ % elif control:
|
|
|
|
|
+ ${ control.errorMessage or '' }
|
|
|
|
|
+ % endif
|
|
|
|
|
+ </div>
|
|
|
|
|
+ % else:
|
|
|
|
|
+ <div style="border:0;" class="span12
|
|
|
|
|
+ %if inverse:
|
|
|
|
|
+ inverse_gradient
|
|
|
|
|
+ %else:
|
|
|
|
|
+ gradient
|
|
|
|
|
+ %endif
|
|
|
|
|
+ ">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ % endif
|
|
|
|
|
+ </div>
|
|
|
|
|
+</%def>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<%def name="print_status_node(form)">
|
|
<%def name="print_status_node(form)">
|
|
|
<%
|
|
<%
|
|
|
|
|
+ is_start = form.instance.get_full_node().node_type == 'start'
|
|
|
|
|
+ is_end = form.instance.get_full_node().node_type == 'end'
|
|
|
is_fork = form.instance.get_full_node().node_type == 'fork'
|
|
is_fork = form.instance.get_full_node().node_type == 'fork'
|
|
|
is_join = form.instance.get_full_node().node_type == 'join'
|
|
is_join = form.instance.get_full_node().node_type == 'join'
|
|
|
is_decision = form.instance.get_full_node().node_type == 'decision'
|
|
is_decision = form.instance.get_full_node().node_type == 'decision'
|
|
|
is_decision_end = form.instance.get_full_node().node_type == 'decisionend'
|
|
is_decision_end = form.instance.get_full_node().node_type == 'decisionend'
|
|
|
action = actions.get(unicode(form.instance))
|
|
action = actions.get(unicode(form.instance))
|
|
|
control = controls.get(unicode(form.instance))
|
|
control = controls.get(unicode(form.instance))
|
|
|
- box_class = ""
|
|
|
|
|
|
|
+ css_box_class = ""
|
|
|
|
|
+ if is_start:
|
|
|
|
|
+ css_box_class = "fa-thumbs-up"
|
|
|
|
|
+ if is_end:
|
|
|
|
|
+ css_box_class = "fa-dot-circle-o"
|
|
|
if is_fork:
|
|
if is_fork:
|
|
|
- box_class = "node-fork"
|
|
|
|
|
|
|
+ css_box_class = "fa-sitemap"
|
|
|
if is_join:
|
|
if is_join:
|
|
|
- box_class = "node-join"
|
|
|
|
|
|
|
+ css_box_class = "fa-sitemap fa-rotate-180"
|
|
|
if is_decision:
|
|
if is_decision:
|
|
|
- box_class = "node-decision"
|
|
|
|
|
|
|
+ css_box_class = "fa-magic"
|
|
|
if is_decision_end:
|
|
if is_decision_end:
|
|
|
- box_class = "node-decision-end"
|
|
|
|
|
|
|
+ css_box_class = "fa-magic"
|
|
|
if action:
|
|
if action:
|
|
|
- box_class = "node-action"
|
|
|
|
|
|
|
+ css_box_class = "fa-cogs"
|
|
|
%>
|
|
%>
|
|
|
|
|
|
|
|
% if form.instance.get_full_node().is_visible():
|
|
% if form.instance.get_full_node().is_visible():
|
|
|
- <div class="span12 action ${ box_class }">
|
|
|
|
|
- <div class="row-fluid">
|
|
|
|
|
- <div class="span12">
|
|
|
|
|
- <h4>${ form.instance.__unicode__() }</h4>
|
|
|
|
|
- <span class="muted">${ form.instance.node_type }</span>
|
|
|
|
|
- <div class="node-description">${ form.instance.description }</div>
|
|
|
|
|
- % if action:
|
|
|
|
|
- ${ action.errorMessage or '' }
|
|
|
|
|
- % elif control:
|
|
|
|
|
- ${ control.errorMessage or '' }
|
|
|
|
|
- % endif
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- % if action and action.externalId:
|
|
|
|
|
- <div class="row-fluid node-action-bar">
|
|
|
|
|
- <div class="span2" style="text-align:left;padding-left: 6px">
|
|
|
|
|
- % if action:
|
|
|
|
|
- <span class="label ${ utils.get_status(action.status) }">${ action.status }</span>
|
|
|
|
|
- % endif
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="span10" style="text-align:right">
|
|
|
|
|
- % if action:
|
|
|
|
|
- <a href="${ action.get_absolute_url() }" class="btn btn-mini" title="${ _('View workflow action') }" rel="tooltip"><i class="fa fa-eye"></i></a>
|
|
|
|
|
- % endif
|
|
|
|
|
- <a href="${ url('jobbrowser.views.job_single_logs', job=action.externalId) }" class="btn btn-mini" title="${ _('View the logs') }" rel="tooltip" data-row-selector-exclude="true" id="advanced-btn"><i class="fa fa-tasks"></i></a>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <div class="span12 action" style="margin-top:0">
|
|
|
|
|
+ % if is_end or is_join:
|
|
|
|
|
+ ${get_content(form, action, control, True)}
|
|
|
|
|
+ <div class="tabbable tabs-below">
|
|
|
|
|
+ ${get_tab(form, action, control, css_box_class)}
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
- % elif control:
|
|
|
|
|
- <div class="row-fluid node-action-bar">
|
|
|
|
|
- <div class="span2" style="text-align:left;padding-left: 6px">
|
|
|
|
|
- % if control:
|
|
|
|
|
- <span class="label ${ utils.get_status(control.status) }">${ control.status }</span>
|
|
|
|
|
- % endif
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="span10" style="text-align:right">
|
|
|
|
|
-
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ % else:
|
|
|
|
|
+ ${get_tab(form, action, control, css_box_class)}
|
|
|
|
|
+ ${get_content(form, action, control)}
|
|
|
% endif
|
|
% endif
|
|
|
-
|
|
|
|
|
</div>
|
|
</div>
|
|
|
% endif
|
|
% endif
|
|
|
|
|
|