mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 09:20:10 +00:00
Adds bootstrap-5.0.0-beta3-dist Adds bootstrap-5.0.0 Updates bootstrap-5.0.0-beta3-dist to bootstrap-5.0.0-dist initial migration to bs v5 porting to bs5 improvements on dropdown menu filter fixed host map dropdown removed excessive padding fix button toggle re-add blog news removed text decoration for links fix button layout (#5348) remove underscore from href (#5347)
32 lines
942 B
JavaScript
32 lines
942 B
JavaScript
$(function() {
|
|
|
|
$(`#btn-import-config`).click(function() {
|
|
|
|
const selectedItem = $(`input[name='item']`).val();
|
|
const itemLabel = $(`label[for='radio-${selectedItem}']`).text();
|
|
$(`#import-modal span.item`).text(itemLabel);
|
|
});
|
|
|
|
// on item change updates export link
|
|
$(`input[name='item']`).change(function() {
|
|
|
|
// change selected item to export
|
|
const item = $(this).val();
|
|
const href = $(`#btn-export-config`).attr('href');
|
|
const currentURL = new URL(href, window.location.origin);
|
|
currentURL.searchParams.set('item', item);
|
|
|
|
if (item == "all") {
|
|
$(`#import-export`).hide();
|
|
$(`#backup-restore`).show();
|
|
return;
|
|
}
|
|
|
|
$(`#backup-restore`).hide();
|
|
$(`#import-export`).show();
|
|
|
|
// update the new export link
|
|
$(`#btn-export-config`).attr('href', currentURL.toString());
|
|
});
|
|
|
|
});
|