diff --git a/src/common/network/sessionParams.ts b/src/common/network/sessionParams.ts index 7e08c243b..d3771c49f 100644 --- a/src/common/network/sessionParams.ts +++ b/src/common/network/sessionParams.ts @@ -64,10 +64,7 @@ export async function getDatabaseSessionList(sessionId: string): Promise { const res = await request.post(`/api/v2/datasource/sessions/killSession`, { data: { - sessionIds: sessionIdAndsvrIps, + sessionIds, datasourceId, killType, }, diff --git a/src/d.ts/index.ts b/src/d.ts/index.ts index fe46823e5..1c575bab4 100644 --- a/src/d.ts/index.ts +++ b/src/d.ts/index.ts @@ -1749,7 +1749,6 @@ export interface IDatabaseSession { sessionId: number; sql: string; srcIp: string; - svrIp: string; status: string; } diff --git a/src/page/Workspace/components/SessionManagementPage/index.tsx b/src/page/Workspace/components/SessionManagementPage/index.tsx index 0e293d335..ba3ecfca0 100644 --- a/src/page/Workspace/components/SessionManagementPage/index.tsx +++ b/src/page/Workspace/components/SessionManagementPage/index.tsx @@ -232,12 +232,7 @@ function SessionManagementPage(props: IProps) { */ const kill = async (type: 'session' | 'query') => { const data = await killSessions( - selectedRows?.map((i) => { - return { - sessionId: i.sessionId?.toString(), - svrIp: i.svrIp, - }; - }), + selectedRows?.map((i) => i.sessionId?.toString()), context.datasourceId, type, ); @@ -351,16 +346,14 @@ function SessionManagementPage(props: IProps) { ) : null}
`${row.sessionId}-${row.svrIp}`} + rowKey={'sessionId'} bordered={true} loading={listLoading} columns={columns} dataSource={filteredRows} loadData={(page) => {}} rowSelection={{ - selectedRowKeys: selectedRows.map( - (r: IDatabaseSession) => `${r.sessionId}-${r.svrIp}`, - ), + selectedRowKeys: selectedRows.map((r: IDatabaseSession) => r.sessionId), onChange: (selectedRowKeys: string[], rows: IDatabaseSession[]) => { setSelectedRows(rows); },