add 'groupName' parameter
This commit is contained in:
parent
900fa661ee
commit
1bef71058f
@ -25,6 +25,7 @@ class EditInstanceDialog extends React.Component {
|
||||
static propTypes = {
|
||||
serviceName: PropTypes.string,
|
||||
clusterName: PropTypes.string,
|
||||
groupName: PropTypes.string,
|
||||
openLoading: PropTypes.string,
|
||||
closeLoading: PropTypes.string,
|
||||
getInstanceList: PropTypes.func,
|
||||
@ -54,7 +55,14 @@ class EditInstanceDialog extends React.Component {
|
||||
}
|
||||
|
||||
onConfirm() {
|
||||
const { serviceName, clusterName, getInstanceList, openLoading, closeLoading } = this.props;
|
||||
const {
|
||||
serviceName,
|
||||
clusterName,
|
||||
groupName,
|
||||
getInstanceList,
|
||||
openLoading,
|
||||
closeLoading,
|
||||
} = this.props;
|
||||
const { ip, port, ephemeral, weight, enabled, metadataText } = this.state.editInstance;
|
||||
request({
|
||||
method: 'PUT',
|
||||
@ -62,6 +70,7 @@ class EditInstanceDialog extends React.Component {
|
||||
data: {
|
||||
serviceName,
|
||||
clusterName,
|
||||
groupName,
|
||||
ip,
|
||||
port,
|
||||
ephemeral,
|
||||
|
@ -78,13 +78,14 @@ class InstanceTable extends React.Component {
|
||||
switchState(index, record) {
|
||||
const { instance } = this.state;
|
||||
const { ip, port, ephemeral, weight, enabled, metadata } = record;
|
||||
const { clusterName, serviceName } = this.props;
|
||||
const { clusterName, serviceName, groupName } = this.props;
|
||||
request({
|
||||
method: 'PUT',
|
||||
url: 'v1/ns/instance',
|
||||
data: {
|
||||
serviceName,
|
||||
clusterName,
|
||||
groupName,
|
||||
ip,
|
||||
port,
|
||||
ephemeral,
|
||||
@ -112,7 +113,7 @@ class InstanceTable extends React.Component {
|
||||
|
||||
render() {
|
||||
const { locale = {} } = this.props;
|
||||
const { clusterName, serviceName } = this.props;
|
||||
const { clusterName, serviceName, groupName } = this.props;
|
||||
const { instance, pageSize, loading } = this.state;
|
||||
return instance.count ? (
|
||||
<div>
|
||||
@ -178,6 +179,7 @@ class InstanceTable extends React.Component {
|
||||
ref={this.editInstanceDialog}
|
||||
serviceName={serviceName}
|
||||
clusterName={clusterName}
|
||||
groupName={groupName}
|
||||
openLoading={() => this.openLoading()}
|
||||
closeLoading={() => this.closeLoading()}
|
||||
getInstanceList={() => this.getInstanceList()}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user