turbinia icon indicating copy to clipboard operation
turbinia copied to clipboard

[FR]: Filter request status list by user/history

Open aarontp opened this issue 10 months ago • 3 comments

What would this feature improve or what problem would it solve?

This will make it easier to get the requests for a given user or time period. For example a user will be able to see just what requests they have made for a given time period.

What is the feature you are proposing?

Add the --user and --days filters to the turbinia-client status summary command.

What alternatives have you considered?

No response

aarontp avatar Oct 07 '23 20:10 aarontp

These options are implemented under turbinia-client status statistics

root@e988b901ec91:/workspaces/turbinia/turbinia/api/cli# turbinia-client status statistics -h
2023-10-09 13:42:00,752 INFO turbinia - Using configuration instance name -> default with host http://localhost:8000
Usage: turbinia-client status statistics [OPTIONS]

  Shows statistics about tasks.

Options:
  -d, --days TEXT        Specifies statistics timeframe.
  -t, --task_id TEXT     Gets statistics for a specific task.
  -r, --request_id TEXT  Gets statistics for a specific request.
  -u, --user TEXT        Gets statistics for a specific user.
  -c, --csv              Outputs statistics as CSV.
  -j, --json_dump        Generates JSON output.
  -h, --help             Show this message and exit.

You can specify --days or --user to retrieve related/filtered tasks.

jleaniz avatar Oct 09 '23 13:10 jleaniz

Is this what you were referring to, or a different type of filtering?

jleaniz avatar Oct 09 '23 13:10 jleaniz

These are the same flags but to filter the list of requests and not statistics. I would like to be able to list only my requests or requests made in the past N days.

Bonus FR I should file elsewhere, but putting it here as well since it will touch the same code: It would be nice if the requests in the status summary view were sorted by last update of the last task.

aarontp avatar Oct 10 '23 17:10 aarontp