Browse Source

[Improvement#6655] [UI] remove registry monitor (#6789)

* [DS-6655][fix] remove zkmonitor
- delete zkmonitor ui

* [DS-6655][fix] remove zkmonitor
- delete zkmonitor ui
- Modify the actions.js comma

* [DS-6655][fix] remove zkmonitor
- remove all backend API

Co-authored-by: Kirs <acm_master@163.com>
罗铭涛 3 years ago
parent
commit
975131e913

+ 0 - 17
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/MonitorController.java

@@ -20,7 +20,6 @@ package org.apache.dolphinscheduler.api.controller;
 import static org.apache.dolphinscheduler.api.enums.Status.LIST_MASTERS_ERROR;
 import static org.apache.dolphinscheduler.api.enums.Status.LIST_WORKERS_ERROR;
 import static org.apache.dolphinscheduler.api.enums.Status.QUERY_DATABASE_STATE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_ZOOKEEPER_STATE_ERROR;
 
 import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
 import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -102,20 +101,4 @@ public class MonitorController extends BaseController {
         return returnDataList(result);
     }
 
-    /**
-     * query zookeeper state
-     *
-     * @param loginUser login user
-     * @return zookeeper information list
-     */
-    @ApiOperation(value = "queryZookeeperState", notes = "QUERY_ZOOKEEPER_STATE_NOTES")
-    @GetMapping(value = "/zookeepers")
-    @ResponseStatus(HttpStatus.OK)
-    @ApiException(QUERY_ZOOKEEPER_STATE_ERROR)
-    @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
-    public Result queryZookeeperState(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
-        Map<String, Object> result = monitorService.queryZookeeperState(loginUser);
-        return returnDataList(result);
-    }
-
 }

+ 0 - 1
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java

@@ -286,7 +286,6 @@ public enum Status {
      * for monitor
      */
     QUERY_DATABASE_STATE_ERROR(70001, "query database state error", "查询数据库状态错误"),
-    QUERY_ZOOKEEPER_STATE_ERROR(70002, "query zookeeper state error", "查询zookeeper状态错误"),
 
     CREATE_ACCESS_TOKEN_ERROR(70010, "create access token error", "创建访问token错误"),
     GENERATE_TOKEN_ERROR(70011, "generate token error", "生成token错误"),

+ 0 - 8
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/MonitorService.java

@@ -44,14 +44,6 @@ public interface MonitorService {
      */
     Map<String,Object> queryMaster(User loginUser);
     
-    /**
-     * query zookeeper state
-     *
-     * @param loginUser login user
-     * @return zookeeper information list
-     */
-    Map<String,Object> queryZookeeperState(User loginUser);
-    
     /**
      * query worker list
      *

+ 0 - 17
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/MonitorServiceImpl.java

@@ -88,23 +88,6 @@ public class MonitorServiceImpl extends BaseServiceImpl implements MonitorServic
         return result;
     }
 
-    /**
-     * query zookeeper state
-     *
-     * @param loginUser login user
-     * @return zookeeper information list
-     */
-    @Override
-    public Map<String, Object> queryZookeeperState(User loginUser) {
-        Map<String, Object> result = new HashMap<>();
-
-        result.put(Constants.DATA_LIST, null);
-        putMsg(result, Status.SUCCESS);
-
-        return result;
-
-    }
-
     /**
      * query worker list
      *

+ 0 - 15
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/MonitorControllerTest.java

@@ -89,19 +89,4 @@ public class MonitorControllerTest extends AbstractControllerTest {
         logger.info(mvcResult.getResponse().getContentAsString());
     }
 
-    @Test
-    public void testQueryZookeeperState() throws Exception {
-        MvcResult mvcResult = mockMvc.perform(get("/monitor/zookeepers")
-            .header(SESSION_ID, sessionId)
-            /* .param("type", ResourceType.FILE.name())*/)
-            .andExpect(status().isOk())
-            .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
-            .andReturn();
-
-        Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
-        result.getCode().equals(Status.SUCCESS.getCode());
-
-        Assert.assertEquals(Status.SUCCESS.getCode(),result.getCode().intValue());
-        logger.info(mvcResult.getResponse().getContentAsString());
-    }
 }

