2022-06-27 12:12:16 +02:00
|
|
|
{% import (
|
2022-07-06 10:46:01 +02:00
|
|
|
"net/http"
|
|
|
|
"strings"
|
2022-06-27 12:12:16 +02:00
|
|
|
) %}
|
|
|
|
|
2022-07-06 10:46:01 +02:00
|
|
|
|
|
|
|
{% func Footer(r *http.Request) %}
|
|
|
|
{%code
|
|
|
|
prefix := "/vmalert/"
|
|
|
|
if strings.HasPrefix(r.URL.Path, prefix) {
|
|
|
|
prefix = ""
|
|
|
|
}
|
|
|
|
%}
|
2021-09-07 21:39:22 +02:00
|
|
|
</main>
|
2022-07-06 10:46:01 +02:00
|
|
|
<script src="{%s prefix %}static/js/jquery-3.6.0.min.js" type="text/javascript"></script>
|
|
|
|
<script src="{%s prefix %}static/js/bootstrap.bundle.min.js" type="text/javascript"></script>
|
2021-09-07 21:39:22 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
function expandAll() {
|
|
|
|
$('.collapse').addClass('show');
|
|
|
|
}
|
|
|
|
function collapseAll() {
|
|
|
|
$('.collapse').removeClass('show');
|
|
|
|
}
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
// prevent collapse logic on link click
|
|
|
|
$(".group-heading a").click(function(e) {
|
|
|
|
e.stopPropagation();
|
|
|
|
});
|
|
|
|
|
|
|
|
$(".group-heading").click(function(e) {
|
|
|
|
let target = $(this).attr('data-bs-target');
|
2022-05-31 01:55:28 +02:00
|
|
|
let el = $("#"+target);
|
2021-09-07 21:39:22 +02:00
|
|
|
new bootstrap.Collapse(el, {
|
|
|
|
toggle: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
var hash = window.location.hash.substr(1);
|
2022-05-31 01:55:28 +02:00
|
|
|
let group = $("#"+hash);
|
2021-09-07 21:39:22 +02:00
|
|
|
if (group.length > 0) {
|
|
|
|
group.click();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
{% endfunc %}
|