fix: closes #362
This commit is contained in:
parent
91dca4a3b9
commit
2ef2e5a5c6
@ -74,14 +74,14 @@ class InstanceTable extends React.Component {
|
||||
|
||||
switchState(index, record) {
|
||||
const { instance } = this.state;
|
||||
const { ip, port, weight, enabled } = record;
|
||||
const { ip, port, weight, enabled, metadata } = record;
|
||||
const { clusterName, serviceName } = this.props;
|
||||
const newVal = Object.assign({}, instance);
|
||||
newVal.list[index].enabled = !enabled;
|
||||
request({
|
||||
method: 'POST',
|
||||
url: 'v1/ns/instance/update',
|
||||
data: { serviceName, clusterName, ip, port, weight, enable: !enabled },
|
||||
data: { serviceName, clusterName, ip, port, weight, enable: !enabled, metadata },
|
||||
dataType: 'text',
|
||||
beforeSend: () => this.openLoading(),
|
||||
success: () => this.setState({ instance: newVal }),
|
||||
|
Loading…
Reference in New Issue
Block a user