nodeactivity_detail.html 2.97 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
{% extends "dashboard/base.html" %}
{% load i18n %}
{% load hro %}

{% block content %}
<div class="body-content">
  <div class="page-header">
    <h1>
      <div class="pull-right" id="vm-activity-state">
        <span class="label label-{% if object.get_status_id == 'wait' %}info{% else %}{% if object.succeeded %}success{% else %}danger{% endif %}{% endif %}">
          <span>{{ object.get_status_id|upper }}</span>
        </span>
      </div>
      <i class="fa fa-{{icon}}"></i>
      {{ object.node.name }}: {{object.readable_name|get_text:user}}
    </h1>
  </div>
  <div class="row">
    <div class="col-md-6" id="vm-info-pane">
      {% include "dashboard/vm-detail/_activity-timeline.html" with active=object %}
    </div>
    <div class="col-md-6">
      <div class="panel panel-default">
        <div class="panel-body">
          <dl>
            <dt>{% trans "activity code" %}</dt>
            <dd>{{object.activity_code}}</dd>

            <dt>{% trans "node" %}</dt>
            <dd><a href="{{object.node.get_absolute_url}}">{{object.node}}</a></dd>

            <dt>{% trans "time" %}</dt>
            <dd>{{object.started|default:'n/a'}} → {{object.finished|default:'n/a'}}</dd>

            <dt>{% trans "user" %}</dt>
            <dd>
            <a href="{{ object.user.profile.get_absolute_url }}">
              {{object.user|default:'(system)'}}</a></dd>
            <dt>{% trans "type" %}</dt>
            <dd>
            {% if object.parent %}
              {% blocktrans with url=object.parent.get_absolute_url name=object.parent %}
                subactivity of <a href="{{url}}">{{name}}</a>
              {% endblocktrans %}
            {% else %}{% trans "top level activity" %}{% endif %}
            </dd>

            <dt>{% trans "task uuid" %}</dt>
            <dd>{{ object.task_uuid|default:'n/a' }}</dd>

            <dt>{% trans "status" %}</dt>
            <dd id="activity_status">{{ object.get_status_id }}</dd>


            <dt>{% trans "result" %}</dt>
            <dd><textarea class="form-control" id="activity_result_text">{{object.result|get_text:user}}</textarea></dd>

            <dt>{% trans "subactivities" %}</dt>
            {% for s in object.children.all %}
              <dd>
                <span{% if s.result %} title="{{ s.result|get_text:user }}"{% endif %}>
                  <a href="{{ s.get_absolute_url }}">
                      {{ s.readable_name|get_text:user|capfirst }}</a></span> &ndash;
                {% if s.finished %}
                  {{ s.finished|time:"H:i:s" }}
                {% else %}
                  <i class="fa fa-refresh fa-spin" class="sub-activity-loading-icon"></i>
                {% endif %}
                {% if s.has_failed %}
                  <div class="label label-danger">{% trans "failed" %}</div>
                {% endif %}
              </dd>
            {% empty %}
              <dd>{% trans "none" %}</dd>
            {% endfor %}
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

{% endblock %}