instanceactivity_detail.html 2.42 KB
Newer Older
1 2 3 4 5 6 7
{% extends "dashboard/base.html" %}
{% load i18n %}

{% block content %}
<div class="body-content">
  <div class="page-header">
    <h1>
8 9 10 11 12 13
        {{ object.instance.name }}:
            {% if user.is_superuser %}
            {{object.readable_name.get_admin_text}}
            {% else %}
            {{object.readable_name.get_user_text}}
            {% endif %}
14 15 16
    </h1>
  </div>
  <div class="row">
17
    <div class="col-md-5" id="vm-info-pane">
18 19 20 21 22
      <div class="big">
        <span id="vm-activity-state" class="label label-{% if object.get_status_id == 'wait' %}info{% else %}{% if object.succeeded %}success{% else %}error{% endif %}{% endif %}">
          <span>{{ object.get_status_id|upper }}</span>
        </span>
      </div>
23 24 25

      {% include "dashboard/vm-detail/_activity-timeline.html" with active=object %}

26
    </div>
27
    <div class="col-md-7">
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
      <div class="panel panel-default">
        <!--<div class="panel-heading"><h2 class="panel-title">{% trans "Activity" %}</h2></div> -->
        <div class="panel-body">
          <dl>
            <dt>{% trans "activity code" %}</dt>
            <dd>{{object.activity_code}}</dd>

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

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

            <dt>{% trans "user" %}</dt>
            <dd>{{object.user|default:'(system)'}}</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>{{ object.get_status_id }}</dd>


            <dt>{% trans "result" %}</dt>
61
            <dd><textarea class="form-control">{% if user.is_superuser %}{{object.result.get_admin_text}}{% else %}{{object.result.get_admin_text}}{% endif %}</textarea></dd>
62 63 64 65 66 67 68 69 70 71

            <dt>{% trans "resultant state" %}</dt>
            <dd>{{object.resultant_state|default:'n/a'}}</dd>
        </div>
      </div>
    </div>
  </div>
</div>

{% endblock %}