render()

in console-ui/src/pages/ConfigurationManagement/ConfigDetail/ConfigDetail.js [281:379]


  render() {
    const { locale = {} } = this.props;
    const { configCompareVisible, editorClass } = this.state;
    const { init } = this.field;
    const formItemLayout = {
      labelCol: {
        span: 2,
      },
      wrapperCol: {
        span: 22,
      },
    };
    const activeKey = this.state.activeKey.split('-')[0];
    return (
      <div>
        <Loading
          shape={'flower'}
          tip={'Loading...'}
          style={{ width: '100%', position: 'relative' }}
          visible={this.state.loading}
          color={'#333'}
        >
          <h1 style={{ position: 'relative', width: '100%' }}>{locale.configurationDetails}</h1>
          {this.state.hasbeta ? (
            <div style={{ display: 'inline-block', height: 40, width: '80%', overflow: 'hidden' }}>
              <Tab
                shape={'wrapped'}
                onChange={this.changeTab.bind(this)}
                lazyLoad={false}
                activeKey={this.state.activeKey}
              >
                {this.state.tag.map(tab => (
                  <TabPane title={tab.title} key={tab.key} />
                ))}
              </Tab>
            </div>
          ) : (
            ''
          )}
          <Form inline={false} field={this.field} {...formItemLayout}>
            <FormItem label={locale.namespace} required>
              <p>{this.namespaceId}</p>
            </FormItem>
            <FormItem label={'Data ID'} required>
              <Input htmlType={'text'} readOnly {...init('dataId')} />
            </FormItem>
            <FormItem label={'Group'} required>
              <Input htmlType={'text'} readOnly {...init('group')} />
            </FormItem>
            <FormItem label=" ">
              <div>
                <a style={{ fontSize: '12px' }} onClick={this.toggleMore.bind(this)}>
                  {this.state.showmore ? locale.collapse : locale.more}
                </a>
              </div>
            </FormItem>

            <FormItem
              label={locale.home}
              className={`more-item${!this.state.showmore ? ' hide' : ''}`}
            >
              <Input htmlType={'text'} readOnly {...init('appName')} />
            </FormItem>

            <FormItem
              label={locale.tags}
              className={`more-item${!this.state.showmore ? ' hide' : ''}`}
            >
              <Input htmlType={'text'} readOnly {...init('config_tags')} />
            </FormItem>

            <FormItem label={locale.description} {...formItemLayout}>
              <Input.TextArea htmlType={'text'} multiple rows={3} readOnly {...init('desc')} />
            </FormItem>
            {activeKey === 'normal' ? (
              ''
            ) : (
              <FormItem label={locale.betaRelease}>
                <div style={{ width: '100%' }} id={'betaips'}>
                  <Input.TextArea
                    multiple
                    style={{ width: '100%' }}
                    value={this.state.ips}
                    readOnly
                    placeholder={'127.0.0.1,127.0.0.2'}
                  />
                </div>
              </FormItem>
            )}
            <FormItem label={'MD5:'} required>
              <Input htmlType={'text'} readOnly {...init('md5')} />
            </FormItem>
            <FormItem label={locale.configuration} required>
              <div className={editorClass} id="container" style={{ minHeight: 500 }} />
            </FormItem>
          </Form>
          <Row>
            <Col span="24" className="button-list">
              <Button type="primary" onClick={() => this.onClickConfigCompare()}>