From eebd9fb89535cdb84534817dd42619a0ba24c898 Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Mon, 7 Aug 2023 11:30:06 +0200 Subject: [PATCH] =?UTF-8?q?allow=20=E2=80=9Cprojects=5Furl=E2=80=9D=20only?= =?UTF-8?q?=20in=20serverless,=20set=20default=20in=20the=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/serverless.yml | 1 - x-pack/plugins/cloud/server/config.ts | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/serverless.yml b/config/serverless.yml index a689d3ba5277e..43e9b86eb1f4a 100644 --- a/config/serverless.yml +++ b/config/serverless.yml @@ -9,7 +9,6 @@ xpack.fleet.internal.activeAgentsSoftLimit: 25000 # Cloud links xpack.cloud.base_url: "https://cloud.elastic.co" -xpack.cloud.projects_url: "/projects/" # Enable ZDT migration algorithm migrations.algorithm: zdt diff --git a/x-pack/plugins/cloud/server/config.ts b/x-pack/plugins/cloud/server/config.ts index bc2256db98f60..ba52153be22e1 100644 --- a/x-pack/plugins/cloud/server/config.ts +++ b/x-pack/plugins/cloud/server/config.ts @@ -29,7 +29,12 @@ const configSchema = schema.object({ users_and_roles_url: schema.maybe(schema.string()), organization_url: schema.maybe(schema.string()), profile_url: schema.maybe(schema.string()), - projects_url: schema.maybe(schema.string()), + projects_url: schema.conditional( + schema.contextRef('serverless'), + true, + schema.string({ defaultValue: '/projects' }), + schema.never() + ), trial_end_date: schema.maybe(schema.string()), is_elastic_staff_owned: schema.maybe(schema.boolean()), serverless: schema.maybe(