fix: logs view format
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
Tooltip,
|
||||
Typography
|
||||
} from 'antd';
|
||||
import _ from 'lodash';
|
||||
import React, { useCallback, useMemo } from 'react';
|
||||
import { placementStrategyOptions } from '../config';
|
||||
import { FormData } from '../config/types';
|
||||
@@ -129,7 +130,33 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
description={renderSelectTips(placementStrategyTips)}
|
||||
></SealSelect>
|
||||
</Form.Item>
|
||||
<Form.Item<FormData> name="worker_selector">
|
||||
<Form.Item<FormData>
|
||||
name="worker_selector"
|
||||
rules={[
|
||||
({ getFieldValue }) => ({
|
||||
validator(rule, value) {
|
||||
if (
|
||||
getFieldValue('scheduleType') === 'auto' &&
|
||||
_.keys(value).length > 0
|
||||
) {
|
||||
if (_.some(_.keys(value), (k: string) => !value[k])) {
|
||||
return Promise.reject(
|
||||
intl.formatMessage(
|
||||
{
|
||||
id: 'common.validate.value'
|
||||
},
|
||||
{
|
||||
name: 'models.form.selector'
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
})
|
||||
]}
|
||||
>
|
||||
<LabelSelector
|
||||
label={intl.formatMessage({
|
||||
id: 'resources.form.workerSelector'
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import LogsViewer from '@/components/logs-viewer';
|
||||
import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button, Modal } from 'antd';
|
||||
import { Modal } from 'antd';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
type ViewModalProps = {
|
||||
@@ -43,13 +42,13 @@ const ViewCodeModal: React.FC<ViewModalProps> = (props) => {
|
||||
title={
|
||||
<span className="flex flex-center">
|
||||
<span> {intl.formatMessage({ id: 'common.button.viewlog' })}</span>
|
||||
<Button size="middle" type="text" onClick={handleFullscreenToggle}>
|
||||
{/* <Button size="middle" type="text" onClick={handleFullscreenToggle}>
|
||||
{isFullScreenRef.current ? (
|
||||
<FullscreenExitOutlined />
|
||||
) : (
|
||||
<FullscreenOutlined />
|
||||
)}
|
||||
</Button>
|
||||
</Button> */}
|
||||
</span>
|
||||
}
|
||||
open={open}
|
||||
|
||||
Reference in New Issue
Block a user