blob: 5c08401d9b64a2998ab75541f18052b27f53f65f [file] [log] [blame]
{% load admin_static %}
<script>
admin_object_name = "{{ opts.object_name }}";
admin_object_id = "{{ original.id }}";
admin_object_controller = "princeton-beta"; // XXX fix this
if (admin_object_id == "") {
admin_object_id = undefined;
} else {
admin_object_id = parseInt(admin_object_id, 10);
}
{% if opts.object_name == "Site" %}
admin_controller_sites = [];
{% for record in original.controllersite.all %}
admin_controller_sites.push( {{ record.id }} );
{% endfor %}
{% endif %}
{% if opts.object_name == "Slice" %}
admin_controller_slices = [];
{% for record in original.controllerslice.all %}
admin_controller_slices.push( {{ record.id }} );
{% endfor %}
{% endif %}
</script>
{% if not DISABLE_MINIDASHBOARD %}
<div id="newMiniDashboard">
<div class="hide" id="selectedMainNav">{{ opts.verbose_name_plural|capfirst }}</div>
<div class="hide" id="currentOriginalNode">{{ original|truncatewords:"18" }}</div>
<div class="hide" id="minidashStatus"></div>
<!-- <div class="miniDashPair">
<button type="button" name="nodeCount" id="miniDashNodeCount" class="minidashbutton">--</button>
<label for="nodeCount" id="miniDashNodeCountLabel">Active Nodes</label>
</div> -->
<div class="miniDashPair">
<button type="button" name="CPU" id="miniDashCPU" class="minidashbutton">--</button>
<label for="CPU" id="miniDashAvgLoadLabel">CPU</label>
</div>
<div class="miniDashPair">
<button type="button" name="bandwidthIn" id="miniDashBandwidthIn" class="minidashbutton">--</button>
<label for="bandwidthIn" id="miniDashBandwidthLabel">Bandwidth In</label>
</div>
<div class="miniDashPair">
<button type="button" name="bandwidthOut" id="miniDashBandwidthOut" class="minidashbutton">--</button>
<label for="bandwidthOut" id="miniDashBandwidthLabel">Bandwidth Out</label>
</div>
<div class="endDashPair">
</div>
</div>
<div id="nodeCountDialog" class="miniDashModal" >
<div id="nodeCountGraph" ></div>
</div>
<div id="bandwidthDialog" class="miniDashModal" >
<div id="bandwidthGraph" ></div>
</div>
<div id="avgLoadDialog" class="miniDashModal" >
<div id="avgLoadGraph" ></div>
</div>
<script src="{% static 'page_analytics.js' %}"></script>
{% endif %}