mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
chore: Make deployment admin page show better durations (#6856)
* chore: Make deployment admin page show better durations Also fix group mappings
This commit is contained in:
@ -190,19 +190,6 @@ func (d *Duration) String() string {
|
||||
return time.Duration(*d).String()
|
||||
}
|
||||
|
||||
func (d *Duration) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(d.String())
|
||||
}
|
||||
|
||||
func (d *Duration) UnmarshalJSON(b []byte) error {
|
||||
var s string
|
||||
err := json.Unmarshal(b, &s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return d.Set(s)
|
||||
}
|
||||
|
||||
func (Duration) Type() string {
|
||||
return "duration"
|
||||
}
|
||||
|
2
cli/testdata/coder_server_--help.golden
vendored
2
cli/testdata/coder_server_--help.golden
vendored
@ -170,7 +170,7 @@ backed by Tailscale and WireGuard.
|
||||
--http-address string, $CODER_HTTP_ADDRESS (default: 127.0.0.1:3000)
|
||||
HTTP bind address of the server. Unset to disable the HTTP endpoint.
|
||||
|
||||
--max-token-lifetime duration, $CODER_MAX_TOKEN_LIFETIME (default: 2562047h47m16.854775807s)
|
||||
--max-token-lifetime duration, $CODER_MAX_TOKEN_LIFETIME (default: 876600h0m0s)
|
||||
The maximum lifetime duration users can specify when creating an API
|
||||
token.
|
||||
|
||||
|
Reference in New Issue
Block a user