From b3e908f72f99b616d65494cd6de40f9a9d918081 Mon Sep 17 00:00:00 2001 From: Wilfred Asomani Date: Fri, 27 Oct 2023 15:32:05 +0000 Subject: [PATCH] satellite/{console,web}: add browser card view config flag This change adds config flag to toggle whether the browser card view can be used. Issue: #6427 Change-Id: I19986ffe9a778b8752549a4d54b318fff0386479 --- satellite/console/consoleweb/config.go | 1 + satellite/console/consoleweb/server.go | 2 ++ scripts/testdata/satellite-config.yaml.lock | 3 +++ web/satellite/src/types/config.gen.ts | 1 + 4 files changed, 7 insertions(+) diff --git a/satellite/console/consoleweb/config.go b/satellite/console/consoleweb/config.go index 966a13750..7038d8949 100644 --- a/satellite/console/consoleweb/config.go +++ b/satellite/console/consoleweb/config.go @@ -49,6 +49,7 @@ type FrontendConfig struct { GalleryViewEnabled bool `json:"galleryViewEnabled"` NeededTransactionConfirmations int `json:"neededTransactionConfirmations"` ObjectBrowserPaginationEnabled bool `json:"objectBrowserPaginationEnabled"` + ObjectBrowserCardViewEnabled bool `json:"objectBrowserCardViewEnabled"` BillingFeaturesEnabled bool `json:"billingFeaturesEnabled"` UnregisteredInviteEmailsEnabled bool `json:"unregisteredInviteEmailsEnabled"` FreeTierInvitesEnabled bool `json:"freeTierInvitesEnabled"` diff --git a/satellite/console/consoleweb/server.go b/satellite/console/consoleweb/server.go index 8664e0bd7..12cf0c699 100644 --- a/satellite/console/consoleweb/server.go +++ b/satellite/console/consoleweb/server.go @@ -110,6 +110,7 @@ type Config struct { UseVuetifyProject bool `help:"whether to use vuetify POC project" default:"false"` VuetifyHost string `help:"the subdomain the vuetify POC project should be hosted on" default:""` ObjectBrowserPaginationEnabled bool `help:"whether to use object browser pagination" default:"false"` + ObjectBrowserCardViewEnabled bool `help:"whether to use object browser card view" default:"false"` OauthCodeExpiry time.Duration `help:"how long oauth authorization codes are issued for" default:"10m"` OauthAccessTokenExpiry time.Duration `help:"how long oauth access tokens are issued for" default:"24h"` @@ -749,6 +750,7 @@ func (server *Server) frontendConfigHandler(w http.ResponseWriter, r *http.Reque GalleryViewEnabled: server.config.GalleryViewEnabled, NeededTransactionConfirmations: server.neededTokenPaymentConfirmations, ObjectBrowserPaginationEnabled: server.config.ObjectBrowserPaginationEnabled, + ObjectBrowserCardViewEnabled: server.config.ObjectBrowserCardViewEnabled, BillingFeaturesEnabled: server.config.BillingFeaturesEnabled, UnregisteredInviteEmailsEnabled: server.config.UnregisteredInviteEmailsEnabled, FreeTierInvitesEnabled: server.config.FreeTierInvitesEnabled, diff --git a/scripts/testdata/satellite-config.yaml.lock b/scripts/testdata/satellite-config.yaml.lock index 53488f8ce..81a4a90c9 100755 --- a/scripts/testdata/satellite-config.yaml.lock +++ b/scripts/testdata/satellite-config.yaml.lock @@ -331,6 +331,9 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0 # how long oauth refresh tokens are issued for # console.oauth-refresh-token-expiry: 720h0m0s +# whether to use object browser card view +# console.object-browser-card-view-enabled: false + # whether to use object browser pagination # console.object-browser-pagination-enabled: false diff --git a/web/satellite/src/types/config.gen.ts b/web/satellite/src/types/config.gen.ts index ea8a5908e..15c31b786 100644 --- a/web/satellite/src/types/config.gen.ts +++ b/web/satellite/src/types/config.gen.ts @@ -46,6 +46,7 @@ export class FrontendConfig { galleryViewEnabled: boolean; neededTransactionConfirmations: number; objectBrowserPaginationEnabled: boolean; + objectBrowserCardViewEnabled: boolean; billingFeaturesEnabled: boolean; unregisteredInviteEmailsEnabled: boolean; freeTierInvitesEnabled: boolean;