- Notifications
You must be signed in to change notification settings - Fork1k
Commitad5e678

Rafael Rodriguez
feat: add filtering options to provisioners list (#19378)
## SummaryIn this pull request we're adding support for additional filteringoptions to the `provisioners list` CLI command and the`/provisionerdaemons` API endpoint.Resolves:#18783### Changes#### Added CLI Options- `--show-offline`: When this option is provided, all provisionerdaemons will be returned. This means that when `--show-offline` is notprovided only `idle` and `busy` provisioner daemons will be returned.- `--status=<list_of_statuses>`: When this option is provided with acomma-separated list of valid statuses (`idle`, `busy`, or `offline`)only provisioner daemons that have these statuses will be returned.- `--max-age=<duration>`: When this option is provided with a validduration value (e.g., `24h`, `30s`) only provisioner daemons with a`last_seen_at` timestamp within the provided max age will be returned.#### Query Params- `?offline=true`: Include offline provisioner daemons in the results.Offline provisioner daemons will be excluded if `?offline=false` or ifoffline is not provided.- `?status=<list_of_statuses>`: Include provisioner daemons with thespecified statuses.- `?max_age=<duration>`: Include provisioner daemons with a`last_seen_at` timestamp within the max age duration.#### Frontend- Since offline provisioners will not be returned by default anymore(`--show-offline` has to be provided to see them), a checkbox was addedto the provisioners list page to allow for offline provisioners to bedisplayed- A revamp of the provisioners page will be done in:#17156, this checkbox change wasjust added to maintain currently functionality with the backend updatesCurrent provisioners page (without checkbox)<img width="1329" height="574" alt="Screenshot 2025-08-20 at 10 5100 AM"src="https://github.com/user-attachments/assets/77b73650-0b62-44f0-a77f-acbe5710809f"/>Provisioners page with checkbox (unchecked)<img width="1314" height="626" alt="Screenshot 2025-08-20 at 10 4840 AM"src="https://github.com/user-attachments/assets/7ba164ad-6d3f-417b-bd39-338c0161b145"/>Provisioner page with checkbox (checked) and URL updated with queryparameters<img width="1306" height="597" alt="Screenshot 2025-08-20 at 10 5014 AM"src="https://github.com/user-attachments/assets/e78d0986-bbf8-491b-9d56-b682973237a0"/>### Show Offline vs Offline StatusTo list offline provisioner daemons, users can either:1. Include the `--show-offline` optionOR2. Include `offline` in the list of values provided to the `--status`option1 parentd77c3d0 commitad5e678
File tree
25 files changed
+707
-94
lines changed- cli
- testdata
- TestProvisioners_Golden
- coderd
- database
- queries
- sdk2db
- httpapi
- codersdk
- docs/reference/cli
- enterprise/cli/testdata
- site/src
- api
- pages/OrganizationSettingsPage/OrganizationProvisionersPage
25 files changed
+707
-94
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| 5 | + | |
5 | 6 |
| |
6 | 7 |
| |
7 | 8 |
| |
8 | 9 |
| |
| 10 | + | |
9 | 11 |
| |
10 | 12 |
| |
11 | 13 |
| |
| |||
39 | 41 |
| |
40 | 42 |
| |
41 | 43 |
| |
42 |
| - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 |
| |
44 | 49 |
| |
45 | 50 |
| |
| |||
59 | 64 |
| |
60 | 65 |
| |
61 | 66 |
| |
62 |
| - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
63 | 71 |
| |
64 | 72 |
| |
65 | 73 |
| |
| |||
98 | 106 |
| |
99 | 107 |
| |
100 | 108 |
| |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
101 | 130 |
| |
102 | 131 |
| |
103 | 132 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
200 | 268 |
| |
201 | 269 |
| |
202 | 270 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + |
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + |
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + |
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + |
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 |
| |
21 | 24 |
| |
22 | 25 |
| |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
23 | 32 |
| |
24 | 33 |
|
0 commit comments
Comments
(0)