diff --git a/console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js b/console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js index 9b1dc2bbdd3..8a577b5b254 100644 --- a/console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js +++ b/console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js @@ -41,39 +41,35 @@ import RegionGroup from 'components/RegionGroup'; import ShowCodeing from 'components/ShowCodeing'; import DeleteDialog from 'components/DeleteDialog'; import DashboardCard from './DashboardCard'; -import {getParams, request, setParams} from '@/globalLib'; -import {goLogin} from '../../../globalLib'; -import {connect} from 'react-redux'; -import {getConfigs, getConfigsV2} from '../../../reducers/configuration'; +import { getParams, request, setParams } from '@/globalLib'; +import { goLogin } from '../../../globalLib'; +import { connect } from 'react-redux'; +import { getConfigs, getConfigsV2 } from '../../../reducers/configuration'; import PageTitle from '../../../components/PageTitle'; import QueryResult from '../../../components/QueryResult'; import './index.scss'; -import { - GLOBAL_PAGE_SIZE_LIST, - LANGUAGE_KEY, - LOGINPAGE_ENABLED -} from '../../../constants'; +import { GLOBAL_PAGE_SIZE_LIST, LANGUAGE_KEY, LOGINPAGE_ENABLED } from '../../../constants'; import TotalRender from '../../../components/Page/TotalRender'; -const {Item} = MenuButton; -const {Panel} = Collapse; +const { Item } = MenuButton; +const { Panel } = Collapse; const configsTableSelected = new Map(); const typeMapping = [ - {value: 'text', label: 'TEXT'}, - {value: 'json', label: 'JSON'}, - {value: 'xml', label: 'XML'}, - {value: 'yaml', label: 'YAML'}, - {value: 'html', label: 'HTML'}, - {value: 'properties', label: 'Properties'}, - {value: 'toml', label: 'TOML'}, + { value: 'text', label: 'TEXT' }, + { value: 'json', label: 'JSON' }, + { value: 'xml', label: 'XML' }, + { value: 'yaml', label: 'YAML' }, + { value: 'html', label: 'HTML' }, + { value: 'properties', label: 'Properties' }, + { value: 'toml', label: 'TOML' }, ]; @connect( - state => ({ - configurations: state.configuration.configurations, - }), - {getConfigs, getConfigsV2} + state => ({ + configurations: state.configuration.configurations, + }), + { getConfigs, getConfigsV2 } ) @ConfigProvider.config class ConfigurationManagement extends React.Component { @@ -114,10 +110,8 @@ class ConfigurationManagement extends React.Component { group: this.group, appName: this.appName, config_detail: getParams('configDetail') || '', - config_tags: getParams('configTags') ? getParams('configTags').split(',') - : [], - types: getParams('types') ? getParams('types').split( - ',') : [], + config_tags: getParams('configTags') ? getParams('configTags').split(',') : [], + types: getParams('types') ? getParams('types').split(',') : [], tagLst: getParams('tagList') ? getParams('tagList').split(',') : [], selectValue: [], loading: false, @@ -152,7 +146,7 @@ class ConfigurationManagement extends React.Component { } componentDidMount() { - const {locale = {}} = this.props; + const { locale = {} } = this.props; // this.getGroup(); this.setIsCn(); if (window._getLink && window._getLink('isCn') === 'true') { @@ -164,20 +158,19 @@ class ConfigurationManagement extends React.Component { width: '60%', }, content: ( -
-
- {locale.ad} - {/* eslint-disable */} - - {locale.questionnaire2} - -
-
- {locale.noLongerDisplay4} - -
+
+
+ {locale.ad} + {/* eslint-disable */} + + {locale.questionnaire2} + +
+
+ {locale.noLongerDisplay4} +
+
), }); } @@ -186,7 +179,7 @@ class ConfigurationManagement extends React.Component { } setIsCn() { - this.setState({isCn: localStorage.getItem(LANGUAGE_KEY) === 'zh-CN'}); + this.setState({ isCn: localStorage.getItem(LANGUAGE_KEY) === 'zh-CN' }); } toggleShowQuestionnaire(value) { @@ -212,19 +205,17 @@ class ConfigurationManagement extends React.Component { switch (url) { case '/historyRollback': url = `${url}?historyServerId=${this.serverId || ''}&historyDataId=${ - record.dataId + record.dataId }&historyGroup=${record.group}&namespace=${this.tenant}`; break; case '/listeningToQuery': - url = `${url}?listeningServerId=${this.serverId - || ''}&listeningDataId=${ - record.dataId + url = `${url}?listeningServerId=${this.serverId || ''}&listeningDataId=${ + record.dataId }&listeningGroup=${record.group}&namespace=${this.tenant}`; break; case '/pushTrajectory': - url = `${url}?serverId=${this.serverId - || ''}&dataId=${record.dataId}&group=${ - record.group + url = `${url}?serverId=${this.serverId || ''}&dataId=${record.dataId}&group=${ + record.group }&namespace=${this.tenant}`; break; default: @@ -259,9 +250,9 @@ class ConfigurationManagement extends React.Component { } this.getData(); configsTableSelected.clear(); - const {rowSelection} = this.state; + const { rowSelection } = this.state; rowSelection.selectedRowKeys = []; - this.setState({rowSelection}); + this.setState({ rowSelection }); } changeParamsBySearchType(params) { @@ -281,10 +272,14 @@ class ConfigurationManagement extends React.Component { } getData(pageNo = 1, clearSelect = true) { + localStorage.getItem('token') && this.getConfigData(pageNo, clearSelect); + } + + getConfigData(pageNo = 1, clearSelect = true) { if (this.state.loading) { return; } - const {locale = {}, configurations = {}} = this.props; + const { locale = {}, configurations = {} } = this.props; this.tenant = getParams('namespace') || ''; // 为当前实例保存tenant参数 this.serverId = getParams('serverId') || ''; const prePageNo = getParams('pageNo'); @@ -304,7 +299,7 @@ class ConfigurationManagement extends React.Component { setParams('pageSize', null); setParams('pageNo', null); this.changeParamsBySearchType(params); - this.setState({loading: true}); + this.setState({ loading: true }); let props = null; if (this.state.config_detail && this.state.config_detail !== '') { if (this.state.defaultFuzzySearch) { @@ -317,30 +312,30 @@ class ConfigurationManagement extends React.Component { props = this.props.getConfigs(params); } props - .then(() => + .then(() => this.setState({ loading: false, selectedRecord: [], selectedKeys: [], tenant: this.tenant, }) - ) - .catch(res => { - configurations.pageItems = []; - configurations.totalCount = 0; - this.setState({ - loading: false, - }); - if (res && [401, 403].includes(res.status)) { - Dialog.alert({ - title: locale.authFail, - content: locale.getNamespace403.replace( + ) + .catch(res => { + configurations.pageItems = []; + configurations.totalCount = 0; + this.setState({ + loading: false, + }); + if (res && [401, 403].includes(res.status)) { + Dialog.alert({ + title: locale.authFail, + content: locale.getNamespace403.replace( '${namespaceName}', this.state.nownamespace_name - ), - }); - } - }); + ), + }); + } + }); } chooseNav(record, key) { @@ -360,29 +355,33 @@ class ConfigurationManagement extends React.Component { } removeConfig(record) { - const {locale = {}} = this.props; + const { locale = {} } = this.props; const self = this; Dialog.confirm({ title: locale.removeConfiguration, content: ( -
-

{locale.sureDelete}

-

- Data ID - {record.dataId} -

-

- Group - {record.group} -

-

- +

{locale.sureDelete}

+

+ Data ID + {record.dataId} +

+

+ Group + {record.group} +

+

+ {locale.environment} - {self.serverId || ''} -

-
+ marginRight: 5, + }} + > + {locale.environment} + + {self.serverId || ''} +

+
), onOk: () => { const url = `v1/cs/configs?dataId=${record.dataId}&group=${record.group}`; @@ -415,61 +414,56 @@ class ConfigurationManagement extends React.Component { } renderCol(value, index, record) { - const {locale = {}} = this.props; + const { locale = {} } = this.props; return ( -
- - {locale.details} - - | - - {locale.sampleCode} - - | - - {locale.edit} - - | - - {locale.deleteAction} - - | +
+ + {locale.details} + + | + + {locale.sampleCode} + + | + + {locale.edit} + + | + + {locale.deleteAction} + + | - - - - } - triggerType={'click'} - > - - {locale.version} - {locale.listenerQuery} - - -
+ + + + } + triggerType={'click'} + > + + {locale.version} + {locale.listenerQuery} + + +
); } changePage(value, e) { this.setState( - { - isPageEnter: e && e.keyCode && e.keyCode === 13, - currentPage: value, - }, - () => this.getData(value, false) + { + isPageEnter: e && e.keyCode && e.keyCode === 13, + currentPage: value, + }, + () => this.getData(value, false) ); } onChangeSort(dataIndex, order) { - const {configurations = {}} = this.props; - configurations.pageItems.sort(function (a, b) { + const { configurations = {} } = this.props; + configurations.pageItems.sort(function(a, b) { if (order === 'asc') { return (a[dataIndex] + '').localeCompare(b[dataIndex] + ''); } @@ -479,7 +473,7 @@ class ConfigurationManagement extends React.Component { } handlePageSizeChange(pageSize) { - this.setState({pageSize}, () => this.changePage(1)); + this.setState({ pageSize }, () => this.changePage(1)); } setConfigDetail(value) { @@ -536,10 +530,9 @@ class ConfigurationManagement extends React.Component { this.serverId = getParams('serverId') || 'center'; this.tenant = getParams('namespace') || ''; // 为当前实例保存tenant参数 this.props.history.push( - `/newconfig?serverId=${this.serverId - || ''}&namespace=${this.tenant}&edasAppName=${ - this.edasAppName - }&edasAppId=${this.edasAppId}&searchDataId=${this.dataId}&searchGroup=${this.group}` + `/newconfig?serverId=${this.serverId || ''}&namespace=${this.tenant}&edasAppName=${ + this.edasAppName + }&edasAppId=${this.edasAppId}&searchDataId=${this.dataId}&searchGroup=${this.group}` ); } @@ -556,12 +549,11 @@ class ConfigurationManagement extends React.Component { this.tenant = getParams('namespace') || ''; // 为当前实例保存tenant参数 // 点击详情到另一个页面, 返回时候要保留原来的搜索条件 比如: record.dataId为详情的, this.dataId为搜索条件的. this.props.history.push( - `/configdetail?serverId=${this.serverId - || ''}&dataId=${record.dataId}&group=${ - record.group - }&namespace=${this.tenant}&edasAppName=${this.edasAppName}&searchDataId=${ - this.dataId - }&searchGroup=${this.group}&pageSize=${this.pageSize}&pageNo=${this.pageNo}` + `/configdetail?serverId=${this.serverId || ''}&dataId=${record.dataId}&group=${ + record.group + }&namespace=${this.tenant}&edasAppName=${this.edasAppName}&searchDataId=${ + this.dataId + }&searchGroup=${this.group}&pageSize=${this.pageSize}&pageNo=${this.pageNo}` ); } @@ -569,14 +561,13 @@ class ConfigurationManagement extends React.Component { this.serverId = getParams('serverId') || 'center'; this.tenant = getParams('namespace') || ''; // 为当前实例保存tenant参数 this.props.history.push( - `/configeditor?serverId=${this.serverId - || ''}&dataId=${record.dataId}&group=${ - record.group - }&namespace=${this.tenant}&edasAppName=${this.edasAppName}&edasAppId=${ - this.edasAppId - }&searchDataId=${this.dataId}&searchGroup=${this.group}&pageSize=${this.pageSize}&pageNo=${ - this.pageNo - }` + `/configeditor?serverId=${this.serverId || ''}&dataId=${record.dataId}&group=${ + record.group + }&namespace=${this.tenant}&edasAppName=${this.edasAppName}&edasAppId=${ + this.edasAppId + }&searchDataId=${this.dataId}&searchGroup=${this.group}&pageSize=${this.pageSize}&pageNo=${ + this.pageNo + }` ); } @@ -615,19 +606,18 @@ class ConfigurationManagement extends React.Component { openUri(url, params) { window.open( - [ - url, - Object.keys(params) + [ + url, + Object.keys(params) .map(key => `${key}=${params[key]}`) .join('&'), - ].join('?') + ].join('?') ); } exportData() { - const {group, appName, dataId, openUri} = this; - const {accessToken = '', username = ''} = JSON.parse( - localStorage.token || '{}'); + const { group, appName, dataId, openUri } = this; + const { accessToken = '', username = '' } = JSON.parse(localStorage.token || '{}'); openUri('v1/cs/configs', { export: 'true', tenant: getParams('namespace'), @@ -641,9 +631,8 @@ class ConfigurationManagement extends React.Component { } exportDataNew() { - const {group, appName, dataId, openUri} = this; - const {accessToken = '', username = ''} = JSON.parse( - localStorage.token || '{}'); + const { group, appName, dataId, openUri } = this; + const { accessToken = '', username = '' } = JSON.parse(localStorage.token || '{}'); openUri('v1/cs/configs', { exportV2: 'true', tenant: getParams('namespace'), @@ -658,9 +647,8 @@ class ConfigurationManagement extends React.Component { exportSelectedData(newVersion) { const ids = []; - const {locale = {}} = this.props; - const {accessToken = '', username = ''} = JSON.parse( - localStorage.token || '{}'); + const { locale = {} } = this.props; + const { accessToken = '', username = '' } = JSON.parse(localStorage.token || '{}'); if (!configsTableSelected.size) { Dialog.alert({ title: locale.exportSelectedAlertTitle, @@ -693,7 +681,7 @@ class ConfigurationManagement extends React.Component { } multipleSelectionDeletion() { - const {locale = {}} = this.props; + const { locale = {} } = this.props; const self = this; if (configsTableSelected.size === 0) { Dialog.alert({ @@ -711,20 +699,19 @@ class ConfigurationManagement extends React.Component { Dialog.confirm({ title: locale.removeConfiguration, content: ( -
-

{locale.sureDelete}

- - - -
-
+
+

{locale.sureDelete}

+ + + +
+
), onOk: () => { const url = - `v1/cs/configs?delType=ids&ids=${Array.from( - configsTableSelected.keys()).join( - ',' - )}&tenant=` + self.state.nownamespace_id; + `v1/cs/configs?delType=ids&ids=${Array.from(configsTableSelected.keys()).join( + ',' + )}&tenant=` + self.state.nownamespace_id; request({ url, type: 'delete', @@ -739,7 +726,7 @@ class ConfigurationManagement extends React.Component { } cloneSelectedDataConfirm() { - const {locale = {}} = this.props; + const { locale = {} } = this.props; const self = this; self.field.setValue('sameConfigPolicy', 'ABORT'); self.field.setValue('cloneTargetSpace', undefined); @@ -767,10 +754,16 @@ class ConfigurationManagement extends React.Component { let namespaceSelectData = []; let namespaceSelecItemRender = item => { if (item.isCurrent) { - return {item.label}; + return ( + + {item.label} + + ); } else { return {item.label}; } @@ -799,192 +792,196 @@ class ConfigurationManagement extends React.Component { dataItem.dataId = value.dataId; dataItem.group = value.group; editableTableData.push(dataItem); - configsTableSelectedDeepCopyed.set(key, - JSON.parse(JSON.stringify(value))); + configsTableSelectedDeepCopyed.set(key, JSON.parse(JSON.stringify(value))); }); let editableTableOnBlur = (record, type, e) => { if (type === 1) { - configsTableSelectedDeepCopyed.get( - record.id).dataId = e.target.value; + configsTableSelectedDeepCopyed.get(record.id).dataId = e.target.value; } else { - configsTableSelectedDeepCopyed.get( - record.id).group = e.target.value; + configsTableSelectedDeepCopyed.get(record.id).group = e.target.value; } }; let renderEditableTableCellDataId = (value, index, record) => ( - + ); let renderEditableTableCellGroup = (value, index, record) => ( - + ); const cloneConfirm = Dialog.confirm({ title: locale.cloningConfiguration, footer: false, content: ( - <> -
- +
+ {locale.source} - {self.state.nownamespace_name} |{' '} - {self.state.nownamespace_id} -
-
- + {locale.source} + + {self.state.nownamespace_name} |{' '} + {self.state.nownamespace_id} +
+
+ {locale.configurationNumber} - {configsTableSelected.size} - {locale.selectedEntry} -
-
- + {locale.configurationNumber} + + {configsTableSelected.size} + {locale.selectedEntry} +
+
+ {'*'} - + {'*'} + + {locale.target} - { + if (value) { + document.getElementById('cloneTargetSpaceSelectErr').style.display = 'none'; + self.field.setValue('cloneTargetSpace', value); + } + }} + /> +
+ {locale.selectNamespace} -
-
- +
+ {locale.samePreparation}: - { + if (value) { + self.field.setValue('sameConfigPolicy', value); + } + }} + /> +
+
+ -
-
- + }, + complete() { + self.closeLoading(); + }, + }); + }} + data-spm-click={'gostr=/aliyun;locaid=doClone'} + > + {locale.startCloning} + +
+
+ {locale.cloneEditableTitle} -
- - - -
- +
+ + + +
+ ), }); }, @@ -1008,79 +1005,76 @@ class ConfigurationManagement extends React.Component { confirm.hide(); let failCount = ret.data.failData ? ret.data.failData.length : 0; let skipCount = ret.data.skipData ? ret.data.skipData.length : 0; - let unrecognizedCount = ret.data.unrecognizedCount - ? ret.data.unrecognizedCount : 0; + let unrecognizedCount = ret.data.unrecognizedCount ? ret.data.unrecognizedCount : 0; if (failCount > 0) { Dialog.alert({ title: isImport ? locale.importAbort : locale.cloneAbort, content: ( -
-

- {locale.conflictConfig}:{ret.data.failData[0].group}/{ret.data.failData[0].dataId} -

-
-
- {locale.failureEntries}: {failCount} -
- - - -
-
-
-
- {locale.unprocessedEntries}: {skipCount} -
- - - -
-
-
-
- {locale.unrecognizedEntries}: {unrecognizedCount} -
- - -
-
+
+

+ {locale.conflictConfig}:{ret.data.failData[0].group}/{ret.data.failData[0].dataId} +

+
+
+ {locale.failureEntries}: {failCount} +
+ + + +
+
+
+ {locale.unprocessedEntries}: {skipCount} +
+ + + +
+
+
+
+ {locale.unrecognizedEntries}: {unrecognizedCount} +
+ + +
+
+
), }); } else if (skipCount > 0 || unrecognizedCount > 0) { - let message = `${isImport ? locale.importSuccEntries - : locale.cloneSuccEntries}${ - ret.data.succCount + let message = `${isImport ? locale.importSuccEntries : locale.cloneSuccEntries}${ + ret.data.succCount }`; Dialog.alert({ title: isImport ? locale.importSucc : locale.cloneSucc, content: ( -
-
{message}
-
-
- {locale.skippedEntries}: {skipCount} -
- - - -
-
-
-
- {locale.unrecognizedEntries}: {unrecognizedCount} -
- - -
-
+
+
{message}
+
+
+ {locale.skippedEntries}: {skipCount} +
+ + + +
+
+
+ {locale.unrecognizedEntries}: {unrecognizedCount} +
+ + +
+
+
), }); } else { - let message = `${isImport ? locale.importSuccBegin - : locale.cloneSuccBegin}${ - ret.data.succCount + let message = `${isImport ? locale.importSuccBegin : locale.cloneSuccBegin}${ + ret.data.succCount }${isImport ? locale.importSuccEnd : locale.cloneSuccEnd}`; Message.success(message); } @@ -1093,8 +1087,7 @@ class ConfigurationManagement extends React.Component { if (resultCode === 100002) { alertContent = locale.metadataIllegal; } - if (resultCode === 100003 || resultCode === 100004 || resultCode - === 100005) { + if (resultCode === 100003 || resultCode === 100004 || resultCode === 100005) { alertContent = locale.importDataValidationError; } Dialog.alert({ @@ -1105,7 +1098,7 @@ class ConfigurationManagement extends React.Component { } importData() { - const {locale = {}} = this.props; + const { locale = {} } = this.props; const self = this; self.field.setValue('sameConfigPolicy', 'ABORT'); @@ -1125,14 +1118,13 @@ class ConfigurationManagement extends React.Component { return; } } - const {accessToken = '', username = ''} = token; + const { accessToken = '', username = '' } = token; const uploadProps = { accept: 'application/zip', action: `v1/cs/configs?import=true&namespace=${getParams( - 'namespace' - )}&accessToken=${accessToken}&username=${username}&tenant=${getParams( - 'namespace')}`, - headers: Object.assign({}, {}, {accessToken}), + 'namespace' + )}&accessToken=${accessToken}&username=${username}&tenant=${getParams('namespace')}`, + headers: Object.assign({}, {}, { accessToken }), data: { policy: self.field.getValue('sameConfigPolicy'), }, @@ -1143,11 +1135,10 @@ class ConfigurationManagement extends React.Component { return options; }, onSuccess(ret) { - self.processImportAndCloneResult(ret.response, locale, importConfirm, - true); + self.processImportAndCloneResult(ret.response, locale, importConfirm, true); }, onError(err) { - const {data = {}, status} = err.response; + const { data = {}, status } = err.response; if ([401, 403].includes(status)) { Dialog.alert({ title: locale.importFail, @@ -1165,72 +1156,78 @@ class ConfigurationManagement extends React.Component { title: locale.import, footer: false, content: ( -
-
- +
+ {locale.targetNamespace}: - {this.state.nownamespace_name} |{' '} - {this.state.nownamespace_id} -
-
- + {locale.targetNamespace}: + + {this.state.nownamespace_name} |{' '} + {this.state.nownamespace_id} +
+
+ {locale.samePreparation}: - +
+
+ + {locale.importRemind}
+
+ + + +
+
), }); } configDataTableOnChange(ids, records) { - const {rowSelection} = this.state; + const { rowSelection } = this.state; rowSelection.selectedRowKeys = ids; - this.setState({rowSelection}); + this.setState({ rowSelection }); configsTableSelected.clear(); records.forEach((record, i) => { configsTableSelected.set(record.id, record); @@ -1238,330 +1235,319 @@ class ConfigurationManagement extends React.Component { } render() { - const {locale = {}, configurations = {}} = this.props; + const { locale = {}, configurations = {} } = this.props; return ( - <> - (this.batchHandle = ref)}/> -
+ <> + (this.batchHandle = ref)} /> +
+
+
+ + +
+
-
- - -
+
+ + + + + { + this.dataId = dataId; + this.setState({ dataId }); + setParams('dataId', this.dataId); + }} + onPressEnter={() => this.selectAll()} + /> + -
- - - - - - { - this.dataId = dataId; - this.setState({dataId}); - setParams('dataId', this.dataId); - }} - onPressEnter={() => this.selectAll()} - /> - + + this.selectAll()} + hasClear + /> + - - this.selectAll()} - hasClear - /> - + + + - - - + + + + + + - - - - + - + {locale.import} + + +
+ + this.getData()} + /> + + + + + + + + +
+ + + + + + + {!this.inApp && ( + + )} + +
+ {configurations.totalCount > 0 && ( + <> +
+ {[ + { + warning: true, + text: locale.deleteAction, + locaid: 'configsDelete', + onClick: () => this.multipleSelectionDeletion(), + }, - + { + text: locale.clone, + locaid: 'configsDelete', + onClick: () => this.cloneSelectedDataConfirm(), + }, + ].map((item, index) => ( - -
- - this.getData()} - /> - - - - - - - - -
- - - - - - - {!this.inApp && ( - - )} - -
- {configurations.totalCount > 0 && ( - <> -
- {[ - { - warning: true, - text: locale.deleteAction, - locaid: 'configsDelete', - onClick: () => this.multipleSelectionDeletion(), - }, - - { - text: locale.clone, - locaid: 'configsDelete', - onClick: () => this.cloneSelectedDataConfirm(), - }, - ].map((item, index) => ( - - ))} - - {[ - { - text: locale.export, - locaid: 'exportData', - onClick: () => this.exportData(this), - }, - { - text: locale.newExport, - locaid: 'exportDataNew', - onClick: () => this.exportDataNew(this), - }, - { - text: locale.exportSelected, - locaid: 'configsExport', - onClick: () => this.exportSelectedData(false), - }, - { - text: locale.newExportSelected, - locaid: 'configsExport', - onClick: () => this.exportSelectedData(true), - }, - ].map((item, index) => ( - - {item.text} - - ))} - -
- this.handlePageSizeChange(val)} - current={configurations.pageNumber} - total={configurations.totalCount} - totalRender={total => } - pageSize={this.state.pageSize} - onChange={this.changePage.bind(this)} - /> - - )} - - -
- {this.state.hasdash && ( -
- {this.state.contentList.map((v, i) => ( - ))} + + {[ + { + text: locale.export, + locaid: 'exportData', + onClick: () => this.exportData(this), + }, + { + text: locale.newExport, + locaid: 'exportDataNew', + onClick: () => this.exportDataNew(this), + }, + { + text: locale.exportSelected, + locaid: 'configsExport', + onClick: () => this.exportSelectedData(false), + }, + { + text: locale.newExportSelected, + locaid: 'configsExport', + onClick: () => this.exportSelectedData(true), + }, + ].map((item, index) => ( + + {item.text} + + ))} +
+ this.handlePageSizeChange(val)} + current={configurations.pageNumber} + total={configurations.totalCount} + totalRender={total => } + pageSize={this.state.pageSize} + onChange={this.changePage.bind(this)} + /> + )} + +
- + {this.state.hasdash && ( +
+ {this.state.contentList.map((v, i) => ( + + ))} +
+ )} +
+ ); } }