| {% load admin_static %} |
| |
| <script> |
| admin_object_name = "{{ opts.object_name }}"; |
| admin_object_id = "{{ original.id }}"; |
| admin_object_controller = "princeton"; // 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="avgLoad" id="miniDashAvgLoad" class="minidashbutton">--</button> |
| <label for="avgLoad" id="miniDashAvgLoadLabel">Average Load</label> |
| </div> |
| <div class="miniDashPair"> |
| <button type="button" name="bandwidth" id="miniDashBandwidth" class="minidashbutton">--</button> |
| <label for="bandwidth" id="miniDashBandwidthLabel">Bandwidth</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 %} |