feat(web): 添加拓扑图页面和相关组件

feat(csms): 添加获取当前连接状态的API
feat(csms): 添加获取当前活动OCPP WebSocket连接的接口
deps(web): 添加@xyflow/react依赖
This commit is contained in:
2026-03-16 12:59:05 +08:00
parent 6888454727
commit 0118dd2e15
7 changed files with 473 additions and 1 deletions

View File

@@ -68,6 +68,10 @@ export type ConnectorDetail = {
updatedAt: string;
};
export type ConnectionsStatus = {
connectedIdentifiers: string[];
};
export type ChargePoint = {
id: string;
chargePointIdentifier: string;
@@ -204,6 +208,7 @@ export const api = {
chargePoints: {
list: () => apiFetch<ChargePoint[]>("/api/charge-points"),
get: (id: string) => apiFetch<ChargePointDetail>(`/api/charge-points/${id}`),
connections: () => apiFetch<ConnectionsStatus>("/api/charge-points/connections"),
create: (data: {
chargePointIdentifier: string;
chargePointVendor?: string;