-
- {data.map(i => )}
-
+ const containerStyle = joinCls(
+ "group relative overflow-hidden rounded-xl my-[5px]",
+ "bg-gradient-to-br from-blue-500/10 to-purple-600/10 backdrop-blur-sm",
+ "border border-blue-500/20 dark:border-purple-600/30",
+ "px-2 py-1.5 transition-all duration-200 hover:shadow-md",
+ "hover:bg-gradient-to-br hover:from-blue-500/15 hover:to-purple-600/15"
+ )
+
+ const idStyle = joinCls(
+ "font-mono text-xs text-blue-600 dark:text-blue-400",
+ "truncate max-w-[140px] transition-colors",
+ "group-hover:text-blue-800 dark:group-hover:text-blue-300"
+ )
+
+ const contentStyle = joinCls(
+ "font-mono text-xs text-purple-600 dark:text-purple-400",
+ "truncate max-w-[160px] px-2 py-0.5 rounded",
+ "bg-gradient-to-r from-purple-200/70 to-violet-200/70",
+ "dark:from-purple-900/40 dark:to-violet-900/40",
+ "group-hover:from-purple-300 group-hover:to-violet-300",
+ "dark:group-hover:from-purple-800 dark:group-hover:to-violet-800"
+ )
+
+ return
+
+
+ {id}
+
+ {content && (
+
+ {content}
+
+ )}
- >
-}
-export default InputOutput
+
+
+}
diff --git a/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/Node/IoItem.tsx b/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/Node/IoItem.tsx
deleted file mode 100644
index b55da59907c4b9eac336faa26e86d2ad74099fc0..0000000000000000000000000000000000000000
--- a/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/Node/IoItem.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2025, Huawei Technologies Co., Ltd.
-// All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-import { joinCls } from "libs"
-import { useContext } from "react"
-import { Tooltip } from "ui"
-import PropertiesContext from "../context"
-
-type Props = {
- id: string
-}
-
-const IoItem = ({id}: Props) => {
- const {nodes, parameters} = useContext(PropertiesContext)
-
- const content = nodes[id]?.opType ?? parameters[id]
-
- const containerStyle = joinCls(
- "group relative overflow-hidden rounded-xl",
- "bg-gradient-to-br from-blue-500/10 to-purple-600/10 backdrop-blur-sm",
- "border border-blue-500/20 dark:border-purple-600/30",
- "px-2 py-1.5 transition-all duration-200 hover:shadow-md",
- "hover:bg-gradient-to-br hover:from-blue-500/15 hover:to-purple-600/15"
- )
-
- const idStyle = joinCls(
- "font-mono text-xs text-blue-600 dark:text-blue-400",
- "truncate max-w-[140px] transition-colors",
- "group-hover:text-blue-800 dark:group-hover:text-blue-300"
- )
-
- const contentStyle = joinCls(
- "font-mono text-xs text-purple-600 dark:text-purple-400",
- "truncate max-w-[160px] px-2 py-0.5 rounded",
- "bg-gradient-to-r from-purple-200/70 to-violet-200/70",
- "dark:from-purple-900/40 dark:to-violet-900/40",
- "group-hover:from-purple-300 group-hover:to-violet-300",
- "dark:group-hover:from-purple-800 dark:group-hover:to-violet-800"
- )
-
- return
-
-
- {id}
-
- {content && (
-
- {content}
-
- )}
-
-
-
-
-}
-
-export default IoItem
diff --git a/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/Node/Metadata.tsx b/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/Node/Metadata.tsx
index 4054a0147985376e0230d9b24ce9ac2e1d757e1e..0d0260cda6a0d620a04a6fb06c9e13b6f43e5553 100644
--- a/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/Node/Metadata.tsx
+++ b/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/Node/Metadata.tsx
@@ -21,7 +21,7 @@ import PropertiesContext from "../context"
type MetadataItemProps = {
i18nKey: string
value: string
- tooltip: boolean
+ tooltip?: boolean
}
const MetadataItem = ({i18nKey, value, tooltip}: MetadataItemProps) => {
@@ -29,7 +29,8 @@ const MetadataItem = ({i18nKey, value, tooltip}: MetadataItemProps) => {
const valueLabel =
{value}
diff --git a/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/Node/index.tsx b/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/Node/index.tsx
index 4d7e84058d3e303f81338f4b5081dcb837f82318..622422729a9128ef5f9c3c7c34a2f83540e19b9c 100644
--- a/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/Node/index.tsx
+++ b/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/Node/index.tsx
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-import Divider from "../Divider"
-import Attributes from "./Attributes"
-import Initializer from "./Initializer"
-import InputOutput from "./InputOutput"
+import { getAttributes } from "./Attributes"
+import { getInitializer } from "./Initializer"
+import { getInputOutput } from "./InputOutput"
import Metadata from "./Metadata"
+import { VirtualScroll } from "ui"
type Props = {
node: ModelNode
@@ -27,18 +27,17 @@ const NodeProperty = ({ node }: Props) => {
if (!node) return null
const attributes = Object.entries(node.attributes ?? {})
+ const renderList: JSX.Element[] = [
]
- const ioDivider = node.input.length > 0 && node.output.length > 0
+ getAttributes(attributes, renderList)
+ getInitializer(node.tensors, renderList)
+ getInputOutput({ i18key: "panel.inputs", data: node.input }, renderList)
+ getInputOutput({ i18key: "panel.outputs", data: node.output }, renderList)
- return <>
-
-
-
-
-
- {ioDivider && }
-
- >
+ return
}
export default NodeProperty
diff --git a/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/index.tsx b/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/index.tsx
index a9fc53e65a66a66a748ae750bba624c7986c9b1b..fcfc1494ee78251695954adf120ceeb2d9f0faf0 100644
--- a/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/index.tsx
+++ b/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/Properties/index.tsx
@@ -50,17 +50,7 @@ const Properties = () => {
"glass-effect border border-white/20 dark:border-slate-700/50",
)}>
diff --git a/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/index.tsx b/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/index.tsx
index 8ca4389cc502fa4722e7a5b37795afceadb2ebcb..59bf2d54a736dda4fdb50906b8956bf00f442245 100644
--- a/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/index.tsx
+++ b/plugins/mindstudio-insight-plugins/ModelVis/app/src/ModelStructure/index.tsx
@@ -223,20 +223,21 @@ const GraphPath = () => {
}
-const ModelStructure = () =>
+const ModelStructure = () => <>