update global settings page
This commit is contained in:
parent
4f1d48f89b
commit
6da49c1f40
|
@ -208,6 +208,12 @@ export default {
|
||||||
|
|
||||||
'app.settings.security.update':"Update Setting",
|
'app.settings.security.update':"Update Setting",
|
||||||
'app.settings.global.update':"Update Setting",
|
'app.settings.global.update':"Update Setting",
|
||||||
|
'app.settings.global.site_name':"Site Name",
|
||||||
|
'app.settings.global.domain':"Site Domain",
|
||||||
|
'app.settings.global.listen_addr':"Listen Address",
|
||||||
|
'app.settings.global.is_tls':"Enable TLS",
|
||||||
|
'app.settings.global.data_path':"Data Path",
|
||||||
|
'app.settings.global.log_path':"Log Path",
|
||||||
|
|
||||||
'app.settings.menuMap.basic': 'Basic Settings',
|
'app.settings.menuMap.basic': 'Basic Settings',
|
||||||
'app.settings.menuMap.security': 'Security Settings',
|
'app.settings.menuMap.security': 'Security Settings',
|
||||||
|
|
|
@ -216,6 +216,12 @@ export default {
|
||||||
|
|
||||||
'app.settings.security.update':"更新设置",
|
'app.settings.security.update':"更新设置",
|
||||||
'app.settings.global.update':"更新设置",
|
'app.settings.global.update':"更新设置",
|
||||||
|
'app.settings.global.site_name':"站点名称",
|
||||||
|
'app.settings.global.domain':"站点域名",
|
||||||
|
'app.settings.global.listen_addr':"监听地址",
|
||||||
|
'app.settings.global.is_tls':"是否开启 TLS",
|
||||||
|
'app.settings.global.data_path':"数据目录",
|
||||||
|
'app.settings.global.log_path':"日志目录",
|
||||||
|
|
||||||
'app.settings.menuMap.basic': '基本设置',
|
'app.settings.menuMap.basic': '基本设置',
|
||||||
'app.settings.menuMap.security': '安全设置',
|
'app.settings.menuMap.security': '安全设置',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, {Component, Fragment} from 'react';
|
import React, {Component, Fragment} from 'react';
|
||||||
import {connect} from 'dva';
|
import {connect} from 'dva';
|
||||||
import {Card, Form, Input, Select, Button, message, Divider, Drawer, Descriptions} from 'antd';
|
import {Card, Form, Input,Switch, Select, Button, message, Divider, Drawer, Descriptions} from 'antd';
|
||||||
|
|
||||||
const {Option} = Select;
|
const {Option} = Select;
|
||||||
import {formatMessage, FormattedMessage} from 'umi/locale';
|
import {formatMessage, FormattedMessage} from 'umi/locale';
|
||||||
|
@ -45,20 +45,99 @@ class Global extends Component {
|
||||||
hideRequiredMark >
|
hideRequiredMark >
|
||||||
|
|
||||||
< FormItem
|
< FormItem
|
||||||
label = {formatMessage({id: 'app.settings.global.cluster_name'})} >
|
label = {formatMessage({id: 'app.settings.global.site_name'})} >
|
||||||
{getFieldDecorator('address',
|
{getFieldDecorator('site_name',
|
||||||
{
|
|
||||||
rules: [
|
|
||||||
{
|
{
|
||||||
required: true,
|
rules: [
|
||||||
message: formatMessage({id: 'app.settings.basic.address-message'}, {}),
|
{
|
||||||
},
|
required: true,
|
||||||
],
|
message: formatMessage({id: 'app.settings.global.site_name-message'}, {}),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
( < Input / >)
|
||||||
|
}
|
||||||
|
</FormItem>
|
||||||
|
|
||||||
|
< FormItem
|
||||||
|
label = {formatMessage({id: 'app.settings.global.domain'})} >
|
||||||
|
{getFieldDecorator('domain',
|
||||||
|
{
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: formatMessage({id: 'app.settings.global.domain-message'}, {}),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
( < Input / >)
|
||||||
}
|
}
|
||||||
)
|
</FormItem>
|
||||||
|
< FormItem
|
||||||
|
label = {formatMessage({id: 'app.settings.global.listen_addr'})} >
|
||||||
|
{getFieldDecorator('listen_addr',
|
||||||
|
{
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: formatMessage({id: 'app.settings.global.listen_addr-message'}, {}),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
( < Input / >)
|
||||||
|
}
|
||||||
|
</FormItem>
|
||||||
|
<Form.Item label = {formatMessage({id: 'app.settings.global.is_tls'})}>
|
||||||
|
{getFieldDecorator('isTLS', {
|
||||||
|
initialValue: true,
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "勾选状态",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})(
|
||||||
|
<Switch defaultChecked onChange={()=>{}} />
|
||||||
|
)}
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
|
|
||||||
|
< FormItem
|
||||||
|
label = {formatMessage({id: 'app.settings.global.data_path'})} >
|
||||||
|
{getFieldDecorator('work_dir',
|
||||||
|
{
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: formatMessage({id: 'app.settings.global.data_path-message'}, {}),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
)
|
||||||
( < Input / >)
|
( < Input / >)
|
||||||
}
|
}
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
|
< FormItem
|
||||||
|
label = {formatMessage({id: 'app.settings.global.log_path'})} >
|
||||||
|
{getFieldDecorator('work_dir',
|
||||||
|
{
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: formatMessage({id: 'app.settings.global.log_path-message'}, {}),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
( < Input / >)
|
||||||
|
}
|
||||||
|
</FormItem>
|
||||||
|
|
||||||
|
|
||||||
< Button type = "primary" >
|
< Button type = "primary" >
|
||||||
< FormattedMessage
|
< FormattedMessage
|
||||||
id = "app.settings.global.update"
|
id = "app.settings.global.update"
|
||||||
|
|
Loading…
Reference in New Issue