8000 feat: Add suspend/active user to cli by Emyrk · Pull Request #1422 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: Add suspend/active user to cli #1422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 16, 2022
Merged
Prev Previous commit
Next Next commit
Fix table headers
  • Loading branch information
Emyrk committed May 16, 2022
commit ab8e5d1499449b280db1f43948c479e7ab2c0271
2 changes: 1 addition & 1 deletion cli/userlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func userList() *cobra.Command {
return err
},
}
cmd.Flags().StringArrayVarP(&columns, "column", "c", []string{"Username", "Email", "Created At"},
cmd.Flags().StringArrayVarP(&columns, "column", "c", []string{"username", "email", "created_at"},
"Specify a column to filter in the table.")
return cmd
}
2 changes: 1 addition & 1 deletion cli/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func users() *cobra.Command {
// columns to display
func displayUsers(filterColumns []string, users ...codersdk.User) string {
tableWriter := cliui.Table()
header := table.Row{"ID", "Username", "Email", "Created At", "Status"}
header := table.Row{"id", "username", "email", "created_at", "status"}
tableWriter.AppendHeader(header)
tableWriter.SetColumnConfigs(cliui.FilterTableColumns(header, filterColumns))
tableWriter.SortBy([]table.SortBy{{
Expand Down
2 changes: 1 addition & 1 deletion cli/userstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func createUserStatusCommand(sdkStatus codersdk.UserStatus) *cobra.Command {
return nil
},
}
cmd.Flags().StringArrayVarP(&columns, "column", "c", []string{"Username", "Email", "Created At", "Status"},
cmd.Flags().StringArrayVarP(&columns, "column", "c", []string{"username", "email", "created_at", "status"},
"Specify a column to filter in the table.")
return cmd
}
0