fix(docker): fix extension spelling EE-5277 (#8956)

pull/8961/head
Prabhat Khera 2023-05-18 10:21:07 +12:00 committed by GitHub
parent b58cd1e87e
commit 14fa60f6e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 9 deletions

View File

@ -60,7 +60,7 @@ func (store *Store) checkOrCreateDefaultSettings() error {
KubeconfigExpiry: portainer.DefaultKubeconfigExpiry,
KubectlShellImage: portainer.DefaultKubectlShellImage,
IsDockerDesktopExtention: isDDExtention,
IsDockerDesktopExtension: isDDExtention,
}
return store.SettingsService.UpdateSettings(defaultSettings)

View File

@ -9,9 +9,9 @@ import (
func (m *Migrator) migrateDockerDesktopExtentionSetting() error {
log.Info().Msg("updating docker desktop extention flag in settings")
isDDExtention := false
isDDExtension := false
if _, ok := os.LookupEnv("DOCKER_EXTENSION"); ok {
isDDExtention = true
isDDExtension = true
}
settings, err := m.settingsService.Settings()
@ -19,7 +19,7 @@ func (m *Migrator) migrateDockerDesktopExtentionSetting() error {
return err
}
settings.IsDockerDesktopExtention = isDDExtention
settings.IsDockerDesktopExtension = isDDExtension
err = m.settingsService.UpdateSettings(settings)
if err != nil {
return err

View File

@ -606,7 +606,7 @@
"InternalAuthSettings": {
"RequiredPasswordLength": 12
},
"IsDockerDesktopExtention": false,
"IsDockerDesktopExtension": false,
"KubeconfigExpiry": "0",
"KubectlShellImage": "portainer/kubectl-shell",
"LDAPSettings": {

View File

@ -50,7 +50,7 @@ type publicSettingsResponse struct {
CheckinInterval int `example:"60"`
}
IsDockerDesktopExtention bool `json:"IsDockerDesktopExtention" example:"false"`
IsDockerDesktopExtension bool `json:"IsDockerDesktopExtension" example:"false"`
}
// @id SettingsPublic
@ -91,7 +91,7 @@ func generatePublicSettings(appSettings *portainer.Settings) *publicSettingsResp
publicSettings.Edge.CommandInterval = appSettings.Edge.CommandInterval
publicSettings.Edge.CheckinInterval = appSettings.EdgeAgentCheckinInterval
publicSettings.IsDockerDesktopExtention = appSettings.IsDockerDesktopExtention
publicSettings.IsDockerDesktopExtension = appSettings.IsDockerDesktopExtension
//if OAuth authentication is on, compose the related fields from application settings
if publicSettings.AuthenticationMethod == portainer.AuthenticationOAuth {

View File

@ -173,7 +173,7 @@ func (service *Service) generateSignedToken(data *portainer.TokenData, expiresAt
return "", fmt.Errorf("failed fetching settings from db: %w", err)
}
if settings.IsDockerDesktopExtention {
if settings.IsDockerDesktopExtension {
// Set expiration to 99 years for docker desktop extension.
log.Info().Msg("detected docker desktop extension mode")
expiresAt = time.Now().Add(time.Hour * 8760 * 99).Unix()

View File

@ -968,7 +968,7 @@ type (
AllowDeviceMappingForRegularUsers bool `json:"AllowDeviceMappingForRegularUsers"`
AllowContainerCapabilitiesForRegularUsers bool `json:"AllowContainerCapabilitiesForRegularUsers"`
IsDockerDesktopExtention bool `json:"IsDockerDesktopExtention"`
IsDockerDesktopExtension bool `json:"IsDockerDesktopExtension"`
}
// SnapshotJob represents a scheduled job that can create environment(endpoint) snapshots