Commit Graph

29 Commits

Author SHA1 Message Date
Ammar Bandukwala 2bd6d2908e
feat: convert entire CLI to clibase (#6491)
I'm sorry.
2023-03-23 17:42:20 -05:00
Dean Sheather 66a6b590a1
feat: add template max_ttl (#6114)
Co-authored-by: Bruno Quaresma <bruno@coder.com>
2023-03-07 14:14:58 +00:00
Dean Sheather d60ec3e4bf
feat: add JSON output format to many CLI commands (#6082) 2023-02-08 17:09:38 +00:00
Ammar Bandukwala 91973e1e88
cli: remove redundant client creation requests (#5264) 2022-12-02 15:40:23 -06:00
Steven Masley 894953db3d
fix: Workspace `ls` show only me by default (#5107) 2022-11-16 17:58:50 +00:00
Garrett Delfosse 88f3691dcc
feat: add count to get users endpoint (#5016) 2022-11-14 17:22:57 -05:00
Garrett Delfosse 766a2ad590
chore: refactor workspace count to single route (#4809)
Co-authored-by: Presley Pizzo <presley@coder.com>
2022-11-10 13:25:46 -05:00
Cian Johnston e6f568fcac
refactor: cli: address comments from #4240 (#4259) 2022-09-29 11:04:37 +01:00
Ali Diamond 0c75ea6286
feat: `coder ls` should show possible columns to filter by (#4240)
* added showing columns in help call, need to format to make pretty

* finished formatting column  strings for print of list /ls command

Co-authored-by: Ali Diamond <user@ali.dev>
2022-09-28 16:39:44 -04:00
Kyle Carberry 6f82ad09c8
fix: Improve consistency on CLI help (#4112)
This makes the english consistent on flags, and improves
the contrast for the placeholder color on dark themes.
2022-09-19 11:36:18 -05:00
Kyle Carberry 2b0fcf3ece
fix: Show the users workspaces by default on `coder ls` (#3947)
Fixes #3945.
2022-09-07 17:30:49 -05:00
Mathias Fredriksson 78a24941fe
feat: Add `codersdk.NullTime`, change workspace build deadline (#3552)
Fixes #2015

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-08-25 19:10:42 +03:00
Steven Masley 6e496077ae
feat: Support search query and --me in workspace list (#3667) 2022-08-24 17:43:41 -04:00
Spike Curtis 184f0625e1
coder licenses add CLI command (#3632)
* coder licenses add CLI command

Signed-off-by: Spike Curtis <spike@coder.com>

* Fix up lint

Signed-off-by: Spike Curtis <spike@coder.com>

* Fix t.parallel call

Signed-off-by: Spike Curtis <spike@coder.com>

* Code review improvements

Signed-off-by: Spike Curtis <spike@coder.com>

* Lint

Signed-off-by: Spike Curtis <spike@coder.com>

Signed-off-by: Spike Curtis <spike@coder.com>
2022-08-23 13:55:39 -07:00
Dean Sheather 3610402cd8
Use new table formatter everywhere (#3544) 2022-08-19 02:41:00 +10:00
Mathias Fredriksson d7ec407a7c
fix: Improve coder list and show CLI help (#3167) 2022-07-25 16:56:20 +03:00
Abhineet Jain de1fc40000
fix: consistent workspace status b/w CLI and UI (#2743) 2022-07-01 14:40:03 +00:00
Cian Johnston c9691eafcb
feat: cli: consolidate schedule-related commands (#2402)
* feat: cli: consolidate schedule-related commands

This commit makes the following changes:
- renames autostart -> schedule starat
- renames ttl -> schedule stop
- renames bump -> schedule override
- adds schedule show command
- moves some cli-related stuff to util.go
2022-06-16 18:24:10 +01:00
Cian Johnston c28b7ecdf2
fix: coderd: decouple ttl and deadline (#2282)
This commit makes the following changes:

- Partially reverts the changes of feat: update workspace deadline when workspace ttl updated #2165, making the deadline of a running workspace build independant of TTL, once started.
- CLI: updating a workspace TTL no longer updates the deadline of the workspace.
- UI: updating a workspace TTL no longer updates the deadline of the workspace.
- Drive-by: API: When creating a workspace, default TTL to min(12 hours, template max_ttl) if not instructed otherwise.
- Drive-by: CLI: list: measure workspace extension correctly (+X in last column) from the time the provisioner job was completed
- Drive-by: WorkspaceSchedule: show timezone of schedule if it is set, defaulting to dayjs guess otherwise.
- Drive-by: WorkspaceScheduleForm: fixed an issue where deleting the "TTL" value in the form would show the text "Your workspace will shut down a few seconds after start".
2022-06-14 17:09:24 +01:00
Cian Johnston dcf03d8ba3
chore: refactor time.Duration -> int64 milliseconds for FE consumption (#1944)
* Changes all public-facing codersdk types to use a plain int64 (milliseconds) instead of time.Duration.
* Makes autostart_schedule a *string as it may not be present.
* Adds a utils/ptr package with some useful methods.
2022-06-02 11:23:34 +01:00
Cian Johnston ff542afe87
feat: allow bumping workspace deadline (#1828)
* Adds a `bump` command to extend workspace build deadline
 * Reduces WARN-level logging spam from autobuild executor
 * Modifies `cli/ssh` notifications to read from workspace build deadline and to notify relative time instead (sidestepping the problem of figuring out a user's timezone across multiple OSes)
 * Shows workspace extension time in `coder list` output e.g.
    ```
    WORKSPACE        TEMPLATE  STATUS   LAST BUILT  OUTDATED  AUTOSTART        TTL        
    developer/test1  docker    Running  4m          false     0 9 * * MON-FRI  15m (+5m)  
    ```
2022-05-27 20:04:33 +01:00
Cian Johnston d72c45e483
refactor: workspace autostop_schedule -> ttl (#1578)
Co-authored-by: G r e y <grey@coder.com>
2022-05-19 15:09:27 -04:00
Steven Masley 6c1117094d
chore: Force codersdk to not import anything from database (#1576)
* chore: Force codersdk to not import anything from database (linter rule)
* chore: Move all database types in codersdk out
2022-05-19 13:04:44 -05:00
Steven Masley a3556b12da
feat: Single query for all workspaces with optional filter (#1537)
* feat: Add single query for all workspaces using a filter
2022-05-18 10:09:07 -05:00
Cian Johnston b7049032a0
fix: cli: prettify schedule when printing output (#1440)
* Adds methods to schedule.Schedule to show the raw cron string and timezone
* Uses these methods to clean up output of auto(start|stop) show or ls
* Defaults CRON_TZ=UTC if not provided
2022-05-16 17:02:44 +01:00
Cian Johnston f970829b9e
feat: add autostart/autostop show, show autostart/autostop schedule in ls output (#1436)
* feat: add autostart/autostop show, show autostart/autostop schedule in ls output
2022-05-13 19:03:27 +00:00
Kyle Carberry e0a7aec228
fix: Match kubectl table style for simpler scripting (#1363)
Fixes #1322.
2022-05-10 15:57:07 -05:00
Kyle Carberry ddb9631d7a
fix: Group subcommands for cognitive ease (#1351) 2022-05-09 17:42:02 -05:00
Kyle Carberry c2b5009208
fix: Unnest workspaces command to the top-level (#1241)
This changes all "coder workspace *" commands to root.
A few of these were already at the root, like SSH. The
inconsistency made for a confusing experience.
2022-05-02 11:08:52 -05:00
Renamed from cli/workspacelist.go (Browse further)