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 | 9b1f2a0 | 2015-01-13 09:46:52 -0800 | [diff] [blame^] | 6 | admin_object_controller = "princeton-beta"; // 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 | 9b1f2a0 | 2015-01-13 09:46:52 -0800 | [diff] [blame^] | 32 | <!-- <div class="miniDashPair"> |
Scott Baker | 38ece4a | 2014-03-27 09:08:36 -0700 | [diff] [blame] | 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 | 9b1f2a0 | 2015-01-13 09:46:52 -0800 | [diff] [blame^] | 35 | </div> --> |
| 36 | <div class="miniDashPair"> |
| 37 | <button type="button" name="CPU" id="miniDashCPU" class="minidashbutton">--</button> |
| 38 | <label for="CPU" id="miniDashAvgLoadLabel">CPU</label> |
Scott Baker | 38ece4a | 2014-03-27 09:08:36 -0700 | [diff] [blame] | 39 | </div> |
| 40 | <div class="miniDashPair"> |
Scott Baker | 9b1f2a0 | 2015-01-13 09:46:52 -0800 | [diff] [blame^] | 41 | <button type="button" name="bandwidthIn" id="miniDashBandwidthIn" class="minidashbutton">--</button> |
| 42 | <label for="bandwidthIn" id="miniDashBandwidthLabel">Bandwidth In</label> |
Scott Baker | 38ece4a | 2014-03-27 09:08:36 -0700 | [diff] [blame] | 43 | </div> |
| 44 | <div class="miniDashPair"> |
Scott Baker | 9b1f2a0 | 2015-01-13 09:46:52 -0800 | [diff] [blame^] | 45 | <button type="button" name="bandwidthOut" id="miniDashBandwidthOut" class="minidashbutton">--</button> |
| 46 | <label for="bandwidthOut" id="miniDashBandwidthLabel">Bandwidth Out</label> |
Scott Baker | 38ece4a | 2014-03-27 09:08:36 -0700 | [diff] [blame] | 47 | </div> |
| 48 | <div class="endDashPair"> |
| 49 | </div> |
| 50 | </div> |
| 51 | |
| 52 | <div id="nodeCountDialog" class="miniDashModal" > |
| 53 | <div id="nodeCountGraph" ></div> |
| 54 | </div> |
| 55 | |
| 56 | <div id="bandwidthDialog" class="miniDashModal" > |
| 57 | <div id="bandwidthGraph" ></div> |
| 58 | </div> |
| 59 | |
| 60 | <div id="avgLoadDialog" class="miniDashModal" > |
| 61 | <div id="avgLoadGraph" ></div> |
| 62 | </div> |
| 63 | |
Scott Baker | 5c4ce2b | 2014-07-08 09:35:40 -0700 | [diff] [blame] | 64 | <script src="{% static 'page_analytics.js' %}"></script> |
| 65 | |
Scott Baker | a226eb4 | 2014-06-09 11:55:26 -0700 | [diff] [blame] | 66 | {% endif %} |