Browse Source

Merge pull request '合并' (#249) from dev-zw into dev-check

pull/268/head
cp3hnu 8 months ago
parent
commit
62bd8049ba
2 changed files with 14 additions and 3 deletions
  1. +5
    -1
      react-ui/src/pages/ModelDeployment/components/ServerLog/index.less
  2. +9
    -2
      react-ui/src/pages/ModelDeployment/components/ServerLog/index.tsx

+ 5
- 1
react-ui/src/pages/ModelDeployment/components/ServerLog/index.less View File

@@ -11,7 +11,11 @@
font-family: 'Roboto Mono', 'Menlo', 'Consolas', 'Monaco', monospace;
display: flex;
flex-direction: column;
align-items: center;
align-items: left;

&--empty {
align-items: center;
}

&__more {
padding: 20px 0;


+ 9
- 2
react-ui/src/pages/ModelDeployment/components/ServerLog/index.tsx View File

@@ -3,6 +3,7 @@ import { getServiceVersionLogReq } from '@/services/modelDeployment';
import { to } from '@/utils/promise';
import { DoubleRightOutlined } from '@ant-design/icons';
import { Button, DatePicker, type TimeRangePickerProps } from 'antd';
import classNames from 'classnames';
import dayjs from 'dayjs';
import { useEffect, useState } from 'react';
import styles from './index.less';
@@ -106,6 +107,8 @@ function ServerLog({ info }: ServerLogProps) {
}
};

const logContent = logData.map((v) => v.log_content).join('');

return (
<div className={styles['server-log']}>
<div>
@@ -122,9 +125,9 @@ function ServerLog({ info }: ServerLogProps) {
查询
</Button>
</div>
{logData.length > 0 && (
{logContent ? (
<div className={styles['server-log__data']} id="server-log">
<div>{logData.map((v) => v.log_content).join('') || '暂无日志'}</div>
<div>{logContent}</div>
{hasMore && (
<Button
type="text"
@@ -137,6 +140,10 @@ function ServerLog({ info }: ServerLogProps) {
</Button>
)}
</div>
) : (
<div className={classNames(styles['server-log__data'], styles['server-log__data--empty'])}>
暂无日志
</div>
)}
</div>
);


Loading…
Cancel
Save