diff --git a/modules/web/pkg/locale/handler.go b/modules/web/pkg/locale/handler.go index 7f74817e9f32..718ec6094c22 100644 --- a/modules/web/pkg/locale/handler.go +++ b/modules/web/pkg/locale/handler.go @@ -71,21 +71,18 @@ func handleAny(c *gin.Context) { } func getSupportedLocales() (tags []language.Tag) { - // read config file localesFile, err := os.ReadFile(args.LocaleConfig()) if err != nil { - klog.Warningf("Error when loading the localization configuration. Dashboard will not be localized. %s", err) + klog.Warningf("Dashboard will not be localized, cannot load config: %s", err) return } - // unmarshall localization := Localization{} err = json.Unmarshal(localesFile, &localization) if err != nil { klog.Warningf("%s %s", string(localesFile), err) } - // filter locale keys for _, translation := range localization.Translations { tags = append(tags, language.Make(translation)) } diff --git a/modules/web/pkg/settings/handler.go b/modules/web/pkg/settings/handler.go index c813eb6b0eb1..5570cdc06e0b 100644 --- a/modules/web/pkg/settings/handler.go +++ b/modules/web/pkg/settings/handler.go @@ -54,7 +54,6 @@ func init() { router.Root().GET("/settings/cani", handleGetSettingsGlobalCanI) router.Root().GET("/settings", handleGetSettingGlobal) router.Root().PUT("/settings", handleSettingsGlobalSave) - router.Root().GET("/settings/pinnedresources/cani", handleGetSettingsGlobalCanI) router.Root().GET("/settings/pinnedresources", handleSettingsGetPinned) router.Root().PUT("/settings/pinnedresources", handleSettingsSavePinned) diff --git a/modules/web/src/common/services/global/globalsettings.ts b/modules/web/src/common/services/global/globalsettings.ts index 5e6cb4fab8e8..3a0a2d96065a 100644 --- a/modules/web/src/common/services/global/globalsettings.ts +++ b/modules/web/src/common/services/global/globalsettings.ts @@ -38,7 +38,7 @@ export class GlobalSettingsService { onSettingsUpdate = new ReplaySubject(); onPageVisibilityChange = new EventEmitter(); - private readonly endpoint_ = '/settings'; + private readonly endpoint_ = 'settings'; private settings_: GlobalSettings = DEFAULT_SETTINGS; private unsubscribe_ = new Subject(); private isInitialized_ = false; diff --git a/modules/web/src/common/services/global/pinner.ts b/modules/web/src/common/services/global/pinner.ts index b6e7b6dfb94f..4611184937fb 100644 --- a/modules/web/src/common/services/global/pinner.ts +++ b/modules/web/src/common/services/global/pinner.ts @@ -25,7 +25,7 @@ export class PinnerService { onPinUpdate = new Subject(); private isInitialized_ = false; private pinnedResources_: PinnedResource[] = []; - private readonly endpoint_ = '/settings/pinnedresources'; + private readonly endpoint_ = 'settings/pinnedresources'; constructor( private readonly dialog_: MatDialog,