Skip to content

Commit

Permalink
fix: Fix cluster projects search
Browse files Browse the repository at this point in the history
Signed-off-by: leoliu <leoliu@yunify.com>
  • Loading branch information
leoliu committed Jul 25, 2020
1 parent e920776 commit 13a190b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/controllers/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ const handleLogin = async ctx => {

const handleLogout = async ctx => {
ctx.cookies.set('token', null)
ctx.cookies.set('expire', null)
ctx.cookies.set('refreshToken', null)
ctx.cookies.set('currentUser', null)

const { origin = '', referer = '' } = ctx.headers
Expand Down
14 changes: 14 additions & 0 deletions src/pages/clusters/containers/Projects/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,19 @@ export default class Projects extends React.Component {
}
}

get tableActions() {
const { tableProps } = this.props
return {
...tableProps.tableActions,
onFetch: this.handleFetch,
}
}

handleFetch = (params, refresh) => {
const { routing } = this.props
routing.query({ ...params, type: this.type }, refresh)
}

handleTabChange = type => {
const { cluster } = this.props.match.params
this.props.routing.push(`/clusters/${cluster}/projects?type=${type}`)
Expand Down Expand Up @@ -215,6 +228,7 @@ export default class Projects extends React.Component {
<Table
{...tableProps}
itemActions={this.itemActions}
tableActions={this.tableActions}
columns={this.getColumns()}
onCreate={this.showCreate}
isLoading={tableProps.isLoading || isLoadingMonitor}
Expand Down

0 comments on commit 13a190b

Please sign in to comment.