Browse Source

feat: 实验实例添加message

pull/189/head
cp3hnu 10 months ago
parent
commit
15071c2ab7
6 changed files with 19 additions and 15 deletions
  1. +0
    -10
      react-ui/public/fonts/font.css
  2. +0
    -3
      react-ui/src/components/IFramePage/index.tsx
  3. +0
    -1
      react-ui/src/pages/Experiment/components/ExperimentDrawer/index.less
  4. +13
    -1
      react-ui/src/pages/Experiment/components/ExperimentDrawer/index.tsx
  5. +5
    -0
      react-ui/src/pages/Points/index.tsx
  6. +1
    -0
      react-ui/src/types.ts

+ 0
- 10
react-ui/public/fonts/font.css View File

@@ -4,16 +4,6 @@
font-display: swap; font-display: swap;
} }


@font-face {
font-family: 'TaoBaoMaiCaiTi';
src: url('./TaoBaoMaiCaiTi-Regular.woff2') format('woff2'), /* 最优先使用 woff2 */
url('./TaoBaoMaiCaiTi-Regular.woff') format('woff'), /* 兼容性较好的 woff */
url('./TaoBaoMaiCaiTi-Regular.ttf') format('truetype'), /* ttf 作为备选 */
url('./TaoBaoMaiCaiTi-Regular.otf') format('opentype'); /* otf 作为最后选项 */
font-display: swap; /* 优化页面加载时的字体显示 */
}


@font-face { @font-face {
font-family: 'DingTalk-JinBuTi'; font-family: 'DingTalk-JinBuTi';
src: url('./DingTalk-JinBuTi.woff2') format('woff2'), /* 最优先使用 woff2 */ src: url('./DingTalk-JinBuTi.woff2') format('woff2'), /* 最优先使用 woff2 */


+ 0
- 3
react-ui/src/components/IFramePage/index.tsx View File

@@ -48,12 +48,9 @@ function IframePage({ type, className, style }: IframePageProps) {


useEffect(() => { useEffect(() => {
const requestIframeUrl = async () => { const requestIframeUrl = async () => {
setLoading(true);
const [res] = await to(getRequestAPI(type)()); const [res] = await to(getRequestAPI(type)());
if (res && res.data) { if (res && res.data) {
setIframeUrl(res.data); setIframeUrl(res.data);
} else {
setLoading(false);
} }
}; };




+ 0
- 1
react-ui/src/pages/Experiment/components/ExperimentDrawer/index.less View File

@@ -13,7 +13,6 @@
} }


&__tabs { &__tabs {
height: calc(100% - 169px);
:global { :global {
.ant-tabs-nav { .ant-tabs-nav {
padding-left: 24px; padding-left: 24px;


+ 13
- 1
react-ui/src/pages/Experiment/components/ExperimentDrawer/index.tsx View File

@@ -129,6 +129,11 @@ const ExperimentDrawer = ({
'--' '--'
)} )}
</div> </div>
{instanceNodeData.message && (
<div className={styles['experiment-drawer__info']}>
消息:{instanceNodeData.message ?? '--'}
</div>
)}
<div className={styles['experiment-drawer__info']}> <div className={styles['experiment-drawer__info']}>
启动时间:{formatDate(instanceNodeStartTime)} 启动时间:{formatDate(instanceNodeStartTime)}
</div> </div>
@@ -137,7 +142,14 @@ const ExperimentDrawer = ({
{elapsedTime(instanceNodeStartTime, instanceNodeEndTime)} {elapsedTime(instanceNodeStartTime, instanceNodeEndTime)}
</div> </div>
</div> </div>
<Tabs defaultActiveKey="1" items={items} className={styles['experiment-drawer__tabs']} />
<Tabs
defaultActiveKey="1"
items={items}
className={styles['experiment-drawer__tabs']}
style={{
height: instanceNodeData.message ? 'calc(100% - 169px - 39px)' : 'calc(100% - 169px)',
}}
/>
</Drawer> </Drawer>
); );
}; };


+ 5
- 0
react-ui/src/pages/Points/index.tsx View File

@@ -216,6 +216,11 @@ function PointsDetail() {
label: '进行中', label: '进行中',
color: themes['primaryColor'], color: themes['primaryColor'],
}, },
{
value: 0,
label: '准备中',
color: themes['pendingColor'],
},
]), ]),
}, },
]; ];


+ 1
- 0
react-ui/src/types.ts View File

@@ -71,6 +71,7 @@ export type PipelineNodeModel = {
component_label: string; component_label: string;
icon_path: string; icon_path: string;
workflowId?: string; workflowId?: string;
message?: string;
}; };


// 流水线节点模型数据 // 流水线节点模型数据


Loading…
Cancel
Save