mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 02:00:46 +08:00
feat(ne): batch delete selected managed network elements
Add POST /v1/managed-ne/batch-delete and toolbar button with confirmation on NE management page. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
d3eae3351c
commit
778442dc57
7 changed files with 75 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ from .ne_service import (
|
|||
batch_apply_hop_proxy,
|
||||
build_managed_ne_import_template,
|
||||
create_managed_ne,
|
||||
batch_delete_managed_ne,
|
||||
delete_managed_ne,
|
||||
get_managed_ne,
|
||||
import_managed_ne,
|
||||
|
|
@ -96,6 +97,11 @@ def api_batch_apply_hop(body: BatchHopApplyRequest, db: Session = Depends(get_db
|
|||
return batch_apply_hop_proxy(db, body.ids, body.hop)
|
||||
|
||||
|
||||
@router.post("/batch-delete")
|
||||
def api_batch_delete_managed_ne(body: ConnectTestRequest, db: Session = Depends(get_db)):
|
||||
return batch_delete_managed_ne(db, body.ids)
|
||||
|
||||
|
||||
@router.post("/connect-test")
|
||||
def api_connect_test(body: ConnectTestRequest, db: Session = Depends(get_db)):
|
||||
ids = [str(x).strip() for x in body.ids if str(x).strip()]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue