Merge branch 'master' into og-autoload
This commit is contained in:
		| @@ -119,6 +119,8 @@ arpnip_min_age: 0 | ||||
| nbtstat_no: [] | ||||
| nbtstat_only: [] | ||||
| nbtstat_max_age: 7 | ||||
| nbtstat_interval: 0.02 | ||||
| nbtstat_timeout: 1 | ||||
| expire_devices: 0 | ||||
| expire_nodes: 0 | ||||
| expire_nodes_archive: 0 | ||||
| @@ -144,6 +146,7 @@ ignore_interfaces: | ||||
| ignore_private_nets: false | ||||
| reverse_sysname: false | ||||
| vlanctl: true | ||||
| portctl_nameonly: false | ||||
| portctl_nophones: false | ||||
| portctl_vlans: false | ||||
| portctl_uplinks: false | ||||
| @@ -165,7 +168,7 @@ port_control_reasons: | ||||
| # -------------- | ||||
|  | ||||
| workers: | ||||
|   interactives: 2 | ||||
|   interactives: 1 | ||||
|   pollers: 10 | ||||
|   sleep_time: 2 | ||||
|   queue: PostgreSQL | ||||
| @@ -210,6 +213,50 @@ job_type_keys: | ||||
|   Poller: pollers | ||||
|   Interactive: interactives | ||||
|  | ||||
| # --------------- | ||||
| # GraphViz Export | ||||
| # --------------- | ||||
|  | ||||
| graph: | ||||
|   # ---- Graph Settings ---- | ||||
|   edge_color      : wheat | ||||
|  | ||||
|   graph           : 'graph/netmap.gif' | ||||
|   graph_png       : 'graph/netmap.png' | ||||
|   graph_bg        : black | ||||
|   graph_clusters  : false  # try fdp layout | ||||
|   graph_color     : white | ||||
|   graph_default   : png | ||||
|   #graph_dir      : net_dir.gif | ||||
|   graph_epsilon   : 6 | ||||
|   graph_layout    : twopi  # try neato or fdp too | ||||
|   graph_map       : 'graph/netmap.map' | ||||
|   graph_overlap   : scale | ||||
|   graph_nodesep   : 2 | ||||
|   graph_ranksep   : .3 | ||||
|   graph_raw       : 'graph/graph_raw.dot' | ||||
|   graph_splines   : false | ||||
|   graph_svg       : 'graph/netmap.svg' | ||||
|   graph_timeout   : 90 | ||||
|   graph_x         : 30 | ||||
|   graph_y         : 30 | ||||
|  | ||||
|   node_fillcolor  : dimgrey | ||||
|   node_font       : lucon | ||||
|   node_fontsize   : 46.0 | ||||
|   node_fontcolor  : white | ||||
|   node_problem    : red | ||||
|   node_shape      : box | ||||
|   node_style      : filled | ||||
|   #edge_style      : setlinewidth(10) | ||||
|  | ||||
|   # ---- Node Maps ---- | ||||
|   # variable:matching pattern:node attribute:attribute value:key:key name | ||||
|   #node_map: | ||||
|   #  - 'label:cat(?!-g):fillcolor:blue:cat:Blue Box - Catalyst Device' | ||||
|   #  - 'label:-g:fillcolor:darkgreen:dev-g:Green Box - Gateway / Router' | ||||
|   #  - 'ip:^192.168\.:color:yellow:dev:Yellow Border - ResNet' | ||||
|  | ||||
| # --------------- | ||||
| # DANCER INTERNAL | ||||
| # --------------- | ||||
|   | ||||
							
								
								
									
										92
									
								
								Netdisco/share/views/ajax/admintask/nodemonitor.tt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								Netdisco/share/views/ajax/admintask/nodemonitor.tt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,92 @@ | ||||
