Skip to content

Commit

Permalink
fix admin filter
Browse files Browse the repository at this point in the history
  • Loading branch information
lizongying committed Nov 17, 2023
1 parent 3673567 commit cc60ec0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/ui/src/views/JobsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ const {query} = useRoute();
if ('id' in query) {
filteredInfo.id = [query.id]
}
const columns = computed(() => {
return [
{
Expand Down Expand Up @@ -565,11 +566,15 @@ const state = reactive({
});
const searchInput = ref();
const handleSearch = (selectedKeys, confirm, dataIndex) => {
filteredInfo[dataIndex] = selectedKeys
confirm();
state.searchText = selectedKeys[0];
state.searchedColumn = dataIndex;
};
const handleReset = clearFilters => {
Object.keys(filteredInfo).forEach(key => {
delete filteredInfo[key];
});
clearFilters({
confirm: true,
});
Expand Down
4 changes: 4 additions & 0 deletions web/ui/src/views/NodesView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,15 @@ const state = reactive({
});
const searchInput = ref();
const handleSearch = (selectedKeys, confirm, dataIndex) => {
filteredInfo[dataIndex] = selectedKeys
confirm();
state.searchText = selectedKeys[0];
state.searchedColumn = dataIndex;
};
const handleReset = clearFilters => {
Object.keys(filteredInfo).forEach(key => {
delete filteredInfo[key];
});
clearFilters({
confirm: true,
});
Expand Down
4 changes: 4 additions & 0 deletions web/ui/src/views/RecordsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,15 @@ const state = reactive({
});
const searchInput = ref();
const handleSearch = (selectedKeys, confirm, dataIndex) => {
filteredInfo[dataIndex] = selectedKeys
confirm();
state.searchText = selectedKeys[0];
state.searchedColumn = dataIndex;
};
const handleReset = clearFilters => {
Object.keys(filteredInfo).forEach(key => {
delete filteredInfo[key];
});
clearFilters({
confirm: true,
});
Expand Down
4 changes: 4 additions & 0 deletions web/ui/src/views/SpidersView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,15 @@ const state = reactive({
});
const searchInput = ref();
const handleSearch = (selectedKeys, confirm, dataIndex) => {
filteredInfo[dataIndex] = selectedKeys
confirm();
state.searchText = selectedKeys[0];
state.searchedColumn = dataIndex;
};
const handleReset = clearFilters => {
Object.keys(filteredInfo).forEach(key => {
delete filteredInfo[key];
});
clearFilters({
confirm: true,
});
Expand Down
4 changes: 4 additions & 0 deletions web/ui/src/views/TasksView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,15 @@ const state = reactive({
});
const searchInput = ref();
const handleSearch = (selectedKeys, confirm, dataIndex) => {
filteredInfo[dataIndex] = selectedKeys
confirm();
state.searchText = selectedKeys[0];
state.searchedColumn = dataIndex;
};
const handleReset = clearFilters => {
Object.keys(filteredInfo).forEach(key => {
delete filteredInfo[key];
});
clearFilters({
confirm: true,
});
Expand Down

0 comments on commit cc60ec0

Please sign in to comment.