Pretty history details.

This commit is contained in:
Joachim Tingvold
2016-08-21 14:46:23 +00:00
parent 8e58999f5a
commit 9348afc26e
4 changed files with 218 additions and 177 deletions

View File

@ -42,8 +42,7 @@
<td>{{ history.msg }}</td>
<td>{{ history.created_on }}</td>
<td width="6%">
<button type="button" class="btn btn-flat btn-primary history-info-button" value='{{ history.detail|replace("[]","None") }}'>
Info&nbsp;<i class="fa fa-info"></i>
<button type="button" class="btn btn-flat btn-primary history-info-button" value='{{ history.detail }}'>Info&nbsp;<i class="fa fa-info"></i>
</button>
</td>
</tr>
@ -74,7 +73,7 @@
$(document.body).on('click', '.history-info-button', function() {
var modal = $("#modal_history_info");
var info = $(this).val();
modal.find('.modal-body p').text(info);
$('#modal-code-content').html(json_library.prettyPrint(info));
modal.modal('show');
});
</script>
@ -97,8 +96,7 @@
<div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-left"
data-dismiss="modal">Close</button>
<button type="button" class="btn btn-flat btn-danger" onclick="applyChanges('', $SCRIPT_ROOT + '/admin/history');location.reload();">Clear
History</button>
<button type="button" class="btn btn-flat btn-danger" onclick="applyChanges('', $SCRIPT_ROOT + '/admin/history');location.reload();">Clear History</button>
</div>
</div>
<!-- /.modal-content -->
@ -116,7 +114,7 @@
<h4 class="modal-title">History Details</h4>
</div>
<div class="modal-body">
<p></p>
<pre><code id="modal-code-content"></code></pre>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-right"

View File

@ -235,7 +235,7 @@
$(document.body).on('click', '.history-info-button', function() {
var modal = $("#modal_history_info");
var info = $(this).val();
modal.find('.modal-body p').text(info);
$('#modal-code-content').html(json_library.prettyPrint(info));
modal.modal('show');
});
$(document.body).on("click", ".button_dnssec", function() {
@ -256,7 +256,7 @@
<h4 class="modal-title">History Details</h4>
</div>
<div class="modal-body">
<p></p>
<pre><code id="modal-code-content"></code></pre>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-right"