Add service status on the web admin

This commit is contained in:
Julien VAUBOURG
2014-11-17 23:43:58 +01:00
parent 6876a183a6
commit c856d861cd
11 changed files with 143 additions and 30 deletions

View File

@@ -1,3 +1,40 @@
li.status-info {
color: #5BC0DE;
}
li.status-warning {
color: #D9534F;
}
li.status-danger {
color: #D9534F;
}
li.status-success {
color: #5CB85C;
}
img#status-loading {
display: none;
margin-right: 5px;
}
img#save-loading {
display: none;
margin-left: 5px;
}
div#status {
display: none;
margin-top: 10px;
}
div#status ul {
list-style-type: none;
padding: 0;
margin: 0;
}
a.btn-danger span {
color: #eee;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -39,4 +39,25 @@ $(document).ready(function() {
$(choosertxtid).val($(this).val());
});
$('#save').click(function() {
$(this).prop('disabled', true);
$('#save-loading').show();
});
$('#status .close').click(function() {
$(this).parent().hide();
});
$('#statusbtn').click(function() {
$('#status-loading').show();
$.ajax({
url: '?/status',
}).done(function(data) {
$('#status-loading').hide();
$('#status-text').html('<ul>' + data + '</ul>');
$('#status').show('slow');
});
});
});