This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch dev-1.3.2
in repository https://gitbox.apache.org/repos/asf/linkis.git


The following commit(s) were added to refs/heads/dev-1.3.2 by this push:
     new 5c8051d08 [feat]The new field of jobhistory returns errorMsgTip (#4228)
5c8051d08 is described below

commit 5c8051d087bbbe6ea10af6ce8d60f4acd8d0e51d
Author: huangKai-2323 <[email protected]>
AuthorDate: Tue Mar 7 17:48:10 2023 +0800

    [feat]The new field of jobhistory returns errorMsgTip (#4228)
---
 .../main/scala/org/apache/linkis/common/conf/Configuration.scala    | 6 ++++++
 .../org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java   | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/linkis-commons/linkis-common/src/main/scala/org/apache/linkis/common/conf/Configuration.scala
 
b/linkis-commons/linkis-common/src/main/scala/org/apache/linkis/common/conf/Configuration.scala
index 29febf0b3..8ac94739c 100644
--- 
a/linkis-commons/linkis-common/src/main/scala/org/apache/linkis/common/conf/Configuration.scala
+++ 
b/linkis-commons/linkis-common/src/main/scala/org/apache/linkis/common/conf/Configuration.scala
@@ -68,6 +68,12 @@ object Configuration extends Logging {
 
   val VARIABLE_OPERATION: Boolean = 
CommonVars("wds.linkis.variable.operation", false).getValue
 
+  val ERROR_MSG_TIP =
+    CommonVars(
+      "linkis.jobhistory.error.msg.tip",
+      "The request interface %s is abnormal. You can try to troubleshoot 
common problems in the knowledge base document"
+    )
+
   def isAdminToken(token: String): Boolean = {
     if (StringUtils.isBlank(token)) {
       false
diff --git 
a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java
 
b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java
index e0db74924..a1c0d20e9 100644
--- 
a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java
+++ 
b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java
@@ -71,7 +71,8 @@ public class QueryRestfulApi {
     String username = ModuleUserUtils.getOperationUser(req, 
"governanceStationAdmin");
     return Message.ok()
         .data("admin", Configuration.isAdmin(username))
-        .data("historyAdmin", Configuration.isJobHistoryAdmin(username));
+        .data("historyAdmin", Configuration.isJobHistoryAdmin(username))
+        .data("errorMsgTip", Configuration.ERROR_MSG_TIP().getValue());
   }
 
   @ApiOperation(value = "getTaskByID", notes = "get task by id", response = 
Message.class)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to