feat(dashboard): add traffic flow sankey chart (#5465)

* feat(dashboard): add traffic flow sankey chart

Add dashboard flow APIs and a Sankey-based flow view with user, optional API key, model, and channel layers.\n\nReuse the dashboard VChart palette, add precise link/node tooltips and interactions, and cover filtering, layer ordering, color stability, and error states with tests.

* feat: build flow chart from quota data

---------

Co-authored-by: CaIon <i@caion.me>
This commit is contained in:
Quaternijkon
2026-06-20 18:57:47 +08:00
committed by GitHub
co-authored by CaIon
parent f9e508bdae
commit a68041f7d6
29 changed files with 2659 additions and 77 deletions
+26 -6
View File
@@ -259,9 +259,10 @@
"AIGC2D": "AIGC2D",
"AILS": "AILS",
"AK/SK mode: use AccessKey|SecretAccessKey|Region": "AK/SKモード: AccessKey | SecretAccessKey | Regionを使用",
"Ali": "Alibaba Bailian",
"Ali": "アリババ百炼",
"Alipay": "Alipay",
"All": "すべて",
"All API tokens": "すべての API キー",
"All categories": "すべてのカテゴリ",
"All conditions must match before this tier is used.": "この段階を使用するには、すべての条件に一致する必要があります。",
"All edits are overwrite operations. Leave fields empty to keep current values unchanged.": "すべての編集は上書き操作です。現在の値を変更しないままにするには、フィールドを空のままにしてください。",
@@ -277,6 +278,7 @@
"All Tags": "すべてのタグ",
"All Types": "すべてのタイプ",
"All upstream data is trusted": "すべてのアップストリームデータは信頼されています",
"All users": "すべてのユーザー",
"All Vendors": "すべてのベンダー",
"All-time": "全期間",
"Allocated Memory": "割り当て済みメモリ",
@@ -684,13 +686,13 @@
"Channel Affinity": "チャネルアフィニティ",
"Channel affinity reuses the last successful channel based on keys extracted from the request context or JSON body.": "チャネルアフィニティは、リクエストコンテキストまたは JSON Body から抽出したキーに基づいて、前回成功したチャネルを優先的に再利用します。",
"Channel Affinity: Upstream Cache Hit": "チャネルアフィニティ:上流キャッシュヒット",
"Channel health checks": "チャネルヘルスチェック",
"Channel copied successfully": "チャネルが正常にコピーされました",
"Channel created successfully": "チャネルが正常に作成されました",
"Channel deleted successfully": "チャネルが正常に削除されました",
"Channel disabled successfully": "チャネルが正常に無効化されました",
"Channel enabled successfully": "チャネルが正常に有効化されました",
"Channel Extra Settings": "チャネル詳細設定",
"Channel health checks": "チャネルヘルスチェック",
"Channel ID": "チャネルID",
"Channel ID is required": "チャネル ID が必要です",
"Channel key": "チャネルキー",
@@ -786,6 +788,7 @@
"Cleared log files": "ログファイルをクリアしました",
"Click \"Create Plan\" to create your first subscription plan": "「プラン作成」をクリックして最初のプランを作成してください",
"Click \"Generate\" to create a token": "「生成」をクリックしてトークンを作成",
"Click a stage to show or hide that column": "ステージをクリックすると、その列を表示または非表示にできます",
"Click any category to drill into its models, apps, and trends": "カテゴリをクリックすると、そのモデル・アプリ・トレンドを掘り下げて確認できます",
"Click for details": "クリックして詳細を表示",
"Click save when you're done.": "完了したら「保存」をクリックしてください。",
@@ -1216,6 +1219,7 @@
"Delete selected channels": "選択したチャネルを削除",
"Delete selected models": "選択したモデルを削除",
"Deleted": "削除済み",
"Deleted ({{id}})": "削除済み ({{id}})",
"Deleted {{count}} failed models": "失敗したモデルを {{count}} 個削除しました",
"Deleted a custom OAuth provider": "カスタム OAuth プロバイダーを削除しました",
"Deleted a deployment": "デプロイメントを削除しました",
@@ -1845,6 +1849,7 @@
"Filter models by type, endpoint, vendor, group and tags": "タイプ、エンドポイント、ベンダー、グループ、タグでモデルをフィルタリング",
"Filter models...": "モデルをフィルタリング...",
"Filter the model analytics view by time range and user.": "時間範囲とユーザーでモデル分析ビューを絞り込みます。",
"Filter the traffic flow view by time range and user.": "時間範囲とユーザーでトラフィックフロー表示を絞り込みます。",
"Filter...": "フィルター…",
"Filters": "フィルター",
"Filters active": "フィルター有効",
@@ -1861,6 +1866,8 @@
"Fixed price (USD)": "固定価格 (USD)",
"Fixed request price": "固定リクエスト価格",
"Floating": "フローティング",
"Flow": "フロー",
"Flow Filters": "フローフィルター",
"FluentRead extension not detected. Please ensure it is installed and active.": "FluentRead 拡張機能が検出されませんでした。インストールされていて有効になっていることを確認してください。",
"Flush interval (minutes)": "書き込み間隔(分)",
"Follow the guided steps to prepare your workspace before the first login.": "初回ログイン前に、ガイド付きの手順に従ってワークスペースを準備してください。",
@@ -2393,10 +2400,10 @@
"Max Disk Cache Size (MB)": "ディスクキャッシュ最大容量 (MB)",
"Max Entries": "最大エントリ数",
"Max output": "最大出力",
"Max Retries": "最大再試行",
"Max Requests (incl. failures)": "最大リクエスト数(失敗を含む)",
"Max Requests (including failures)": "最大リクエスト数(失敗を含む)",
"Max requests per period": "期間あたりの最大リクエスト数",
"Max Retries": "最大再試行",
"Max Success": "最大成功数",
"Max successful requests": "最大成功リクエスト数",
"Max Successful Requests": "最大成功リクエスト数",
@@ -2420,8 +2427,6 @@
"Merchant ID is required": "マーチャント ID は必須です",
"Message Priority": "メッセージの優先度",
"Metadata": "メタデータ",
"MjProxy": "MjProxy",
"MjProxyPlus": "MjProxyPlus",
"min downtime": "分のダウンタイム",
"Min Top-up": "最低チャージ額",
"Min Top-up:": "最小チャージ額:",
@@ -2446,6 +2451,8 @@
"Missing Models": "不足しているモデル",
"Missing user data from Passkey login response": "パスキーログイン応答からユーザーデータが欠落しています",
"Mistral": "Mistral",
"MjProxy": "MjProxy",
"MjProxyPlus": "MjProxyPlus",
"Modalities": "モダリティ",
"Modality": "モダリティ",
"Mode": "モード",
@@ -2636,6 +2643,7 @@
"No API keys available. Create your first API key to get started.": "利用可能なAPIキーがありません。最初のAPIキーを作成して開始してください。",
"No API Keys Found": "APIキーが見つかりません",
"No API routes configured": "APIルートが設定されていません",
"No API tokens": "API キーなし",
"No app usage data available for this model.": "このモデルのアプリ利用データはまだありません。",
"No apps match the selected filters": "条件に一致するアプリはありません",
"No Auth": "認証なし",
@@ -2675,6 +2683,7 @@
"No FAQ entries available": "FAQエントリがありません",
"No FAQ entries yet. Click \"Add FAQ\" to create one.": "FAQエントリはまだありません。「FAQを追加」をクリックして作成してください。",
"No files match the accepted types.": "許可された種類に一致するファイルがありません。",
"No flow data available": "フローデータがありません",
"No group found.": "グループが見つかりません。",
"No group-based rate limits configured. Click \"Add group\" to get started.": "グループベースのレート制限が設定されていません。\"グループを追加\" をクリックして開始してください。",
"No groups match your search": "検索に一致するグループがありません",
@@ -2694,6 +2703,7 @@
"No matching items": "一致する項目がありません",
"No matching results": "一致する結果がありません",
"No matching rules": "一致するルールがありません",
"No matching token and channel usage was found.": "一致するトークンとチャネルの使用量が見つかりませんでした。",
"No messages yet": "まだメッセージがありません",
"No missing models found.": "不足しているモデルは見つかりません。",
"No model found.": "モデルが見つかりません。",
@@ -2768,10 +2778,12 @@
"No usage logs available. Logs will appear here once API calls are made.": "使用ログはありません。API呼び出し後にログがここに表示されます。",
"No user information available": "ユーザー情報はありません",
"No user selected": "ユーザーが選択されていません",
"No users": "ユーザーなし",
"No users available. Try adjusting your search or filters.": "利用可能なユーザーがいません。検索またはフィルターを調整してみてください。",
"No Users Found": "ユーザーが見つかりません",
"No vendor data available": "ベンダーデータがありません",
"No X Found": "X が見つかりません",
"Node": "ノード",
"Node Name": "ノード名",
"Non-stream": "非ストリーミング",
"Non-zero invitation rewards require compliance confirmation in Payment Gateway settings.": "0 以外の招待報酬には、支払いゲートウェイ設定でのコンプライアンス確認が必要です。",
@@ -3481,11 +3493,13 @@
"Request Model": "リクエストモデル",
"Request Model:": "リクエストモデル:",
"Request overrides, routing behavior, and upstream model automation": "リクエスト上書き、ルーティング動作、上流モデル自動化",
"Request retry": "リクエスト再試行",
"Request rule pricing": "リクエストルールの課金",
"Request success rate sampled over the last 24 hours": "過去 24 時間にサンプリングされたリクエスト成功率",
"Request success rate; {{incidents}} incident buckets in the last 24 hours": "リクエスト成功率;過去 24 時間に {{incidents}} 個のインシデント時間枠",
"Request timed out, please refresh and restart GitHub login": "タイムアウトしました。ページをリロードして GitHub ログインをやり直してください",
"Request-based": "リクエスト条件あり",
"Requests": "リクエスト",
"Requests (24h)": "リクエスト (24h)",
"Requests / 24h": "リクエスト / 24h",
"Requests per minute": "1分あたりのリクエスト数",
@@ -3544,7 +3558,6 @@
"Restore defaults": "既定に戻す",
"Restrict user model request frequency (may impact high concurrency performance)": "ユーザーモデルのリクエスト頻度を制限する(高並行性パフォーマンスに影響を与える可能性があります)",
"Result": "結果",
"Request retry": "リクエスト再試行",
"Retain last N days": "最新N日間を保持",
"Retain last N files": "最新N個のファイルを保持",
"Retention days": "保持日数",
@@ -3838,6 +3851,7 @@
"Show All": "すべて表示",
"Show all providers including unbound": "未バインドを含むすべてのプロバイダーを表示",
"Show only bound providers": "バインド済みのプロバイダーのみ表示",
"Show or hide flow columns": "フロー列の表示・非表示",
"Show prices in currency instead of quota.": "クォータではなく通貨で価格を表示。",
"Show setup guide": "セットアップガイドを表示",
"Show token usage statistics in the UI": "UIでトークン使用統計を表示",
@@ -4106,9 +4120,11 @@
"The administrator has not configured a privacy policy yet.": "管理者がまだプライバシーポリシーを設定していません。",
"The administrator has not configured a user agreement yet.": "管理者がまだ利用規約を設定していません。",
"The administrator has not configured any about content yet. You can set it in the settings page, supporting HTML or URL.": "管理者はまだ「概要」コンテンツを設定していません。設定ページでHTMLまたはURLをサポートして設定できます。",
"The API key used for the requests": "リクエストに使用された API キー",
"The binding will complete automatically after authorization": "認証後、バインディングは自動的に完了します",
"The bound Product powers wallet top-ups: when a user enters any amount, new-api runs the checkout against this single Pancake product and overrides the price per session — no need to pre-create $1 / $5 / $10 SKUs.": "紐付け済み商品はウォレットチャージに使用されます。ユーザーが任意の金額を入力すると、new-api はこの単一の Pancake 商品でチェックアウトを実行し、セッションごとに価格を上書きします。$1 / $5 / $10 の SKU を事前作成する必要はありません。",
"The bound Store is the parent container for every Pancake product new-api creates from this admin — both the wallet top-up product and any subscription-plan products. One store is enough; pin a different one only if you genuinely run separate Pancake catalogs.": "紐付け済みストアは、この管理画面から new-api が作成するすべての Pancake 商品の親コンテナです。ウォレットチャージ商品とサブスクリプションプラン商品が含まれます。通常は 1 つのストアで十分です。別々の Pancake カタログを本当に運用する場合のみ別のストアを固定してください。",
"The deployment node that handled the requests": "リクエストを処理したデプロイノード",
"The effective domain for Passkey registration. Must match the current domain or be its parent domain.": "Passkey登録のための有効なドメイン。現在のドメインまたはその親ドメインと一致する必要があります。",
"The entered text does not match the required text.": "入力したテキストが必要なテキストと一致しません。",
"The environment (test vs production) is decided by the key you paste here — use the Test key while integrating, then swap to the Production key when going live.": "環境(テスト/本番)はここに貼り付けるキーで決まります。統合中はテストキーを使用し、本番公開時に本番キーへ切り替えてください。",
@@ -4116,6 +4132,7 @@
"The following models have billing type conflicts (fixed price vs ratio billing). Confirm to proceed with the changes.": "以下のモデルには請求タイプ(固定価格 vs 比率請求)の競合があります。変更を続行するには確認してください。",
"The following models in the model redirect have not been added to the \"Models\" list and may fail during invocation due to missing available models:": "モデルリダイレクト内の以下のモデルは\"モデル\"リストに追加されていないため、利用可能なモデルが不足して呼び出しが失敗する可能性があります:",
"The mapped upstream model(s)": "マッピングされたアップストリームモデル",
"The model that was requested": "リクエストされたモデル",
"The model you're looking for doesn't exist.": "お探しのモデルは存在しません。",
"The name displayed across the application": "アプリケーション全体に表示される名前",
"The public URL of your server, used for OAuth callbacks, webhooks, and other external integrations": "OAuthコールバック、Webhook、その他の外部統合に使用されるサーバーの公開URL",
@@ -4128,7 +4145,10 @@
"The token group that will have a custom ratio": "カスタム比率を持つトークングループ",
"The unique identifier for this model": "このモデルの一意の識別子",
"The unique name for this vendor": "このベンダーの一意の名前",
"The upstream channel that served the requests": "リクエストを処理した上流チャネル",
"The URL for this chat client.": "このチャットクライアントのURL。",
"The user group applied to the requests": "リクエストに適用されたユーザーグループ",
"The user who made the requests": "リクエストを行ったユーザー",
"Theme": "テーマ",
"Theme preset": "テーマプリセット",
"Theme Settings": "テーマ設定",