This commit is contained in:
scarqin
2024-12-24 14:34:16 +08:00
parent a9b7fc525a
commit 5ea0cc7838
2 changed files with 3 additions and 4 deletions
@@ -114,17 +114,17 @@ const AIFlowChart = () => {
title: 'API Keys',
keys: model.keys.map((key, index) => ({
id: key.id,
status: key.status === 'normal' ? 'enabled' : 'disable',
status: key.status,
priority: index + 1
}))
}
}))
]
const newEdges = [
const newEdges: any = [
...modelData.map((model) => ({
id: `service-${model.id}`,
source: 'service',
source: 'apiService',
target: model.id,
label: `apis(${model.api_count})`,
style: { stroke: '#ddd', cursor: 'pointer' },
@@ -16,7 +16,6 @@ export const KeyStatusNode: React.FC<{ data: KeyStatusNodeData }> = ({ data }) =
const { title, keys = [] } = data
const totalKeys = keys.length
const keyWidth = totalKeys > 5 ? `calc((100% - ${(totalKeys - 1) * 0.25}rem) / ${totalKeys})` : KEY_SIZE
return (
<div
className="relative p-4 bg-white rounded-lg shadow-sm node-card nodrag"