diff --git a/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/model/MgmtProperty.java b/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/model/MgmtProperty.java index 22cb7d53..27323e52 100644 --- a/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/model/MgmtProperty.java +++ b/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/model/MgmtProperty.java @@ -10,6 +10,7 @@ public class MgmtProperty { private boolean enabled; private String defaultEnv = "stage"; private boolean mgmtServerEnabled = false; + private String productName = ""; private APIToken apiToken = new APIToken(); private String buyerTokenExpiredSeconds = DEFAULT_TOKEN_EXPIRED_SECONDS; diff --git a/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/model/SystemInfo.java b/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/model/SystemInfo.java index a3e20aa8..77d3c8c1 100644 --- a/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/model/SystemInfo.java +++ b/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/model/SystemInfo.java @@ -16,4 +16,5 @@ public class SystemInfo extends AbstractModel { String status; String productionAppVersion; String stageAppVersion; + String productName; } diff --git a/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/service/SystemInfoService.java b/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/service/SystemInfoService.java index 5e539dec..8ce0c4b6 100644 --- a/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/service/SystemInfoService.java +++ b/kraken-java-sdk/kraken-java-sdk-controller/src/main/java/com/consoleconnect/kraken/operator/controller/service/SystemInfoService.java @@ -3,6 +3,7 @@ import com.consoleconnect.kraken.operator.controller.entity.SystemInfoEntity; import com.consoleconnect.kraken.operator.controller.enums.SystemStateEnum; import com.consoleconnect.kraken.operator.controller.mapper.SystemInfoMapper; +import com.consoleconnect.kraken.operator.controller.model.MgmtProperty; import com.consoleconnect.kraken.operator.controller.model.SystemInfo; import com.consoleconnect.kraken.operator.controller.repo.SystemInfoRepository; import com.consoleconnect.kraken.operator.core.dto.Tuple2; @@ -38,6 +39,7 @@ public class SystemInfoService { private final UnifiedAssetService unifiedAssetService; private final SystemInfoRepository systemInfoRepository; + private final MgmtProperty mgmtProperty; @Value("${spring.build.version}") private String buildVersion; @@ -165,6 +167,11 @@ public SystemInfo find() { return systemInfoRepository .findOneByKey(KEY) .map(SystemInfoMapper.INSTANCE::toDto) + .map( + t -> { + t.setProductName(mgmtProperty.getProductName()); + return t; + }) .orElseThrow(() -> KrakenException.notFound("System info not found")); } }