blob: d0e9f766c49d8b024a6267f46f70286388cf8136 (
plain) (
tree)
|
|
<h1>{{lang_replaceMachinesHeading}}</h1>
<style>
.reptable {
border-collapse: separate;
border-spacing: 2px;
}
.reptable td.a {
padding: 2px;
border:1px solid #ccc;
border-radius: 3px;
background: #eee;
vertical-align: top;
}
.reptable td.b {
font-size: 300%;
}
</style>
<p>
{{lang_replaceInstructions}}
</p>
<form method="post" action="?do=statistics&show=replace">
<input type="hidden" name="token" value="{{token}}">
<table class="reptable">
<thead>
<tr>
<th>{{lang_replaceOld}}</th>
<th></th>
<th>{{lang_replaceNew}}</th>
<th></th>
</tr>
</thead>
<tbody>
{{#pairs}}
<tr>
<td class="a">
<div><b>{{oldhost}}</b> {{oldip}}</div>
<div class="slx-bold">{{oldmodel}}</div>
<div class="small">{{oldmac}} – {{olduuid}}</div>
<div>{{lang_lastSeen}}: {{oldlastseen_s}}</div>
</td>
<td class="b">→</td>
<td class="a">
<div><b>{{newhost}}</b> {{newip}}</div>
<div class="slx-bold">{{newmodel}}</div>
<div class="small">{{newmac}} – {{newuuid}}</div>
<div>{{lang_firstSeen}}: {{newfirstseen_s}}</div>
</td>
<td>
<div class="checkbox checkbox-inline">
<input type="checkbox" name="replace[]" value="{{olduuid}}x{{newuuid}}">
<label></label>
</div>
</td>
</tr>
{{/pairs}}
</tbody>
</table>
<div class="text-right">
<button type="button" class="btn btn-danger" name="action" value="replace" data-toggle="modal" data-target="#confirm-dialog">
<span class="glyphicon glyphicon-floppy-disk"></span>
{{lang_replace}}
(<span id="rep-count">0</span>)
</button>
</div>
<div class="modal fade" id="confirm-dialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">{{lang_replace}}</h4>
</div>
<div class="modal-body">
{{lang_sureReplaceNoUndo}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
<button type="submit" name="action" value="replace" class="btn btn-danger">
<span class="glyphicon glyphicon-floppy-disk"></span>
{{lang_replace}}
</button>
</div>
</div>
</div>
</div>
</form>
<script type="application/javascript"><!--
document.addEventListener('DOMContentLoaded', function () {
$('td.a').click(function () {
var $cb = $(this).parent().find('input:checkbox');
$cb.prop('checked', !$cb.is(':checked'));
cbChanged();
});
$('input:checkbox').change(function () {
cbChanged();
});
function cbChanged() {
var cnt = $('input:checkbox:checked').length;
$('#rep-count').text(cnt).parent().prop('disabled', cnt === 0);
}
cbChanged();
});
//--></script>
|