feat(cloud): 提供控制台聚合摘要
This commit is contained in:
@@ -94,6 +94,7 @@ import {
|
||||
import { HWPOD_TOPOLOGY_CONTRACT_VERSION } from "./hwpod-topology-read-model.ts";
|
||||
import { handleCaseRunHttp } from "./server-caserun-http.ts";
|
||||
import { handleProjectManagementProxyHttp } from "./project-management-proxy.ts";
|
||||
import { handleDashboardSummaryHttp } from "./server-dashboard-http.ts";
|
||||
import { HWPOD_NODE_OPS, HWPOD_NODE_OPS_CONTRACT_VERSION } from "../../tools/src/hwpod-node-ops-contract.ts";
|
||||
|
||||
const DEFAULT_BODY_LIMIT_BYTES = 1024 * 1024;
|
||||
@@ -529,6 +530,11 @@ async function handleRestAdapter(request, response, url, options) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.pathname === "/v1/dashboard/summary") {
|
||||
await handleDashboardSummaryHttp(request, response, options);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((url.pathname === "/v1/usage/summary" || url.pathname === "/v1/billing/summary") && request.method === "GET") {
|
||||
await handleUsageSummaryHttp(request, response, url, options);
|
||||
return;
|
||||
@@ -996,6 +1002,7 @@ async function handleRestAdapter(request, response, url, options) {
|
||||
|
||||
function navIdForRestPath(pathname, method = "GET") {
|
||||
const verb = String(method || "GET").toUpperCase();
|
||||
if (pathname === "/v1/dashboard/summary") return "user.dashboard";
|
||||
if (pathname === "/v1/usage/summary") return "user.usage";
|
||||
if (pathname === "/v1/billing/summary" || pathname === "/v1/redeem" || pathname === "/v1/subscription/summary" || pathname === "/v1/payments/summary") return "user.billing";
|
||||
if (pathname.startsWith("/v1/admin/billing/")) return "admin.billing";
|
||||
|
||||
Reference in New Issue
Block a user