net/haproxy: add link to Config Diff page, fix direct tab links

This commit is contained in:
Frank Wall
2021-02-23 17:10:45 +01:00
parent 470a8d204a
commit 9ae43dc1f8
4 changed files with 23 additions and 1 deletions
+1
View File
@@ -20,6 +20,7 @@ Added:
Fixed:
* fix maintenance page (python error: 'list' object has no attribute 'strip')
* prevent service outage by aborting "Apply" when configtest fails
* fix direct links to individual statistics tabs
Changed:
* change default SSL version to TLSv1.2 (ssl-min-ver)
@@ -90,6 +90,16 @@ 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>
@@ -314,7 +314,7 @@ POSSIBILITY OF SUCH DAMAGE.
BootstrapDialog.show({
type: BootstrapDialog.TYPE_DANGER,
title: "{{ lang._('HAProxy configtest found critical errors') }}",
message: "{{ lang._('The HAProxy service may not be able to start due to critical errors. Run syntax check for further details.') }}",
message: "{{ lang._('The HAProxy service may not be able to start due to critical errors. Run syntax check for further details or review the changes in the %sConfiguration Diff%s.')|format('<a href=\"/ui/haproxy/export#diff\">','</a>') }}",
buttons: [{
icon: 'fa fa-trash-o',
label: '{{ lang._('Abort') }}',
@@ -157,6 +157,17 @@ POSSIBILITY OF SUCH DAMAGE.
$("#update-status").click();
$("#update-counters").click();
$("#update-tables").click();
// 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>