mirror of
https://github.com/hansjone/netx.git
synced 2026-10-10 13:50:44 +08:00
feat(managed-ne): tag stats cards and bulk ops by tag
Add tags/remark to import template, stats/ids-by-tag APIs, per-tag overview sub-cards, and bulk proxy/connect-test dialogs filtered by tag. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
d23b5b7cb0
commit
06a5615095
9 changed files with 492 additions and 4 deletions
|
|
@ -102,6 +102,28 @@ export const fetchManagedNeMeta = () =>
|
|||
credentials_configured: creds.configured,
|
||||
}));
|
||||
|
||||
export type ManagedNeStats = {
|
||||
total: number;
|
||||
by_status: Record<string, number>;
|
||||
tags: string[];
|
||||
no_tag_count: number;
|
||||
tag_counts: Record<string, number>;
|
||||
per_tag: Record<
|
||||
string,
|
||||
{
|
||||
total: number;
|
||||
by_status: Record<string, number>;
|
||||
}
|
||||
>;
|
||||
};
|
||||
|
||||
export const fetchManagedNeStats = () => apiGet<ManagedNeStats>("/v1/managed-ne/meta/stats");
|
||||
|
||||
export const fetchIdsByTag = (tag: string | null) => {
|
||||
const url = tag ? `/v1/managed-ne/meta/ids-by-tag?tag=${encodeURIComponent(tag)}` : "/v1/managed-ne/meta/ids-by-tag";
|
||||
return apiGet<{ ids: string[] }>(url);
|
||||
};
|
||||
|
||||
export const fetchManagedNe = (params: {
|
||||
keyword: string;
|
||||
vendor: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue