You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2022/04/14 12:01:57 UTC

[incubator-linkis] branch dev-1.1.1 updated: delete dss interface (#11) (#1972)

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

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


The following commit(s) were added to refs/heads/dev-1.1.1 by this push:
     new f84f6d532 delete dss interface (#11) (#1972)
f84f6d532 is described below

commit f84f6d5329a962e37da8406a2ef2ea980b9893e7
Author: Casion <ca...@gmail.com>
AuthorDate: Thu Apr 14 20:01:49 2022 +0800

    delete dss interface (#11) (#1972)
    
    Co-authored-by: liveipooli(李为) <li...@webank.com>
    
    Co-authored-by: 李为 <12...@qq.com>
    Co-authored-by: liveipooli(李为) <li...@webank.com>
---
 .../apps/URM/module/functionManagement/index.vue   |  6 --
 web/src/apps/URM/module/header/index.vue           | 11 ---
 web/src/apps/URM/module/udfManagement/index.vue    |  6 --
 web/src/apps/linkis/module/header/index.vue        | 10 ---
 web/src/common/config/apiPath.js                   | 24 -------
 web/src/common/service/apiCommonMethod.js          | 84 ----------------------
 web/src/common/service/mixin.js                    | 14 +---
 web/src/dss/module/header/index.vue                | 10 ---
 web/src/dss/view/login/index.vue                   | 14 +---
 web/src/main.js                                    |  3 -
 10 files changed, 2 insertions(+), 180 deletions(-)

diff --git a/web/src/apps/URM/module/functionManagement/index.vue b/web/src/apps/URM/module/functionManagement/index.vue
index 9879d5df2..5d7ad0a7f 100644
--- a/web/src/apps/URM/module/functionManagement/index.vue
+++ b/web/src/apps/URM/module/functionManagement/index.vue
@@ -207,12 +207,6 @@ export default {
     // api.fetch('/configuration/engineType', 'get').then(res => {
     //   this.getCreators = ['all', ...res.engineType]
     // })
-    // 所有用户列表,移交时选择用户
-    api.fetch('/dss/framework/workspace/listAllUsers', 'get').then(res => {
-      let allUsers =  (res.users || []).map(it => it.username)
-      this.udfUsers = allUsers.slice(0, 150)
-      this.allUsers = allUsers
-    })
   },
   mounted() {
     this.init()
diff --git a/web/src/apps/URM/module/header/index.vue b/web/src/apps/URM/module/header/index.vue
index 2edbd3218..1acc2b367 100644
--- a/web/src/apps/URM/module/header/index.vue
+++ b/web/src/apps/URM/module/header/index.vue
@@ -57,13 +57,10 @@
   </div>
 </template>
 <script>
-import { isEmpty } from "lodash";
-import storage from "@/common/helper/storage";
 import userMenu from "./userMenu.vue";
 import clickoutside from "@/common/helper/clickoutside";
 import mixin from '@/common/service/mixin';
 import util from '@/common/util';
-import { GetBaseInfo } from '@/common/service/apiCommonMethod.js';
 export default {
   directives: {
     clickoutside
@@ -85,14 +82,6 @@ export default {
   },
   methods: {
     init() {
-      GetBaseInfo().then(rst => {
-        if (!isEmpty(rst)) {
-          this.userName = rst.username;
-          storage.set("baseInfo", rst, "local");
-          this.$router.app.$emit("username", rst.username);
-          this.$emit("set-init");
-        }
-      });
     },
     handleOutsideClick() {
       this.isUserMenuShow = false;
diff --git a/web/src/apps/URM/module/udfManagement/index.vue b/web/src/apps/URM/module/udfManagement/index.vue
index d9f7ebf81..1d16023bd 100644
--- a/web/src/apps/URM/module/udfManagement/index.vue
+++ b/web/src/apps/URM/module/udfManagement/index.vue
@@ -206,12 +206,6 @@ export default {
     // api.fetch('/configuration/engineType', 'get').then(res => {
     //   this.getCreators = ['all', ...res.engineType]
     // })
-    // 所有用户列表,移交时选择用户
-    api.fetch('/dss/framework/workspace/listAllUsers', 'get').then(res => {
-      let allUsers =  (res.users || []).map(it => it.username)
-      this.udfUsers = allUsers.slice(0, 150)
-      this.allUsers = allUsers
-    })
   },
   mounted() {
     this.init()
diff --git a/web/src/apps/linkis/module/header/index.vue b/web/src/apps/linkis/module/header/index.vue
index ab7c6f6ea..1d85a36cd 100644
--- a/web/src/apps/linkis/module/header/index.vue
+++ b/web/src/apps/linkis/module/header/index.vue
@@ -57,13 +57,11 @@
   </div>
 </template>
 <script>
-import { isEmpty } from "lodash";
 import storage from "@/common/helper/storage";
 import userMenu from "./userMenu.vue";
 import clickoutside from "@/common/helper/clickoutside";
 import mixin from '@/common/service/mixin';
 import util from '@/common/util';
-import { GetBaseInfo } from '@/common/service/apiCommonMethod.js';
 export default {
   directives: {
     clickoutside
@@ -86,14 +84,6 @@ export default {
   methods: {
     init() {
       this.userName = storage.get('userName');
-      GetBaseInfo().then(rst => {
-        if (!isEmpty(rst)) {
-          this.userName = this.userName || rst.username;
-          storage.set("baseInfo", rst, "local");
-          this.$router.app.$emit("username", rst.username);
-          this.$emit("set-init");
-        }
-      });
     },
     handleOutsideClick() {
       this.isUserMenuShow = false;
diff --git a/web/src/common/config/apiPath.js b/web/src/common/config/apiPath.js
deleted file mode 100644
index a299b34bf..000000000
--- a/web/src/common/config/apiPath.js
+++ /dev/null
@@ -1,24 +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.
- */
- 
-export default {
-  WORKSPACE_PATH: '/dss/framework/workspace/',
-  PROJECT_PATH: '/dss/framework/project/',
-  ORCHESTRATOR_PATH: '/dss/framework/orchestrator/',
-  WORKFLOW_PATH: '/dss/workflow/',
-  PUBLISH_PATH: '/dss/framework/release/'
-}
\ No newline at end of file
diff --git a/web/src/common/service/apiCommonMethod.js b/web/src/common/service/apiCommonMethod.js
deleted file mode 100644
index 6bfde25f5..000000000
--- a/web/src/common/service/apiCommonMethod.js
+++ /dev/null
@@ -1,84 +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.
- */
- 
-import api from "./api.js"
-import API_PATH from '@/common/config/apiPath.js'
-import storage from "@/common/helper/storage";
-// 获取基本信息接口
-const GetBaseInfo = (flag = true) => {
-  // 如果缓存里有直接返回
-  const baseInfo = storage.get('baseInfo', 'local')
-  if (baseInfo && flag) {
-    return new Promise((resolve) => {
-      resolve(baseInfo)
-    })
-  } else {
-    return api.fetch('dss/getBaseInfo', "get")
-  }
-}
-
-// 获取编排模式选项卡
-const GetDicSecondList = (params) => {
-  return api.fetch(`${API_PATH.WORKSPACE_PATH}getDicSecondList`, {
-    parentKey: "p_orchestrator_mode",
-    workspaceId: params
-  })
-}
-// 获取工作空间用户管理相关数据
-const GetWorkspaceUserManagement = (params) => api.fetch(`${API_PATH.WORKSPACE_PATH}getWorkspaceUsers`, params, 'get')
-
-// 获取工作空间用户的列表
-const GetWorkspaceUserList = (params) => api.fetch(`${API_PATH.WORKSPACE_PATH}getAllWorkspaceUsers`, params, 'get')
-
-// 获取工作空间数据
-const GetWorkspaceData = (params) => api.fetch(`${API_PATH.WORKSPACE_PATH}workspaces/${params}`, 'get')
-
-// 获取工作空间应用商店数据
-const GetWorkspaceApplications = (params) => api.fetch(`${API_PATH.WORKSPACE_PATH}workspaces/${params}/applications`, {}, {method: 'get', cacheOptions: {time: 3000}})
-
-// 获取工作空间归属部门数据
-const GetDepartments = () => api.fetch(`${API_PATH.WORKSPACE_PATH}workspaces/departments`, 'get')
-
-// 判断工作空间是否重复
-const CheckWorkspaceNameExist = (params) => api.fetch(`${API_PATH.WORKSPACE_PATH}workspaces/exists`, params, 'get')
-
-// 获取流程数据字典数据
-const GetDicList = (params) => api.fetch(`${API_PATH.WORKSPACE_PATH}getDicList`, params, 'post')
-
-// 获取工作空间列表或修改
-const GetWorkspaceList = (params, method) => api.fetch(`${API_PATH.WORKSPACE_PATH}workspaces`, params, method)
-
-// 获取工作空间基础信息
-const GetWorkspaceBaseInfo = (params) =>  api.fetch(`${API_PATH.WORKSPACE_PATH}getWorkspaceBaseInfo`, params, 'get')
-
-// 获取工程的应用领域
-const GetAreaMap = () =>  api.fetch(`${API_PATH.PROJECT_PATH}listApplicationAreas`, "get")
-
-export {
-  GetDicSecondList,
-  GetAreaMap,
-  GetBaseInfo,
-  GetWorkspaceUserManagement,
-  GetWorkspaceUserList,
-  GetWorkspaceData,
-  GetWorkspaceApplications,
-  GetDepartments,
-  CheckWorkspaceNameExist,
-  GetDicList,
-  GetWorkspaceList,
-  GetWorkspaceBaseInfo
-}
\ No newline at end of file
diff --git a/web/src/common/service/mixin.js b/web/src/common/service/mixin.js
index 397fe1b46..33624343d 100644
--- a/web/src/common/service/mixin.js
+++ b/web/src/common/service/mixin.js
@@ -17,7 +17,6 @@
 
 
 import storage from '@/common/helper/storage';
-import api from '@/common/service/api';
 import SUPPORTED_LANG_MODES from '@/common/config/scriptis';
 
 export default {
@@ -58,24 +57,13 @@ export default {
     getSupportModes() {
       return this.SUPPORTED_LANG_MODES;
     },
-    getCommonProjectId(type, query) {
-      return api.fetch(`/dss/getAppjointProjectIDByApplicationName`, {
-        projectID: query.projectID,
-        applicationName: type
-      }, 'get').then((res) => {
-        localStorage.setItem('appJointProjectId', res.appJointProjectID);
-      })
-    },
     async gotoCommonIframe(type, query = {}) {
       const baseInfo = storage.get('baseInfo', 'local');
       if (!baseInfo) return;
       const info = baseInfo.applications.find((item) => item.name === type) || {};
       // 根据是否有projectid来确定是走首页还是工程页
       let url = '';
-      if (query.projectID) {
-        await this.getCommonProjectId(type, query);
-        url = info.projectUrl
-      } else {
+      if (!query.projectID) {
         localStorage.removeItem('appJointProjectId')
         url = info.homepageUrl
       }
diff --git a/web/src/dss/module/header/index.vue b/web/src/dss/module/header/index.vue
index fd2017d81..2dec8f61c 100644
--- a/web/src/dss/module/header/index.vue
+++ b/web/src/dss/module/header/index.vue
@@ -58,13 +58,11 @@
   </div>
 </template>
 <script>
-import { isEmpty } from "lodash";
 import storage from "@/common/helper/storage";
 import userMenu from "./userMenu.vue";
 import clickoutside from "@/common/helper/clickoutside";
 import mixin from '@/common/service/mixin';
 import util from '@/common/util';
-import { GetBaseInfo } from '@/common/service/apiCommonMethod.js';
 export default {
   directives: {
     clickoutside
@@ -87,14 +85,6 @@ export default {
   methods: {
     init() {
       this.userName = storage.get('userName');
-      GetBaseInfo().then(rst => {
-        if (!isEmpty(rst)) {
-          this.userName = this.userName || rst.username;
-          storage.set("baseInfo", rst, "local");
-          this.$router.app.$emit("username", rst.username);
-          this.$emit("set-init");
-        }
-      });
     },
     handleOutsideClick() {
       this.isUserMenuShow = false;
diff --git a/web/src/dss/view/login/index.vue b/web/src/dss/view/login/index.vue
index 4b3fa4514..4d0b700e9 100644
--- a/web/src/dss/view/login/index.vue
+++ b/web/src/dss/view/login/index.vue
@@ -66,7 +66,6 @@ import storage from '@/common/helper/storage';
 import { db } from '@/common/service/db/index.js';
 import { config } from '@/common/config/db.js';
 import { RSA } from '@/common/util/ras.js';
-import util from '@/common/util/';
 import tab from '@/apps/scriptis/service/db/tab.js';
 export default {
   data() {
@@ -102,17 +101,6 @@ export default {
   mounted() {
   },
   methods: {
-    // 获取登录后的url调转
-    getPageHomeUrl() {
-      const currentModules = util.currentModules();
-      return api.fetch(`${this.$API_PATH.WORKSPACE_PATH}getWorkspaceHomePage`, {
-        micro_module: currentModules.microModule || 'dss'
-      }, 'get').then((res) => {
-        return res.workspaceHomePage.homePageUrl;
-      }).catch(() => {
-        return '/'
-      });
-    },
     // 获取公钥接口
     getPublicKey() {
       api.fetch('/user/publicKey', 'get').then((res) => {
@@ -175,7 +163,7 @@ export default {
               }
               if (err.message.indexOf('已经登录,请先退出再进行登录') !== -1) {
                 this.getPageHomeUrl().then((res) => {
-                  this.$router.push({path: res});
+                  this.$router.push({path: '/'});
                 })
               }
               this.loading = false;
diff --git a/web/src/main.js b/web/src/main.js
index 1eaf535e1..8237dbf3b 100644
--- a/web/src/main.js
+++ b/web/src/main.js
@@ -27,7 +27,6 @@ import router from './router'
 import i18n from './common/i18n'
 import mixinDispatch from './common/service/moduleMixin'
 
-import API_PATH from './common/config/apiPath.js'
 import 'iview/dist/styles/iview.css'
 
 // Icon
@@ -57,8 +56,6 @@ Vue.config.productionTip = false
 Vue.prototype.$Message.config({
   duration: 3
 })
-// 全局变量
-Vue.prototype.$API_PATH = API_PATH;
 
 new Vue({
   router,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org