You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by ca...@apache.org on 2022/09/18 07:23:51 UTC

[incubator-linkis] branch dev-1.3.1 updated: fix: optimizing menu items (#3454)

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

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


The following commit(s) were added to refs/heads/dev-1.3.1 by this push:
     new 26c3398da fix: optimizing menu items (#3454)
26c3398da is described below

commit 26c3398dac5d4335bd2b3dc3aaa3723be7cde42e
Author: jack tao <79...@qq.com>
AuthorDate: Sun Sep 18 15:23:44 2022 +0800

    fix: optimizing menu items (#3454)
    
    * fix: optimizing menu items
    
    * feat:Display BaseDatamanager only if you are admin
    
    * fix:fix icon error of datasource type
    
    * fix:fix extend resource route error and
    
    * fix:fix search placeholder info
---
 linkis-web/src/apps/linkis/i18n/common/zh.json     |  6 +--
 .../apps/linkis/module/datasourceAccess/index.vue  |  2 +-
 .../linkis/module/datasourceEnv/EditForm/index.vue |  2 +
 .../src/apps/linkis/module/datasourceEnv/index.vue |  2 +-
 .../apps/linkis/module/datasourceType/index.vue    |  7 ++--
 .../src/apps/linkis/module/errorCode/index.vue     |  2 +-
 .../apps/linkis/module/gatewayAuthToken/index.vue  |  2 +-
 .../rmExternalResourceProvider/EditForm/index.vue  |  2 +
 .../module/rmExternalResourceProvider/index.vue    |  3 +-
 .../src/apps/linkis/module/udfManager/index.vue    |  2 +-
 .../src/apps/linkis/module/udfTree/index.vue       |  2 +-
 linkis-web/src/apps/linkis/view/linkis/index.vue   | 49 ++++++++++++++--------
 linkis-web/vue.config.js                           |  2 +-
 13 files changed, 50 insertions(+), 33 deletions(-)

diff --git a/linkis-web/src/apps/linkis/i18n/common/zh.json b/linkis-web/src/apps/linkis/i18n/common/zh.json
index d6c765d46..b14b2d03e 100644
--- a/linkis-web/src/apps/linkis/i18n/common/zh.json
+++ b/linkis-web/src/apps/linkis/i18n/common/zh.json
@@ -157,11 +157,11 @@
                         "dataSourceManage": "数据源管理",
                         "userResourceManagement": "用户资源管理",
                         "errorCode": "错误码管理",
-                        "gatewayAuthToken": "Token管理",
+                        "gatewayAuthToken": "令牌管理",
                         "rmExternalResourceProvider": "扩展资源管理",
-                        "udfManager": "UDF用户管理",
+                        "udfManager": "用户管理",
                         "udfTree": "UDF分类",
-                        "datasourceAccess": "数据源访问权限",
+                        "datasourceAccess": "数据源权限",
                         "datasourceEnv": "数据源环境",
                         "datasourceType": "数据源分类",
                         "EnginePluginManagement": "引擎物料管理",
diff --git a/linkis-web/src/apps/linkis/module/datasourceAccess/index.vue b/linkis-web/src/apps/linkis/module/datasourceAccess/index.vue
index 30a87e2d3..1ca327f87 100644
--- a/linkis-web/src/apps/linkis/module/datasourceAccess/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasourceAccess/index.vue
@@ -19,7 +19,7 @@
   <div>
     <Row class="search-bar" type="flex">
       <Col span="6">
-        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索错误信息"></Input>
+        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索"></Input>
       </Col>
       <Col span="3">
         <Button type="primary" class="Button" @click="load()">{{
diff --git a/linkis-web/src/apps/linkis/module/datasourceEnv/EditForm/index.vue b/linkis-web/src/apps/linkis/module/datasourceEnv/EditForm/index.vue
index e6810529e..1637d1cb3 100644
--- a/linkis-web/src/apps/linkis/module/datasourceEnv/EditForm/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasourceEnv/EditForm/index.vue
@@ -119,6 +119,8 @@ export default {
           value: '',
           props: {
             placeholder: "",
+            "type": "textarea",
+            "rows": 5
           },
           validate: [
             {
diff --git a/linkis-web/src/apps/linkis/module/datasourceEnv/index.vue b/linkis-web/src/apps/linkis/module/datasourceEnv/index.vue
index b7175ef1d..5dc0e3538 100644
--- a/linkis-web/src/apps/linkis/module/datasourceEnv/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasourceEnv/index.vue
@@ -19,7 +19,7 @@
   <div>
     <Row class="search-bar" type="flex">
       <Col span="6">
-        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索错误信息"></Input>
+        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索"></Input>
       </Col>
       <Col span="3">
         <Button type="primary" class="Button" @click="load()">{{
diff --git a/linkis-web/src/apps/linkis/module/datasourceType/index.vue b/linkis-web/src/apps/linkis/module/datasourceType/index.vue
index 525176bd6..4972bdb24 100644
--- a/linkis-web/src/apps/linkis/module/datasourceType/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasourceType/index.vue
@@ -19,7 +19,7 @@
   <div>
     <Row class="search-bar" type="flex">
       <Col span="6">
-        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索错误信息"></Input>
+        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索"></Input>
       </Col>
       <Col span="3">
         <Button type="primary" class="Button" @click="load()">{{
@@ -81,7 +81,6 @@
 import mixin from '@/common/service/mixin';
 import ErrorCodeForm from './EditForm/index'
 import {add, del, edit, getList} from "./service";
-import {formatDate} from "iview/src/components/date-picker/util";
 export default {
   mixins: [mixin],
   components: {ErrorCodeForm},
@@ -127,8 +126,8 @@ export default {
           align: 'center',
         },
         {
-          title: "icon",
-          key: '图标',
+          title: "图标",
+          key: 'icon',
           tooltip: true,
           align: 'center',
         },
diff --git a/linkis-web/src/apps/linkis/module/errorCode/index.vue b/linkis-web/src/apps/linkis/module/errorCode/index.vue
index d41a7ee83..4733a76a9 100644
--- a/linkis-web/src/apps/linkis/module/errorCode/index.vue
+++ b/linkis-web/src/apps/linkis/module/errorCode/index.vue
@@ -19,7 +19,7 @@
   <div>
     <Row class="search-bar" type="flex">
       <Col span="6">
-        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索错误信息"></Input>
+        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索"></Input>
       </Col>
       <Col span="3">
         <Button type="primary" class="Button" @click="load()">{{
diff --git a/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.vue b/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.vue
index d3715037b..d97b4f830 100644
--- a/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.vue
+++ b/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.vue
@@ -19,7 +19,7 @@
   <div>
     <Row class="search-bar" type="flex">
       <Col span="6">
-        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索错误信息"></Input>
+        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索"></Input>
       </Col>
       <Col span="3">
         <Button type="primary" class="Button" @click="load()">{{
diff --git a/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/EditForm/index.vue b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/EditForm/index.vue
index 0b957a000..41baf4317 100644
--- a/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/EditForm/index.vue
+++ b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/EditForm/index.vue
@@ -119,6 +119,8 @@ export default {
           value: '',
           props: {
             placeholder: "",
+            "type": "textarea",
+            "rows": 11
           },
           validate: [
             {
diff --git a/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.vue b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.vue
index 3f6918c9b..91bc5608d 100644
--- a/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.vue
+++ b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.vue
@@ -19,7 +19,7 @@
   <div>
     <Row class="search-bar" type="flex">
       <Col span="6">
-        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索错误信息"></Input>
+        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索"></Input>
       </Col>
       <Col span="3">
         <Button type="primary" class="Button" @click="load()">{{
@@ -81,7 +81,6 @@
 import mixin from '@/common/service/mixin';
 import ErrorCodeForm from './EditForm/index'
 import {add, del, edit, getList} from "./service";
-import {formatDate} from "iview/src/components/date-picker/util";
 export default {
   mixins: [mixin],
   components: {ErrorCodeForm},
diff --git a/linkis-web/src/apps/linkis/module/udfManager/index.vue b/linkis-web/src/apps/linkis/module/udfManager/index.vue
index b03db9e51..4d407b514 100644
--- a/linkis-web/src/apps/linkis/module/udfManager/index.vue
+++ b/linkis-web/src/apps/linkis/module/udfManager/index.vue
@@ -19,7 +19,7 @@
   <div>
     <Row class="search-bar" type="flex">
       <Col span="6">
-        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索错误信息"></Input>
+        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索"></Input>
       </Col>
       <Col span="3">
         <Button type="primary" class="Button" @click="load()">{{
diff --git a/linkis-web/src/apps/linkis/module/udfTree/index.vue b/linkis-web/src/apps/linkis/module/udfTree/index.vue
index a01f17dce..d45eb7a51 100644
--- a/linkis-web/src/apps/linkis/module/udfTree/index.vue
+++ b/linkis-web/src/apps/linkis/module/udfTree/index.vue
@@ -19,7 +19,7 @@
   <div>
     <Row class="search-bar" type="flex">
       <Col span="6">
-        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索错误信息"></Input>
+        <Input v-model="searchName" clearable suffix="ios-search" class="input" placeholder="搜索"></Input>
       </Col>
       <Col span="3">
         <Button type="primary" class="Button" @click="load()">{{
diff --git a/linkis-web/src/apps/linkis/view/linkis/index.vue b/linkis-web/src/apps/linkis/view/linkis/index.vue
index 7dd4d499c..0af650db9 100644
--- a/linkis-web/src/apps/linkis/view/linkis/index.vue
+++ b/linkis-web/src/apps/linkis/view/linkis/index.vue
@@ -34,7 +34,7 @@
             :key="index2"
             @on-click="handleCellClick">
             <Cell
-              v-if="!isLogAdmin? (item.path !=='/console/ECM')&&(item.path !=='/console/microService'):true"
+              v-if="!isLogAdmin? (item.path !=='/console/ECM')&&(item.path !=='/console/microService')&&item.key !== '1-11':true"
               :key="index2"
               :class="{ crrentItem: crrentItem === item.key }"
               :title="item.name"
@@ -42,14 +42,14 @@
               <div>
                 <span>{{item.name}}</span>
                 <div class="sub-menu-row">
-                  <Icon v-show="item.showSubMenu && (item.key === '1-9' || item.key === '1-11')" type="ios-arrow-down" class="user-icon"/>
-                  <Icon v-show="!item.showSubMenu && (item.key === '1-9' || item.key === '1-11')" type="ios-arrow-up" class="user-icon"/>
+                  <Icon v-show="item.showSubMenu && (item.key === '1-8' || item.key === '1-9' || item.key === '1-11')" type="ios-arrow-down" class="user-icon"/>
+                  <Icon v-show="!item.showSubMenu && (item.key === '1-8' || item.key === '1-9' || item.key === '1-11')" type="ios-arrow-up" class="user-icon"/>
                 </div>
               </div>
-              <div v-if="(item.key === '1-9' || item.key === '1-11') && !item.showSubMenu">
+              <div v-if="(item.key === '1-8' || item.key === '1-9' || item.key === '1-11') && !item.showSubMenu">
                 <div @click.stop="">
                   <CellGroup
-                    v-for="(item3, index3) in (item.key === '1-9' ? urmSideNavList.children : basedataNavList.children)"
+                    v-for="(item3, index3) in (item.key === '1-9' ? urmSideNavList.children : item.key === '1-8' ?datasourceNavList.children:basedataNavList.children)"
                     :key="index3"
                     @on-click="clickToRoute">
                     <Cell
@@ -109,12 +109,24 @@ export default {
           { key: '1-4', name: this.$t('message.linkis.sideNavList.function.children.dateReport'), path: '/console/globalValiable' },
           { key: '1-6', name: this.$t('message.linkis.sideNavList.function.children.ECMManage'), path: '/console/ECM' },
           { key: '1-7', name: this.$t('message.linkis.sideNavList.function.children.microserviceManage'), path: '/console/microService' },
-          { key: '1-8', name: this.$t('message.linkis.sideNavList.function.children.dataSourceManage'), path: '/console/dataSource' },
+          // { key: '1-8', name: this.$t('message.linkis.sideNavList.function.children.dataSourceManage'), path: '/console/dataSource' },
+          { key: '1-8', name: this.$t('message.linkis.sideNavList.function.children.dataSourceManage'), showSubMenu: false },
           { key: '1-9', name: this.$t('message.linkis.sideNavList.function.children.udfFunctionTitle'), path: '/console/urm/udfManagement', showSubMenu: false},
-          { key: '1-10', name: this.$t('message.linkis.sideNavList.function.children.errorCode'), path: '/console/errorCode' },
           { key: '1-11', name: this.$t('message.linkis.sideNavList.function.children.basedataManagement'), showSubMenu: false},
         ],
       },
+      datasourceNavList: {
+        key: '1',
+        name: this.$t('message.linkis.sideNavList.function.name'),
+        padding: 0,
+        icon: 'ios-options',
+        children: [
+          {key: '1-8-1', name: this.$t('message.linkis.sideNavList.function.children.dataSourceManage'), path: '/console/dataSource' },
+          {key: '1-8-2', name: this.$t('message.linkis.sideNavList.function.children.datasourceEnv'), path: '/console/datasourceEnv' },
+          {key: '1-8-3', name: this.$t('message.linkis.sideNavList.function.children.datasourceType'), path: '/console/datasourceType' },
+          {key: '1-8-4', name: this.$t('message.linkis.sideNavList.function.children.datasourceAccess'), path: '/console/datasourceAccess' },
+        ]
+      },
       basedataNavList: {
         key: '1',
         name: this.$t('message.linkis.sideNavList.function.name'),
@@ -122,13 +134,9 @@ export default {
         icon: 'ios-options',
         children: [
           {key: '1-11-1', name: this.$t('message.linkis.sideNavList.function.children.gatewayAuthToken'), path: '/console/gatewayAuthToken'},
-          {key: '1-11-2', name: this.$t('message.linkis.sideNavList.function.children.rmExternalResourceProvider'), path: '/console/urm/functionManagement'},
-          {key: '1-11-3', name: this.$t('message.linkis.sideNavList.function.children.datasourceAccess'), path: '/console/datasourceAccess' },
-          {key: '1-11-4', name: this.$t('message.linkis.sideNavList.function.children.datasourceEnv'), path: '/console/datasourceEnv' },
-          {key: '1-11-5', name: this.$t('message.linkis.sideNavList.function.children.datasourceType'), path: '/console/datasourceType' },
-          {key: '1-11-6', name: this.$t('message.linkis.sideNavList.function.children.EnginePluginManagement'), path: '/console/EnginePluginManagement' },
-          {key: '1-11-7', name: this.$t('message.linkis.sideNavList.function.children.udfManager'), path: '/console/udfManager' },
-          {key: '1-11-8', name: this.$t('message.linkis.sideNavList.function.children.udfTree'), path: '/console/udfTree' },
+          {key: '1-11-2', name: this.$t('message.linkis.sideNavList.function.children.errorCode'), path: '/console/errorCode' },
+          {key: '1-11-3', name: this.$t('message.linkis.sideNavList.function.children.rmExternalResourceProvider'), path: '/console/rmExternalResourceProvider'},
+          {key: '1-11-4', name: this.$t('message.linkis.sideNavList.function.children.EnginePluginManagement'), path: '/console/EnginePluginManagement' },
         ]
       },
       urmSideNavList: {
@@ -138,7 +146,9 @@ export default {
         icon: 'ios-options',
         children: [
           {key: '1-9-1', name: this.$t('message.linkis.sideNavList.function.children.udfFunctionManage'), path: '/console/urm/udfManagement'},
-          {key: '1-9-2', name: this.$t('message.linkis.sideNavList.function.children.functionManagement'), path: '/console/urm/functionManagement'}
+          {key: '1-9-2', name: this.$t('message.linkis.sideNavList.function.children.functionManagement'), path: '/console/urm/functionManagement'},
+          {key: '1-9-3', name: this.$t('message.linkis.sideNavList.function.children.udfManager'), path: '/console/udfManager' },
+          {key: '1-9-4', name: this.$t('message.linkis.sideNavList.function.children.udfTree'), path: '/console/udfTree' },
         ]
       },
       breadcrumbSecondName: this.$t('message.linkis.sideNavList.function.children.globalHistory')
@@ -173,12 +183,17 @@ export default {
   },
   methods: {
     handleCellClick(index) {
+      console.log("test");
+      if (index === '1-8') {
+        this.sideNavList.children[6].showSubMenu = !this.sideNavList.children[6].showSubMenu;
+        return;
+      }
       if (index === '1-9') {
         this.sideNavList.children[7].showSubMenu = !this.sideNavList.children[7].showSubMenu;
         return;
       }
       if (index === '1-11') {
-        this.sideNavList.children[9].showSubMenu = !this.sideNavList.children[9].showSubMenu;
+        this.sideNavList.children[8].showSubMenu = !this.sideNavList.children[8].showSubMenu;
         return;
       }
       index = index.split('-')[0] + '-' + index.split('-')[1]; //防止出现三级菜单
@@ -196,7 +211,7 @@ export default {
       });
     },
     clickToRoute(index) {
-      const activedCellParent = index.split('-').slice(0, 2).join('-') === '1-9' ? this.urmSideNavList : this.basedataNavList;
+      const activedCellParent = index.split('-').slice(0, 2).join('-') === '1-9' ? this.urmSideNavList :index.split('-').slice(0, 2).join('-') === '1-8'?this.datasourceNavList: this.basedataNavList;
       this.crrentItem = index;
       const activedCell = activedCellParent.children.find((item) => item.key === index);
       this.breadcrumbFirstName = activedCellParent.name;
diff --git a/linkis-web/vue.config.js b/linkis-web/vue.config.js
index e4ffca843..8cdf3e417 100644
--- a/linkis-web/vue.config.js
+++ b/linkis-web/vue.config.js
@@ -202,7 +202,7 @@ module.exports = {
   devServer: {
     proxy: {
       '/api': {
-        target: 'http://127.0.0.1:8080', // linkis
+        target: 'http://127.0.0.1:9001', // linkis
         changeOrigin: true,
         pathRewrite: {
           '^/api': '/api'


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