Merge branch 'master' into og-autoload
This commit is contained in:
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 || '';
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user