mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
firewall: open dialog with uuid link, for https://github.com/opnsense/plugins/issues/1720
This commit is contained in:
committed by
Ad Schellevis
parent
455518faa0
commit
00e242f068
@@ -78,7 +78,6 @@ class Filter extends BaseModel
|
||||
$rule->source_net->__reference
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return $messages;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$("#grid-rules").UIBootgrid({
|
||||
let grid = $("#grid-rules").UIBootgrid({
|
||||
search:'/api/firewall/filter/searchItem/',
|
||||
get:'/api/firewall/filter/getItem/',
|
||||
set:'/api/firewall/filter/setItem/',
|
||||
@@ -8,6 +8,13 @@
|
||||
del:'/api/firewall/filter/delItem/',
|
||||
toggle:'/api/firewall/filter/toggleItem/'
|
||||
});
|
||||
|
||||
// open edit dialog when opened with a uuid reference
|
||||
if (window.location.hash !== "" && window.location.hash.split("-").length >= 4) {
|
||||
grid.on('loaded.rs.jquery.bootgrid', function(){
|
||||
$(".command-edit:eq(0)").clone(true).data('row-id', window.location.hash).click();
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user