From 8e56acc68f7883d263dfbb203af091f03ef248a9 Mon Sep 17 00:00:00 2001 From: Mark Borissov Date: Wed, 22 Jan 2025 08:14:02 +0000 Subject: [PATCH] WAL 8046 Add marketplace title page to configuration --- cypress/fixtures/configuration-admin.json | 1 + cypress/fixtures/configuration.json | 1 + cypress/fixtures/support/configuration.json | 1 + src/auth/types.ts | 1 + src/configs/default.ts | 1 - src/core/types.ts | 1 - src/marketplace/landing/LandingPage.tsx | 10 ++++++++-- 7 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cypress/fixtures/configuration-admin.json b/cypress/fixtures/configuration-admin.json index f82061e5a..507986e6f 100644 --- a/cypress/fixtures/configuration-admin.json +++ b/cypress/fixtures/configuration-admin.json @@ -77,6 +77,7 @@ "SITE_PHONE": "", "SITE_DESCRIPTION": "Your single pane of control for managing projects, teams and resources in a self-service manner.", "MASTERMIND_URL": "", + "MARKETPLACE_LANDING_PAGE": "Marketplace", "ANONYMOUS_USER_CAN_VIEW_OFFERINGS": true, "ENABLE_RESOURCE_END_DATE": true, "AUTHENTICATION_METHODS": ["LOCAL_SIGNIN", "SAML2", "SOCIAL_SIGNUP"], diff --git a/cypress/fixtures/configuration.json b/cypress/fixtures/configuration.json index 25331d01c..f12e23bc1 100644 --- a/cypress/fixtures/configuration.json +++ b/cypress/fixtures/configuration.json @@ -5,6 +5,7 @@ "NATIVE_NAME_ENABLED": false, "ENABLE_RESOURCE_END_DATE": true, "AUTHENTICATION_METHODS": ["LOCAL_SIGNIN"], + "MARKETPLACE_LANDING_PAGE": "Marketplace", "COMPANY_TYPES": [ "Ministry", "Private company", diff --git a/cypress/fixtures/support/configuration.json b/cypress/fixtures/support/configuration.json index 1bdcf30b6..e9eb21e36 100644 --- a/cypress/fixtures/support/configuration.json +++ b/cypress/fixtures/support/configuration.json @@ -73,6 +73,7 @@ "SITE_NAME": "Waldur", "SITE_EMAIL": "", "SITE_ADDRESS": "", + "MARKETPLACE_LANDING_PAGE": "Marketplace", "LANGUAGE_CHOICES": "en,it,de,es,et,fr,ar", "SITE_PHONE": "", "SITE_DESCRIPTION": "Your single pane of control for managing projects, teams and resources in a self-service manner.", diff --git a/src/auth/types.ts b/src/auth/types.ts index 25acb5755..f540c2ec7 100644 --- a/src/auth/types.ts +++ b/src/auth/types.ts @@ -58,6 +58,7 @@ interface CoreConfiguration { SITE_PHONE: string; SITE_EMAIL: string; SITE_NAME: string; + MARKETPLACE_LANDING_PAGE: string; TRANSLATION_DOMAIN: string; ORGANIZATION_SUBNETS_VISIBLE: boolean; CURRENCY_NAME: string; diff --git a/src/configs/default.ts b/src/configs/default.ts index 103562693..ea8f57b7b 100644 --- a/src/configs/default.ts +++ b/src/configs/default.ts @@ -2,7 +2,6 @@ import { ApplicationConfigurationOptions } from '@waldur/core/types'; export const ENV: ApplicationConfigurationOptions = { apiEndpoint: 'http://localhost:8080/', - marketplaceLandingPageTitle: '', pageSize: 10, buildId: 'develop', accountingMode: 'accounting', diff --git a/src/core/types.ts b/src/core/types.ts index 81bf873c6..7d42bfc55 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -50,7 +50,6 @@ export interface ApplicationConfigurationOptions { languageChoices?: LanguageOption[]; defaultLanguage?: string; FEATURES?: Record; - marketplaceLandingPageTitle: string; pageSize: number; buildId: string; accountingMode: 'billing' | 'accounting'; diff --git a/src/marketplace/landing/LandingPage.tsx b/src/marketplace/landing/LandingPage.tsx index ec208db37..e6449f14f 100644 --- a/src/marketplace/landing/LandingPage.tsx +++ b/src/marketplace/landing/LandingPage.tsx @@ -26,7 +26,10 @@ import { OfferingsSearchBox } from './OfferingsSearchBox'; import './LandingPage.scss'; export const LandingPage: FC<{}> = () => { - useTitle(ENV.marketplaceLandingPageTitle || translate('Marketplace')); + useTitle( + ENV.plugins.WALDUR_CORE.MARKETPLACE_LANDING_PAGE || + translate('Marketplace'), + ); useFullPage(); const showExperimentalUiComponents = isExperimentalUiComponentsVisible(); @@ -49,7 +52,10 @@ export const LandingPage: FC<{}> = () => { )}