fix #321
This commit is contained in:
parent
d958bd60e3
commit
7d0bef5342
@ -60,7 +60,7 @@ class EditorNameSpace extends React.Component {
|
|||||||
this.field.setValues(record);
|
this.field.setValues(record);
|
||||||
request({
|
request({
|
||||||
type: 'get',
|
type: 'get',
|
||||||
url: `/nacos/v1/console/namespaces?show=all&namespaceId=${record.namespace}`,
|
url: `v1/console/namespaces?show=all&namespaceId=${record.namespace}`,
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res !== null) {
|
if (res !== null) {
|
||||||
this.field.setValue('namespaceDesc', res.namespaceDesc);
|
this.field.setValue('namespaceDesc', res.namespaceDesc);
|
||||||
@ -89,7 +89,7 @@ class EditorNameSpace extends React.Component {
|
|||||||
beforeSend: () => {
|
beforeSend: () => {
|
||||||
this.openLoading();
|
this.openLoading();
|
||||||
},
|
},
|
||||||
url: '/nacos/v1/console/namespaces',
|
url: 'v1/console/namespaces',
|
||||||
contentType: 'application/x-www-form-urlencoded',
|
contentType: 'application/x-www-form-urlencoded',
|
||||||
data: {
|
data: {
|
||||||
namespace: values.namespace,
|
namespace: values.namespace,
|
||||||
@ -120,7 +120,7 @@ class EditorNameSpace extends React.Component {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
request({
|
request({
|
||||||
type: 'get',
|
type: 'get',
|
||||||
url: '/nacos/v1/console/namespaces',
|
url: 'v1/console/namespaces',
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
window.namespaceList = res.data;
|
window.namespaceList = res.data;
|
||||||
|
@ -99,7 +99,7 @@ class NameSpaceList extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
request({
|
request({
|
||||||
type: 'get',
|
type: 'get',
|
||||||
url: '/nacos/v1/console/namespaces',
|
url: 'v1/console/namespaces',
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.handleNameSpaces(res.data);
|
this.handleNameSpaces(res.data);
|
||||||
|
@ -103,7 +103,7 @@ class NewNameSpace extends React.Component {
|
|||||||
});
|
});
|
||||||
request({
|
request({
|
||||||
type: 'post',
|
type: 'post',
|
||||||
url: '/nacos/v1/console/namespaces',
|
url: 'v1/console/namespaces',
|
||||||
contentType: 'application/x-www-form-urlencoded',
|
contentType: 'application/x-www-form-urlencoded',
|
||||||
beforeSend: () => {
|
beforeSend: () => {
|
||||||
this.openLoading();
|
this.openLoading();
|
||||||
@ -140,7 +140,7 @@ class NewNameSpace extends React.Component {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
request({
|
request({
|
||||||
type: 'get',
|
type: 'get',
|
||||||
url: '/nacos/v1/console/namespaces',
|
url: 'v1/console/namespaces',
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
window.namespaceList = res.data;
|
window.namespaceList = res.data;
|
||||||
|
@ -96,7 +96,7 @@ class ConfigDetail extends React.Component {
|
|||||||
this.tenant = getParams('namespace') || '';
|
this.tenant = getParams('namespace') || '';
|
||||||
this.edasAppName = getParams('edasAppName') || '';
|
this.edasAppName = getParams('edasAppName') || '';
|
||||||
this.inApp = this.edasAppName;
|
this.inApp = this.edasAppName;
|
||||||
const url = `/nacos/v1/cs/configs?show=all&dataId=${this.dataId}&group=${this.group}`;
|
const url = `v1/cs/configs?show=all&dataId=${this.dataId}&group=${this.group}`;
|
||||||
request({
|
request({
|
||||||
url,
|
url,
|
||||||
beforeSend() {
|
beforeSend() {
|
||||||
|
@ -157,7 +157,7 @@ class ConfigEditor extends React.Component {
|
|||||||
const self = this;
|
const self = this;
|
||||||
this.tenant = getParams('namespace') || '';
|
this.tenant = getParams('namespace') || '';
|
||||||
this.serverId = getParams('serverId') || 'center';
|
this.serverId = getParams('serverId') || 'center';
|
||||||
const url = `/nacos/v1/cs/configs?show=all&dataId=${this.dataId}&group=${this.group}`;
|
const url = `v1/cs/configs?show=all&dataId=${this.dataId}&group=${this.group}`;
|
||||||
request({
|
request({
|
||||||
url,
|
url,
|
||||||
beforeSend() {
|
beforeSend() {
|
||||||
@ -343,7 +343,7 @@ class ConfigEditor extends React.Component {
|
|||||||
content,
|
content,
|
||||||
tenant: this.tenant,
|
tenant: this.tenant,
|
||||||
};
|
};
|
||||||
const url = '/nacos/v1/cs/configs';
|
const url = 'v1/cs/configs';
|
||||||
request({
|
request({
|
||||||
type: 'post',
|
type: 'post',
|
||||||
contentType: 'application/x-www-form-urlencoded',
|
contentType: 'application/x-www-form-urlencoded',
|
||||||
|
@ -60,7 +60,7 @@ class ConfigRollback extends React.Component {
|
|||||||
const self = this;
|
const self = this;
|
||||||
this.tenant = getParams('namespace') || '';
|
this.tenant = getParams('namespace') || '';
|
||||||
this.serverId = getParams('serverId') || 'center';
|
this.serverId = getParams('serverId') || 'center';
|
||||||
const url = `/nacos/v1/cs/history?dataId=${this.dataId}&group=${this.group}&nid=${this.nid}`;
|
const url = `v1/cs/history?dataId=${this.dataId}&group=${this.group}&nid=${this.nid}`;
|
||||||
request({
|
request({
|
||||||
url,
|
url,
|
||||||
success(result) {
|
success(result) {
|
||||||
@ -131,9 +131,9 @@ class ConfigRollback extends React.Component {
|
|||||||
tenant: self.tenant,
|
tenant: self.tenant,
|
||||||
};
|
};
|
||||||
|
|
||||||
let url = '/nacos/v1/cs/configs';
|
let url = 'v1/cs/configs';
|
||||||
if (self.opType.trim() === 'I') {
|
if (self.opType.trim() === 'I') {
|
||||||
url = `/nacos/v1/cs/configs?dataId=${self.dataId}&group=${self.group}`;
|
url = `v1/cs/configs?dataId=${self.dataId}&group=${self.group}`;
|
||||||
postData = {};
|
postData = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,9 +344,9 @@ class ConfigurationManagement extends React.Component {
|
|||||||
this.serverId = getParams('serverId') || '';
|
this.serverId = getParams('serverId') || '';
|
||||||
let urlPrefix = '';
|
let urlPrefix = '';
|
||||||
if (this.dataId.indexOf('*') !== -1 || this.group.indexOf('*') !== -1) {
|
if (this.dataId.indexOf('*') !== -1 || this.group.indexOf('*') !== -1) {
|
||||||
urlPrefix = '/nacos/v1/cs/configs?search=blur';
|
urlPrefix = 'v1/cs/configs?search=blur';
|
||||||
} else {
|
} else {
|
||||||
urlPrefix = '/nacos/v1/cs/configs?search=accurate';
|
urlPrefix = 'v1/cs/configs?search=accurate';
|
||||||
}
|
}
|
||||||
|
|
||||||
request({
|
request({
|
||||||
@ -432,7 +432,7 @@ class ConfigurationManagement extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const url = `/nacos/v1/cs/configs?dataId=${record.dataId}&group=${record.group}`;
|
const url = `v1/cs/configs?dataId=${record.dataId}&group=${record.group}`;
|
||||||
request({
|
request({
|
||||||
url,
|
url,
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
|
@ -59,7 +59,7 @@ class HistoryDetail extends React.Component {
|
|||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
request({
|
request({
|
||||||
url: `/nacos/v1/cs/history?dataId=${this.dataId}&group=${this.group}&nid=${this.nid}`,
|
url: `v1/cs/history?dataId=${this.dataId}&group=${this.group}&nid=${this.nid}`,
|
||||||
success(result) {
|
success(result) {
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
const data = result;
|
const data = result;
|
||||||
|
@ -123,7 +123,7 @@ class HistoryRollback extends React.Component {
|
|||||||
beforeSend() {
|
beforeSend() {
|
||||||
self.openLoading();
|
self.openLoading();
|
||||||
},
|
},
|
||||||
url: `/nacos/v1/cs/history?search=accurate&dataId=${this.dataId}&group=${
|
url: `v1/cs/history?search=accurate&dataId=${this.dataId}&group=${
|
||||||
this.group
|
this.group
|
||||||
}&&pageNo=${pageNo}&pageSize=${this.state.pageSize}`,
|
}&&pageNo=${pageNo}&pageSize=${this.state.pageSize}`,
|
||||||
success(data) {
|
success(data) {
|
||||||
|
@ -68,7 +68,7 @@ class ListeningToQuery extends React.Component {
|
|||||||
const type = this.getValue('type');
|
const type = this.getValue('type');
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
const ip = this.getValue('ip');
|
const ip = this.getValue('ip');
|
||||||
queryUrl = `/nacos/v1/cs/listener?ip=${ip}`;
|
queryUrl = `v1/cs/listener?ip=${ip}`;
|
||||||
const tenant = window.nownamespace || getParams('namespace') || '';
|
const tenant = window.nownamespace || getParams('namespace') || '';
|
||||||
if (tenant) {
|
if (tenant) {
|
||||||
queryUrl += `&tenant=${tenant}`;
|
queryUrl += `&tenant=${tenant}`;
|
||||||
@ -77,7 +77,7 @@ class ListeningToQuery extends React.Component {
|
|||||||
const dataId = this.getValue('dataId');
|
const dataId = this.getValue('dataId');
|
||||||
const group = this.getValue('group');
|
const group = this.getValue('group');
|
||||||
if (!dataId || !group) return false;
|
if (!dataId || !group) return false;
|
||||||
queryUrl = `/nacos/v1/cs/configs/listener?dataId=${dataId}&group=${group}`;
|
queryUrl = `v1/cs/configs/listener?dataId=${dataId}&group=${group}`;
|
||||||
}
|
}
|
||||||
request({
|
request({
|
||||||
url: queryUrl,
|
url: queryUrl,
|
||||||
|
@ -239,7 +239,7 @@ class NewConfig extends React.Component {
|
|||||||
tenant: this.tenant,
|
tenant: this.tenant,
|
||||||
};
|
};
|
||||||
this.serverId = getParams('serverId') || 'center';
|
this.serverId = getParams('serverId') || 'center';
|
||||||
const url = '/nacos/v1/cs/configs';
|
const url = 'v1/cs/configs';
|
||||||
request({
|
request({
|
||||||
type: 'post',
|
type: 'post',
|
||||||
contentType: 'application/x-www-form-urlencoded',
|
contentType: 'application/x-www-form-urlencoded',
|
||||||
|
@ -42,7 +42,7 @@ class NameSpace extends React.Component {
|
|||||||
request({
|
request({
|
||||||
type: 'get',
|
type: 'get',
|
||||||
beforeSend() {},
|
beforeSend() {},
|
||||||
url: '/nacos/v1/console/namespaces',
|
url: 'v1/console/namespaces',
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
const data = res.data || [];
|
const data = res.data || [];
|
||||||
@ -98,7 +98,7 @@ class NameSpace extends React.Component {
|
|||||||
detailNamespace(record) {
|
detailNamespace(record) {
|
||||||
const { namespace } = record; // 获取ak,sk
|
const { namespace } = record; // 获取ak,sk
|
||||||
request({
|
request({
|
||||||
url: `/nacos/v1/console/namespaces?show=all&namespaceId=${namespace}`,
|
url: `v1/console/namespaces?show=all&namespaceId=${namespace}`,
|
||||||
beforeSend: () => {
|
beforeSend: () => {
|
||||||
this.openLoading();
|
this.openLoading();
|
||||||
},
|
},
|
||||||
@ -177,7 +177,7 @@ class NameSpace extends React.Component {
|
|||||||
),
|
),
|
||||||
language: aliwareIntl.currentLanguageCode || 'zh-cn',
|
language: aliwareIntl.currentLanguageCode || 'zh-cn',
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const url = `/nacos/v1/console/namespaces?namespaceId=${record.namespace}`;
|
const url = `v1/console/namespaces?namespaceId=${record.namespace}`;
|
||||||
request({
|
request({
|
||||||
url,
|
url,
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
@ -214,7 +214,7 @@ class NameSpace extends React.Component {
|
|||||||
refreshNameSpace() {
|
refreshNameSpace() {
|
||||||
request({
|
request({
|
||||||
type: 'get',
|
type: 'get',
|
||||||
url: '/nacos/v1/console/namespaces',
|
url: 'v1/console/namespaces',
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
window.namespaceList = res.data;
|
window.namespaceList = res.data;
|
||||||
|
@ -54,7 +54,7 @@ class EditClusterDialog extends React.Component {
|
|||||||
} = this.state.editCluster;
|
} = this.state.editCluster;
|
||||||
request({
|
request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/nacos/v1/ns/cluster/update',
|
url: 'v1/ns/cluster/update',
|
||||||
data: {
|
data: {
|
||||||
serviceName,
|
serviceName,
|
||||||
clusterName: name,
|
clusterName: name,
|
||||||
|
@ -46,7 +46,7 @@ class EditInstanceDialog extends React.Component {
|
|||||||
const { ip, port, weight, enabled, metadataText } = this.state.editInstance;
|
const { ip, port, weight, enabled, metadataText } = this.state.editInstance;
|
||||||
request({
|
request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/nacos/v1/ns/instance/update',
|
url: 'v1/ns/instance/update',
|
||||||
data: { serviceName, clusterName, ip, port, weight, enable: enabled, metadata: metadataText },
|
data: { serviceName, clusterName, ip, port, weight, enable: enabled, metadata: metadataText },
|
||||||
dataType: 'text',
|
dataType: 'text',
|
||||||
beforeSend: () => openLoading(),
|
beforeSend: () => openLoading(),
|
||||||
|
@ -48,7 +48,7 @@ class EditServiceDialog extends React.Component {
|
|||||||
const { name, protectThreshold, healthCheckMode, metadataText } = editService;
|
const { name, protectThreshold, healthCheckMode, metadataText } = editService;
|
||||||
request({
|
request({
|
||||||
method: isCreate ? 'PUT' : 'POST',
|
method: isCreate ? 'PUT' : 'POST',
|
||||||
url: `/nacos/v1/ns/service/${isCreate ? 'create' : 'update'}`,
|
url: `v1/ns/service/${isCreate ? 'create' : 'update'}`,
|
||||||
data: { serviceName: name, protectThreshold, healthCheckMode, metadata: metadataText },
|
data: { serviceName: name, protectThreshold, healthCheckMode, metadata: metadataText },
|
||||||
dataType: 'text',
|
dataType: 'text',
|
||||||
beforeSend: () => this.setState({ loading: true }),
|
beforeSend: () => this.setState({ loading: true }),
|
||||||
|
@ -51,7 +51,7 @@ class InstanceTable extends React.Component {
|
|||||||
if (!clusterName) return;
|
if (!clusterName) return;
|
||||||
const { pageSize, pageNum } = this.state;
|
const { pageSize, pageNum } = this.state;
|
||||||
request({
|
request({
|
||||||
url: '/nacos/v1/ns/catalog/instanceList',
|
url: 'v1/ns/catalog/instanceList',
|
||||||
data: {
|
data: {
|
||||||
serviceName,
|
serviceName,
|
||||||
clusterName,
|
clusterName,
|
||||||
@ -76,7 +76,7 @@ class InstanceTable extends React.Component {
|
|||||||
newVal.list[index].enabled = !enabled;
|
newVal.list[index].enabled = !enabled;
|
||||||
request({
|
request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/nacos/v1/ns/instance/update',
|
url: 'v1/ns/instance/update',
|
||||||
data: { serviceName, clusterName, ip, port, weight, enable: !enabled },
|
data: { serviceName, clusterName, ip, port, weight, enable: !enabled },
|
||||||
dataType: 'text',
|
dataType: 'text',
|
||||||
beforeSend: () => this.openLoading(),
|
beforeSend: () => this.openLoading(),
|
||||||
|
@ -53,7 +53,7 @@ class ServiceDetail extends React.Component {
|
|||||||
getServiceDetail() {
|
getServiceDetail() {
|
||||||
const { serviceName } = this.state;
|
const { serviceName } = this.state;
|
||||||
request({
|
request({
|
||||||
url: `/nacos/v1/ns/catalog/serviceDetail?serviceName=${serviceName}`,
|
url: `v1/ns/catalog/serviceDetail?serviceName=${serviceName}`,
|
||||||
beforeSend: () => this.openLoading(),
|
beforeSend: () => this.openLoading(),
|
||||||
success: ({ clusters = [], service = {} }) => this.setState({ service, clusters }),
|
success: ({ clusters = [], service = {} }) => this.setState({ service, clusters }),
|
||||||
complete: () => this.closeLoading(),
|
complete: () => this.closeLoading(),
|
||||||
|
@ -69,7 +69,7 @@ class ServiceList extends React.Component {
|
|||||||
const { currentPage, pageSize, keyword } = this.state;
|
const { currentPage, pageSize, keyword } = this.state;
|
||||||
const parameter = [`startPg=${currentPage}`, `pgSize=${pageSize}`, `keyword=${keyword}`];
|
const parameter = [`startPg=${currentPage}`, `pgSize=${pageSize}`, `keyword=${keyword}`];
|
||||||
request({
|
request({
|
||||||
url: `/nacos/v1/ns/catalog/serviceList?${parameter.join('&')}`,
|
url: `v1/ns/catalog/serviceList?${parameter.join('&')}`,
|
||||||
beforeSend: () => this.openLoading(),
|
beforeSend: () => this.openLoading(),
|
||||||
success: ({ count = 0, serviceList = [] } = {}) => {
|
success: ({ count = 0, serviceList = [] } = {}) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -98,7 +98,7 @@ class ServiceList extends React.Component {
|
|||||||
onOk: () => {
|
onOk: () => {
|
||||||
request({
|
request({
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
url: `/nacos/v1/ns/service/remove?serviceName=${serviceName}`,
|
url: `v1/ns/service/remove?serviceName=${serviceName}`,
|
||||||
dataType: 'text',
|
dataType: 'text',
|
||||||
beforeSend: () => this.openLoading(),
|
beforeSend: () => this.openLoading(),
|
||||||
success: res => {
|
success: res => {
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="css/icon.css">
|
<link rel="stylesheet" type="text/css" href="css/icon.css">
|
||||||
<link rel="stylesheet" type="text/css" href="css/font-awesome.css">
|
<link rel="stylesheet" type="text/css" href="css/font-awesome.css">
|
||||||
<!-- 第三方css结束 -->
|
<!-- 第三方css结束 -->
|
||||||
<link href="./css/main.8ecdd1f2.css" rel="stylesheet"></head>
|
<link href="./css/main.a1b00967.css" rel="stylesheet"></head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="root" style="overflow:hidden"></div>
|
<div id="root" style="overflow:hidden"></div>
|
||||||
@ -49,6 +49,6 @@
|
|||||||
<script src="js/merge.js"></script>
|
<script src="js/merge.js"></script>
|
||||||
<script src="js/loader.js"></script>
|
<script src="js/loader.js"></script>
|
||||||
<!-- 第三方js结束 -->
|
<!-- 第三方js结束 -->
|
||||||
<script type="text/javascript" src="./js/main.26f10b18.js"></script></body>
|
<script type="text/javascript" src="./js/main.23a1a48a.js"></script></body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user