google / turbinia

Automation and Scaling of Digital Forensics Tools
Apache License 2.0
749 stars 162 forks source link

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

Open aarontp opened 1 year ago

aarontp commented 1 year ago

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

jleaniz commented 1 year ago

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 commented 1 year ago

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

aarontp commented 1 year ago

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.