release 2.010002
This commit is contained in:
@@ -40,10 +40,8 @@
|
||||
<td class="nd_center-cell">[% row.started_stamp | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.finished_stamp | html_entity %]</td>
|
||||
<td class="nd_center-cell">
|
||||
<form name="del" class="nd_inline-form">
|
||||
<input name="job" type="hidden" value="[% row.job | html_entity %]">
|
||||
<button class="btn" name="del" type="submit"><i class="icon-trash text-error"></i></button>
|
||||
</form>
|
||||
<input data-form="del" name="job" type="hidden" value="[% row.job | html_entity %]">
|
||||
<button class="btn nd_adminbutton" name="del" type="submit"><i class="icon-trash text-error"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
|
||||
@@ -9,33 +9,29 @@
|
||||
</thead>
|
||||
</tbody>
|
||||
<tr>
|
||||
<form name="add">
|
||||
<td class="nd_center-cell"><input name="dns" type="text"></td>
|
||||
<td class="nd_center-cell"><input name="ip" type="text"></td>
|
||||
<td class="nd_center-cell"><input name="ports" type="number"></td>
|
||||
<td class="nd_center-cell"><input data-form="add" name="dns" type="text"></td>
|
||||
<td class="nd_center-cell"><input data-form="add" name="ip" type="text"></td>
|
||||
<td class="nd_center-cell"><input data-form="add" name="ports" type="number"></td>
|
||||
<td class="nd_center-cell">
|
||||
<button class="btn btn-small" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button>
|
||||
<button class="btn btn-small nd_adminbutton" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
[% WHILE (row = results.next) %]
|
||||
<tr>
|
||||
<form name="update">
|
||||
<td class="nd_center-cell"><a class="nd_linkcell"
|
||||
href="[% uri_for('/device') %]?q=[% row.dns | uri %]">[% row.dns | html_entity %]</a></td>
|
||||
<td class="nd_center-cell">[% row.ip | html_entity %]</td>
|
||||
<td class="nd_center-cell"><input name="ports" type="number" value="[% row.port_count | html_entity %]"></td>
|
||||
<td class="nd_center-cell">
|
||||
<input name="dns" type="hidden" value="[% row.dns | html_entity %]">
|
||||
<input name="ip" type="hidden" value="[% row.ip | html_entity %]">
|
||||
<button class="btn" name="update" type="submit"><i class="icon-save text-warning"></i></button>
|
||||
</form>
|
||||
<form name="del" class="nd_inline-form">
|
||||
<input name="dns" type="hidden" value="[% row.dns | html_entity %]">
|
||||
<input name="ip" type="hidden" value="[% row.ip | html_entity %]">
|
||||
<input name="ports" type="hidden" value="[% row.port_count | html_entity %]">
|
||||
<button class="btn" name="del" type="submit"><i class="icon-trash text-error"></i></button>
|
||||
</form>
|
||||
<input data-form="update" name="ports" type="number" value="[% row.port_count | html_entity %]">
|
||||
</td>
|
||||
<td class="nd_center-cell">
|
||||
<input data-form="update" name="dns" type="hidden" value="[% row.dns | html_entity %]">
|
||||
<input data-form="update" name="ip" type="hidden" value="[% row.ip | html_entity %]">
|
||||
<button class="btn nd_adminbutton" name="update" type="submit"><i class="icon-save text-warning"></i></button>
|
||||
<input data-form="del" name="dns" type="hidden" value="[% row.dns | html_entity %]">
|
||||
<input data-form="del" name="ip" type="hidden" value="[% row.ip | html_entity %]">
|
||||
<input data-form="del" name="ports" type="hidden" value="[% row.port_count | html_entity %]">
|
||||
<button class="btn nd_adminbutton" name="del" type="submit"><i class="icon-trash text-error"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
|
||||
@@ -10,39 +10,36 @@
|
||||
</thead>
|
||||
</tbody>
|
||||
<tr>
|
||||
<form name="add">
|
||||
<td class="nd_center-cell">
|
||||
<div class="input-append">
|
||||
<input class="nd_topo_dev nd_topo_dev1" name="dev1" type="text">
|
||||
<input data-form="add" class="nd_topo_dev nd_topo_dev1" name="dev1" type="text">
|
||||
<span class="add-on nd_topo_dev_caret"><i class="icon-caret-down icon-large"></i></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="nd_center-cell">
|
||||
<div class="input-append">
|
||||
<input class="nd_topo_port nd_topo_dev1" name="port1" type="text">
|
||||
<input data-form="add" class="nd_topo_port nd_topo_dev1" name="port1" type="text">
|
||||
<span class="add-on nd_topo_port_caret"><i class="icon-caret-down icon-large"></i></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="nd_center-cell">
|
||||
<div class="input-append">
|
||||
<input class="nd_topo_dev nd_topo_dev2" name="dev2" type="text">
|
||||
<input data-form="add" class="nd_topo_dev nd_topo_dev2" name="dev2" type="text">
|
||||
<span class="add-on nd_topo_dev_caret"><i class="icon-caret-down icon-large"></i></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="nd_center-cell">
|
||||
<div class="input-append">
|
||||
<input class="nd_topo_port nd_topo_dev2" name="port2" type="text">
|
||||
<input data-form="add" class="nd_topo_port nd_topo_dev2" name="port2" type="text">
|
||||
<span class="add-on nd_topo_port_caret"><i class="icon-caret-down icon-large"></i></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="nd_center-cell">
|
||||
<button class="btn btn-small" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button>
|
||||
<button class="btn btn-small nd_adminbutton" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
[% WHILE (row = results.next) %]
|
||||
<tr>
|
||||
<form name="del">
|
||||
<td class="nd_center-cell"><a class="nd_linkcell"
|
||||
href="[% uri_for('/device') %]?q=[% row.dev1 | uri %]">[% row.dev1 | html_entity %]</a></td>
|
||||
<td class="nd_center-cell">[% row.port1 | html_entity %]</td>
|
||||
@@ -50,12 +47,11 @@
|
||||
href="[% uri_for('/device') %]?q=[% row.dev2 | uri %]">[% row.dev2 | html_entity %]</a></td>
|
||||
<td class="nd_center-cell">[% row.port2 | html_entity %]</td>
|
||||
<td class="nd_center-cell">
|
||||
<input name="dev1" type="hidden" value="[% row.dev1 | html_entity %]">
|
||||
<input name="port1" type="hidden" value="[% row.port1 | html_entity %]">
|
||||
<input name="dev2" type="hidden" value="[% row.dev2 | html_entity %]">
|
||||
<input name="port2" type="hidden" value="[% row.port2 | html_entity %]">
|
||||
<button class="btn" name="del" type="submit"><i class="icon-trash text-error"></i></button>
|
||||
</form>
|
||||
<input data-form="del" name="dev1" type="hidden" value="[% row.dev1 | html_entity %]">
|
||||
<input data-form="del" name="port1" type="hidden" value="[% row.port1 | html_entity %]">
|
||||
<input data-form="del" name="dev2" type="hidden" value="[% row.dev2 | html_entity %]">
|
||||
<input data-form="del" name="port2" type="hidden" value="[% row.port2 | html_entity %]">
|
||||
<button class="btn nd_adminbutton" name="del" type="submit"><i class="icon-trash text-error"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
|
||||
@@ -210,7 +210,9 @@
|
||||
<a href="[% uri_for('/device',
|
||||
self_options) %]&q=[% row.neighbor.dns || row.neighbor.ip | uri %]&f=[% row.remote_port | uri %]">
|
||||
[% row.neighbor.dns.remove(settings.domain_suffix) || row.neighbor.ip | html_entity %]
|
||||
([% row.remote_port | html_entity %])</a>
|
||||
([% row.remote_port | html_entity %]
|
||||
[% ' id: '_ row.remote_id IF row.remote_id %]
|
||||
[% ' type: '_ row.remote_type IF row.remote_type %])</a>
|
||||
[% ELSIF row.remote_ip AND row.remote_port %]
|
||||
<span class="label label-important">N</span>
|
||||
<a href="[% search_node %]&q=[% row.remote_ip | uri %]">
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
});
|
||||
|
||||
// job control refresh icon should reload the page
|
||||
$('#nd_countdown-refresh').click(function() {
|
||||
$('#nd_countdown-refresh').click(function(event) {
|
||||
event.preventDefault();
|
||||
for (var i = 0; i < nd_timers.length; i++) {
|
||||
clearTimeout(nd_timers[i]);
|
||||
@@ -89,7 +89,7 @@
|
||||
});
|
||||
|
||||
// job control pause/play icon switcheroo
|
||||
$('#nd_countdown-control').click(function() {
|
||||
$('#nd_countdown-control').click(function(event) {
|
||||
event.preventDefault();
|
||||
var icon = $('#nd_countdown-control-icon');
|
||||
icon.toggleClass('icon-pause icon-play text-error text-success');
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
// activity for admin task tables
|
||||
// dynamically bind to all forms in the table
|
||||
$(target).on('submit', 'form', function() {
|
||||
$(target).on('click', '.nd_adminbutton', function(event) {
|
||||
// stop form from submitting normally
|
||||
event.preventDefault();
|
||||
|
||||
@@ -116,13 +116,16 @@
|
||||
clearTimeout(nd_timers[i]);
|
||||
}
|
||||
|
||||
// what purpose - add/update/del
|
||||
var mode = $(this).attr('name')
|
||||
|
||||
// submit the query and put results into the tab pane
|
||||
$.ajax({
|
||||
type: 'POST'
|
||||
,async: true
|
||||
,dataType: 'html'
|
||||
,url: uri_base + '/ajax/control/admin/' + tab + '/' + $(this).attr('name')
|
||||
,data: $(this).serializeArray()
|
||||
,url: uri_base + '/ajax/control/admin/' + tab + '/' + mode
|
||||
,data: $(this).closest('tr').find('input[data-form="' + mode + '"]').serializeArray()
|
||||
,beforeSend: function() {
|
||||
$(target).html(
|
||||
'<div class="span2 alert">Request submitted...</div>'
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
// clickable device port names can simply resubmit AJAX rather than
|
||||
// fetch the whole page again.
|
||||
$('#ports_pane').on('click', '.nd_this-port-only', function() {
|
||||
$('#ports_pane').on('click', '.nd_this-port-only', function(event) {
|
||||
event.preventDefault(); // link is real so prevent page submit
|
||||
|
||||
var port = $(this).text();
|
||||
@@ -120,7 +120,7 @@
|
||||
});
|
||||
|
||||
// activity for contenteditable control
|
||||
$('.tab-content').on('keydown', '[contenteditable=true]', function() {
|
||||
$('.tab-content').on('keydown', '[contenteditable=true]', function(event) {
|
||||
var esc = event.which == 27,
|
||||
nl = event.which == 13;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user