Merge pull request #905 from loadchange/fe/v1.0
Fix: ServiceDetail groupName
This commit is contained in:
commit
5d668579ef
@ -45,6 +45,7 @@ class ServiceDetail extends React.Component {
|
|||||||
this.editClusterDialog = React.createRef();
|
this.editClusterDialog = React.createRef();
|
||||||
this.state = {
|
this.state = {
|
||||||
serviceName: getParameter(props.location.search, 'name'),
|
serviceName: getParameter(props.location.search, 'name'),
|
||||||
|
groupName: getParameter(props.location.search, 'groupName'),
|
||||||
loading: false,
|
loading: false,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
clusters: [],
|
clusters: [],
|
||||||
@ -64,9 +65,9 @@ class ServiceDetail extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getServiceDetail() {
|
getServiceDetail() {
|
||||||
const { serviceName } = this.state;
|
const { serviceName, groupName } = this.state;
|
||||||
request({
|
request({
|
||||||
url: `v1/ns/catalog/service?serviceName=${serviceName}`,
|
url: `v1/ns/catalog/service?serviceName=${serviceName}&groupName=${groupName}`,
|
||||||
beforeSend: () => this.openLoading(),
|
beforeSend: () => this.openLoading(),
|
||||||
success: ({ clusters = [], service = {} }) => this.setState({ service, clusters }),
|
success: ({ clusters = [], service = {} }) => this.setState({ service, clusters }),
|
||||||
error: e => Message.error(e.responseText || 'error'),
|
error: e => Message.error(e.responseText || 'error'),
|
||||||
|
@ -231,7 +231,9 @@ class ServiceList extends React.Component {
|
|||||||
<Button
|
<Button
|
||||||
type="normal"
|
type="normal"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
this.props.history.push(`/serviceDetail?name=${record.name}`)
|
this.props.history.push(
|
||||||
|
`/serviceDetail?name=${record.name}&groupName=${record.groupName}`
|
||||||
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{detail}
|
{detail}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user