| <table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0"> | ||||
|   <thead> | ||||
|     <tr> | ||||
|       <th class="nd_center-cell">Date Added</th> | ||||
|       <th class="nd_center-cell">MAC Address</th> | ||||
|       <th class="nd_center-cell">Enabled</th> | ||||
|       <th class="nd_center-cell">Reason</th> | ||||
|       <th class="nd_center-cell">Email</th> | ||||
|       <th class="nd_center-cell">Action</th> | ||||
|     </tr> | ||||
|   </thead> | ||||
|   </tbody> | ||||
|     <tr> | ||||
|       <td class="nd_center-cell"></td> | ||||
|       <td class="nd_center-cell"><input data-form="add" name="mac" type="text"></td> | ||||
|       <td class="nd_center-cell"><input data-form="add" name="active" type="checkbox" checked></td> | ||||
|       <td class="nd_center-cell"><input data-form="add" name="why" type="text"></td> | ||||
|       <td class="nd_center-cell"><input data-form="add" name="cc"  type="email"></td> | ||||
|       <td class="nd_center-cell"> | ||||
|         <button class="btn btn-small nd_adminbutton" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button> | ||||
|       </td> | ||||
|     </tr> | ||||
|  | ||||
|     [% SET count = 0 %] | ||||
|     [% WHILE (row = results.next) %] | ||||
|     [% SET count = count + 1 %] | ||||
|     <tr> | ||||
|       <td class="nd_center-cell">[% row.date | html_entity %]</td> | ||||
|       <td class="nd_center-cell"> | ||||
|         <input data-form="update" name="mac" type="text" value="[% row.mac | html_entity %]"> | ||||
|       </td> | ||||
|       <td class="nd_center-cell"> | ||||
|         <input data-form="update" name="active" type="checkbox" [% 'checked="checked"' IF row.active %]> | ||||
|       </td> | ||||
|       <td class="nd_center-cell"> | ||||
|         <input data-form="update" name="why" type="text" value="[% row.why | html_entity %]"> | ||||
|       </td> | ||||
|       <td class="nd_center-cell"> | ||||
|         <input data-form="update" name="cc" type="email" value="[% row.cc | html_entity %]"> | ||||
|       </td> | ||||
|  | ||||
|       <td class="nd_center-cell"> | ||||
|         <button class="btn nd_adminbutton" name="update" type="submit"><i class="icon-save text-warning"></i></button> | ||||
|  | ||||
|         <button class="btn" data-toggle="modal" | ||||
|           data-target="#nd_devdel-[% count %]" type="button"><i class="icon-trash text-error"></i></button> | ||||
|  | ||||
|         <div id="nd_devdel-[% count %]" class="nd_modal nd_deep-horizon modal hide fade" tabindex="-1" | ||||
|           role="dialog" aria-labelledby="nd_devdel-label-[% count %]" aria-hidden="true"> | ||||
|           <div class="modal-header"> | ||||
|             <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> | ||||
|             <h3 id="nd_devdel-label-[% count %]">Are you sure?</h3> | ||||
|           </div> | ||||
|           <div class="modal-body"> | ||||
|             <blockquote> | ||||
|               <p class="text-info">Monitor for "[% row.mac | html_entity %]" will be removed.</p> | ||||
|             </blockquote> | ||||
|             <input data-form="del" name="mac" type="hidden" value="[% row.mac | html_entity %]"> | ||||
|           </div> | ||||
|           <div class="modal-footer"> | ||||
|             <button class="btn btn-success" data-dismiss="modal" aria-hidden="true">Cancel</button> | ||||
|             <button class="btn btn-danger nd_adminbutton" name="del" data-dismiss="modal">Confirm</button> | ||||
|           </div> | ||||
|         </div> | ||||
|       </td> | ||||
|     </tr> | ||||
|     [% END %] | ||||
|   </tbody> | ||||
| </table> | ||||
|  | ||||
| <script> | ||||
| $(document).ready(function() { | ||||
|   $('#data-table').dataTable({ | ||||
|     "stateSave": true, | ||||
|     "pageLength": [% settings.table_pagesize %], | ||||
|     "language": { | ||||
|       "search": 'Filter records: ' | ||||
|     }, | ||||
|     "columnDefs": [  | ||||
|       { | ||||
|         "targets": [ 0, 2, 5 ], | ||||
|         "searchable": false | ||||
|       }, | ||||
|       { | ||||
|         "targets": [ 0, 2, 5 ], | ||||
|         "orderable": false | ||||
|       } | ||||
|     ] | ||||
|   } ); | ||||
| } ); | ||||
| </script> | ||||
|  | ||||
| @@ -25,7 +25,7 @@ $(document).ready(function() { | ||||
|     }, | ||||
|     "serverSide": true, | ||||
|     "order": [[ 0, "desc" ]], | ||||
|     "ajax": "/ajax/control/admin/userlog/data", | ||||
|     "ajax": "[% uri_for('/ajax/control/admin/userlog/data') %]", | ||||
|     "columns": [{ | ||||
|       "data": 'creation', | ||||
|       "className": "nd_center-cell", | ||||
|   | ||||
| @@ -60,12 +60,14 @@ | ||||
|       [% IF user_can_port_control AND params.c_admin %] | ||||
|       [% IF row.up_admin == 'up' %] | ||||
|       <td nowrap class="nd_editable-cell" data-action="down" | ||||
|         data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]" | ||||
|         data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]"> | ||||
|         <i class="icon-hand-down nd_hand-icon" | ||||
|           rel="tooltip" data-placement="top" data-offset="3" | ||||
|           data-animation="" data-title="Click to Disable"></i> | ||||
|       [% ELSE %] | ||||
|       <td nowrap class="nd_editable-cell" data-action="up" | ||||
|         data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]" | ||||
|         data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]"> | ||||
|         <i class="icon-hand-up nd_hand-icon" | ||||
|           rel="tooltip" data-placement="top" data-offset="3" | ||||
| @@ -78,7 +80,7 @@ | ||||
|             data-animation="" data-title="View Port Log"></i> | ||||
|         </a> | ||||
|       [% ELSE %] | ||||
|       <td nowrap> | ||||
|       <td nowrap data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]"> | ||||
|       [% END %] | ||||
|         <a class="nd_this-port-only nd_port-only-first" href="[% uri_for('/device', | ||||
|             self_options) %]&q=[% params.q | uri %]&f=[% row.port | uri %]&prefer=port"> | ||||
|   | ||||
| @@ -45,7 +45,7 @@ $(document).ready(function() { | ||||
|       "search": 'Filter records: ' | ||||
|     }, | ||||
|     "serverSide": true, | ||||
|     "ajax": '/ajax/content/report/apradiochannelpower/data', | ||||
|     "ajax": "[% uri_for('/ajax/content/report/apradiochannelpower/data') %]", | ||||
|     "order": [[ 0, 'asc' ]], | ||||
|     "columns": [ | ||||
|       { | ||||
|   | ||||
| @@ -25,7 +25,7 @@ $(document).ready(function() { | ||||
|       { | ||||
|         "data": 'ip', | ||||
|         "render": function(data, type, row, meta) { | ||||
|             return '<a search_device %]&q=' + encodeURIComponent(data) + '">' + he.encode(row.ip || row.name) + '</a>'; | ||||
|             return '<a href="[% search_device %]&q=' + encodeURIComponent(data) + '">' + he.encode(row.name || row.ip) + '</a>'; | ||||
|           } | ||||
|       }, { | ||||
|         "data": 'dns', | ||||
|   | ||||
| @@ -71,7 +71,7 @@ $(document).ready(function() { | ||||
|       "search": 'Filter records: ' | ||||
|     }, | ||||
|     "serverSide": true, | ||||
|     "ajax": '/ajax/content/report/devicepoestatus/data', | ||||
|     "ajax": "[% uri_for('/ajax/content/report/devicepoestatus/data') %]", | ||||
|     "order": [[ 0, 'asc' ]], | ||||
|     "columns": [ | ||||
|       { | ||||
|   | ||||
| @@ -25,11 +25,15 @@ $(document).ready(function() { | ||||
|         "data": 'ip', | ||||
|         "render": function(data, type, row, meta) { | ||||
|           var cell_str = he.encode(data); | ||||
|           if (row.time_last && row.node) { | ||||
|             cell_str = '<a href="[% search_node %]&q=' + encodeURIComponent(data) + (row.active ? '' : '&archived=on') + '">' + he.encode(data) + (row.active ? '' : ' <i class="icon-book text-warning"></i> ') + '</a>'; | ||||
|           } | ||||
|           else if (row.time_last) { | ||||
|             cell_str = '<a href="[% search_device %]&q=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>'; | ||||
|           if (type == 'display') { | ||||
|             if (row.time_last && row.node) { | ||||
|               cell_str = '<a href="[% search_node %]&q=' + encodeURIComponent(data) | ||||
|                 + (row.active ? '' : '&archived=on') + '">' + he.encode(data) | ||||
|                 + (row.active ? '' : ' <i class="icon-book text-warning"></i> ') + '</a>'; | ||||
|             } | ||||
|             else if (row.time_last) { | ||||
|               cell_str = '<a href="[% search_device %]&q=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>'; | ||||
|             } | ||||
|           } | ||||
|           return cell_str; | ||||
|         } | ||||
|   | ||||
| @@ -40,7 +40,7 @@ $(document).ready(function() { | ||||
|     "serverSide": true, | ||||
|     "searching": false, | ||||
|     "order": [[ 0, "desc" ]], | ||||
|     "ajax": '/ajax/content/report/moduleinventory/data?[% url(params('query').hash) %]', | ||||
|     "ajax": "[% uri_for('/ajax/content/report/moduleinventory/data') %]?[% url(params('query').hash) %]", | ||||
|     "columns": [ | ||||
|       { | ||||
|       "data": 'ip', | ||||
|   | ||||
| @@ -35,7 +35,7 @@ $(document).ready(function() { | ||||
|     [% IF opt %] | ||||
|     "serverSide": true, | ||||
|     "order": [[ 0, "desc" ]], | ||||
|     "ajax": '/ajax/content/report/netbios/data?[% url(params('query').hash) %]', | ||||
|     "ajax": "[% uri_for('/ajax/content/report/netbios/data') %]?[% url(params('query').hash) %]", | ||||
|     "columns": [ | ||||
|       { | ||||
|         "data": 'domain', | ||||
|   | ||||
| @@ -35,7 +35,7 @@ $(document).ready(function() { | ||||
|     [% IF opt %] | ||||
|     "serverSide": true, | ||||
|     "order": [[ 0, "desc" ]], | ||||
|     "ajax": '/ajax/content/report/nodevendor/data?[% url(params('query').hash) %]', | ||||
|     "ajax": "[% uri_for('/ajax/content/report/nodevendor/data') %]?[% url(params('query').hash) %]", | ||||
|     "columns": [ | ||||
|       { | ||||
|         "data": 'mac', | ||||
|   | ||||
| @@ -42,7 +42,7 @@ $(document).ready(function() { | ||||
|       }, { | ||||
|         "data": 'port_vlans.vlan', | ||||
|         "render": function(data, type, row, meta) { | ||||
|           return data; | ||||
|           return data || ''; | ||||
|         } | ||||
|       } | ||||
|     ] | ||||
|   | ||||
| @@ -13,17 +13,21 @@ | ||||
|         </thead> | ||||
|         <tbody> | ||||
|           [% FOREACH platform IN models.all %] | ||||
|           [% NEXT UNLESS platform.vendor AND platform.model %] | ||||
|           [% NEXT UNLESS platform.vendor OR platform.model %] | ||||
|           <tr> | ||||
|             <th> | ||||
|               [% IF platform.vendor %] | ||||
|               <a class="nd_linkcell" | ||||
|                 href="[% search_device %]&q=[% platform.vendor | uri %]&vendor=[% platform.vendor | uri %]"> | ||||
|                   [% platform.vendor | html_entity %]</a> | ||||
|               [% ELSE %]unknown[% END %] | ||||
|             </th> | ||||
|             <th> | ||||
|               [% IF platform.model %] | ||||
|               <a class="nd_linkcell" | ||||
|                 href="[% search_device %]&q=[% platform.model | uri %]&model=[% platform.model | uri %]"> | ||||
|                   [% platform.model | html_entity %]</a> | ||||
|               [% ELSE %]unknown[% END %] | ||||
|             </th> | ||||
|             <th>[% platform.get_column('count') | html_entity %]</th> | ||||
|           </tr> | ||||
| @@ -43,13 +47,15 @@ | ||||
|         </thead> | ||||
|         <tbody> | ||||
|           [% FOREACH release IN releases.all %] | ||||
|           [% NEXT UNLESS (release.os AND release.os_ver) %] | ||||
|           [% NEXT UNLESS (release.os OR release.os_ver) %] | ||||
|           <tr> | ||||
|             <th>[% release.os | html_entity %]</th> | ||||
|             <th>[% release.os || 'unknown' | html_entity %]</th> | ||||
|             <th> | ||||
|               [% IF release.os_ver %] | ||||
|               <a class="nd_linkcell" | ||||
|                 href="[% search_device %]&q=[% release.os_ver | uri %]&os_ver=[% release.os_ver | uri %]"> | ||||
|                   [% release.os_ver | html_entity %]</a> | ||||
|               [% ELSE %]unknown[% END %] | ||||
|             </th> | ||||
|             <th>[% release.get_column('count') | html_entity %]</th> | ||||
|           </tr> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user