activity.html 1.91 KB
Newer Older
1 2
{% load i18n %}
<h3>{% trans "Activity" %}</h3>
3 4 5 6 7 8 9
<style>
  .sub-timeline {
    border-left: 3px solid green;
    margin-left: 30px;
    padding-left: 10px;
  }
</style>
10

11
<div class="timeline">
12
  {% for a in activity %}
13 14 15 16 17
  <div class="activity" data-activity-id="{{ a.pk }}">
    <span class="timeline-icon">
      <i class="{% if not a.finished %} icon-refresh icon-spin {% else %}icon-plus{% endif %}"></i>
    </span> 
    <strong>{{ a.get_readable_name }}</strong>
18 19 20
    {{ a.started|date:"Y-m-d. H:i" }}, {{ a.user }}
      {% if a.instanceactivity_set.count > 0 %}
        <div class="sub-timeline">
21 22 23 24 25 26 27 28 29 30
          {% for s in a.instanceactivity_set.all %}
            <div data-activity-id="{{ s.pk }}" class="sub-activity">
            {{ s.get_readable_name }} - 
            {% if s.finished %}
              {{ s.finished|time:"H:i:s" }}
            {% else %}
              <i class="icon-refresh icon-spin" class="sub-activity-loading-icon"></i>
            {% endif %}
            </div>
          {% endfor %}
31 32 33 34 35 36 37
        </div>
      {% endif %}
  </div>
  {% endfor %}
  <div><span class="timeline-icon timeline-warning"><i class="icon-remove"></i></span> <strong>Removing</strong> 2013-11-21 15:32</div>
  <div><span class="timeline-icon timeline-warning"><i class="icon-pause"></i></span> <strong>Suspending</strong> 2013-09-21 15:32</div>
  <div><span class="timeline-icon"><i class="icon-ellipsis-vertical" ></i></span> <strong>(now)</strong></div>
38 39 40 41
  <div><span class="timeline-icon"><i class="icon-truck"></i></span> <strong>Migrated to mega5</strong> 2013-04-21 15:32, ABC123</div>
  <div><span class="timeline-icon"><i class="icon-refresh"></i></span> <strong>Forced reboot</strong> 2013-04-21 15:32, ABC123</div>
  <div><span class="timeline-icon"><i class="icon-plus"></i></span> <strong>Created</strong> 2013-04-21 15:32, ABC123</div>
</div>
42 43 44 45

{% block extra_js %}
<script src="{{ STATIC_URL }}dashboard/vm-details.js"></script>
{% endblock %}