Merge pull request #4 from tzumainn/master

updated for latest node details template
This commit is contained in:
Jordan OMara 2014-07-31 13:14:35 -04:00
commit 8f04e9c62a

View File

@ -1,9 +1,9 @@
{% extends 'infrastructure/base.html' %} {% extends 'infrastructure/base.html' %}
{% load i18n %} {% load i18n %}
{% block title %}{% trans 'Node Details' %}{% endblock %} {% block title %}{{ title }}{% endblock %}
{% block page_header %} {% block page_header %}
{% include 'horizon/common/_page_header.html' with title=_('Node Details') %} {% include 'horizon/common/_page_header.html' with title=title %}
{% endblock page_header %} {% endblock page_header %}
{% block js %} {% block js %}
@ -13,42 +13,14 @@
{% endblock %} {% endblock %}
{% block main %} {% block main %}
<div class="row-fluid"> <div class="node node-details">
<div class="span12"> <div class="node-title">
<dl class="clearfix"> <dl>
<dt>{% trans "Power state" %}</dt> <span class="powerstate">{% trans "Powered" %} {{ node.power_state|default:"&mdash;" }}</span>
<dd>{{ node.power_state|default:"&mdash;" }}</dd>
</dl> </dl>
</div> </div>
</div>
<div class="row-fluid"> <div class="node node-deployment">
<div class="span6">
<h4>{% trans "Inventory" %}</h4>
<dl class="clearfix">
<dt>{% trans "Node UUID" %}</dt>
<dd>{{ node.uuid|default:"&mdash;" }}</dd>
<dt>{% trans "Driver" %}</dt>
<dd>
{{ node.driver|default:"&mdash;" }}<br />
<b>IP Address:</b> {{ node.driver_info.ipmi_address|default:"&mdash;" }}<br />
<b>IPMI User:</b> {{ node.driver_info.ipmi_username|default:"&mdash;" }}
</dd>
<dt>{% trans "Network Cards" %}</dt>
<dd>
{{ node.addresses|length }}<br />
{% for address in node.addresses %}
{{ address }}<br />
{% endfor %}
</dd>
<dt>{% trans "Registered HW" %}</dt>
<dd>
{{ node.cpus|default:"&mdash;" }} {% trans "CPU" %}<br />
{{ node.memory_mb|default:"&mdash;" }} {% trans "RAM (MB)" %}<br />
{{ node.local_gb|default:"&mdash;" }} {% trans "HDD (GB)" %}
</dd>
</dl>
</div>
<div class="span6">
<h4>{% trans "Deployment" %}</h4> <h4>{% trans "Deployment" %}</h4>
<dl class="clearfix"> <dl class="clearfix">
<dt>{% trans "Deployment Role" %}</dt> <dt>{% trans "Deployment Role" %}</dt>
@ -70,24 +42,52 @@
<dd>{{ node.instance_uuid|default:"&mdash;" }}</dd> <dd>{{ node.instance_uuid|default:"&mdash;" }}</dd>
</dl> </dl>
</div> </div>
</div>
{% if node.uuid %} <div class="node node-detail">
<div> <h4>{% trans "Inventory" %}</h4>
<h2>{% trans "Content" %}</h2> <dl>
<div ng-controller="ErrataController"> <dt>{% trans "Node UUID" %}</dt>
<div satellite-errata uuid="'{{ node.uuid }}'"></div> <dd>{{ node.uuid|default:"&mdash;" }}</dd>
<dt>{% trans "Driver" %}</dt>
<dd class="dropdown">
<span class="dropdown-toggle" type="button" data-toggle="dropdown">
{{ node.driver|default:"&mdash;" }}
<span class="caret"></span>
</span>
<ul class="dropdown-menu">
<li><dt>IP Address</dt> <dd>{{ node.driver_info.ipmi_address|default:"&mdash;" }}</dd></li>
<li><dt>IPMI User</dt> <dd>{{ node.driver_info.ipmi_username|default:"&mdash;" }}</dd></li>
</ul>
</dd>
<dt>{% trans "Network Cards" %}</dt>
<dd class="dropdown">
<span class="dropdown-toggle" type="button" data-toggle="dropdown">
{{ node.addresses|length }}
<span class="caret"></span>
</span>
<ul class="dropdown-menu">
{% for address in node.addresses %}
<li>{{ address }}</li>
{% endfor %}
</ul>
</dd>
<dt>{% trans "Registered HW" %}</dt>
<dd>
{{ node.cpus|default:"&mdash;" }} {% trans "CPU" %}<br />
{{ node.memory_mb|default:"&mdash;" }} {% trans "RAM (MB)" %}<br />
{{ node.local_gb|default:"&mdash;" }} {% trans "HDD (GB)" %}
</dd>
</dl>
</div> </div>
</div>
{% endif %}
<h2>{% trans "Performance and Capacity" %}</h2> <div id="node-performance" class="node">
<h4>{% trans "Performance and Capacity" %}</h4>
{% if meter_conf %} {% if meter_conf %}
<br /> <br />
{% url 'horizon:infrastructure:nodes:performance' node.uuid as node_perf_url %} {% url 'horizon:infrastructure:nodes:performance' node.uuid as node_perf_url %}
<div id="ceilometer-stats"> <div id="ceilometer-stats" class="clearfix">
<form class="form-horizontal" id="linechart_general_form"> <form class="form-horizontal" id="linechart_general_form">
<div class="control-group"> <div class="control-group">
<label for="date_options" class="control-label">{% trans "Period" %}:&nbsp;</label> <label for="date_options" class="control-label">{% trans "Period" %}:&nbsp;</label>
@ -96,8 +96,8 @@
id="date_options" id="date_options"
name="date_options" name="date_options"
class="span2"> class="span2">
<option value="1">{% trans "Last day" %}</option> <option value="1" selected="selected">{% trans "Last day" %}</option>
<option value="7" selected="selected">{% trans "Last week" %}</option> <option value="7">{% trans "Last week" %}</option>
<option value="{% now 'j' %}">{% trans "Month to date" %}</option> <option value="{% now 'j' %}">{% trans "Month to date" %}</option>
<option value="15">{% trans "Last 15 days" %}</option> <option value="15">{% trans "Last 15 days" %}</option>
<option value="30">{% trans "Last 30 days" %}</option> <option value="30">{% trans "Last 30 days" %}</option>
@ -126,9 +126,9 @@
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
if (typeof $ !== 'undefined') { if (typeof $ !== 'undefined') {
show_hide_datepickers(); show_hide_datepickers();
} else { } else {
@ -154,25 +154,30 @@
$("#date_from, #date_to").hide(); $("#date_from, #date_to").hide();
} }
} }
</script> </script>
<div class="clear"></div> <div id="node-charts" class="clearfix">
<div> {% for meter_label, url_part, y_max in meter_conf %}
<table> <div class="span3">
{% for meter_label, url_part in meter_conf %} {% include "infrastructure/_performance_chart.html" with label=meter_label y_max=y_max url=node_perf_url|add:"?"|add:url_part only %}
{% if forloop.counter == 1 or forloop.counter == 4 %} </div>
<tr>
{% endif %}
<td>
{% include "infrastructure/_performance_chart.html" with label=meter_label url=node_perf_url|add:"?"|add:url_part only %}
</td>
{% if forloop.counter == 3 or forloop.counter == 5 %}
</tr>
{% endif %}
{% endfor %} {% endfor %}
</table>
{% else %}
{% trans 'Metering service is not enabled.' %}
{% endif %}
</div>
</div>
{% if node.uuid %}
<br />
<br />
<div>
<h4>{% trans "Errata" %}</h4>
<div ng-controller="ErrataController">
<div satellite-errata uuid="'{{ node.uuid }}'"></div>
</div>
</div> </div>
{% else %}
Metering service is not enabled.
{% endif %} {% endif %}
{% endblock %} {% endblock %}