mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-22 16:36:27 +01:00
b29fafa86b
* vmalert: deprecate alert's status link Deprecate alert's status link `/api/v1/<groupID>/<alertID>/status` in favour of `api/v1/alerts?group_id=<group_id>&alert_id=<alert_id>"`. The change was needed for simplifying logic in vmselect for proxying vmalert's requests. The old alert's status link will be still supported for a few versions but will be removed in the future. https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2825 Signed-off-by: hagen1778 <roman@victoriametrics.com> * vmalert: fix review comments Signed-off-by: hagen1778 <roman@victoriametrics.com>
108 lines
3.0 KiB
Go
108 lines
3.0 KiB
Go
// Code generated by qtc from "footer.qtpl". DO NOT EDIT.
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
//line app/vmalert/tpl/footer.qtpl:1
|
|
package tpl
|
|
|
|
//line app/vmalert/tpl/footer.qtpl:1
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/utils"
|
|
)
|
|
|
|
//line app/vmalert/tpl/footer.qtpl:8
|
|
import (
|
|
qtio422016 "io"
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
)
|
|
|
|
//line app/vmalert/tpl/footer.qtpl:8
|
|
var (
|
|
_ = qtio422016.Copy
|
|
_ = qt422016.AcquireByteBuffer
|
|
)
|
|
|
|
//line app/vmalert/tpl/footer.qtpl:8
|
|
func StreamFooter(qw422016 *qt422016.Writer, r *http.Request) {
|
|
//line app/vmalert/tpl/footer.qtpl:8
|
|
qw422016.N().S(`
|
|
`)
|
|
//line app/vmalert/tpl/footer.qtpl:9
|
|
prefix := utils.Prefix(r.URL.Path)
|
|
|
|
//line app/vmalert/tpl/footer.qtpl:9
|
|
qw422016.N().S(`
|
|
</main>
|
|
<script src="`)
|
|
//line app/vmalert/tpl/footer.qtpl:11
|
|
qw422016.E().S(prefix)
|
|
//line app/vmalert/tpl/footer.qtpl:11
|
|
qw422016.N().S(`static/js/jquery-3.6.0.min.js" type="text/javascript"></script>
|
|
<script src="`)
|
|
//line app/vmalert/tpl/footer.qtpl:12
|
|
qw422016.E().S(prefix)
|
|
//line app/vmalert/tpl/footer.qtpl:12
|
|
qw422016.N().S(`static/js/bootstrap.bundle.min.js" type="text/javascript"></script>
|
|
<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');
|
|
let el = $("#"+target);
|
|
new bootstrap.Collapse(el, {
|
|
toggle: true
|
|
});
|
|
});
|
|
|
|
var hash = window.location.hash.substr(1);
|
|
let group = $("#"+hash);
|
|
if (group.length > 0) {
|
|
group.click();
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|
|
`)
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
}
|
|
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
func WriteFooter(qq422016 qtio422016.Writer, r *http.Request) {
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
StreamFooter(qw422016, r)
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
}
|
|
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
func Footer(r *http.Request) string {
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
WriteFooter(qb422016, r)
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
qs422016 := string(qb422016.B)
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
return qs422016
|
|
//line app/vmalert/tpl/footer.qtpl:44
|
|
}
|