CalvinKirs commented on a change in pull request #7210:
URL: https://github.com/apache/dolphinscheduler/pull/7210#discussion_r763783654



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertPluginInstanceServiceImpl.java
##########
@@ -188,14 +188,20 @@ public boolean checkExistPluginInstanceName(String 
pluginInstanceName) {
     }
 
     @Override
-    public Result queryPluginPage(int pageIndex, int pageSize) {
-        IPage<AlertPluginInstance> pluginInstanceIPage = new Page<>(pageIndex, 
pageSize);
-        pluginInstanceIPage = 
alertPluginInstanceMapper.selectPage(pluginInstanceIPage, null);
+    public Result listPaging(User loginUser, String searchVal, int pageNo, int 
pageSize) {
 
-        PageInfo<AlertPluginInstanceVO> pageInfo = new PageInfo<>(pageIndex, 
pageSize);
-        pageInfo.setTotal((int) pluginInstanceIPage.getTotal());
-        
pageInfo.setTotalList(buildPluginInstanceVOList(pluginInstanceIPage.getRecords()));
         Result result = new Result();
+        if (!isAdmin(loginUser)) {
+            putMsg(result,Status.USER_NO_OPERATION_PERM);
+            return result;
+        }
+
+        Page<AlertPluginInstance> page = new Page<>(pageNo, pageSize);
+        IPage<AlertPluginInstance> alertPluginInstanceIPage = 
alertPluginInstanceMapper.queryByInstanceNamePage(page, searchVal);
+
+        PageInfo<AlertPluginInstance> pageInfo = new PageInfo<>(pageNo, 
pageSize);
+        pageInfo.setTotal((int) alertPluginInstanceIPage.getTotal());
+        pageInfo.setTotalList(alertPluginInstanceIPage.getRecords());

Review comment:
       buildPluginInstanceVOList




-- 
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]


Reply via email to