Scott Baker | 5c4ce2b | 2014-07-08 09:35:40 -0700 | [diff] [blame] | 1 | {% load admin_static %} |
| 2 | |
Scott Baker | f53a0ca | 2015-01-13 00:33:45 -0800 | [diff] [blame] | 3 | <script> |
| 4 | admin_object_name = "{{ opts.object_name }}"; |
| 5 | admin_object_id = "{{ original.id }}"; |
Scott Baker | c65edf3 | 2015-01-13 01:05:09 -0800 | [diff] [blame] | 6 | admin_object_controller = "princeton"; // XXX fix this |
Scott Baker | f53a0ca | 2015-01-13 00:33:45 -0800 | [diff] [blame] | 7 | if (admin_object_id == "") { |
| 8 | admin_object_id = undefined; |
| 9 | } else { |
| 10 | admin_object_id = parseInt(admin_object_id, 10); |
| 11 | } |
| 12 | {% if opts.object_name == "Site" %} |
| 13 | admin_controller_sites = []; |
| 14 | {% for record in original.controllersite.all %} |
| 15 | admin_controller_sites.push( {{ record.id }} ); |
| 16 | {% endfor %} |
| 17 | {% endif %} |
| 18 | {% if opts.object_name == "Slice" %} |
| 19 | admin_controller_slices = []; |
| 20 | {% for record in original.controllerslice.all %} |
| 21 | admin_controller_slices.push( {{ record.id }} ); |
| 22 | {% endfor %} |
| 23 | {% endif %} |
| 24 | </script> |
| 25 | |
Scott Baker | a226eb4 | 2014-06-09 11:55:26 -0700 | [diff] [blame] | 26 | {% if not DISABLE_MINIDASHBOARD %} |
| 27 | |
Scott Baker | 38ece4a | 2014-03-27 09:08:36 -0700 | [diff] [blame] | 28 | <div id="newMiniDashboard"> |
Scott Baker | 61aefcf | 2014-04-25 15:21:18 -0700 | [diff] [blame] | 29 | <div class="hide" id="selectedMainNav">{{ opts.verbose_name_plural|capfirst }}</div> |
| 30 | <div class="hide" id="currentOriginalNode">{{ original|truncatewords:"18" }}</div> |
Scott Baker | f2c26de | 2014-06-10 20:37:40 -0700 | [diff] [blame] | 31 | <div class="hide" id="minidashStatus"></div> |
Scott Baker | 38ece4a | 2014-03-27 09:08:36 -0700 | [diff] [blame] | 32 | <div class="miniDashPair"> |
| 33 | <button type="button" name="nodeCount" id="miniDashNodeCount" class="minidashbutton">--</button> |
Scott Baker | f4f7bf9 | 2014-05-13 17:04:40 -0700 | [diff] [blame] | 34 | <label for="nodeCount" id="miniDashNodeCountLabel">Active Nodes</label> |
Scott Baker | 38ece4a | 2014-03-27 09:08:36 -0700 | [diff] [blame] | 35 | </div> |
| 36 | <div class="miniDashPair"> |
| 37 | <button type="button" name="avgLoad" id="miniDashAvgLoad" class="minidashbutton">--</button> |
| 38 | <label for="avgLoad" id="miniDashAvgLoadLabel">Average Load</label> |
| 39 | </div> |
| 40 | <div class="miniDashPair"> |
| 41 | <button type="button" name="bandwidth" id="miniDashBandwidth" class="minidashbutton">--</button> |
| 42 | <label for="bandwidth" id="miniDashBandwidthLabel">Bandwidth</label> |
| 43 | </div> |
| 44 | <div class="endDashPair"> |
| 45 | </div> |
| 46 | </div> |
| 47 | |
| 48 | <div id="nodeCountDialog" class="miniDashModal" > |
| 49 | <div id="nodeCountGraph" ></div> |
| 50 | </div> |
| 51 | |
| 52 | <div id="bandwidthDialog" class="miniDashModal" > |
| 53 | <div id="bandwidthGraph" ></div> |
| 54 | </div> |
| 55 | |
| 56 | <div id="avgLoadDialog" class="miniDashModal" > |
| 57 | <div id="avgLoadGraph" ></div> |
| 58 | </div> |
| 59 | |
Scott Baker | 5c4ce2b | 2014-07-08 09:35:40 -0700 | [diff] [blame] | 60 | <script src="{% static 'page_analytics.js' %}"></script> |
| 61 | |
Scott Baker | a226eb4 | 2014-06-09 11:55:26 -0700 | [diff] [blame] | 62 | {% endif %} |