Skip to content

Commit

Permalink
fix: Show only fedmanaged workspaces in cluster visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
leoliu committed Jul 1, 2020
1 parent 2f96e36 commit 1529258
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/pages/clusters/actions/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default {
const clusters = item.clusters || []
set(
formData,
'spec.placement.clusters',
uniqBy([...clusters, { name: cluster.name }], 'name')
)
requests.push(workspaceStore.patch(item, formData))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ export default class ClusterVisibility extends React.Component {
fetchAuthedWorkspaces = params => {
const { cluster = {} } = this.props
this.authedWorkspaceStore
.fetchList({ ...params, limit: -1, cluster: cluster.name })
.fetchList({
...params,
limit: -1,
cluster: cluster.name,
labelSelector: 'kubefed.io/managed=true',
})
.then(() => {
this.setState({
authedWorkspaces: [...toJS(this.authedWorkspaceStore.list.data)],
Expand Down
6 changes: 5 additions & 1 deletion src/pages/clusters/containers/Visibility/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ export default class Overview extends React.Component {
}

getData = params => {
this.workspaceStore.fetchList({ ...this.props.match.params, ...params })
this.workspaceStore.fetchList({
...this.props.match.params,
...params,
labelSelector: 'kubefed.io/managed=true',
})
}

afterEdit = async () => {
Expand Down

0 comments on commit 1529258

Please sign in to comment.