mirror of
https://github.com/prymitive/karma
synced 2026-05-13 03:56:59 +00:00
Show loading placeholder
Form loads after ajax call, so it can take some time on big responses and slow connection
This commit is contained in:
@@ -24,6 +24,7 @@ var Templates = (function(params) {
|
||||
silenceFormSuccess: '#silence-form-success',
|
||||
silenceFormError: '#silence-form-error',
|
||||
silenceFormFatal: '#silence-form-fatal',
|
||||
silenceFormLoading: '#silence-form-loading',
|
||||
|
||||
// label button
|
||||
buttonLabel: '#label-button-filter',
|
||||
|
||||
@@ -135,6 +135,9 @@ var UI = (function(params) {
|
||||
var modal = $("#silenceModal");
|
||||
modal.on("show.bs.modal", function(event) {
|
||||
Unsee.Pause();
|
||||
modal.find(".modal-body").html(
|
||||
Templates.Render("silenceFormLoading", {})
|
||||
);
|
||||
var elem = $(event.relatedTarget);
|
||||
var elemLabels = {};
|
||||
$.each(elem.data("labels").split(","), function(i, l) {
|
||||
|
||||
@@ -128,3 +128,9 @@
|
||||
<i class="fa fa-exclamation-circle"></i>
|
||||
<%- error %>
|
||||
</script>
|
||||
|
||||
<script type="application/json" id="silence-form-loading">
|
||||
<div class="silence-result-icon text-center text-muted">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user