ruanwenjun commented on code in PR #15933:
URL:
https://github.com/apache/dolphinscheduler/pull/15933#discussion_r1625479118
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/UiPluginController.java:
##########
@@ -85,4 +89,17 @@ public Result queryUiPluginDetailById(@Parameter(hidden =
true) @RequestAttribut
Map<String, Object> result =
uiPluginService.queryUiPluginDetailById(pluginId);
return returnDataList(result);
}
+
+ /**
+ * obtain project version and address
+ * @return product info
+ */
+ @Operation(summary = "queryProductInfo", description =
"QUERY_PRODUCT_INFO")
+ @GetMapping(value = "/queryProductInfo")
Review Comment:
```suggestion
@GetMapping(value = "/query-product-info")
```
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UiPluginServiceImpl.java:
##########
@@ -45,6 +54,19 @@ public class UiPluginServiceImpl extends BaseServiceImpl
implements UiPluginServ
@Autowired
PluginDefineMapper pluginDefineMapper;
+ @Autowired
+ private DsVersionDao dsVersionDao;
+
+ private String dsVersion;
+
+ @PostConstruct
+ private void init() {
+ dsVersion =
dsVersionDao.selectVersion().map(DsVersion::getVersion).orElse("unknown");
+ if(StringUtils.isBlank(dsVersion)){
+ throw new ServiceException(Status.VERSION_INFO_STATE_ERROR);
+ }
Review Comment:
This is strange, if the t_ds_version is empty will use unknown, but if the
version empty will throw exception.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]