mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
add redirect to previous page from edit pool link
This commit is contained in:
parent
768b4334aa
commit
96b5600d80
3 changed files with 10 additions and 3 deletions
|
|
@ -38,6 +38,7 @@ $(document).ready(function() {
|
|||
const openEditPoolModal = (tableAPI) => {
|
||||
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
|
||||
if (!urlParams.has('pool')) return;
|
||||
|
||||
const poolId = urlParams.get('pool');
|
||||
|
|
@ -50,7 +51,13 @@ $(document).ready(function() {
|
|||
$(`#edit-pool`).modal('show');
|
||||
}
|
||||
|
||||
// otherwise do nothing because the pool id is not valid
|
||||
if (!urlParams.has('referer')) return;
|
||||
const referer = urlParams.get('referer');
|
||||
|
||||
$('#edit-pool').on('hidden.bs.modal', function(e) {
|
||||
window.location = referer;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
let dtConfig = DataTableUtils.getStdDatatableConfig( [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue