From 990fbe28f5a915de2d30efd20181bf382ecb3a8d Mon Sep 17 00:00:00 2001 From: DenisSinelnikov <142215442+DenisSinelnikov@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:16:41 +0400 Subject: [PATCH] CB-5895. Added new parameter link to buy license for getProductInfo API (#3080) * CB-5895. Added new parameter link to buy license for getProductInfo API * CB-5951 add purchase field --------- Co-authored-by: naumov Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com> Co-authored-by: Ainur <59531286+yagudin10@users.noreply.github.com> --- .../io.cloudbeaver.server/schema/service.core.graphqls | 1 + .../src/io/cloudbeaver/model/WebProductInfo.java | 6 ++++++ .../src/queries/fragments/ServerConfig/ProductInfo.gql | 1 + 3 files changed, 8 insertions(+) diff --git a/server/bundles/io.cloudbeaver.server/schema/service.core.graphqls b/server/bundles/io.cloudbeaver.server/schema/service.core.graphqls index bcd3ffb4df..665ce1045d 100644 --- a/server/bundles/io.cloudbeaver.server/schema/service.core.graphqls +++ b/server/bundles/io.cloudbeaver.server/schema/service.core.graphqls @@ -118,6 +118,7 @@ type ProductInfo { licenseInfo: String latestVersionInfo: String + productPurchaseURL: String } type ServerConfig { diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebProductInfo.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebProductInfo.java index be799bc9c7..58d8f6b6bd 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebProductInfo.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebProductInfo.java @@ -77,4 +77,10 @@ public String getLatestVersionInfo() { return CommonUtils.notEmpty(product.getProperty("versionUpdateURL")); } + @Property + public String getProductPurchaseURL() { + IProduct product = Platform.getProduct(); + return CommonUtils.notEmpty(product.getProperty("productPurchaseURL")); + } + } diff --git a/webapp/packages/core-sdk/src/queries/fragments/ServerConfig/ProductInfo.gql b/webapp/packages/core-sdk/src/queries/fragments/ServerConfig/ProductInfo.gql index 2ce93b8765..ad727b493c 100644 --- a/webapp/packages/core-sdk/src/queries/fragments/ServerConfig/ProductInfo.gql +++ b/webapp/packages/core-sdk/src/queries/fragments/ServerConfig/ProductInfo.gql @@ -8,5 +8,6 @@ fragment ProductInfo on ServerConfig { buildTime releaseTime licenseInfo + productPurchaseURL } }