This commit is contained in:
zhichen 2018-10-26 18:56:30 +08:00
parent c8804a5205
commit 91cc27a0cc
4 changed files with 12 additions and 14 deletions

View File

@ -107,7 +107,7 @@ class ConfigEditor extends React.Component {
this.tenant = window.getParams('namespace') || ''; //为当前实例保存tenant参数
window.hashHistory.push(`${url}?serverId=${this.serverId || ''}&dataId=${this.dataId}&group=${this.group}&namespace=${this.tenant}`);
}
openLoading() {
this.setState({
loading: true
@ -356,7 +356,7 @@ class ConfigEditor extends React.Component {
callback();
}
}
changeEnv(values) {
this.targetEnvs = values;
this.setState({
@ -550,14 +550,14 @@ class ConfigEditor extends React.Component {
</div>
</FormItem>
<div style={{ height: this.state.showmore ? 'auto' : '0', overflow: 'hidden' }}>
<FormItem label={window.aliwareIntl.get('nacos.page.configeditor.Tags')} {...formItemLayout}>
<Select size="medium" hasArrow style={{ width: '100%' }} autoWidth={true} multiple={true} mode="tag" filterLocal={true} placeholder={window.aliwareIntl.get('nacos.page.configurationManagement.Please_enter_tag')} dataSource={this.state.tagLst} value={this.state.config_tags} onChange={this.setConfigTags.bind(this)} hasClear language={window.aliwareIntl.currentLanguageCode}>
</Select>
</FormItem>
<FormItem label={window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.the_target_environment:')} {...formItemLayout}>
<Input {...init('appName')} readOnly={this.inApp} />
<Input {...init('appName')} readOnly={!!this.inApp} />
</FormItem>
</div>
@ -573,13 +573,12 @@ class ConfigEditor extends React.Component {
</Balloon>:</span>} {...formItemLayout}>
<div style={{ clear: 'both', height: 300 }} id="container"></div>
</FormItem>
{}
<FormItem {...formItemLayout} label="">
<div style={{ textAlign: 'right' }}>
{activeKey === 'beta' ? <Button style={{ marginRight: 10 }} type="primary" onClick={this.openDiff.bind(this, true)}>{window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.release')}</Button> : ''}
{activeKey === 'normal' ? <Button type="primary" disabled={this.state.hasbeta} style={{ marginRight: 10 }} onClick={this.openDiff.bind(this, this.state.checkedBeta)}>{this.state.checkedBeta ? window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.release') : window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.return')}</Button> : <Button type="primary" style={{ marginRight: 10 }} onClick={this.openDiff.bind(this, false)}>{window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.return')}</Button>}
<Button type="light" onClick={this.goList.bind(this)}>{window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.')}</Button>
<Button type="normal" onClick={this.goList.bind(this)}>{window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.')}</Button>
</div>
</FormItem>
</Form>

View File

@ -111,10 +111,10 @@ class ConfigRollback extends React.Component {
let url = `/nacos/v1/cs/configs`;
if (self.opType.trim() === 'I') {
url = `/nacos/v1/cs/configs?dataId=${self.dataId}&group=${self.group}`;
postData = {};
url = `/nacos/v1/cs/configs?dataId=${self.dataId}&group=${self.group}`;
postData = {};
}
// ajax
window.request({
type: type,
@ -171,7 +171,7 @@ class ConfigRollback extends React.Component {
</FormItem>
<FormItem label=" " {...formItemLayout}>
<Button type="primary" style={{ marginRight: 10 }} onClick={this.onOpenConfirm.bind(this)}>{window.aliwareIntl.get('com.alibaba.nacos.page.configRollback.rollback')}</Button>
<Button type="light" onClick={this.goList.bind(this)}>{window.aliwareIntl.get('com.alibaba.nacos.page.configRollback.return')}</Button>
<Button type="normal" onClick={this.goList.bind(this)}>{window.aliwareIntl.get('com.alibaba.nacos.page.configRollback.return')}</Button>
</FormItem>
</Form>

View File

@ -11,7 +11,6 @@ import { Balloon, Button, Checkbox, Collapse, Dialog, Dropdown, Field, Form, Ico
const Accordion = Collapse;
const FormItem = Form.Item;
const { Panel } = Collapse;
const { AutoComplete: Combobox } = Select;
/*****************************此行为标记行, 请勿删和修改此行, 文件和组件依赖请写在此行上面, 主体代码请写在此行下面的class中*****************************/
const DashboardCard = ({ data, height }) => <div>
@ -601,8 +600,8 @@ class ConfigurationManagement extends React.Component {
</FormItem>
<FormItem label={"Group:"}>
<Combobox style={{ width: 200 }} size={"medium"} hasArrow placeholder={window.aliwareIntl.get('com.alibaba.nacos.page.configurationManagement.fuzzyg')} dataSource={this.state.groups} value={this.state.group} onChange={this.setGroup.bind(this)} hasClear language={window.aliwareIntl.currentLanguageCode}>
</Combobox>
<Select.AutoComplete style={{ width: 200 }} size={"medium"} placeholder={window.aliwareIntl.get('com.alibaba.nacos.page.configurationManagement.fuzzyg')} dataSource={this.state.groups} value={this.state.group} onChange={this.setGroup.bind(this)} hasClear language={window.aliwareIntl.currentLanguageCode}>
</Select.AutoComplete>
</FormItem>
<FormItem label={""}>
<Button type={"primary"} style={{ marginRight: 10 }} onClick={this.selectAll.bind(this)} data-spm-click={"gostr=/aliyun;locaid=dashsearch"}>{window.aliwareIntl.get('com.alibaba.nacos.page.configurationManagement.query')}</Button>

View File

@ -141,7 +141,7 @@ class ListeningToQuery extends React.Component {
<Row className="demo-row" style={{ marginBottom: 10, padding: 0 }}>
<Col span="24">
<Form inline field={this.field}>
<FormItem label={window.aliwareIntl.get('com.alibaba.nacos.page.listeningToQuery.query_dimension')} initValue="0">
<FormItem label={window.aliwareIntl.get('com.alibaba.nacos.page.listeningToQuery.query_dimension')}>
<Select dataSource={selectDataSource} style={{ width: 200 }} {...this.init('type')} language={window.aliwareIntl.currentLanguageCode} />
</FormItem>
<FormItem label="Data ID:" style={{