mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39: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:
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"math"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -1113,10 +1112,13 @@ when required by your organization's security policy.`,
|
||||
Description: "The maximum lifetime duration users can specify when creating an API token.",
|
||||
Flag: "max-token-lifetime",
|
||||
Env: "CODER_MAX_TOKEN_LIFETIME",
|
||||
Default: time.Duration(math.MaxInt64).String(),
|
||||
Value: &c.MaxTokenLifetime,
|
||||
Group: &deploymentGroupNetworkingHTTP,
|
||||
YAML: "maxTokenLifetime",
|
||||
// The default value is essentially "forever", so just use 100 years.
|
||||
// We have to add in the 25 leap days for the frontend to show the
|
||||
// "100 years" correctly.
|
||||
Default: ((100 * 365 * time.Hour * 24) + (25 * time.Hour * 24)).String(),
|
||||
Value: &c.MaxTokenLifetime,
|
||||
Group: &deploymentGroupNetworkingHTTP,
|
||||
YAML: "maxTokenLifetime",
|
||||
},
|
||||
{
|
||||
Name: "Enable swagger endpoint",
|
||||
|
Reference in New Issue
Block a user