Skip to content

Commit

Permalink
dashboard fix filter by labels
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Jul 19, 2024
1 parent f335f2a commit a2c44e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/dashboard/src/components/tasks/tasks-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,18 @@ export const TasksApp = React.memo(
}

(async () => {
let labelFilter: string | undefined = undefined;
if (filterColumn && filterColumn.startsWith('label=')) {
labelFilter = `${filterColumn.substring(6)}=${filterValue}`;
}

const resp = await rmf.tasksApi.queryTaskStatesTasksGet(
filterColumn && filterColumn === 'id_' ? filterValue : undefined,
filterColumn && filterColumn === 'category' ? filterValue : undefined,
filterColumn && filterColumn === 'requester' ? filterValue : undefined,
filterColumn && filterColumn === 'assigned_to' ? filterValue : undefined,
filterColumn && filterColumn === 'status' ? filterValue : undefined,
filterColumn && filterColumn.startsWith('label=') ? filterValue : undefined,
labelFilter,
filterColumn && filterColumn === 'unix_millis_request_time' ? filterValue : undefined,
filterColumn && filterColumn === 'unix_millis_start_time' ? filterValue : undefined,
filterColumn && filterColumn === 'unix_millis_finish_time' ? filterValue : undefined,
Expand Down

0 comments on commit a2c44e8

Please sign in to comment.