⬆️ Upgrading dependencies. nacos 1.1.4

This commit is contained in:
冷冷 committed 2019-11-01 12:34:23 +08:00
1 parent d9e7a740cf
commit d77d3be2cd
15 files changed
+89 -112

No files matched your search

@@ -97,9 +97,11 @@ const I18N_CONF = {
pubNoData: 'No results found.',
columnServiceName: 'Service Name',
groupName: 'Group Name',
groupNamePlaceholder: 'Enter Group Name',
columnClusterCount: 'Cluster Count',
columnIpCount: 'Instance Count',
columnHealthyInstanceCount: 'Healthy Instance Count',
columnTriggerFlag: 'Trigger Protection Threshold',
operation: 'Operation',
detail: 'Details',
sampleCode: 'Code Example',
@@ -96,10 +96,12 @@ const I18N_CONF = {
query: '查询',
pubNoData: '没有数据',
columnServiceName: '服务名',
groupName: '分组',
groupName: '分组名称',
groupNamePlaceholder: '请输入分组名称',
columnClusterCount: '集群数目',
columnIpCount: '实例数',
columnHealthyInstanceCount: '健康实例数',
columnTriggerFlag: '触发保护阈值',
operation: '操作',
detail: '详情',
sampleCode: '示例代码',
@@ -100,6 +100,10 @@ class ConfigurationManagement extends React.Component {
contentList: [],
isAdvancedQuery: false,
isCheckAll: false,
rowSelection: {
onChange: this.configDataTableOnChange.bind(this),
selectedRowKeys: [],
},
};
const obj = {
dataId: this.dataId || '',
@@ -250,6 +254,10 @@ class ConfigurationManagement extends React.Component {
});
}
this.getData();
configsTableSelected.clear();
const { rowSelection } = this.state;
rowSelection.selectedRowKeys = [];
this.setState({ rowSelection });
}
getData(pageNo = 1, clearSelect = true) {
@@ -1070,22 +1078,14 @@ class ConfigurationManagement extends React.Component {
});
}
configsTableOnSelect(selected, record, records) {
if (selected) {
configsTableSelected.set(record.id, record);
} else {
configsTableSelected.delete(record.id);
}
}
configsTableOnSelectAll(selected, records) {
if (selected) {
records.forEach((record, i) => {
configsTableSelected.set(record.id, record);
});
} else {
configsTableSelected.clear();
}
configDataTableOnChange(ids, records) {
const { rowSelection } = this.state;
rowSelection.selectedRowKeys = ids;
this.setState({ rowSelection });
configsTableSelected.clear();
ids.forEach((id, i) => {
configsTableSelected.set(id, id);
});
}
render() {
@@ -1285,10 +1285,7 @@ class ConfigurationManagement extends React.Component {
fixedHeader
maxBodyHeight={400}
ref={'dataTable'}
rowSelection={{
onSelect: this.configsTableOnSelect,
onSelectAll: this.configsTableOnSelectAll,
}}
rowSelection={this.state.rowSelection}
>
<Table.Column title={'Data Id'} dataIndex={'dataId'} />
<Table.Column title={'Group'} dataIndex={'group'} />
@@ -414,7 +414,7 @@ class NewConfig extends React.Component {
label: 'YAML',
},
{
value: 'text/html',
value: 'html',
label: 'HTML',
},
{
@@ -56,8 +56,11 @@ class ServiceList extends React.Component {
total: 0,
pageSize: 10,
currentPage: 1,
keyword: '',
dataSource: [],
search: {
serviceName: '',
groupName: '',
},
hasIpCount: !(localStorage.getItem('hasIpCount') === 'false'),
};
this.field = new Field(this);
@@ -78,13 +81,14 @@ class ServiceList extends React.Component {
}
queryServiceList() {
const { currentPage, pageSize, keyword, withInstances = false, hasIpCount } = this.state;
const { currentPage, pageSize, search, withInstances = false, hasIpCount } = this.state;
const parameter = [
`hasIpCount=${hasIpCount}`,
`withInstances=${withInstances}`,
`pageNo=${currentPage}`,
`pageSize=${pageSize}`,
`keyword=${keyword}`,
`serviceNameParam=${search.serviceName}`,
`groupNameParam=${search.groupName}`,
];
request({
url: `v1/ns/catalog/services?${parameter.join('&')}`,
@@ -164,6 +168,8 @@ class ServiceList extends React.Component {
serviceList,
serviceName,
serviceNamePlaceholder,
groupName,
groupNamePlaceholder,
hiddenEmptyService,
query,
create,
@@ -172,7 +178,7 @@ class ServiceList extends React.Component {
sampleCode,
deleteAction,
} = locale;
const { keyword, nowNamespaceName, nowNamespaceId, hasIpCount } = this.state;
const { search, nowNamespaceName, nowNamespaceId, hasIpCount } = this.state;
const { init, getValue } = this.field;
this.init = init;
this.getValue = getValue;
@@ -214,8 +220,19 @@ class ServiceList extends React.Component {
<Input
placeholder={serviceNamePlaceholder}
style={{ width: 200 }}
value={keyword}
onChange={keyword => this.setState({ keyword })}
value={search.serviceName}
onChange={serviceName => this.setState({ search: { ...search, serviceName } })}
onPressEnter={() =>
this.setState({ currentPage: 1 }, () => this.queryServiceList())
}
/>
</FormItem>
<FormItem label={groupName}>
<Input
placeholder={groupNamePlaceholder}
style={{ width: 200 }}
value={search.groupName}
onChange={groupName => this.setState({ search: { ...search, groupName } })}
onPressEnter={() =>
this.setState({ currentPage: 1 }, () => this.queryServiceList())
}
@@ -264,6 +281,7 @@ class ServiceList extends React.Component {
title={locale.columnHealthyInstanceCount}
dataIndex="healthyInstanceCount"
/>
<Column title={locale.columnTriggerFlag} dataIndex="triggerFlag" />
<Column
title={operation}
align="center"
@@ -18,8 +18,8 @@ const request = () => {
},
error => {
if (error.response) {
const { status } = error.response;
Message.error(`HTTP ERROR: ${status}`);
const { data, status } = error.response;
Message.error(data && typeof data === 'string' ? data : `HTTP ERROR: ${status}`);
} else {
Message.error(API_GENERAL_ERROR_MESSAGE);
}