|
@@ -1,16 +1,24 @@
|
|
|
-import { Button, Form, Input, Select, Radio, Space, Upload, Steps, message } from 'antd';
|
|
|
-import type { RadioChangeEvent } from 'antd';
|
|
|
-import type { UploadProps } from 'antd';
|
|
|
-import { UploadOutlined } from '@ant-design/icons';
|
|
|
-import React, { useState , Component, useEffect } from 'react';
|
|
|
-import styled from 'styled-components';
|
|
|
-import JobStepOne from './JobStepOne';
|
|
|
-import JobStepTwo from './JobStepTwo';
|
|
|
+import {
|
|
|
+ Button,
|
|
|
+ Form,
|
|
|
+ Input,
|
|
|
+ Select,
|
|
|
+ Radio,
|
|
|
+ Space,
|
|
|
+ Upload,
|
|
|
+ Steps,
|
|
|
+ message,
|
|
|
+} from 'antd'
|
|
|
+import type { RadioChangeEvent } from 'antd'
|
|
|
+import type { UploadProps } from 'antd'
|
|
|
+import { UploadOutlined } from '@ant-design/icons'
|
|
|
+import React, { useState, Component, useEffect } from 'react'
|
|
|
+import styled from 'styled-components'
|
|
|
+import JobStepOne from './JobStepOne'
|
|
|
+import JobStepTwo from './JobStepTwo'
|
|
|
|
|
|
const JobCre = styled.div``
|
|
|
const CreContent = styled.div`
|
|
|
- background-color: #FFFFFF;
|
|
|
- height: 960px;
|
|
|
margin-left: 24px;
|
|
|
.ant-form {
|
|
|
display: flex;
|
|
@@ -19,7 +27,6 @@ const CreContent = styled.div`
|
|
|
justify-content: center;
|
|
|
flex-wrap: wrap;
|
|
|
align-items: stretch;
|
|
|
-
|
|
|
}
|
|
|
.creTitle {
|
|
|
width: 120px;
|
|
@@ -27,7 +34,7 @@ const CreContent = styled.div`
|
|
|
margin-left: 15px;
|
|
|
display: flex;
|
|
|
}
|
|
|
- .bluetTitle {
|
|
|
+ .bluetTitle {
|
|
|
background-color: rgba(24, 129, 218, 1);
|
|
|
width: 3px;
|
|
|
height: 16px;
|
|
@@ -36,7 +43,7 @@ const CreContent = styled.div`
|
|
|
}
|
|
|
.creText {
|
|
|
width: 105px;
|
|
|
- height: 20px;
|
|
|
+ height: 20px;
|
|
|
margin-left: 10px;
|
|
|
overflow-wrap: break-word;
|
|
|
color: rgba(74, 74, 74, 1);
|
|
@@ -51,43 +58,43 @@ const CreContent = styled.div`
|
|
|
top: 36%;
|
|
|
padding-left: 7px;
|
|
|
height: 20px;
|
|
|
- border-left: 1px solid
|
|
|
+ border-left: 1px solid;
|
|
|
}
|
|
|
.ant-col {
|
|
|
flex: unset;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.ant-select {
|
|
|
width: 295px;
|
|
|
height: 32px;
|
|
|
}
|
|
|
.ant-form-item-control-input {
|
|
|
- width:295px;
|
|
|
+ width: 295px;
|
|
|
}
|
|
|
.ant-row {
|
|
|
margin-left: 60px;
|
|
|
}
|
|
|
.JsPyInfo {
|
|
|
- width:464px;
|
|
|
+ width: 464px;
|
|
|
.ant-form {
|
|
|
align-content: end;
|
|
|
}
|
|
|
.choseJs {
|
|
|
.ant-row {
|
|
|
margin-left: 43px;
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
.ant-form-item-control-input {
|
|
|
- left: 11px;
|
|
|
- }
|
|
|
- .upButton {
|
|
|
- width: 88px;
|
|
|
- height: 32px;
|
|
|
- margin-left: 7px;
|
|
|
- background-color: #4883FB;
|
|
|
- color: white;
|
|
|
- }
|
|
|
+ left: 11px;
|
|
|
+ }
|
|
|
+ .upButton {
|
|
|
+ width: 88px;
|
|
|
+ height: 32px;
|
|
|
+ margin-left: 7px;
|
|
|
+ background-color: #4883fb;
|
|
|
+ color: white;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
.mirrorLeft {
|
|
|
margin-left: -25px;
|
|
@@ -110,14 +117,14 @@ const CreContent = styled.div`
|
|
|
margin-left: 67px;
|
|
|
}
|
|
|
.ant-steps-label-vertical .ant-steps-item-content {
|
|
|
- width:220px
|
|
|
+ width: 220px;
|
|
|
}
|
|
|
}
|
|
|
- `
|
|
|
+`
|
|
|
|
|
|
-const { Option } = Select;
|
|
|
+const { Option } = Select
|
|
|
const FormItem = Form.Item
|
|
|
-const RadioGroup = Radio.Group;
|
|
|
+const RadioGroup = Radio.Group
|
|
|
|
|
|
const layout = {
|
|
|
labelCol: {
|
|
@@ -126,30 +133,28 @@ const layout = {
|
|
|
wrapperCol: {
|
|
|
span: 16,
|
|
|
},
|
|
|
-};
|
|
|
+}
|
|
|
const tailLayout = {
|
|
|
wrapperCol: {
|
|
|
offset: 8,
|
|
|
span: 16,
|
|
|
},
|
|
|
-};
|
|
|
-export default function JobCreate () {
|
|
|
- // 设置背景颜色
|
|
|
- document.body.style.background = '#F0F2F5'
|
|
|
- const [form] = Form.useForm();
|
|
|
- const { Step } = Steps
|
|
|
-
|
|
|
+}
|
|
|
+export default function JobCreate() {
|
|
|
+ const [form] = Form.useForm()
|
|
|
+ const { Step } = Steps
|
|
|
+
|
|
|
// 显示/隐藏配置Js作业信息模块
|
|
|
- const [JsIsShow,setJsIsShow]=useState('none')
|
|
|
+ const [JsIsShow, setJsIsShow] = useState('none')
|
|
|
|
|
|
// 显示/隐藏配置Python作业信息模块
|
|
|
- const [PyIsShow,setPyIsShow]=useState('none')
|
|
|
+ const [PyIsShow, setPyIsShow] = useState('none')
|
|
|
|
|
|
// 显示/隐藏配置Dag作业信息模块
|
|
|
- const [DagIsShow,setDagIsShow]=useState('none')
|
|
|
+ const [DagIsShow, setDagIsShow] = useState('none')
|
|
|
|
|
|
// 单选框动态传值
|
|
|
- const [value, setValue] = useState(1);
|
|
|
+ const [value, setValue] = useState(1)
|
|
|
|
|
|
// 步骤数
|
|
|
const [currentStep, setCurrentStep] = useState(0)
|
|
@@ -159,11 +164,11 @@ export default function JobCreate () {
|
|
|
const [currentForm, setCurrentForm] = useState(drawDataForm)
|
|
|
|
|
|
// 设置单选框value值
|
|
|
- const onChange = (e) => {
|
|
|
- console.log('radio checked', e.target.value);
|
|
|
- setValue(e.target.value);
|
|
|
- };
|
|
|
-
|
|
|
+ const onChange = e => {
|
|
|
+ console.log('radio checked', e.target.value)
|
|
|
+ setValue(e.target.value)
|
|
|
+ }
|
|
|
+
|
|
|
//上传文件配置
|
|
|
const UpProps: UploadProps = {
|
|
|
name: 'file',
|
|
@@ -175,29 +180,27 @@ export default function JobCreate () {
|
|
|
// 上传文件提交状态
|
|
|
onChange(info) {
|
|
|
if (info.file.status !== 'uploading') {
|
|
|
- console.log(info.file, info.fileList);
|
|
|
+ console.log(info.file, info.fileList)
|
|
|
}
|
|
|
if (info.file.status === 'done') {
|
|
|
- message.success(`${info.file.name} file uploaded successfully`);
|
|
|
+ message.success(`${info.file.name} file uploaded successfully`)
|
|
|
} else if (info.file.status === 'error') {
|
|
|
- message.error(`${info.file.name} file upload failed.`);
|
|
|
+ message.error(`${info.file.name} file upload failed.`)
|
|
|
}
|
|
|
},
|
|
|
- };
|
|
|
+ }
|
|
|
|
|
|
//根据作业类型做出判断
|
|
|
- const onGenderChange = (value) => {
|
|
|
- if (value === "Java") {
|
|
|
+ const onGenderChange = value => {
|
|
|
+ if (value === 'Java') {
|
|
|
setJsIsShow('block')
|
|
|
setDagIsShow('none')
|
|
|
- setPyIsShow('none')
|
|
|
- }
|
|
|
- else if (value === "Python") {
|
|
|
+ setPyIsShow('none')
|
|
|
+ } else if (value === 'Python') {
|
|
|
setJsIsShow('none')
|
|
|
setDagIsShow('none')
|
|
|
- setPyIsShow('block')
|
|
|
- }
|
|
|
- else if (value === "Dag") {
|
|
|
+ setPyIsShow('block')
|
|
|
+ } else if (value === 'Dag') {
|
|
|
setJsIsShow('none')
|
|
|
setDagIsShow('block')
|
|
|
setPyIsShow('none')
|
|
@@ -211,7 +214,7 @@ export default function JobCreate () {
|
|
|
|
|
|
//下一步
|
|
|
const nextStep = () => {
|
|
|
- changeStep(1)
|
|
|
+ changeStep(1)
|
|
|
}
|
|
|
|
|
|
useEffect(() => {
|
|
@@ -222,315 +225,274 @@ export default function JobCreate () {
|
|
|
break
|
|
|
default:
|
|
|
break
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }},[currentStep])
|
|
|
+ }
|
|
|
+ }, [currentStep])
|
|
|
return (
|
|
|
<JobCre>
|
|
|
- <div>
|
|
|
- <header style={{
|
|
|
- height: '40px',
|
|
|
- fontSize: '14px',
|
|
|
- paddingLeft: '24px',
|
|
|
- lineHeight: '40px',
|
|
|
- backgroundColor: 'white',
|
|
|
- marginBottom: '16px',
|
|
|
- }}>
|
|
|
- <span>
|
|
|
- 作业列表
|
|
|
- </span>
|
|
|
- </header>
|
|
|
- </div>
|
|
|
- <CreContent>
|
|
|
- <div className="choseJob">
|
|
|
- <div className='creTitle'>
|
|
|
- <div className='bluetTitle' />
|
|
|
- <span className='creText'>配置作业类型</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- {/* 作业类型选择 */}
|
|
|
- <Form {...layout} form={form} name="control-hooks" >
|
|
|
- <FormItem
|
|
|
- name="type
|
|
|
+ <CreContent>
|
|
|
+ <div className="choseJob">
|
|
|
+ <div className="creTitle">
|
|
|
+ <div className="bluetTitle" />
|
|
|
+ <span className="creText">配置作业类型</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {/* 作业类型选择 */}
|
|
|
+ <Form {...layout} form={form} name="control-hooks">
|
|
|
+ <FormItem
|
|
|
+ name="type
|
|
|
"
|
|
|
- label="选择作业类型"
|
|
|
- rules={[
|
|
|
- {
|
|
|
- required: true,
|
|
|
- },
|
|
|
- ]}
|
|
|
- >
|
|
|
- <Select
|
|
|
- placeholder="请选择作业类型..."
|
|
|
- onChange={onGenderChange}
|
|
|
- allowClear
|
|
|
- value = {value}
|
|
|
- >
|
|
|
- <Option value="Java">Java</Option>
|
|
|
- <Option value="Python">Python</Option>
|
|
|
- <Option value="Dag">Dag</Option>
|
|
|
- </Select>
|
|
|
- </FormItem>
|
|
|
- </Form>
|
|
|
- </div>
|
|
|
- <div className="DagInfo" style={{display: DagIsShow}}>
|
|
|
- <Steps labelPlacement="vertical" size="small" current={currentStep}>
|
|
|
- <Step title="步骤1: 配置作业信息" />
|
|
|
- <Step title="步骤2: 定义输入数据源" />
|
|
|
- <Step title="步骤3: 定义输出数据源" />
|
|
|
- </Steps>
|
|
|
- <div className='creTitle'>
|
|
|
- <div className='bluetTitle' />
|
|
|
- <span className='creText'>配置作业信息</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- {/* 配置Dag作业信息 */}
|
|
|
-
|
|
|
- {/* 第一步 */}
|
|
|
- {currentStep === 0 && (
|
|
|
- <JobStepOne
|
|
|
- drawDataForm={drawDataForm}
|
|
|
- />
|
|
|
- )}
|
|
|
-
|
|
|
- {/* 第二步 */}
|
|
|
- {currentStep === 1 && (
|
|
|
- <JobStepTwo/>
|
|
|
- )}
|
|
|
-
|
|
|
- <Space style={{ margin: '20px' }}>
|
|
|
- <Button onClick={() => {changeStep(-1)}}>上一步</Button>
|
|
|
- <Button type="primary" onClick={nextStep}>下一步</Button>
|
|
|
- </Space>
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
- {/* 配置Js作业信息 */}
|
|
|
- <div className="JsPyInfo" style={{display: JsIsShow}}>
|
|
|
- <div className='creTitle'>
|
|
|
- <div className='bluetTitle' />
|
|
|
- <span className='creText'>配置作业信息</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- {/* 输入作业名称 */}
|
|
|
- <Form {...layout} form={form} name="control-hooks" >
|
|
|
- <FormItem
|
|
|
- name="JsJobName
|
|
|
+ label="选择作业类型"
|
|
|
+ rules={[
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
+ <Select
|
|
|
+ placeholder="请选择作业类型..."
|
|
|
+ onChange={onGenderChange}
|
|
|
+ allowClear
|
|
|
+ value={value}>
|
|
|
+ <Option value="Java">Java</Option>
|
|
|
+ <Option value="Python">Python</Option>
|
|
|
+ <Option value="Dag">Dag</Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+ </div>
|
|
|
+ <div className="DagInfo" style={{ display: DagIsShow }}>
|
|
|
+ <Steps labelPlacement="vertical" size="small" current={currentStep}>
|
|
|
+ <Step title="步骤1: 配置作业信息" />
|
|
|
+ <Step title="步骤2: 定义输入数据源" />
|
|
|
+ <Step title="步骤3: 定义输出数据源" />
|
|
|
+ </Steps>
|
|
|
+ <div className="creTitle">
|
|
|
+ <div className="bluetTitle" />
|
|
|
+ <span className="creText">配置作业信息</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {/* 配置Dag作业信息 */}
|
|
|
+
|
|
|
+ {/* 第一步 */}
|
|
|
+ {currentStep === 0 && <JobStepOne drawDataForm={drawDataForm} />}
|
|
|
+
|
|
|
+ {/* 第二步 */}
|
|
|
+ {currentStep === 1 && <JobStepTwo />}
|
|
|
+
|
|
|
+ <Space style={{ margin: '20px' }}>
|
|
|
+ <Button
|
|
|
+ onClick={() => {
|
|
|
+ changeStep(-1)
|
|
|
+ }}>
|
|
|
+ 上一步
|
|
|
+ </Button>
|
|
|
+ <Button type="primary" onClick={nextStep}>
|
|
|
+ 下一步
|
|
|
+ </Button>
|
|
|
+ </Space>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {/* 配置Js作业信息 */}
|
|
|
+ <div className="JsPyInfo" style={{ display: JsIsShow }}>
|
|
|
+ <div className="creTitle">
|
|
|
+ <div className="bluetTitle" />
|
|
|
+ <span className="creText">配置作业信息</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {/* 输入作业名称 */}
|
|
|
+ <Form {...layout} form={form} name="control-hooks">
|
|
|
+ <FormItem
|
|
|
+ name="JsJobName
|
|
|
"
|
|
|
- label="作业名称"
|
|
|
- rules={[
|
|
|
- {
|
|
|
- required: true,
|
|
|
- },
|
|
|
- ]}
|
|
|
- >
|
|
|
- <Input
|
|
|
- placeholder="请输入作业名称..."
|
|
|
- allowClear
|
|
|
- >
|
|
|
- </Input>
|
|
|
- </FormItem>
|
|
|
- </Form>
|
|
|
-
|
|
|
- {/* 选择作业分类 */}
|
|
|
- <Form {...layout} form={form} name="control-hooks">
|
|
|
- <FormItem
|
|
|
- name="JsJobSort
|
|
|
+ label="作业名称"
|
|
|
+ rules={[
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
+ <Input placeholder="请输入作业名称..." allowClear></Input>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+
|
|
|
+ {/* 选择作业分类 */}
|
|
|
+ <Form {...layout} form={form} name="control-hooks">
|
|
|
+ <FormItem
|
|
|
+ name="JsJobSort
|
|
|
"
|
|
|
- label="作业分类"
|
|
|
- rules={[
|
|
|
- {
|
|
|
- required: true,
|
|
|
- },
|
|
|
- ]}
|
|
|
- >
|
|
|
- <Select
|
|
|
- placeholder="请选择作业分类..."
|
|
|
- allowClear
|
|
|
- >
|
|
|
- <Option value="Java">Java</Option>
|
|
|
- <Option value="Python">Python</Option>
|
|
|
- <Option value="Dag">Dag</Option>
|
|
|
- </Select>
|
|
|
- </FormItem>
|
|
|
- </Form>
|
|
|
-
|
|
|
- {/* 选择执行镜像 */}
|
|
|
- <Form {...layout} form={form} name="control-hooks">
|
|
|
- <FormItem
|
|
|
- className='mirrorLeft'
|
|
|
- name="JsMirror
|
|
|
+ label="作业分类"
|
|
|
+ rules={[
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
+ <Select placeholder="请选择作业分类..." allowClear>
|
|
|
+ <Option value="Java">Java</Option>
|
|
|
+ <Option value="Python">Python</Option>
|
|
|
+ <Option value="Dag">Dag</Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+
|
|
|
+ {/* 选择执行镜像 */}
|
|
|
+ <Form {...layout} form={form} name="control-hooks">
|
|
|
+ <FormItem
|
|
|
+ className="mirrorLeft"
|
|
|
+ name="JsMirror
|
|
|
"
|
|
|
- label="配置执行的镜像"
|
|
|
- rules={[
|
|
|
- {
|
|
|
- required: true,
|
|
|
- },
|
|
|
- ]}
|
|
|
- >
|
|
|
- <Select
|
|
|
- placeholder="请选择镜像..."
|
|
|
- allowClear
|
|
|
- >
|
|
|
- <Option value="Java">Java</Option>
|
|
|
- <Option value="Python">Python</Option>
|
|
|
- <Option value="Dag">Dag</Option>
|
|
|
- </Select>
|
|
|
- </FormItem>
|
|
|
- </Form>
|
|
|
-
|
|
|
- {/* 选择执行的Java脚本 */}
|
|
|
- <Form {...layout} form={form} name="control-hooks" className='choseJs'>
|
|
|
- <FormItem
|
|
|
- className='mirrorLeft'
|
|
|
- label="配置执行的Java脚本"
|
|
|
- name="JsScripter"
|
|
|
- rules={[
|
|
|
- {
|
|
|
- required: true,
|
|
|
- },
|
|
|
- ]}
|
|
|
- >
|
|
|
- <RadioGroup onChange={onChange} value={value}>
|
|
|
- <Space direction="vertical" className='jsSel'>
|
|
|
- <Radio value={1}>
|
|
|
- <Select
|
|
|
- placeholder="在工作目录中选择"
|
|
|
- allowClear
|
|
|
- className='javaSelect'
|
|
|
- disabled={value === 1 ? false : true}
|
|
|
- >
|
|
|
- <Option value="Java">Java</Option>
|
|
|
- <Option value="Python">Python</Option>
|
|
|
- <Option value="Dag">Dag</Option>
|
|
|
- </Select>
|
|
|
- </Radio>
|
|
|
-
|
|
|
- <Radio value={4}>
|
|
|
- <Upload {...UpProps}>
|
|
|
- <Button className='upButton'>本地上传</Button>
|
|
|
- </Upload>
|
|
|
- </Radio>
|
|
|
- </Space>
|
|
|
- </RadioGroup>
|
|
|
- </FormItem>
|
|
|
- </Form>
|
|
|
- </div>
|
|
|
-
|
|
|
- {/* 配置Python作业信息 */}
|
|
|
- <div className="JsPyInfo" style={{display: PyIsShow}}>
|
|
|
- <div className='creTitle'>
|
|
|
- <div className='bluetTitle' />
|
|
|
- <span className='creText'>配置作业信息</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- {/* 输入作业名称 */}
|
|
|
- <Form {...layout} form={form} name="control-hooks" >
|
|
|
- <FormItem
|
|
|
- name="PyJobName
|
|
|
+ label="配置执行的镜像"
|
|
|
+ rules={[
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
+ <Select placeholder="请选择镜像..." allowClear>
|
|
|
+ <Option value="Java">Java</Option>
|
|
|
+ <Option value="Python">Python</Option>
|
|
|
+ <Option value="Dag">Dag</Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+
|
|
|
+ {/* 选择执行的Java脚本 */}
|
|
|
+ <Form
|
|
|
+ {...layout}
|
|
|
+ form={form}
|
|
|
+ name="control-hooks"
|
|
|
+ className="choseJs">
|
|
|
+ <FormItem
|
|
|
+ className="mirrorLeft"
|
|
|
+ label="配置执行的Java脚本"
|
|
|
+ name="JsScripter"
|
|
|
+ rules={[
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
+ <RadioGroup onChange={onChange} value={value}>
|
|
|
+ <Space direction="vertical" className="jsSel">
|
|
|
+ <Radio value={1}>
|
|
|
+ <Select
|
|
|
+ placeholder="在工作目录中选择"
|
|
|
+ allowClear
|
|
|
+ className="javaSelect"
|
|
|
+ disabled={value === 1 ? false : true}>
|
|
|
+ <Option value="Java">Java</Option>
|
|
|
+ <Option value="Python">Python</Option>
|
|
|
+ <Option value="Dag">Dag</Option>
|
|
|
+ </Select>
|
|
|
+ </Radio>
|
|
|
+
|
|
|
+ <Radio value={4}>
|
|
|
+ <Upload {...UpProps}>
|
|
|
+ <Button className="upButton">本地上传</Button>
|
|
|
+ </Upload>
|
|
|
+ </Radio>
|
|
|
+ </Space>
|
|
|
+ </RadioGroup>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {/* 配置Python作业信息 */}
|
|
|
+ <div className="JsPyInfo" style={{ display: PyIsShow }}>
|
|
|
+ <div className="creTitle">
|
|
|
+ <div className="bluetTitle" />
|
|
|
+ <span className="creText">配置作业信息</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {/* 输入作业名称 */}
|
|
|
+ <Form {...layout} form={form} name="control-hooks">
|
|
|
+ <FormItem
|
|
|
+ name="PyJobName
|
|
|
"
|
|
|
- label="作业名称"
|
|
|
- rules={[
|
|
|
- {
|
|
|
- required: true,
|
|
|
- },
|
|
|
- ]}
|
|
|
- >
|
|
|
- <Input
|
|
|
- placeholder="请输入作业名称..."
|
|
|
- allowClear
|
|
|
- >
|
|
|
- </Input>
|
|
|
- </FormItem>
|
|
|
- </Form>
|
|
|
-
|
|
|
- {/* 选择作业分类 */}
|
|
|
- <Form {...layout} form={form} name="control-hooks">
|
|
|
- <FormItem
|
|
|
- name="PyJobSort
|
|
|
+ label="作业名称"
|
|
|
+ rules={[
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
+ <Input placeholder="请输入作业名称..." allowClear></Input>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+
|
|
|
+ {/* 选择作业分类 */}
|
|
|
+ <Form {...layout} form={form} name="control-hooks">
|
|
|
+ <FormItem
|
|
|
+ name="PyJobSort
|
|
|
"
|
|
|
- label="作业分类"
|
|
|
- rules={[
|
|
|
- {
|
|
|
- required: true,
|
|
|
- },
|
|
|
- ]}
|
|
|
- >
|
|
|
- <Select
|
|
|
- placeholder="请选择作业分类..."
|
|
|
- allowClear
|
|
|
- >
|
|
|
- <Option value="Java">Java</Option>
|
|
|
- <Option value="Python">Python</Option>
|
|
|
- <Option value="Dag">Dag</Option>
|
|
|
- </Select>
|
|
|
- </FormItem>
|
|
|
- </Form>
|
|
|
-
|
|
|
- {/* 选择执行镜像 */}
|
|
|
- <Form {...layout} form={form} name="control-hooks">
|
|
|
- <FormItem
|
|
|
- className='mirrorLeft'
|
|
|
- name="PyMirror
|
|
|
+ label="作业分类"
|
|
|
+ rules={[
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
+ <Select placeholder="请选择作业分类..." allowClear>
|
|
|
+ <Option value="Java">Java</Option>
|
|
|
+ <Option value="Python">Python</Option>
|
|
|
+ <Option value="Dag">Dag</Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+
|
|
|
+ {/* 选择执行镜像 */}
|
|
|
+ <Form {...layout} form={form} name="control-hooks">
|
|
|
+ <FormItem
|
|
|
+ className="mirrorLeft"
|
|
|
+ name="PyMirror
|
|
|
"
|
|
|
- label="配置执行的镜像"
|
|
|
- rules={[
|
|
|
- {
|
|
|
- required: true,
|
|
|
- },
|
|
|
- ]}
|
|
|
- >
|
|
|
- <Select
|
|
|
- placeholder="请选择镜像..."
|
|
|
- allowClear
|
|
|
- >
|
|
|
- <Option value="Java">Java</Option>
|
|
|
- <Option value="Python">Python</Option>
|
|
|
- <Option value="Dag">Dag</Option>
|
|
|
- </Select>
|
|
|
- </FormItem>
|
|
|
- </Form>
|
|
|
-
|
|
|
- {/* 选择执行的Java脚本 */}
|
|
|
- <Form {...layout} form={form} name="control-hooks" className='choseJs'>
|
|
|
- <FormItem
|
|
|
- className='mirrorLeft'
|
|
|
- label="配置执行的Java脚本"
|
|
|
- name="PyScripter"
|
|
|
- rules={[
|
|
|
- {
|
|
|
- required: true,
|
|
|
- },
|
|
|
- ]}
|
|
|
- >
|
|
|
- <RadioGroup onChange={onChange} value={value}>
|
|
|
- <Space direction="vertical" className='jsSel'>
|
|
|
- <Radio value={1}>
|
|
|
- <Select
|
|
|
- placeholder="在工作目录中选择"
|
|
|
- allowClear
|
|
|
- className='javaSelect'
|
|
|
- disabled={value === 1 ? false : true}
|
|
|
- >
|
|
|
- <Option value="Java">Java</Option>
|
|
|
- <Option value="Python">Python</Option>
|
|
|
- <Option value="Dag">Dag</Option>
|
|
|
- </Select>
|
|
|
- </Radio>
|
|
|
-
|
|
|
- <Radio value={2}>
|
|
|
- <Upload {...UpProps}>
|
|
|
- <Button className='upButton'>本地上传</Button>
|
|
|
- </Upload>
|
|
|
- </Radio>
|
|
|
- </Space>
|
|
|
- </RadioGroup>
|
|
|
- </FormItem>
|
|
|
- </Form>
|
|
|
- </div>
|
|
|
- </CreContent>
|
|
|
- </JobCre>
|
|
|
- );
|
|
|
-};
|
|
|
+ label="配置执行的镜像"
|
|
|
+ rules={[
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
+ <Select placeholder="请选择镜像..." allowClear>
|
|
|
+ <Option value="Java">Java</Option>
|
|
|
+ <Option value="Python">Python</Option>
|
|
|
+ <Option value="Dag">Dag</Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+
|
|
|
+ {/* 选择执行的Java脚本 */}
|
|
|
+ <Form
|
|
|
+ {...layout}
|
|
|
+ form={form}
|
|
|
+ name="control-hooks"
|
|
|
+ className="choseJs">
|
|
|
+ <FormItem
|
|
|
+ className="mirrorLeft"
|
|
|
+ label="配置执行的Java脚本"
|
|
|
+ name="PyScripter"
|
|
|
+ rules={[
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
+ <RadioGroup onChange={onChange} value={value}>
|
|
|
+ <Space direction="vertical" className="jsSel">
|
|
|
+ <Radio value={1}>
|
|
|
+ <Select
|
|
|
+ placeholder="在工作目录中选择"
|
|
|
+ allowClear
|
|
|
+ className="javaSelect"
|
|
|
+ disabled={value === 1 ? false : true}>
|
|
|
+ <Option value="Java">Java</Option>
|
|
|
+ <Option value="Python">Python</Option>
|
|
|
+ <Option value="Dag">Dag</Option>
|
|
|
+ </Select>
|
|
|
+ </Radio>
|
|
|
+
|
|
|
+ <Radio value={2}>
|
|
|
+ <Upload {...UpProps}>
|
|
|
+ <Button className="upButton">本地上传</Button>
|
|
|
+ </Upload>
|
|
|
+ </Radio>
|
|
|
+ </Space>
|
|
|
+ </RadioGroup>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+ </div>
|
|
|
+ </CreContent>
|
|
|
+ </JobCre>
|
|
|
+ )
|
|
|
+}
|