fix: update instance

This commit is contained in:
王彦民 2018-12-13 18:19:20 +08:00
parent bcfe37f912
commit 565ce81e34
2 changed files with 10 additions and 2 deletions

View File

@ -26,7 +26,7 @@ module.exports = Object.assign({}, base, {
context: ['/'],
changeOrigin: true,
secure: false,
target: 'http://11.160.165.126:8848',
target: 'http://11.163.128.34:8848',
pathRewrite: {'^/v1' : '/nacos/v1'}
}],
disableHostCheck: true,

View File

@ -81,7 +81,15 @@ class InstanceTable extends React.Component {
request({
method: 'POST',
url: 'v1/ns/instance/update',
data: { serviceName, clusterName, ip, port, weight, enable: !enabled, metadata },
data: {
serviceName,
clusterName,
ip,
port,
weight,
enable: !enabled,
metadata: JSON.stringify(metadata),
},
dataType: 'text',
beforeSend: () => this.openLoading(),
success: () => this.setState({ instance: newVal }),