ruanwenjun commented on code in PR #15933:
URL:
https://github.com/apache/dolphinscheduler/pull/15933#discussion_r1609639575
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/UiPluginController.java:
##########
@@ -85,4 +89,18 @@ 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")
+ @PostMapping(value = "/queryProductInfo")
Review Comment:
Please use GetMapping
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UiPluginServiceImpl.java:
##########
@@ -82,4 +94,18 @@ public Map<String, Object> queryUiPluginDetailById(int id) {
return result;
}
+ @Override
+ public ProductInfoDto queryProductInfo(User loginUser) {
+
+ // persist to the database
+ dsVersion =
dsVersionDao.selectVersion().map(DsVersion::getVersion).orElse("unknown");
+
Review Comment:
These seems never changed, so it would be better to query only once when the
api startup, this can reduce a lot of db query.
--
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]