From 15ddf2a3fb903b706422d33a226fbedd089f19be Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Tue, 6 Jun 2023 14:43:45 +0000 Subject: [PATCH 1/5] Add docs for user filtering --- docs/admin/users.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/admin/users.md b/docs/admin/users.md index 39e7b994f044d..daca485c7e1ae 100644 --- a/docs/admin/users.md +++ b/docs/admin/users.md @@ -129,3 +129,15 @@ kubectl exec -it deployment/coder /bin/bash -n coder coder reset-password ``` + +## Filtering users + +In the Coder UI you can filter your users using the pre-defined filter or by using the Coder's filter query like the examples below: + +- `status:active` to find active users +- `role:admin` to find admin users + +The supported filters are: + +- `status` - The status of the user. It can be a `active` or `suspended`. +- `role` - The role of the user. You can [find here](https://pkg.go.dev/github.com/coder/coder/codersdk#TemplateRole) all the user roles that are supported. From 2c3b0309eb1c2d32276d473052555e3e066baef4 Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Tue, 6 Jun 2023 14:48:47 +0000 Subject: [PATCH 2/5] Add filter for workspace --- docs/workspaces.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/workspaces.md b/docs/workspaces.md index d2d11e88f8382..269c4da5193fe 100644 --- a/docs/workspaces.md +++ b/docs/workspaces.md @@ -90,6 +90,19 @@ Coder stores macOS and Linux logs at the following locations: > Note: Logs are truncated once they reach 5MB in size. +## Filtering workspaces + +In the Coder UI you can filter your workspaces using the pre-defined filter or by using the Coder's filter query like the examples below: + +- `owner:me` to find the workspaces that you own +- `status:running` to find `running` workspaces + +The supported filters are: + +- `owner` - The `username` of the owner. You can also use `me` as an alias for the logged in user. +- `template` - The name of the template. +- `status` - The status of the workspace. You can [find here](https://pkg.go.dev/github.com/coder/coder/codersdk#WorkspaceStatus) all the statuses that are supported. + --- ## Up next From 3c0be7215f7d25d07d074a0ebeae96bad6a6d299 Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Tue, 6 Jun 2023 11:57:38 -0300 Subject: [PATCH 3/5] Apply suggestions from code review Co-authored-by: Muhammad Atif Ali --- docs/admin/users.md | 14 +++++++------- docs/workspaces.md | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/admin/users.md b/docs/admin/users.md index daca485c7e1ae..5a7979179730b 100644 --- a/docs/admin/users.md +++ b/docs/admin/users.md @@ -130,14 +130,14 @@ kubectl exec -it deployment/coder /bin/bash -n coder coder reset-password ``` -## Filtering users +## Filtering Users -In the Coder UI you can filter your users using the pre-defined filter or by using the Coder's filter query like the examples below: +In the Coder UI, you can filter your users using pre-defined filters or by utilizing the Coder's filter query. The examples provided below demonstrate how to use the Coder's filter query: -- `status:active` to find active users -- `role:admin` to find admin users +- To find active users, use the filter `status:active`. +- To find admin users, use the filter `role:admin`. -The supported filters are: +The following filters are supported: -- `status` - The status of the user. It can be a `active` or `suspended`. -- `role` - The role of the user. You can [find here](https://pkg.go.dev/github.com/coder/coder/codersdk#TemplateRole) all the user roles that are supported. +- `status` - Indicates the status of the user. It can be either `active` or `suspended`. +- `role` - Represents the role of the user. You can refer to the [TemplateRole documentation](https://pkg.go.dev/github.com/coder/coder/codersdk#TemplateRole) for a list of supported user roles. diff --git a/docs/workspaces.md b/docs/workspaces.md index 269c4da5193fe..90246a4a22ab4 100644 --- a/docs/workspaces.md +++ b/docs/workspaces.md @@ -90,18 +90,18 @@ Coder stores macOS and Linux logs at the following locations: > Note: Logs are truncated once they reach 5MB in size. -## Filtering workspaces +## Workspace Filtering -In the Coder UI you can filter your workspaces using the pre-defined filter or by using the Coder's filter query like the examples below: +In the Coder UI, you can filter your workspaces using pre-defined filters or employing the Coder's filter query. Take a look at the following examples to understand how to use the Coder's filter query: -- `owner:me` to find the workspaces that you own -- `status:running` to find `running` workspaces +- To find the workspaces that you own, use the filter `owner:me`. +- To find workspaces that are currently running, use the filter `status:running`. -The supported filters are: +The following filters are supported: -- `owner` - The `username` of the owner. You can also use `me` as an alias for the logged in user. -- `template` - The name of the template. -- `status` - The status of the workspace. You can [find here](https://pkg.go.dev/github.com/coder/coder/codersdk#WorkspaceStatus) all the statuses that are supported. +- `owner` - Represents the `username` of the owner. You can also use `me` as a convenient alias for the logged-in user. +- `template` - Specifies the name of the template. +- `status` - Indicates the status of the workspace. For a list of supported statuses, please refer to the [WorkspaceStatus documentation](https://pkg.go.dev/github.com/coder/coder/codersdk#WorkspaceStatus). --- From c4056c52b9a307f14c6e6e74fd6efd7c03e14ed0 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 6 Jun 2023 17:59:58 +0300 Subject: [PATCH 4/5] Update docs/admin/users.md --- docs/admin/users.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin/users.md b/docs/admin/users.md index 5a7979179730b..b85a4256110d1 100644 --- a/docs/admin/users.md +++ b/docs/admin/users.md @@ -130,7 +130,7 @@ kubectl exec -it deployment/coder /bin/bash -n coder coder reset-password ``` -## Filtering Users +## User filtering In the Coder UI, you can filter your users using pre-defined filters or by utilizing the Coder's filter query. The examples provided below demonstrate how to use the Coder's filter query: From 2408b822245db6fa674e6b3c890e4ee2d2aa49fc Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 6 Jun 2023 18:00:20 +0300 Subject: [PATCH 5/5] Apply suggestions from code review --- docs/workspaces.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/workspaces.md b/docs/workspaces.md index 90246a4a22ab4..43b61f595b305 100644 --- a/docs/workspaces.md +++ b/docs/workspaces.md @@ -90,7 +90,7 @@ Coder stores macOS and Linux logs at the following locations: > Note: Logs are truncated once they reach 5MB in size. -## Workspace Filtering +## Workspace filtering In the Coder UI, you can filter your workspaces using pre-defined filters or employing the Coder's filter query. Take a look at the following examples to understand how to use the Coder's filter query: