Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
group show
  • Loading branch information
yanlinly committed Oct 26, 2018
1 parent 90e5c95 commit acfac48
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,14 @@ class ConfigDetail extends React.Component {

<FormItem label={"Data ID:"} required {...formItemLayout}>
<Input htmlType={"text"} readOnly={true} {...init('dataId')} />
<div style={{ marginTop: 10 }}>
<a style={{ fontSize: '12px' }} onClick={this.toggleMore.bind(this)}>{this.state.showmore ? window.aliwareIntl.get('com.alibaba.nacos.page.configdetail.recipient_from') : window.aliwareIntl.get('com.alibaba.nacos.page.configdetail.more_advanced_options')}</a>
</div>
</FormItem>

{this.state.showmore ? <div>
<FormItem label={"Group:"} required {...formItemLayout}>
<FormItem label={"Group:"} required {...formItemLayout}>
<Input htmlType={"text"} readOnly={true} {...init('group')} />
</FormItem>
</FormItem>
<div style={{ marginTop: 10 }}>
<a style={{ fontSize: '12px' }} onClick={this.toggleMore.bind(this)}>{this.state.showmore ? window.aliwareIntl.get('com.alibaba.nacos.page.configdetail.recipient_from') : window.aliwareIntl.get('com.alibaba.nacos.page.configdetail.more_advanced_options')}</a>
</div>
{this.state.showmore ? <div>
<FormItem label={window.aliwareIntl.get('com.alibaba.nacos.page.configdetail.home')} {...formItemLayout}>
<Input htmlType={"text"} readOnly={true} {...init('appName')} />
</FormItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,20 +536,21 @@ class ConfigEditor extends React.Component {
})} />

</FormItem>
<FormItem label="Group:" {...formItemLayout}>
<Input disabled={true} {...init('group', {
rules: [{
required: true,
message: window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.Home_application:')
}, { validator: this.validateChart.bind(this) }]
})} />
</FormItem>
<FormItem label="" {...formItemLayout}>
<div>
<a style={{ fontSize: '12px' }} onClick={this.toggleMore.bind(this)}>{this.state.showmore ? window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.more_advanced_options') : window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.group_is_not_empty')}</a>
</div>
</FormItem>
<div style={{ height: this.state.showmore ? 'auto' : '0', overflow: 'hidden' }}>
<FormItem label="Group:" {...formItemLayout}>
<Input disabled={true} {...init('group', {
rules: [{
required: true,
message: window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.Home_application:')
}, { validator: this.validateChart.bind(this) }]
})} />
</FormItem>

<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>
Expand All @@ -570,7 +571,6 @@ class ConfigEditor extends React.Component {
<p>{window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.Esc_exit')}</p>
<p>{window.aliwareIntl.get('com.alibaba.nacos.page.configeditor.release_beta')}</p>
</Balloon>:</span>} {...formItemLayout}>

<div style={{ clear: 'both', height: 300 }} id="container"></div>
</FormItem>
{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,19 +317,6 @@ class NewConfig extends React.Component {
label: 'Properties'
}];

const groupInput = <FormItem label={"Group:"} required {...formItemLayout}>
<Combobox style={{ width: '100%' }} size={"large"} hasArrow dataSource={this.state.groups} placeholder={window.aliwareIntl.get("com.alibaba.nacos.page.newconfig.group_placeholder")} defaultValue={this.group} {...init('group', {
rules: [{
required: true,
message: window.aliwareIntl.get('com.alibaba.nacos.page.newconfig.the_more_advanced')
}, {
max: 127,
message: window.aliwareIntl.get('com.alibaba.nacos.page.newconfig.group_is_not_empty')
}, { validator: this.validateChart.bind(this) }]
})} onChange={this.setGroup.bind(this)} hasClear language={window.aliwareIntl.currentLanguageCode}>
</Combobox>
</FormItem>;

return (
<div style={{ padding: 10 }}>
<Loading shape={"flower"} tip={"Loading..."} style={{ width: '100%', position: 'relative' }} visible={this.state.loading} color={"#333"}>
Expand All @@ -347,7 +334,18 @@ class NewConfig extends React.Component {
})} addonTextBefore={this.state.addonBefore ? <div style={{ minWidth: 100, color: "#373D41" }}>{this.state.addonBefore}</div> : null} />

</FormItem>
{this.inEdas ? groupInput : ""}
<FormItem label={"Group:"} required {...formItemLayout}>
<Combobox style={{ width: '100%' }} size={"large"} hasArrow dataSource={this.state.groups} placeholder={window.aliwareIntl.get("com.alibaba.nacos.page.newconfig.group_placeholder")} defaultValue={this.group} {...init('group', {
rules: [{
required: true,
message: window.aliwareIntl.get('com.alibaba.nacos.page.newconfig.the_more_advanced')
}, {
max: 127,
message: window.aliwareIntl.get('com.alibaba.nacos.page.newconfig.group_is_not_empty')
}, { validator: this.validateChart.bind(this) }]
})} onChange={this.setGroup.bind(this)} hasClear language={window.aliwareIntl.currentLanguageCode}>
</Combobox>
</FormItem>
<FormItem label={" "} {...formItemLayout} style={{ display: this.state.showGroupWarning ? "block" : "none" }}>
<Message type={'warning'} size={'medium'} animation={false}>{window.aliwareIntl.get('nacos.page.newconfig.Note_You_are_to_be_a_custom_packet_the_new_configuration,_make_sure_that_the_client_use_the_Pandora_version_higher_than_3._4._0,_otherwise_it_may_read_less_than_the_configuration.0')}</Message>
</FormItem>
Expand All @@ -356,10 +354,8 @@ class NewConfig extends React.Component {
<a style={{ fontSize: '12px' }} onClick={this.toggleMore.bind(this)}>{this.state.showmore ? window.aliwareIntl.get('com.alibaba.nacos.page.newconfig.Data_ID_length') : window.aliwareIntl.get('com.alibaba.nacos.page.newconfig.collapse')}</a>
</div>
</FormItem>

<div style={{ overflow: 'hidden', height: this.state.showmore ? 'auto' : '0' }}>
{this.inEdas ? "" : groupInput}

<FormItem label={window.aliwareIntl.get('nacos.page.newconfig.Tags')} {...formItemLayout}>
<Select size={"medium"} hasArrow style={{ width: '100%', height: '100%!important' }} 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>
Expand Down

0 comments on commit acfac48

Please sign in to comment.