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:
oliver 2026-06-05 16:13:31 +08:00
parent d23b5b7cb0
commit 06a5615095
9 changed files with 492 additions and 4 deletions

View file

@ -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;