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:
Steven Masley
2023-03-29 16:26:20 -05:00
committed by GitHub
parent 872037bf85
commit 90da09bc2c
8 changed files with 115 additions and 37 deletions

View File

@ -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"
}

View File

@ -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.