diff --git a/spug_web/src/pages/schedule/Form.js b/spug_web/src/pages/schedule/Form.js index 5877dc1..41e2db6 100644 --- a/spug_web/src/pages/schedule/Form.js +++ b/spug_web/src/pages/schedule/Form.js @@ -1,7 +1,8 @@ import React from 'react'; import { observer } from 'mobx-react'; import { Modal, Form, Input, Select, Col, Button, Steps, Tabs, InputNumber, DatePicker, Icon, message } from 'antd'; -import { SHEditor } from 'components'; +import { LinkButton, SHEditor } from 'components'; +import TemplateSelector from '../exec/task/TemplateSelector'; import http from 'libs/http'; import store from './store'; import hostStore from '../host/store'; @@ -93,7 +94,7 @@ class ComForm extends React.Component { render() { const info = store.record; const {getFieldDecorator} = this.props.form; - const {page, args, loading} = this.state; + const {page, args, loading, showTmp} = this.state; const [b1, b2, b3] = this.verifyButtonStatus(); const itemLayout = { labelCol: {span: 6}, @@ -138,7 +139,11 @@ class ComForm extends React.Component { )} - + this.setState({showTmp: true})}>从模板添加}> this.setState({command: val})} @@ -222,6 +227,9 @@ class ComForm extends React.Component { } + {showTmp && this.setState({command})} + onCancel={() => this.setState({showTmp: false})} />} ) } diff --git a/spug_web/src/pages/schedule/Info.js b/spug_web/src/pages/schedule/Info.js index 1436a56..ee2b67b 100644 --- a/spug_web/src/pages/schedule/Info.js +++ b/spug_web/src/pages/schedule/Info.js @@ -46,7 +46,9 @@ class ComForm extends React.Component { {outputs && ( {outputs.map((item, index) => ( - + {item.name}}>
执行时间: {run_time}({moment(run_time).fromNow()})
运行耗时: {item.duration} s
返回状态: {item.code}