-
Notifications
You must be signed in to change notification settings - Fork 110
Add sorting for clusters and query history page columns #752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,6 @@ ij_java_doc_align_param_comments = false | |
|
||
[*.yml] | ||
indent_size = 2 | ||
|
||
[*.tsx] | ||
indent_size = 2 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,13 +133,33 @@ export function History() { | |
onPageChange: list, | ||
}}> | ||
<Column title="QueryId" dataIndex="queryId" key="queryId" render={linkQueryRender} /> | ||
<Column title="RoutingGroup" dataIndex="routingGroup" key="routingGroup" render={routingGroupRender} /> | ||
<Column title="RoutingGroup" dataIndex="routingGroup" key="routingGroup" | ||
sorter={(a, b) => { | ||
if (!a || !b) return 0; | ||
return a.routingGroup.localeCompare(b.routingGroup); | ||
}} | ||
filters={ | ||
[...new Set(backendData?.map(b => b.routingGroup))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if backendData is undefined, it will be new Set(undefined) which will give an empty set. So filters array will be simply empty array so i think it is ok like this. |
||
.map(routingGroup => { | ||
return { | ||
text: routingGroup, | ||
value: routingGroup | ||
} | ||
})} | ||
onFilter={(value, record) => { | ||
if (!record) return false; | ||
return value === record.routingGroup | ||
}} | ||
render={routingGroupRender} /> | ||
<Column title="Name" dataIndex="backendUrl" key="backendUrlName" render={(text: string) => <Text>{backendMapping[text]}</Text>} /> | ||
<Column title="RoutedTo" dataIndex="externalUrl" key="externalUrl" render={linkRender} /> | ||
<Column title="User" dataIndex="user" key="user" /> | ||
<Column title="Source" dataIndex="source" key="source" /> | ||
<Column title="QueryText" dataIndex="queryText" key="queryText" width={300} render={queryTextRender} /> | ||
<Column title="SubmissionTime" dataIndex="captureTime" key="captureTime" render={timeRender} /> | ||
<Column title="SubmissionTime" dataIndex="captureTime" key="captureTime" render={timeRender} sorter={(a, b) => { | ||
if (!a || !b) return 0; | ||
return a.captureTime - b.captureTime; | ||
}} /> | ||
</Table> | ||
</Card> | ||
<Modal | ||
|
Uh oh!
There was an error while loading. Please reload this page.