+ 0 - 8
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/MonitorServiceTest.java

@@ -74,14 +74,6 @@ public class MonitorServiceTest {
         /*Assert.assertEquals(Status.SUCCESS,result.get(Constants.STATUS));*/
     }
 
-    @Test
-    public  void testQueryZookeeperState() {
-        //TODO need zk
-        /*Map<String,Object> result = monitorService.queryZookeeperState(null);*/
-        /*logger.info(result.toString());*/
-        /*Assert.assertEquals(Status.SUCCESS,result.get(Constants.STATUS));*/
-    }
-
     @Test
     public  void testGetServerListFromZK() {
         //TODO need zk

+ 0 - 67
dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/zookeeper.vue

@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-<template>
-  <m-list-construction :title="'Zookeeper ' + $t('Manage')">
-    <template slot="content">
-      <template v-if="zookeeperList.length">
-        <m-list :list="zookeeperList"></m-list>
-      </template>
-      <template v-if="!zookeeperList.length">
-        <m-no-data></m-no-data>
-      </template>
-      <m-spin :is-spin="isLoading" ></m-spin>
-    </template>
-  </m-list-construction>
-</template>
-<script>
-  import { mapActions } from 'vuex'
-  import mList from './_source/zookeeperList'
-  import mSpin from '@/module/components/spin/spin'
-  import mNoData from '@/module/components/noData/noData'
-  import mListConstruction from '@/module/components/listConstruction/listConstruction'
-
-  export default {
-    name: 'servers-zookeeper',
-    data () {
-      return {
-        isLoading: false,
-        zookeeperList: []
-      }
-    },
-    props: {},
-    methods: {
-      ...mapActions('monitor', ['getZookeeperData'])
-    },
-    watch: {},
-    created () {
-      this.isLoading = true
-      this.getZookeeperData().then(res => {
-        this.zookeeperList = res
-        this.isLoading = false
-      }).catch(() => {
-        this.isLoading = false
-      })
-    },
-    mounted () {
-
-    },
-    components: { mList, mListConstruction, mSpin, mNoData }
-  }
-</script>
-<style lang="scss" rel="stylesheet/scss">
-  @import "./servers";
-</style>

+ 0 - 9
dolphinscheduler-ui/src/js/conf/home/router/index.js

@@ -547,15 +547,6 @@ const router = new Router({
             refreshInSwitchedTab: config.refreshInSwitchedTab
           }
         },
-        {
-          path: '/monitor/servers/zookeeper',
-          name: 'servers-zookeeper',
-          component: resolve => require(['../pages/monitor/pages/servers/zookeeper'], resolve),
-          meta: {
-            title: 'Zookeeper',
-            refreshInSwitchedTab: config.refreshInSwitchedTab
-          }
-        },
         {
           path: '/monitor/servers/apiserver',
           name: 'servers-apiserver',

+ 0 - 9
dolphinscheduler-ui/src/js/conf/home/store/monitor/actions.js

@@ -44,14 +44,5 @@ export default {
         reject(e)
       })
     })
-  },
-  getZookeeperData ({ state }, payload) {
-    return new Promise((resolve, reject) => {
-      io.get('monitor/zookeepers', payload, res => {
-        resolve(res.data)
-      }).catch(e => {
-        reject(e)
-      })
-    })
   }
 }

+ 0 - 6
dolphinscheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js

@@ -238,12 +238,6 @@ const menu = {
           id: 1,
           enabled: true
         },
-        {
-          name: 'Zookeeper',
-          path: 'servers-zookeeper',
-          id: 4,
-          enabled: true
-        },
         {
           name: 'DB',
           path: 'servers-db',