net/haproxy: fix direct links to individual maintenance tabs

This commit is contained in:
Frank Wall
2021-03-02 16:42:59 +01:00
parent b9e25ac40b
commit b39646a842
@@ -425,6 +425,17 @@ POSSIBILITY OF SUCH DAMAGE.
});
});
// update history on tab state and implement navigation
if(window.location.hash != "") {
$('a[href="' + window.location.hash + '"]').click()
}
$('.nav-tabs a').on('shown.bs.tab', function (e) {
history.pushState(null, null, e.target.hash);
});
$(window).on('hashchange', function(e) {
$('a[href="' + window.location.hash + '"]').click()
});
});
</script>