Commit db3c3c74 by Oláh István Gergely Committed by Őry Máté

dashboard: refactor node detail templates

parent 6a39ca6c
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
</ul> </ul>
<div id="panel-body" class="tab-content panel-body"> <div id="panel-body" class="tab-content panel-body">
<div class="tab-pane active" id="home">{% include "dashboard/node-detail-home.html" %}</div> <div class="tab-pane active" id="home">{% include "dashboard/node-detail/home.html" %}</div>
<div class="tab-pane" id="resources">{% include "dashboard/node-detail-resources.html" %}</div> <div class="tab-pane" id="resources">{% include "dashboard/node-detail/resources.html" %}</div>
<div class="tab-pane" id="activity">{% include "dashboard/node-detail-activity.html" %}</div> <div class="tab-pane" id="activity">{% include "dashboard/node-detail/activity.html" %}</div>
<div class="tab-pane" id="virtualmachines">{% include "dashboard/node-detail-vm.html" %}</div> <div class="tab-pane" id="virtualmachines">{% include "dashboard/node-detail/vm.html" %}</div>
</div> </div>
</div> </div>
</div> </div>
......
{% load i18n %} {% load i18n %}
<h3>{% trans "Activity" %}</h3> {% for a in activities %}
<style> <div class="activity" data-activity-id="{{ a.pk }}">
.sub-timeline { <span class="timeline-icon{% if a.has_failed %} timeline-icon-failed{% endif %}">
border-left: 3px solid green; <i class="{% if not a.finished %} icon-refresh icon-spin {% else %}icon-plus{% endif %}"></i>
margin-left: 30px; </span>
padding-left: 10px; <strong>{{ a.get_readable_name }}</strong>
} {{ a.started|date:"Y-m-d H:i" }}, {{ a.user }}
</style> {% if a.children.count > 0 %}
<div class="sub-timeline">
<div class="timeline"> {% for s in a.children.all %}
{% for a in activity %} <div data-activity-id="{{ s.pk }}" class="sub-activity{% if s.has_failed %} sub-activity-failed{% endif %}">
<div class="activity" data-activity-id="{{ a.pk }}"> {{ s.get_readable_name }} -
<span class="timeline-icon"> {% if s.finished %}
<i class="{% if not a.finished %} icon-refresh icon-spin {% else %}icon-plus{% endif %}"></i> {{ s.finished|time:"H:i:s" }}
</span> {% else %}
<strong>{{ a.get_readable_name }}</strong> <i class="icon-refresh icon-spin" class="sub-activity-loading-icon"></i>
{{ a.started|date:"Y-m-d. H:i" }}, {{ a.user }} {% endif %}
{% if a.children.count > 0 %} {% if s.has_failed %}
<div class="sub-timeline"> <div class="label label-danger">{% trans "failed" %}</div>
{% for s in a.children.all %} {% endif %}
<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 %}
</div> </div>
{% endif %} {% endfor %}
</div> </div>
{% endfor %} {% endif %}
<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>
<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> </div>
{% endfor %}
{% block extra_js %}
<script src="{{ STATIC_URL }}dashboard/vm-details.js"></script>
{% endblock %}
{% load i18n %}
<h3>{% trans "Activity" %}</h3>
<div id="activity-timeline" class="timeline">
{% include "dashboard/node-detail/_activity-timeline.html" %}
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment