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 2e6be437e feat(basedata-manager): add basic web to base data manager
(#3181)
2e6be437e is described below
commit 2e6be437e36bb3d04444b17289fcbdca34e0f08c
Author: jack tao <[email protected]>
AuthorDate: Fri Sep 2 14:23:23 2022 +0800
feat(basedata-manager): add basic web to base data manager (#3181)
---
linkis-web/src/apps/linkis/i18n/common/en.json | 14 +-
linkis-web/src/apps/linkis/i18n/common/zh.json | 12 +
.../module/datasourceAccess/EditForm/index.vue | 153 +++++++++++
.../apps/linkis/module/datasourceAccess/index.js | 25 ++
.../apps/linkis/module/datasourceAccess/index.scss | 65 +++++
.../apps/linkis/module/datasourceAccess/index.vue | 271 +++++++++++++++++++
.../apps/linkis/module/datasourceAccess/service.js | 25 ++
.../linkis/module/datasourceEnv/EditForm/index.vue | 153 +++++++++++
.../src/apps/linkis/module/datasourceEnv/index.js | 25 ++
.../apps/linkis/module/datasourceEnv/index.scss | 65 +++++
.../src/apps/linkis/module/datasourceEnv/index.vue | 295 +++++++++++++++++++++
.../apps/linkis/module/datasourceEnv/service.js | 25 ++
.../module/datasourceType/EditForm/index.vue | 189 +++++++++++++
.../src/apps/linkis/module/datasourceType/index.js | 25 ++
.../apps/linkis/module/datasourceType/index.scss | 65 +++++
.../apps/linkis/module/datasourceType/index.vue | 271 +++++++++++++++++++
.../apps/linkis/module/datasourceType/service.js | 25 ++
.../module/errorCode/errorCodeForm/index.vue | 135 ++++++++++
.../src/apps/linkis/module/errorCode/index.js | 25 ++
.../src/apps/linkis/module/errorCode/index.scss | 65 +++++
.../src/apps/linkis/module/errorCode/index.vue | 252 ++++++++++++++++++
.../src/apps/linkis/module/errorCode/service.js | 26 ++
.../module/gatewayAuthToken/EditForm/index.vue | 153 +++++++++++
.../apps/linkis/module/gatewayAuthToken/index.js | 25 ++
.../apps/linkis/module/gatewayAuthToken/index.scss | 65 +++++
.../apps/linkis/module/gatewayAuthToken/index.vue | 295 +++++++++++++++++++++
.../apps/linkis/module/gatewayAuthToken/service.js | 25 ++
.../rmExternalResourceProvider/EditForm/index.vue | 153 +++++++++++
.../module/rmExternalResourceProvider/index.js | 25 ++
.../module/rmExternalResourceProvider/index.scss | 65 +++++
.../module/rmExternalResourceProvider/index.vue | 259 ++++++++++++++++++
.../module/rmExternalResourceProvider/service.js | 25 ++
.../linkis/module/udfManager/EditForm/index.vue | 99 +++++++
.../src/apps/linkis/module/udfManager/index.js | 25 ++
.../src/apps/linkis/module/udfManager/index.scss | 65 +++++
.../src/apps/linkis/module/udfManager/index.vue | 240 +++++++++++++++++
.../src/apps/linkis/module/udfManager/service.js | 25 ++
.../apps/linkis/module/udfTree/EditForm/index.vue | 153 +++++++++++
linkis-web/src/apps/linkis/module/udfTree/index.js | 25 ++
.../src/apps/linkis/module/udfTree/index.scss | 65 +++++
.../src/apps/linkis/module/udfTree/index.vue | 290 ++++++++++++++++++++
.../src/apps/linkis/module/udfTree/service.js | 25 ++
linkis-web/src/apps/linkis/router.js | 134 ++++++++--
linkis-web/src/apps/linkis/view/linkis/index.vue | 10 +-
44 files changed, 4423 insertions(+), 29 deletions(-)
diff --git a/linkis-web/src/apps/linkis/i18n/common/en.json
b/linkis-web/src/apps/linkis/i18n/common/en.json
index 211b868bc..9cd679085 100644
--- a/linkis-web/src/apps/linkis/i18n/common/en.json
+++ b/linkis-web/src/apps/linkis/i18n/common/en.json
@@ -152,7 +152,15 @@
"udfFunctionTitle": "UDF Function",
"udfFunctionManage": "UDF Management",
"dataSourceManage": "DataSource Manage",
- "userResourceManagement": "User Resource Management"
+ "userResourceManagement": "User Resource Management",
+ "errorCode": "Error Manage",
+ "gatewayAuthToken": "Gateway Auth Token Manage",
+ "rmExternalResourceProvider": "External Resource Provider Manage",
+ "udfManager": "UDF User Manage",
+ "udfTree": "UDF Tree",
+ "datasourceAccess": "Data source access permissions",
+ "datasourceEnv": "Datasource Environment",
+ "datasourceType": "Datasource Type"
}
}
},
@@ -315,6 +323,10 @@
"used": "Available",
"commentValue": "Roll back from version {text}",
"undefinedVersion": "Cannot find the version of DataSource"
+ },
+ "basedata": {
+ "add": "add",
+ "remove": "remove"
}
}
}
diff --git a/linkis-web/src/apps/linkis/i18n/common/zh.json
b/linkis-web/src/apps/linkis/i18n/common/zh.json
index 6907fdeb7..3dca97735 100644
--- a/linkis-web/src/apps/linkis/i18n/common/zh.json
+++ b/linkis-web/src/apps/linkis/i18n/common/zh.json
@@ -156,6 +156,14 @@
"functionManagement": "函数管理",
"dataSourceManage": "数据源管理",
"userResourceManagement": "用户资源管理",
+ "errorCode": "异常代码管理",
+ "gatewayAuthToken": "网关验证Token管理",
+ "rmExternalResourceProvider": "扩展资源管理",
+ "udfManager": "UDF用户管理",
+ "udfTree": "UDF分类",
+ "datasourceAccess": "数据源访问权限",
+ "datasourceEnv": "数据源环境",
+ "datasourceType": "数据源分类",
"EnginePluginManagement": "引擎物料管理"
}
}
@@ -319,6 +327,10 @@
"used": "可用",
"commentValue": "从版本 {text} 回滚"
},
+ "basedata": {
+ "add": "新增",
+ "remove": "删除"
+ },
"EnginePluginManagement": {
"engineConnType": "引擎类型",
"engineConnVersion": "引擎版本",
diff --git
a/linkis-web/src/apps/linkis/module/datasourceAccess/EditForm/index.vue
b/linkis-web/src/apps/linkis/module/datasourceAccess/EditForm/index.vue
new file mode 100644
index 000000000..bb77a2c46
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceAccess/EditForm/index.vue
@@ -0,0 +1,153 @@
+<!--
+ ~ 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>
+ <div class="table-warp">
+ <form-create
+ :rule="rule"
+ v-model="formModel"
+ :option="options"
+ :value.sync="formData"
+ />
+ </div>
+</template>
+
+<script>
+export default {
+ props: {
+ mode: String,
+ data: Object,
+ },
+ data() {
+ return {
+ formModel: {},
+ formData: {},
+ options: {
+ submitBtn: false,
+ },
+ rule: [
+ {
+ type: 'hidden',
+ title: "id",
+ field: 'id',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: false,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"id"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "表ID",
+ field: 'tableId',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"表ID"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "访问者",
+ field: 'visitor',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"访问者"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "字段",
+ field: 'fields',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"字段"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "应用ID",
+ field: 'applicationId',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"应用ID"`,
+ trigger: 'blur',
+ },
+ ],
+ }
+ ]
+ }
+ },
+ created() {
+ this.getData(this.data)
+ },
+ methods: {
+ getData(data){
+ this.formData = {...data}
+ }
+ },
+ watch: {
+ data: {
+ handler(newV) {
+ this.getData(newV)
+ },
+ deep: true,
+ },
+ },
+}
+</script>
diff --git a/linkis-web/src/apps/linkis/module/datasourceAccess/index.js
b/linkis-web/src/apps/linkis/module/datasourceAccess/index.js
new file mode 100644
index 000000000..e74aca1cc
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceAccess/index.js
@@ -0,0 +1,25 @@
+/*
+ * 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 {
+ name: 'datasourceAccess',
+ data: {
+ ENVIR: process.env.NODE_ENV,
+ },
+ component: () => import('./index.vue'),
+};
diff --git a/linkis-web/src/apps/linkis/module/datasourceAccess/index.scss
b/linkis-web/src/apps/linkis/module/datasourceAccess/index.scss
new file mode 100644
index 000000000..7ea4fd680
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceAccess/index.scss
@@ -0,0 +1,65 @@
+/*
+ * 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 '@/common/style/variables.scss';
+
+.search-bar {
+ .search-item {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ font-size: $font-size-base;
+
+ .lable {
+ min-width: 90px;
+ // flex-basis: 130px;
+ text-align: right;
+ }
+ }
+
+ .ivu-col {
+ display: flex;
+ justify-content: center;
+ }
+
+}
+
+.table-content {
+ margin-top: 25px;
+}
+
+.datasource-type-wrap {
+ .project-header {
+ height: 32px;
+
+ .header-title {
+ font-size: $font-size-large;
+ font-weight: bold;
+ padding-left: 12px;
+ border-left: 3px solid $primary-color;
+ color: $text-title-color;
+ }
+
+ }
+
+}
+
+.modal {
+ .footer {
+ display: flex;
+ justify-content: space-between;
+ }
+}
diff --git a/linkis-web/src/apps/linkis/module/datasourceAccess/index.vue
b/linkis-web/src/apps/linkis/module/datasourceAccess/index.vue
new file mode 100644
index 000000000..30a87e2d3
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceAccess/index.vue
@@ -0,0 +1,271 @@
+<!--
+ ~ 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>
+ <div>
+ <Row class="search-bar" type="flex">
+ <Col span="6">
+ <Input v-model="searchName" clearable suffix="ios-search"
class="input" placeholder="搜索错误信息"></Input>
+ </Col>
+ <Col span="3">
+ <Button type="primary" class="Button" @click="load()">{{
+ $t('message.linkis.search')
+ }}
+ </Button>
+ <Button type="success" class="Button" style="margin-left: 10px"
@click="onAdd()">{{
+ $t('message.linkis.basedata.add')
+ }}
+ </Button>
+ </Col>
+ <Col span="15">
+ </Col>
+ </Row>
+ <Table border size="small" align="center" :columns="tableColumnNum"
:data="pageDatalist" max-height="420"
+ class="table-content">
+ <template slot-scope="{ row,index }" slot="action">
+ <ButtonGroup size="small">
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableEdit(row, index)"
+ >{{ $t('message.linkis.edit') }}
+ </Button
+ >
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableDelete(row, index)"
+ >
+ {{ $t('message.linkis.basedata.remove') }}
+ </Button>
+ </ButtonGroup>
+ </template>
+ </Table>
+ <div style="margin: 10px; overflow: hidden">
+ <div style="float: right">
+ <Page :page-size="page.pageSize" :total="page.totalSize"
:current="page.pageNow" @on-change="changePage"></Page>
+ </div>
+ </div>
+ <Modal
+ width="800"
+ class="modal"
+ v-model="modalShow"
+ :title="modalAddMode=='add'?'新增':'编辑'"
+ :loading="modalLoading"
+ >
+ <div slot="footer">
+ <Button type="text" size="large" @click="onModalCancel()">取消</Button>
+ <Button type="primary" size="large"
@click="onModalOk('userConfirm')">确定</Button>
+ </div>
+ <ErrorCodeForm ref="errorCodeForm" :data="modalEditData"></ErrorCodeForm>
+ </Modal>
+ </div>
+</template>
+<script>
+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},
+ data() {
+ return {
+ searchName: "",
+ page: {
+ totalSize: 0,
+ pageSize: 10,
+ pageNow: 1,
+ },
+ tableColumnNum: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 100,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "表ID",
+ key: 'tableId',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "访问者",
+ key: 'visitor',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "字段",
+ key: 'fields',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "应用ID",
+ key: 'applicationId',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "访问时间",
+ key: 'access_time',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ render: (h,params)=>{
+ return h('div',
+ formatDate(new Date(params.row.createTime),'yyyy-MM-dd hh:mm')
+ )
+ }
+ },
+ {
+ title: this.$t('message.linkis.datasource.action'),
+ width: 150,
+ slot: 'action',
+ align: 'center',
+ },
+
+ ],
+ pageDatalist: [],
+ modalShow: false,
+ modalAddMode: 'add',
+ modalEditData: {},
+ modalLoading: false
+ };
+ },
+ created() {
+ this.load()
+ },
+ mounted() {
+ this.init();
+ },
+ methods: {
+ init() {
+ console.log(this.$route.query.isSkip);
+ },
+ load() {
+ let params = {
+ searchName: this.searchName,
+ currentPage: this.page.pageNow,
+ pageSize: this.page.pageSize
+ }
+ getList(params).then((data) => {
+ this.pageDatalist = data.list.list
+ this.page.totalSize = data.list.total
+ })
+ },
+ changePage(value) {
+ this.page.pageNow = value
+ this.load()
+ },
+ onAdd(){
+ this.modalEditData={
+ id: "",
+ errorCode: "",
+ errorDesc: "",
+ errorRegex: '',
+ }
+ this.modalAddMode = 'add'
+ this.modalShow = true
+ },
+ onTableEdit(row){
+ this.modalEditData = row
+ this.modalAddMode = 'edit'
+ this.modalShow = true
+ },
+ onTableDelete(row){
+
+ this.$Modal.confirm({
+ title: "提示信息",
+ content: "确认是否删除该记录?",
+ onOk: ()=>{
+ let params = {
+ id: row.id
+ }
+ del(params).then((data)=>{
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "删除成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "删除失败"
+ })
+ }
+ })
+ this.load()
+ }
+ })
+
+ },
+ onModalOk(){
+ this.$refs.errorCodeForm.formModel.submit((formData)=>{
+ this.modalLoading = true
+ if(this.modalAddMode=='add') {
+ add(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "添加成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "添加失败"
+ })
+ }
+ })
+ }else {
+ edit(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "编辑成功"
+ })
+ this.load()
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "编辑失败"
+ })
+ }
+ })
+ }
+ this.modalLoading=false
+ this.modalShow = false
+ })
+ },
+ onModalCancel(){
+ this.modalLoading=false
+ this.modalShow = false
+ }
+ },
+};
+</script>
+
+<style lang="scss" src="./index.scss" scoped>
+</style>
diff --git a/linkis-web/src/apps/linkis/module/datasourceAccess/service.js
b/linkis-web/src/apps/linkis/module/datasourceAccess/service.js
new file mode 100644
index 000000000..f8e2fd083
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceAccess/service.js
@@ -0,0 +1,25 @@
+import api from '@/common/service/api';
+
+const getList = (params)=> {
+ console.log(params)
+ return api.fetch('/basedata_manager/datasource_access', params , 'get')
+}
+
+const add = (data)=> {
+ return api.fetch('/basedata_manager/datasource_access', data , 'post')
+}
+
+const edit = (data)=> {
+ return api.fetch('/basedata_manager/datasource_access', data , 'put')
+}
+
+const del = (params)=> {
+ return api.fetch(`/basedata_manager/datasource_access/${params.id}`,'delete')
+}
+
+export{
+ getList,
+ add,
+ edit,
+ del
+}
diff --git a/linkis-web/src/apps/linkis/module/datasourceEnv/EditForm/index.vue
b/linkis-web/src/apps/linkis/module/datasourceEnv/EditForm/index.vue
new file mode 100644
index 000000000..e6810529e
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceEnv/EditForm/index.vue
@@ -0,0 +1,153 @@
+<!--
+ ~ 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>
+ <div class="table-warp">
+ <form-create
+ :rule="rule"
+ v-model="formModel"
+ :option="options"
+ :value.sync="formData"
+ />
+ </div>
+</template>
+
+<script>
+export default {
+ props: {
+ mode: String,
+ data: Object,
+ },
+ data() {
+ return {
+ formModel: {},
+ formData: {},
+ options: {
+ submitBtn: false,
+ },
+ rule: [
+ {
+ type: 'hidden',
+ title: "id",
+ field: 'id',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: false,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"id"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "环境名称",
+ field: 'envName',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"环境名称"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "环境描述",
+ field: 'envDesc',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"环境描述"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "数据源ID",
+ field: 'datasourceTypeId',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"数据源ID"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "参数",
+ field: 'parameter',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"参数"`,
+ trigger: 'blur',
+ },
+ ],
+ }
+ ]
+ }
+ },
+ created() {
+ this.getData(this.data)
+ },
+ methods: {
+ getData(data){
+ this.formData = {...data}
+ }
+ },
+ watch: {
+ data: {
+ handler(newV) {
+ this.getData(newV)
+ },
+ deep: true,
+ },
+ },
+}
+</script>
diff --git a/linkis-web/src/apps/linkis/module/datasourceEnv/index.js
b/linkis-web/src/apps/linkis/module/datasourceEnv/index.js
new file mode 100644
index 000000000..d677bb94a
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceEnv/index.js
@@ -0,0 +1,25 @@
+/*
+ * 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 {
+ name: 'datasourceEnv',
+ data: {
+ ENVIR: process.env.NODE_ENV,
+ },
+ component: () => import('./index.vue'),
+};
diff --git a/linkis-web/src/apps/linkis/module/datasourceEnv/index.scss
b/linkis-web/src/apps/linkis/module/datasourceEnv/index.scss
new file mode 100644
index 000000000..7ea4fd680
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceEnv/index.scss
@@ -0,0 +1,65 @@
+/*
+ * 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 '@/common/style/variables.scss';
+
+.search-bar {
+ .search-item {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ font-size: $font-size-base;
+
+ .lable {
+ min-width: 90px;
+ // flex-basis: 130px;
+ text-align: right;
+ }
+ }
+
+ .ivu-col {
+ display: flex;
+ justify-content: center;
+ }
+
+}
+
+.table-content {
+ margin-top: 25px;
+}
+
+.datasource-type-wrap {
+ .project-header {
+ height: 32px;
+
+ .header-title {
+ font-size: $font-size-large;
+ font-weight: bold;
+ padding-left: 12px;
+ border-left: 3px solid $primary-color;
+ color: $text-title-color;
+ }
+
+ }
+
+}
+
+.modal {
+ .footer {
+ display: flex;
+ justify-content: space-between;
+ }
+}
diff --git a/linkis-web/src/apps/linkis/module/datasourceEnv/index.vue
b/linkis-web/src/apps/linkis/module/datasourceEnv/index.vue
new file mode 100644
index 000000000..b7175ef1d
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceEnv/index.vue
@@ -0,0 +1,295 @@
+<!--
+ ~ 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>
+ <div>
+ <Row class="search-bar" type="flex">
+ <Col span="6">
+ <Input v-model="searchName" clearable suffix="ios-search"
class="input" placeholder="搜索错误信息"></Input>
+ </Col>
+ <Col span="3">
+ <Button type="primary" class="Button" @click="load()">{{
+ $t('message.linkis.search')
+ }}
+ </Button>
+ <Button type="success" class="Button" style="margin-left: 10px"
@click="onAdd()">{{
+ $t('message.linkis.basedata.add')
+ }}
+ </Button>
+ </Col>
+ <Col span="15">
+ </Col>
+ </Row>
+ <Table border size="small" align="center" :columns="tableColumnNum"
:data="pageDatalist" max-height="420"
+ class="table-content">
+ <template slot-scope="{ row,index }" slot="action">
+ <ButtonGroup size="small">
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableEdit(row, index)"
+ >{{ $t('message.linkis.edit') }}
+ </Button
+ >
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableDelete(row, index)"
+ >
+ {{ $t('message.linkis.basedata.remove') }}
+ </Button>
+ </ButtonGroup>
+ </template>
+ </Table>
+ <div style="margin: 10px; overflow: hidden">
+ <div style="float: right">
+ <Page :page-size="page.pageSize" :total="page.totalSize"
:current="page.pageNow" @on-change="changePage"></Page>
+ </div>
+ </div>
+ <Modal
+ width="800"
+ class="modal"
+ v-model="modalShow"
+ :title="modalAddMode=='add'?'新增':'编辑'"
+ :loading="modalLoading"
+ >
+ <div slot="footer">
+ <Button type="text" size="large" @click="onModalCancel()">取消</Button>
+ <Button type="primary" size="large"
@click="onModalOk('userConfirm')">确定</Button>
+ </div>
+ <ErrorCodeForm ref="errorCodeForm" :data="modalEditData"></ErrorCodeForm>
+ </Modal>
+ </div>
+</template>
+<script>
+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},
+ data() {
+ return {
+ searchName: "",
+ page: {
+ totalSize: 0,
+ pageSize: 10,
+ pageNow: 1,
+ },
+ tableColumnNum: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 100,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "环境名称",
+ key: 'envName',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "环境描述",
+ key: 'envDesc',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "数据源ID",
+ key: 'datasourceTypeId',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "参数",
+ key: 'parameter',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "创建时间",
+ key: 'createTime',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ render: (h,params)=>{
+ return h('div',
+ formatDate(new Date(params.row.createTime),'yyyy-MM-dd hh:mm')
+ )
+ }
+ },
+ {
+ title: "创建者",
+ key: 'create_user',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "更新时间",
+ key: 'updateTime',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ render: (h,params)=>{
+ return h('div',
+ formatDate(new Date(params.row.createTime),'yyyy-MM-dd hh:mm')
+ )
+ }
+ },
+ {
+ title: "更新者",
+ key: 'modify_user',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.datasource.action'),
+ width: 150,
+ slot: 'action',
+ align: 'center',
+ },
+
+ ],
+ pageDatalist: [],
+ modalShow: false,
+ modalAddMode: 'add',
+ modalEditData: {},
+ modalLoading: false
+ };
+ },
+ created() {
+ this.load()
+ },
+ mounted() {
+ this.init();
+ },
+ methods: {
+ init() {
+ console.log(this.$route.query.isSkip);
+ },
+ load() {
+ let params = {
+ searchName: this.searchName,
+ currentPage: this.page.pageNow,
+ pageSize: this.page.pageSize
+ }
+ getList(params).then((data) => {
+ this.pageDatalist = data.list.list
+ this.page.totalSize = data.list.total
+ })
+ },
+ changePage(value) {
+ this.page.pageNow = value
+ this.load()
+ },
+ onAdd(){
+ this.modalEditData={
+ id: "",
+ errorCode: "",
+ errorDesc: "",
+ errorRegex: '',
+ }
+ this.modalAddMode = 'add'
+ this.modalShow = true
+ },
+ onTableEdit(row){
+ this.modalEditData = row
+ this.modalAddMode = 'edit'
+ this.modalShow = true
+ },
+ onTableDelete(row){
+
+ this.$Modal.confirm({
+ title: "提示信息",
+ content: "确认是否删除该记录?",
+ onOk: ()=>{
+ let params = {
+ id: row.id
+ }
+ del(params).then((data)=>{
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "删除成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "删除失败"
+ })
+ }
+ })
+ this.load()
+ }
+ })
+
+ },
+ onModalOk(){
+ this.$refs.errorCodeForm.formModel.submit((formData)=>{
+ this.modalLoading = true
+ if(this.modalAddMode=='add') {
+ add(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "添加成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "添加失败"
+ })
+ }
+ })
+ }else {
+ edit(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "编辑成功"
+ })
+ this.load()
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "编辑失败"
+ })
+ }
+ })
+ }
+ this.modalLoading=false
+ this.modalShow = false
+ })
+ },
+ onModalCancel(){
+ this.modalLoading=false
+ this.modalShow = false
+ }
+ },
+};
+</script>
+
+<style lang="scss" src="./index.scss" scoped>
+</style>
diff --git a/linkis-web/src/apps/linkis/module/datasourceEnv/service.js
b/linkis-web/src/apps/linkis/module/datasourceEnv/service.js
new file mode 100644
index 000000000..1923ef7e8
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceEnv/service.js
@@ -0,0 +1,25 @@
+import api from '@/common/service/api';
+
+const getList = (params)=> {
+ console.log(params)
+ return api.fetch('/basedata_manager/datasource_env', params , 'get')
+}
+
+const add = (data)=> {
+ return api.fetch('/basedata_manager/datasource_env', data , 'post')
+}
+
+const edit = (data)=> {
+ return api.fetch('/basedata_manager/datasource_env', data , 'put')
+}
+
+const del = (params)=> {
+ return api.fetch(`/basedata_manager/datasource_env/${params.id}`,'delete')
+}
+
+export{
+ getList,
+ add,
+ edit,
+ del
+}
diff --git
a/linkis-web/src/apps/linkis/module/datasourceType/EditForm/index.vue
b/linkis-web/src/apps/linkis/module/datasourceType/EditForm/index.vue
new file mode 100644
index 000000000..93a65eec4
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceType/EditForm/index.vue
@@ -0,0 +1,189 @@
+<!--
+ ~ 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>
+ <div class="table-warp">
+ <form-create
+ :rule="rule"
+ v-model="formModel"
+ :option="options"
+ :value.sync="formData"
+ />
+ </div>
+</template>
+
+<script>
+export default {
+ props: {
+ mode: String,
+ data: Object,
+ },
+ data() {
+ return {
+ formModel: {},
+ formData: {},
+ options: {
+ submitBtn: false,
+ },
+ rule: [
+ {
+ type: 'hidden',
+ title: "id",
+ field: 'id',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: false,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"id"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "名称",
+ field: 'name',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"名称"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "描述",
+ field: 'description',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"描述"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "选项",
+ field: 'option',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"选项"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "分类",
+ field: 'classifier',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"分类"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "图标",
+ field: 'icon',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"图标"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "层级",
+ field: 'layers',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"层级"`,
+ trigger: 'blur',
+ },
+ ],
+ }
+ ]
+ }
+ },
+ created() {
+ this.getData(this.data)
+ },
+ methods: {
+ getData(data){
+ this.formData = {...data}
+ }
+ },
+ watch: {
+ data: {
+ handler(newV) {
+ this.getData(newV)
+ },
+ deep: true,
+ },
+ },
+}
+</script>
diff --git a/linkis-web/src/apps/linkis/module/datasourceType/index.js
b/linkis-web/src/apps/linkis/module/datasourceType/index.js
new file mode 100644
index 000000000..699daafd7
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceType/index.js
@@ -0,0 +1,25 @@
+/*
+ * 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 {
+ name: 'datasourceType',
+ data: {
+ ENVIR: process.env.NODE_ENV,
+ },
+ component: () => import('./index.vue'),
+};
diff --git a/linkis-web/src/apps/linkis/module/datasourceType/index.scss
b/linkis-web/src/apps/linkis/module/datasourceType/index.scss
new file mode 100644
index 000000000..7ea4fd680
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceType/index.scss
@@ -0,0 +1,65 @@
+/*
+ * 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 '@/common/style/variables.scss';
+
+.search-bar {
+ .search-item {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ font-size: $font-size-base;
+
+ .lable {
+ min-width: 90px;
+ // flex-basis: 130px;
+ text-align: right;
+ }
+ }
+
+ .ivu-col {
+ display: flex;
+ justify-content: center;
+ }
+
+}
+
+.table-content {
+ margin-top: 25px;
+}
+
+.datasource-type-wrap {
+ .project-header {
+ height: 32px;
+
+ .header-title {
+ font-size: $font-size-large;
+ font-weight: bold;
+ padding-left: 12px;
+ border-left: 3px solid $primary-color;
+ color: $text-title-color;
+ }
+
+ }
+
+}
+
+.modal {
+ .footer {
+ display: flex;
+ justify-content: space-between;
+ }
+}
diff --git a/linkis-web/src/apps/linkis/module/datasourceType/index.vue
b/linkis-web/src/apps/linkis/module/datasourceType/index.vue
new file mode 100644
index 000000000..525176bd6
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceType/index.vue
@@ -0,0 +1,271 @@
+<!--
+ ~ 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>
+ <div>
+ <Row class="search-bar" type="flex">
+ <Col span="6">
+ <Input v-model="searchName" clearable suffix="ios-search"
class="input" placeholder="搜索错误信息"></Input>
+ </Col>
+ <Col span="3">
+ <Button type="primary" class="Button" @click="load()">{{
+ $t('message.linkis.search')
+ }}
+ </Button>
+ <Button type="success" class="Button" style="margin-left: 10px"
@click="onAdd()">{{
+ $t('message.linkis.basedata.add')
+ }}
+ </Button>
+ </Col>
+ <Col span="15">
+ </Col>
+ </Row>
+ <Table border size="small" align="center" :columns="tableColumnNum"
:data="pageDatalist" max-height="420"
+ class="table-content">
+ <template slot-scope="{ row,index }" slot="action">
+ <ButtonGroup size="small">
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableEdit(row, index)"
+ >{{ $t('message.linkis.edit') }}
+ </Button
+ >
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableDelete(row, index)"
+ >
+ {{ $t('message.linkis.basedata.remove') }}
+ </Button>
+ </ButtonGroup>
+ </template>
+ </Table>
+ <div style="margin: 10px; overflow: hidden">
+ <div style="float: right">
+ <Page :page-size="page.pageSize" :total="page.totalSize"
:current="page.pageNow" @on-change="changePage"></Page>
+ </div>
+ </div>
+ <Modal
+ width="800"
+ class="modal"
+ v-model="modalShow"
+ :title="modalAddMode=='add'?'新增':'编辑'"
+ :loading="modalLoading"
+ >
+ <div slot="footer">
+ <Button type="text" size="large" @click="onModalCancel()">取消</Button>
+ <Button type="primary" size="large"
@click="onModalOk('userConfirm')">确定</Button>
+ </div>
+ <ErrorCodeForm ref="errorCodeForm" :data="modalEditData"></ErrorCodeForm>
+ </Modal>
+ </div>
+</template>
+<script>
+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},
+ data() {
+ return {
+ searchName: "",
+ page: {
+ totalSize: 0,
+ pageSize: 10,
+ pageNow: 1,
+ },
+ tableColumnNum: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 100,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "名称",
+ key: 'name',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "描述",
+ key: 'description',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "选项",
+ key: 'option',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "分类",
+ key: 'classifier',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "icon",
+ key: '图标',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "层级",
+ key: 'layers',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.datasource.action'),
+ width: 150,
+ slot: 'action',
+ align: 'center',
+ },
+
+ ],
+ pageDatalist: [],
+ modalShow: false,
+ modalAddMode: 'add',
+ modalEditData: {},
+ modalLoading: false
+ };
+ },
+ created() {
+ this.load()
+ },
+ mounted() {
+ this.init();
+ },
+ methods: {
+ init() {
+ console.log(this.$route.query.isSkip);
+ },
+ load() {
+ let params = {
+ searchName: this.searchName,
+ currentPage: this.page.pageNow,
+ pageSize: this.page.pageSize
+ }
+ getList(params).then((data) => {
+ this.pageDatalist = data.list.list
+ this.page.totalSize = data.list.total
+ })
+ },
+ changePage(value) {
+ this.page.pageNow = value
+ this.load()
+ },
+ onAdd(){
+ this.modalEditData={
+ id: "",
+ errorCode: "",
+ errorDesc: "",
+ errorRegex: '',
+ }
+ this.modalAddMode = 'add'
+ this.modalShow = true
+ },
+ onTableEdit(row){
+ this.modalEditData = row
+ this.modalAddMode = 'edit'
+ this.modalShow = true
+ },
+ onTableDelete(row){
+
+ this.$Modal.confirm({
+ title: "提示信息",
+ content: "确认是否删除该记录?",
+ onOk: ()=>{
+ let params = {
+ id: row.id
+ }
+ del(params).then((data)=>{
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "删除成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "删除失败"
+ })
+ }
+ })
+ this.load()
+ }
+ })
+
+ },
+ onModalOk(){
+ this.$refs.errorCodeForm.formModel.submit((formData)=>{
+ this.modalLoading = true
+ if(this.modalAddMode=='add') {
+ add(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "添加成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "添加失败"
+ })
+ }
+ })
+ }else {
+ edit(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "编辑成功"
+ })
+ this.load()
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "编辑失败"
+ })
+ }
+ })
+ }
+ this.modalLoading=false
+ this.modalShow = false
+ })
+ },
+ onModalCancel(){
+ this.modalLoading=false
+ this.modalShow = false
+ }
+ },
+};
+</script>
+
+<style lang="scss" src="./index.scss" scoped>
+</style>
diff --git a/linkis-web/src/apps/linkis/module/datasourceType/service.js
b/linkis-web/src/apps/linkis/module/datasourceType/service.js
new file mode 100644
index 000000000..f1fa8cf17
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/datasourceType/service.js
@@ -0,0 +1,25 @@
+import api from '@/common/service/api';
+
+const getList = (params)=> {
+ console.log(params)
+ return api.fetch('/basedata_manager/datasource_type', params , 'get')
+}
+
+const add = (data)=> {
+ return api.fetch('/basedata_manager/datasource_type', data , 'post')
+}
+
+const edit = (data)=> {
+ return api.fetch('/basedata_manager/datasource_type', data , 'put')
+}
+
+const del = (params)=> {
+ return api.fetch(`/basedata_manager/datasource_type/${params.id}`,'delete')
+}
+
+export{
+ getList,
+ add,
+ edit,
+ del
+}
diff --git
a/linkis-web/src/apps/linkis/module/errorCode/errorCodeForm/index.vue
b/linkis-web/src/apps/linkis/module/errorCode/errorCodeForm/index.vue
new file mode 100644
index 000000000..20065c73f
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/errorCode/errorCodeForm/index.vue
@@ -0,0 +1,135 @@
+<!--
+ ~ 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>
+ <div class="table-warp">
+ <form-create
+ :rule="rule"
+ v-model="formModel"
+ :option="options"
+ :value.sync="formData"
+ />
+ </div>
+</template>
+
+<script>
+export default {
+ props: {
+ mode: String,
+ data: Object,
+ },
+ data() {
+ return {
+ formModel: {},
+ formData: {},
+ options: {
+ submitBtn: false,
+ },
+ rule: [
+ {
+ type: 'hidden',
+ title: "id",
+ field: 'id',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: false,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"id"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "错误代码",
+ field: 'errorCode',
+ value: '',
+ props: {
+ placeholder: "示例:01001",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"错误代码"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "错误描述",
+ field: 'errorDesc',
+ value: '',
+ props: {
+ placeholder: "示例:引擎在启动时被Kill,请联系管理员",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"错误描述"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "错误正则",
+ field: 'errorRegex',
+ value: '',
+ props: {
+ placeholder: "示例:[0-9]+ Killed",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"错误正则"`,
+ trigger: 'blur',
+ },
+ ],
+ }
+ ]
+ }
+ },
+ created() {
+ this.getData(this.data)
+ },
+ methods: {
+ getData(data){
+ this.formData = {...data}
+ }
+ },
+ watch: {
+ data: {
+ handler(newV) {
+ this.getData(newV)
+ },
+ deep: true,
+ },
+ },
+}
+</script>
diff --git a/linkis-web/src/apps/linkis/module/errorCode/index.js
b/linkis-web/src/apps/linkis/module/errorCode/index.js
new file mode 100644
index 000000000..b6733d9e0
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/errorCode/index.js
@@ -0,0 +1,25 @@
+/*
+ * 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 {
+ name: 'errorCode',
+ data: {
+ ENVIR: process.env.NODE_ENV,
+ },
+ component: () => import('./index.vue'),
+};
diff --git a/linkis-web/src/apps/linkis/module/errorCode/index.scss
b/linkis-web/src/apps/linkis/module/errorCode/index.scss
new file mode 100644
index 000000000..7ea4fd680
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/errorCode/index.scss
@@ -0,0 +1,65 @@
+/*
+ * 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 '@/common/style/variables.scss';
+
+.search-bar {
+ .search-item {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ font-size: $font-size-base;
+
+ .lable {
+ min-width: 90px;
+ // flex-basis: 130px;
+ text-align: right;
+ }
+ }
+
+ .ivu-col {
+ display: flex;
+ justify-content: center;
+ }
+
+}
+
+.table-content {
+ margin-top: 25px;
+}
+
+.datasource-type-wrap {
+ .project-header {
+ height: 32px;
+
+ .header-title {
+ font-size: $font-size-large;
+ font-weight: bold;
+ padding-left: 12px;
+ border-left: 3px solid $primary-color;
+ color: $text-title-color;
+ }
+
+ }
+
+}
+
+.modal {
+ .footer {
+ display: flex;
+ justify-content: space-between;
+ }
+}
diff --git a/linkis-web/src/apps/linkis/module/errorCode/index.vue
b/linkis-web/src/apps/linkis/module/errorCode/index.vue
new file mode 100644
index 000000000..d41a7ee83
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/errorCode/index.vue
@@ -0,0 +1,252 @@
+<!--
+ ~ 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>
+ <div>
+ <Row class="search-bar" type="flex">
+ <Col span="6">
+ <Input v-model="searchName" clearable suffix="ios-search"
class="input" placeholder="搜索错误信息"></Input>
+ </Col>
+ <Col span="3">
+ <Button type="primary" class="Button" @click="load()">{{
+ $t('message.linkis.search')
+ }}
+ </Button>
+ <Button type="success" class="Button" style="margin-left: 10px"
@click="onAdd()">{{
+ $t('message.linkis.basedata.add')
+ }}
+ </Button>
+ </Col>
+ <Col span="15">
+ </Col>
+ </Row>
+ <Table border size="small" align="center" :columns="tableColumnNum"
:data="pageDatalist" max-height="420"
+ class="table-content">
+ <template slot-scope="{ row,index }" slot="action">
+ <ButtonGroup size="small">
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableEdit(row, index)"
+ >{{ $t('message.linkis.edit') }}
+ </Button
+ >
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableDelete(row, index)"
+ >
+ {{ $t('message.linkis.basedata.remove') }}
+ </Button>
+ </ButtonGroup>
+ </template>
+ </Table>
+ <div style="margin: 10px; overflow: hidden">
+ <div style="float: right">
+ <Page :page-size="page.pageSize" :total="page.totalSize"
:current="page.pageNow" @on-change="changePage"></Page>
+ </div>
+ </div>
+ <Modal
+ width="800"
+ class="modal"
+ v-model="modalShow"
+ :title="modalAddMode=='add'?'新增':'编辑'"
+ :loading="modalLoading"
+ >
+ <div slot="footer">
+ <Button type="text" size="large" @click="onModalCancel()">取消</Button>
+ <Button type="primary" size="large"
@click="onModalOk('userConfirm')">确定</Button>
+ </div>
+ <ErrorCodeForm ref="errorCodeForm" :data="modalEditData"></ErrorCodeForm>
+ </Modal>
+ </div>
+</template>
+<script>
+import mixin from '@/common/service/mixin';
+import ErrorCodeForm from './errorCodeForm/index'
+import {add, del, edit, getList} from "./service";
+
+export default {
+ mixins: [mixin],
+ components: {ErrorCodeForm},
+ data() {
+ return {
+ searchName: "",
+ page: {
+ totalSize: 0,
+ pageSize: 10,
+ pageNow: 1,
+ },
+ tableColumnNum: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 100,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "错误代码",
+ key: 'errorCode',
+ width: 100,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "错误描述",
+ key: 'errorDesc',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "错误正则",
+ key: 'errorRegex',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.datasource.action'),
+ width: 150,
+ slot: 'action',
+ align: 'center',
+ },
+ ],
+ pageDatalist: [],
+ modalShow: false,
+ modalAddMode: 'add',
+ modalEditData: {},
+ modalLoading: false
+ };
+ },
+ created() {
+ this.load()
+ },
+ mounted() {
+ this.init();
+ },
+ methods: {
+ init() {
+ console.log(this.$route.query.isSkip);
+ },
+ load() {
+ let params = {
+ searchName: this.searchName,
+ currentPage: this.page.pageNow,
+ pageSize: this.page.pageSize
+ }
+ getList(params).then((data) => {
+ this.pageDatalist = data.list.list
+ this.page.totalSize = data.list.total
+ })
+ },
+ changePage(value) {
+ this.page.pageNow = value
+ this.load()
+ },
+ onAdd(){
+ this.modalEditData={
+ id: "",
+ errorCode: "",
+ errorDesc: "",
+ errorRegex: '',
+ }
+ this.modalAddMode = 'add'
+ this.modalShow = true
+ },
+ onTableEdit(row){
+ this.modalEditData = row
+ this.modalAddMode = 'edit'
+ this.modalShow = true
+ },
+ onTableDelete(row){
+
+ this.$Modal.confirm({
+ title: "提示信息",
+ content: "确认是否删除该记录?",
+ onOk: ()=>{
+ let params = {
+ id: row.id
+ }
+ del(params).then((data)=>{
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "删除成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "删除失败"
+ })
+ }
+ })
+ this.load()
+ }
+ })
+
+ },
+ onModalOk(){
+ this.$refs.errorCodeForm.formModel.submit((formData)=>{
+ this.modalLoading = true
+ if(this.modalAddMode=='add') {
+ add(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "添加成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "添加失败"
+ })
+ }
+ })
+ }else {
+ edit(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "编辑成功"
+ })
+ this.load()
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "编辑失败"
+ })
+ }
+ })
+ }
+ this.modalLoading=false
+ this.modalShow = false
+ })
+ },
+ onModalCancel(){
+ this.modalLoading=false
+ this.modalShow = false
+ }
+ },
+};
+</script>
+
+<style lang="scss" src="./index.scss" scoped>
+</style>
diff --git a/linkis-web/src/apps/linkis/module/errorCode/service.js
b/linkis-web/src/apps/linkis/module/errorCode/service.js
new file mode 100644
index 000000000..f230c196e
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/errorCode/service.js
@@ -0,0 +1,26 @@
+import api from '@/common/service/api';
+import {serialize} from "object-to-formdata";
+
+const getList = (params)=> {
+ console.log(params)
+ return api.fetch('/basedata_manager/error_code', params , 'get')
+}
+
+const add = (data)=> {
+ return api.fetch('/basedata_manager/error_code', data , 'post')
+}
+
+const edit = (data)=> {
+ return api.fetch('/basedata_manager/error_code', data , 'put')
+}
+
+const del = (params)=> {
+ return api.fetch(`/basedata_manager/error_code/${params.id}`,'delete')
+}
+
+export{
+ getList,
+ add,
+ edit,
+ del
+}
diff --git
a/linkis-web/src/apps/linkis/module/gatewayAuthToken/EditForm/index.vue
b/linkis-web/src/apps/linkis/module/gatewayAuthToken/EditForm/index.vue
new file mode 100644
index 000000000..65f7b3956
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/gatewayAuthToken/EditForm/index.vue
@@ -0,0 +1,153 @@
+<!--
+ ~ 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>
+ <div class="table-warp">
+ <form-create
+ :rule="rule"
+ v-model="formModel"
+ :option="options"
+ :value.sync="formData"
+ />
+ </div>
+</template>
+
+<script>
+export default {
+ props: {
+ mode: String,
+ data: Object,
+ },
+ data() {
+ return {
+ formModel: {},
+ formData: {},
+ options: {
+ submitBtn: false,
+ },
+ rule: [
+ {
+ type: 'hidden',
+ title: "id",
+ field: 'id',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: false,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"id"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "名称",
+ field: 'tokenName',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"名称"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "用户",
+ field: 'legalUsers',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"用户"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "主机",
+ field: 'legalHosts',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"主机"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "过期天数",
+ field: 'elapseDay',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"过期天数"`,
+ trigger: 'blur',
+ },
+ ],
+ }
+ ]
+ }
+ },
+ created() {
+ this.getData(this.data)
+ },
+ methods: {
+ getData(data){
+ this.formData = {...data}
+ }
+ },
+ watch: {
+ data: {
+ handler(newV) {
+ this.getData(newV)
+ },
+ deep: true,
+ },
+ },
+}
+</script>
diff --git a/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.js
b/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.js
new file mode 100644
index 000000000..9b1cdf088
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.js
@@ -0,0 +1,25 @@
+/*
+ * 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 {
+ name: 'gatewayAuthToken',
+ data: {
+ ENVIR: process.env.NODE_ENV,
+ },
+ component: () => import('./index.vue'),
+};
diff --git a/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.scss
b/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.scss
new file mode 100644
index 000000000..7ea4fd680
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.scss
@@ -0,0 +1,65 @@
+/*
+ * 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 '@/common/style/variables.scss';
+
+.search-bar {
+ .search-item {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ font-size: $font-size-base;
+
+ .lable {
+ min-width: 90px;
+ // flex-basis: 130px;
+ text-align: right;
+ }
+ }
+
+ .ivu-col {
+ display: flex;
+ justify-content: center;
+ }
+
+}
+
+.table-content {
+ margin-top: 25px;
+}
+
+.datasource-type-wrap {
+ .project-header {
+ height: 32px;
+
+ .header-title {
+ font-size: $font-size-large;
+ font-weight: bold;
+ padding-left: 12px;
+ border-left: 3px solid $primary-color;
+ color: $text-title-color;
+ }
+
+ }
+
+}
+
+.modal {
+ .footer {
+ display: flex;
+ justify-content: space-between;
+ }
+}
diff --git a/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.vue
b/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.vue
new file mode 100644
index 000000000..d3715037b
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.vue
@@ -0,0 +1,295 @@
+<!--
+ ~ 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>
+ <div>
+ <Row class="search-bar" type="flex">
+ <Col span="6">
+ <Input v-model="searchName" clearable suffix="ios-search"
class="input" placeholder="搜索错误信息"></Input>
+ </Col>
+ <Col span="3">
+ <Button type="primary" class="Button" @click="load()">{{
+ $t('message.linkis.search')
+ }}
+ </Button>
+ <Button type="success" class="Button" style="margin-left: 10px"
@click="onAdd()">{{
+ $t('message.linkis.basedata.add')
+ }}
+ </Button>
+ </Col>
+ <Col span="15">
+ </Col>
+ </Row>
+ <Table border size="small" align="center" :columns="tableColumnNum"
:data="pageDatalist" max-height="420"
+ class="table-content">
+ <template slot-scope="{ row,index }" slot="action">
+ <ButtonGroup size="small">
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableEdit(row, index)"
+ >{{ $t('message.linkis.edit') }}
+ </Button
+ >
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableDelete(row, index)"
+ >
+ {{ $t('message.linkis.basedata.remove') }}
+ </Button>
+ </ButtonGroup>
+ </template>
+ </Table>
+ <div style="margin: 10px; overflow: hidden">
+ <div style="float: right">
+ <Page :page-size="page.pageSize" :total="page.totalSize"
:current="page.pageNow" @on-change="changePage"></Page>
+ </div>
+ </div>
+ <Modal
+ width="800"
+ class="modal"
+ v-model="modalShow"
+ :title="modalAddMode=='add'?'新增':'编辑'"
+ :loading="modalLoading"
+ >
+ <div slot="footer">
+ <Button type="text" size="large" @click="onModalCancel()">取消</Button>
+ <Button type="primary" size="large"
@click="onModalOk('userConfirm')">确定</Button>
+ </div>
+ <ErrorCodeForm ref="errorCodeForm" :data="modalEditData"></ErrorCodeForm>
+ </Modal>
+ </div>
+</template>
+<script>
+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},
+ data() {
+ return {
+ searchName: "",
+ page: {
+ totalSize: 0,
+ pageSize: 10,
+ pageNow: 1,
+ },
+ tableColumnNum: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 100,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "名称",
+ key: 'tokenName',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "用户",
+ key: 'legalUsers',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "主机",
+ key: 'legalHosts',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "过期天数",
+ key: 'elapseDay',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "所属者",
+ key: 'businessOwner',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "创建时间",
+ key: 'createTime',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ render: (h,params)=>{
+ return h('div',
+ formatDate(new Date(params.row.createTime),'yyyy-MM-dd hh:mm')
+ )
+ }
+ },
+ {
+ title: "更新时间",
+ key: 'updateTime',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ render: (h,params)=>{
+ return h('div',
+ formatDate(new Date(params.row.createTime),'yyyy-MM-dd hh:mm')
+ )
+ }
+ },
+ {
+ title: "更新人",
+ key: 'updateBy',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.datasource.action'),
+ width: 150,
+ slot: 'action',
+ align: 'center',
+ },
+
+ ],
+ pageDatalist: [],
+ modalShow: false,
+ modalAddMode: 'add',
+ modalEditData: {},
+ modalLoading: false
+ };
+ },
+ created() {
+ this.load()
+ },
+ mounted() {
+ this.init();
+ },
+ methods: {
+ init() {
+ console.log(this.$route.query.isSkip);
+ },
+ load() {
+ let params = {
+ searchName: this.searchName,
+ currentPage: this.page.pageNow,
+ pageSize: this.page.pageSize
+ }
+ getList(params).then((data) => {
+ this.pageDatalist = data.list.list
+ this.page.totalSize = data.list.total
+ })
+ },
+ changePage(value) {
+ this.page.pageNow = value
+ this.load()
+ },
+ onAdd(){
+ this.modalEditData={
+ id: "",
+ errorCode: "",
+ errorDesc: "",
+ errorRegex: '',
+ }
+ this.modalAddMode = 'add'
+ this.modalShow = true
+ },
+ onTableEdit(row){
+ this.modalEditData = row
+ this.modalAddMode = 'edit'
+ this.modalShow = true
+ },
+ onTableDelete(row){
+
+ this.$Modal.confirm({
+ title: "提示信息",
+ content: "确认是否删除该记录?",
+ onOk: ()=>{
+ let params = {
+ id: row.id
+ }
+ del(params).then((data)=>{
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "删除成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "删除失败"
+ })
+ }
+ })
+ this.load()
+ }
+ })
+
+ },
+ onModalOk(){
+ this.$refs.errorCodeForm.formModel.submit((formData)=>{
+ this.modalLoading = true
+ if(this.modalAddMode=='add') {
+ add(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "添加成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "添加失败"
+ })
+ }
+ })
+ }else {
+ edit(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "编辑成功"
+ })
+ this.load()
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "编辑失败"
+ })
+ }
+ })
+ }
+ this.modalLoading=false
+ this.modalShow = false
+ })
+ },
+ onModalCancel(){
+ this.modalLoading=false
+ this.modalShow = false
+ }
+ },
+};
+</script>
+
+<style lang="scss" src="./index.scss" scoped>
+</style>
diff --git a/linkis-web/src/apps/linkis/module/gatewayAuthToken/service.js
b/linkis-web/src/apps/linkis/module/gatewayAuthToken/service.js
new file mode 100644
index 000000000..9753a2f78
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/gatewayAuthToken/service.js
@@ -0,0 +1,25 @@
+import api from '@/common/service/api';
+
+const getList = (params)=> {
+ console.log(params)
+ return api.fetch('/basedata_manager/gateway_auth_token', params , 'get')
+}
+
+const add = (data)=> {
+ return api.fetch('/basedata_manager/gateway_auth_token', data , 'post')
+}
+
+const edit = (data)=> {
+ return api.fetch('/basedata_manager/gateway_auth_token', data , 'put')
+}
+
+const del = (params)=> {
+ return
api.fetch(`/basedata_manager/gateway_auth_token/${params.id}`,'delete')
+}
+
+export{
+ getList,
+ add,
+ edit,
+ del
+}
diff --git
a/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/EditForm/index.vue
b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/EditForm/index.vue
new file mode 100644
index 000000000..0b957a000
--- /dev/null
+++
b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/EditForm/index.vue
@@ -0,0 +1,153 @@
+<!--
+ ~ 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>
+ <div class="table-warp">
+ <form-create
+ :rule="rule"
+ v-model="formModel"
+ :option="options"
+ :value.sync="formData"
+ />
+ </div>
+</template>
+
+<script>
+export default {
+ props: {
+ mode: String,
+ data: Object,
+ },
+ data() {
+ return {
+ formModel: {},
+ formData: {},
+ options: {
+ submitBtn: false,
+ },
+ rule: [
+ {
+ type: 'hidden',
+ title: "id",
+ field: 'id',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: false,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"id"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "资源类型",
+ field: 'resourceType',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"资源类型"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "名称",
+ field: 'name',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"名称"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "标签",
+ field: 'labels',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"标签"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "配置信息",
+ field: 'config',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"配置信息"`,
+ trigger: 'blur',
+ },
+ ],
+ }
+ ]
+ }
+ },
+ created() {
+ this.getData(this.data)
+ },
+ methods: {
+ getData(data){
+ this.formData = {...data}
+ }
+ },
+ watch: {
+ data: {
+ handler(newV) {
+ this.getData(newV)
+ },
+ deep: true,
+ },
+ },
+}
+</script>
diff --git
a/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.js
b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.js
new file mode 100644
index 000000000..4ba0ea1e0
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.js
@@ -0,0 +1,25 @@
+/*
+ * 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 {
+ name: 'rmExternalResourceProvider',
+ data: {
+ ENVIR: process.env.NODE_ENV,
+ },
+ component: () => import('./index.vue'),
+};
diff --git
a/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.scss
b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.scss
new file mode 100644
index 000000000..7ea4fd680
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.scss
@@ -0,0 +1,65 @@
+/*
+ * 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 '@/common/style/variables.scss';
+
+.search-bar {
+ .search-item {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ font-size: $font-size-base;
+
+ .lable {
+ min-width: 90px;
+ // flex-basis: 130px;
+ text-align: right;
+ }
+ }
+
+ .ivu-col {
+ display: flex;
+ justify-content: center;
+ }
+
+}
+
+.table-content {
+ margin-top: 25px;
+}
+
+.datasource-type-wrap {
+ .project-header {
+ height: 32px;
+
+ .header-title {
+ font-size: $font-size-large;
+ font-weight: bold;
+ padding-left: 12px;
+ border-left: 3px solid $primary-color;
+ color: $text-title-color;
+ }
+
+ }
+
+}
+
+.modal {
+ .footer {
+ display: flex;
+ justify-content: space-between;
+ }
+}
diff --git
a/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.vue
b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.vue
new file mode 100644
index 000000000..3f6918c9b
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/index.vue
@@ -0,0 +1,259 @@
+<!--
+ ~ 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>
+ <div>
+ <Row class="search-bar" type="flex">
+ <Col span="6">
+ <Input v-model="searchName" clearable suffix="ios-search"
class="input" placeholder="搜索错误信息"></Input>
+ </Col>
+ <Col span="3">
+ <Button type="primary" class="Button" @click="load()">{{
+ $t('message.linkis.search')
+ }}
+ </Button>
+ <Button type="success" class="Button" style="margin-left: 10px"
@click="onAdd()">{{
+ $t('message.linkis.basedata.add')
+ }}
+ </Button>
+ </Col>
+ <Col span="15">
+ </Col>
+ </Row>
+ <Table border size="small" align="center" :columns="tableColumnNum"
:data="pageDatalist" max-height="420"
+ class="table-content">
+ <template slot-scope="{ row,index }" slot="action">
+ <ButtonGroup size="small">
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableEdit(row, index)"
+ >{{ $t('message.linkis.edit') }}
+ </Button
+ >
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableDelete(row, index)"
+ >
+ {{ $t('message.linkis.basedata.remove') }}
+ </Button>
+ </ButtonGroup>
+ </template>
+ </Table>
+ <div style="margin: 10px; overflow: hidden">
+ <div style="float: right">
+ <Page :page-size="page.pageSize" :total="page.totalSize"
:current="page.pageNow" @on-change="changePage"></Page>
+ </div>
+ </div>
+ <Modal
+ width="800"
+ class="modal"
+ v-model="modalShow"
+ :title="modalAddMode=='add'?'新增':'编辑'"
+ :loading="modalLoading"
+ >
+ <div slot="footer">
+ <Button type="text" size="large" @click="onModalCancel()">取消</Button>
+ <Button type="primary" size="large"
@click="onModalOk('userConfirm')">确定</Button>
+ </div>
+ <ErrorCodeForm ref="errorCodeForm" :data="modalEditData"></ErrorCodeForm>
+ </Modal>
+ </div>
+</template>
+<script>
+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},
+ data() {
+ return {
+ searchName: "",
+ page: {
+ totalSize: 0,
+ pageSize: 10,
+ pageNow: 1,
+ },
+ tableColumnNum: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 100,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "资源类型",
+ key: 'resourceType',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "名称",
+ key: 'name',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "标签",
+ key: 'labels',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "配置信息",
+ key: 'config',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.datasource.action'),
+ width: 150,
+ slot: 'action',
+ align: 'center',
+ },
+
+ ],
+ pageDatalist: [],
+ modalShow: false,
+ modalAddMode: 'add',
+ modalEditData: {},
+ modalLoading: false
+ };
+ },
+ created() {
+ this.load()
+ },
+ mounted() {
+ this.init();
+ },
+ methods: {
+ init() {
+ console.log(this.$route.query.isSkip);
+ },
+ load() {
+ let params = {
+ searchName: this.searchName,
+ currentPage: this.page.pageNow,
+ pageSize: this.page.pageSize
+ }
+ getList(params).then((data) => {
+ this.pageDatalist = data.list.list
+ this.page.totalSize = data.list.total
+ })
+ },
+ changePage(value) {
+ this.page.pageNow = value
+ this.load()
+ },
+ onAdd(){
+ this.modalEditData={
+ id: "",
+ errorCode: "",
+ errorDesc: "",
+ errorRegex: '',
+ }
+ this.modalAddMode = 'add'
+ this.modalShow = true
+ },
+ onTableEdit(row){
+ this.modalEditData = row
+ this.modalAddMode = 'edit'
+ this.modalShow = true
+ },
+ onTableDelete(row){
+
+ this.$Modal.confirm({
+ title: "提示信息",
+ content: "确认是否删除该记录?",
+ onOk: ()=>{
+ let params = {
+ id: row.id
+ }
+ del(params).then((data)=>{
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "删除成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "删除失败"
+ })
+ }
+ })
+ this.load()
+ }
+ })
+
+ },
+ onModalOk(){
+ this.$refs.errorCodeForm.formModel.submit((formData)=>{
+ this.modalLoading = true
+ if(this.modalAddMode=='add') {
+ add(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "添加成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "添加失败"
+ })
+ }
+ })
+ }else {
+ edit(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "编辑成功"
+ })
+ this.load()
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "编辑失败"
+ })
+ }
+ })
+ }
+ this.modalLoading=false
+ this.modalShow = false
+ })
+ },
+ onModalCancel(){
+ this.modalLoading=false
+ this.modalShow = false
+ }
+ },
+};
+</script>
+
+<style lang="scss" src="./index.scss" scoped>
+</style>
diff --git
a/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/service.js
b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/service.js
new file mode 100644
index 000000000..a977b435d
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/service.js
@@ -0,0 +1,25 @@
+import api from '@/common/service/api';
+
+const getList = (params)=> {
+ console.log(params)
+ return api.fetch('/basedata_manager/rm_external_resource_provier', params ,
'get')
+}
+
+const add = (data)=> {
+ return api.fetch('/basedata_manager/rm_external_resource_provier', data ,
'post')
+}
+
+const edit = (data)=> {
+ return api.fetch('/basedata_manager/rm_external_resource_provier', data ,
'put')
+}
+
+const del = (params)=> {
+ return
api.fetch(`/basedata_manager/rm_external_resource_provier/${params.id}`,'delete')
+}
+
+export{
+ getList,
+ add,
+ edit,
+ del
+}
diff --git a/linkis-web/src/apps/linkis/module/udfManager/EditForm/index.vue
b/linkis-web/src/apps/linkis/module/udfManager/EditForm/index.vue
new file mode 100644
index 000000000..a3c7f205e
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/udfManager/EditForm/index.vue
@@ -0,0 +1,99 @@
+<!--
+ ~ 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>
+ <div class="table-warp">
+ <form-create
+ :rule="rule"
+ v-model="formModel"
+ :option="options"
+ :value.sync="formData"
+ />
+ </div>
+</template>
+
+<script>
+export default {
+ props: {
+ mode: String,
+ data: Object,
+ },
+ data() {
+ return {
+ formModel: {},
+ formData: {},
+ options: {
+ submitBtn: false,
+ },
+ rule: [
+ {
+ type: 'hidden',
+ title: "id",
+ field: 'id',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: false,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"id"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "用户名",
+ field: 'user_name',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"用户名"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ ]
+ }
+ },
+ created() {
+ this.getData(this.data)
+ },
+ methods: {
+ getData(data){
+ this.formData = {...data}
+ }
+ },
+ watch: {
+ data: {
+ handler(newV) {
+ this.getData(newV)
+ },
+ deep: true,
+ },
+ },
+}
+</script>
diff --git a/linkis-web/src/apps/linkis/module/udfManager/index.js
b/linkis-web/src/apps/linkis/module/udfManager/index.js
new file mode 100644
index 000000000..72ad45dc5
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/udfManager/index.js
@@ -0,0 +1,25 @@
+/*
+ * 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 {
+ name: 'udfManager',
+ data: {
+ ENVIR: process.env.NODE_ENV,
+ },
+ component: () => import('./index.vue'),
+};
diff --git a/linkis-web/src/apps/linkis/module/udfManager/index.scss
b/linkis-web/src/apps/linkis/module/udfManager/index.scss
new file mode 100644
index 000000000..7ea4fd680
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/udfManager/index.scss
@@ -0,0 +1,65 @@
+/*
+ * 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 '@/common/style/variables.scss';
+
+.search-bar {
+ .search-item {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ font-size: $font-size-base;
+
+ .lable {
+ min-width: 90px;
+ // flex-basis: 130px;
+ text-align: right;
+ }
+ }
+
+ .ivu-col {
+ display: flex;
+ justify-content: center;
+ }
+
+}
+
+.table-content {
+ margin-top: 25px;
+}
+
+.datasource-type-wrap {
+ .project-header {
+ height: 32px;
+
+ .header-title {
+ font-size: $font-size-large;
+ font-weight: bold;
+ padding-left: 12px;
+ border-left: 3px solid $primary-color;
+ color: $text-title-color;
+ }
+
+ }
+
+}
+
+.modal {
+ .footer {
+ display: flex;
+ justify-content: space-between;
+ }
+}
diff --git a/linkis-web/src/apps/linkis/module/udfManager/index.vue
b/linkis-web/src/apps/linkis/module/udfManager/index.vue
new file mode 100644
index 000000000..b03db9e51
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/udfManager/index.vue
@@ -0,0 +1,240 @@
+<!--
+ ~ 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>
+ <div>
+ <Row class="search-bar" type="flex">
+ <Col span="6">
+ <Input v-model="searchName" clearable suffix="ios-search"
class="input" placeholder="搜索错误信息"></Input>
+ </Col>
+ <Col span="3">
+ <Button type="primary" class="Button" @click="load()">{{
+ $t('message.linkis.search')
+ }}
+ </Button>
+ <Button type="success" class="Button" style="margin-left: 10px"
@click="onAdd()">{{
+ $t('message.linkis.basedata.add')
+ }}
+ </Button>
+ </Col>
+ <Col span="15">
+ </Col>
+ </Row>
+ <Table border size="small" align="center" :columns="tableColumnNum"
:data="pageDatalist" max-height="420"
+ class="table-content">
+ <template slot-scope="{ row,index }" slot="action">
+ <ButtonGroup size="small">
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableEdit(row, index)"
+ >{{ $t('message.linkis.edit') }}
+ </Button
+ >
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableDelete(row, index)"
+ >
+ {{ $t('message.linkis.basedata.remove') }}
+ </Button>
+ </ButtonGroup>
+ </template>
+ </Table>
+ <div style="margin: 10px; overflow: hidden">
+ <div style="float: right">
+ <Page :page-size="page.pageSize" :total="page.totalSize"
:current="page.pageNow" @on-change="changePage"></Page>
+ </div>
+ </div>
+ <Modal
+ width="800"
+ class="modal"
+ v-model="modalShow"
+ :title="modalAddMode=='add'?'新增':'编辑'"
+ :loading="modalLoading"
+ >
+ <div slot="footer">
+ <Button type="text" size="large" @click="onModalCancel()">取消</Button>
+ <Button type="primary" size="large"
@click="onModalOk('userConfirm')">确定</Button>
+ </div>
+ <ErrorCodeForm ref="errorCodeForm" :data="modalEditData"></ErrorCodeForm>
+ </Modal>
+ </div>
+</template>
+<script>
+import mixin from '@/common/service/mixin';
+import ErrorCodeForm from './EditForm/index'
+import {add, del, edit, getList} from "./service";
+export default {
+ mixins: [mixin],
+ components: {ErrorCodeForm},
+ data() {
+ return {
+ searchName: "",
+ page: {
+ totalSize: 0,
+ pageSize: 10,
+ pageNow: 1,
+ },
+ tableColumnNum: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 100,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "用户名",
+ key: 'tokenName',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.datasource.action'),
+ width: 150,
+ slot: 'action',
+ align: 'center',
+ },
+
+ ],
+ pageDatalist: [],
+ modalShow: false,
+ modalAddMode: 'add',
+ modalEditData: {},
+ modalLoading: false
+ };
+ },
+ created() {
+ this.load()
+ },
+ mounted() {
+ this.init();
+ },
+ methods: {
+ init() {
+ console.log(this.$route.query.isSkip);
+ },
+ load() {
+ let params = {
+ searchName: this.searchName,
+ currentPage: this.page.pageNow,
+ pageSize: this.page.pageSize
+ }
+ getList(params).then((data) => {
+ this.pageDatalist = data.list.list
+ this.page.totalSize = data.list.total
+ })
+ },
+ changePage(value) {
+ this.page.pageNow = value
+ this.load()
+ },
+ onAdd(){
+ this.modalEditData={
+ id: "",
+ errorCode: "",
+ errorDesc: "",
+ errorRegex: '',
+ }
+ this.modalAddMode = 'add'
+ this.modalShow = true
+ },
+ onTableEdit(row){
+ this.modalEditData = row
+ this.modalAddMode = 'edit'
+ this.modalShow = true
+ },
+ onTableDelete(row){
+
+ this.$Modal.confirm({
+ title: "提示信息",
+ content: "确认是否删除该记录?",
+ onOk: ()=>{
+ let params = {
+ id: row.id
+ }
+ del(params).then((data)=>{
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "删除成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "删除失败"
+ })
+ }
+ })
+ this.load()
+ }
+ })
+
+ },
+ onModalOk(){
+ this.$refs.errorCodeForm.formModel.submit((formData)=>{
+ this.modalLoading = true
+ if(this.modalAddMode=='add') {
+ add(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "添加成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "添加失败"
+ })
+ }
+ })
+ }else {
+ edit(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "编辑成功"
+ })
+ this.load()
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "编辑失败"
+ })
+ }
+ })
+ }
+ this.modalLoading=false
+ this.modalShow = false
+ })
+ },
+ onModalCancel(){
+ this.modalLoading=false
+ this.modalShow = false
+ }
+ },
+};
+</script>
+
+<style lang="scss" src="./index.scss" scoped>
+</style>
diff --git a/linkis-web/src/apps/linkis/module/udfManager/service.js
b/linkis-web/src/apps/linkis/module/udfManager/service.js
new file mode 100644
index 000000000..e8f212f55
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/udfManager/service.js
@@ -0,0 +1,25 @@
+import api from '@/common/service/api';
+
+const getList = (params)=> {
+ console.log(params)
+ return api.fetch('/basedata_manager/udf_manager', params , 'get')
+}
+
+const add = (data)=> {
+ return api.fetch('/basedata_manager/udf_manager', data , 'post')
+}
+
+const edit = (data)=> {
+ return api.fetch('/basedata_manager/udf_manager', data , 'put')
+}
+
+const del = (params)=> {
+ return api.fetch(`/basedata_manager/udf_manager/${params.id}`,'delete')
+}
+
+export{
+ getList,
+ add,
+ edit,
+ del
+}
diff --git a/linkis-web/src/apps/linkis/module/udfTree/EditForm/index.vue
b/linkis-web/src/apps/linkis/module/udfTree/EditForm/index.vue
new file mode 100644
index 000000000..910912ce5
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/udfTree/EditForm/index.vue
@@ -0,0 +1,153 @@
+<!--
+ ~ 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>
+ <div class="table-warp">
+ <form-create
+ :rule="rule"
+ v-model="formModel"
+ :option="options"
+ :value.sync="formData"
+ />
+ </div>
+</template>
+
+<script>
+export default {
+ props: {
+ mode: String,
+ data: Object,
+ },
+ data() {
+ return {
+ formModel: {},
+ formData: {},
+ options: {
+ submitBtn: false,
+ },
+ rule: [
+ {
+ type: 'hidden',
+ title: "id",
+ field: 'id',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: false,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"id"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "名称",
+ field: 'name',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"名称"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "用户名",
+ field: 'userName',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"用户名"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "描述",
+ field: 'description',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"描述"`,
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ type: 'input',
+ title: "父级Key",
+ field: 'parent',
+ value: '',
+ props: {
+ placeholder: "",
+ },
+ validate: [
+ {
+ required: true,
+ message: `${this.$t(
+ 'message.linkis.datasource.pleaseInput'
+ )}"父级Key"`,
+ trigger: 'blur',
+ },
+ ],
+ }
+ ]
+ }
+ },
+ created() {
+ this.getData(this.data)
+ },
+ methods: {
+ getData(data){
+ this.formData = {...data}
+ }
+ },
+ watch: {
+ data: {
+ handler(newV) {
+ this.getData(newV)
+ },
+ deep: true,
+ },
+ },
+}
+</script>
diff --git a/linkis-web/src/apps/linkis/module/udfTree/index.js
b/linkis-web/src/apps/linkis/module/udfTree/index.js
new file mode 100644
index 000000000..44c544e1d
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/udfTree/index.js
@@ -0,0 +1,25 @@
+/*
+ * 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 {
+ name: 'udfTree',
+ data: {
+ ENVIR: process.env.NODE_ENV,
+ },
+ component: () => import('./index.vue'),
+};
diff --git a/linkis-web/src/apps/linkis/module/udfTree/index.scss
b/linkis-web/src/apps/linkis/module/udfTree/index.scss
new file mode 100644
index 000000000..7ea4fd680
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/udfTree/index.scss
@@ -0,0 +1,65 @@
+/*
+ * 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 '@/common/style/variables.scss';
+
+.search-bar {
+ .search-item {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ font-size: $font-size-base;
+
+ .lable {
+ min-width: 90px;
+ // flex-basis: 130px;
+ text-align: right;
+ }
+ }
+
+ .ivu-col {
+ display: flex;
+ justify-content: center;
+ }
+
+}
+
+.table-content {
+ margin-top: 25px;
+}
+
+.datasource-type-wrap {
+ .project-header {
+ height: 32px;
+
+ .header-title {
+ font-size: $font-size-large;
+ font-weight: bold;
+ padding-left: 12px;
+ border-left: 3px solid $primary-color;
+ color: $text-title-color;
+ }
+
+ }
+
+}
+
+.modal {
+ .footer {
+ display: flex;
+ justify-content: space-between;
+ }
+}
diff --git a/linkis-web/src/apps/linkis/module/udfTree/index.vue
b/linkis-web/src/apps/linkis/module/udfTree/index.vue
new file mode 100644
index 000000000..a01f17dce
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/udfTree/index.vue
@@ -0,0 +1,290 @@
+<!--
+ ~ 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>
+ <div>
+ <Row class="search-bar" type="flex">
+ <Col span="6">
+ <Input v-model="searchName" clearable suffix="ios-search"
class="input" placeholder="搜索错误信息"></Input>
+ </Col>
+ <Col span="3">
+ <Button type="primary" class="Button" @click="load()">{{
+ $t('message.linkis.search')
+ }}
+ </Button>
+ <Button type="success" class="Button" style="margin-left: 10px"
@click="onAdd()">{{
+ $t('message.linkis.basedata.add')
+ }}
+ </Button>
+ </Col>
+ <Col span="15">
+ </Col>
+ </Row>
+ <Table border size="small" align="center" :columns="tableColumnNum"
:data="pageDatalist" max-height="420"
+ class="table-content">
+ <template slot-scope="{ row,index }" slot="action">
+ <ButtonGroup size="small">
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableEdit(row, index)"
+ >{{ $t('message.linkis.edit') }}
+ </Button
+ >
+ <Button
+ :disabled="row.expire"
+ size="small"
+ type="primary"
+ @click="onTableDelete(row, index)"
+ >
+ {{ $t('message.linkis.basedata.remove') }}
+ </Button>
+ </ButtonGroup>
+ </template>
+ </Table>
+ <div style="margin: 10px; overflow: hidden">
+ <div style="float: right">
+ <Page :page-size="page.pageSize" :total="page.totalSize"
:current="page.pageNow" @on-change="changePage"></Page>
+ </div>
+ </div>
+ <Modal
+ width="800"
+ class="modal"
+ v-model="modalShow"
+ :title="modalAddMode=='add'?'新增':'编辑'"
+ :loading="modalLoading"
+ >
+ <div slot="footer">
+ <Button type="text" size="large" @click="onModalCancel()">取消</Button>
+ <Button type="primary" size="large"
@click="onModalOk('userConfirm')">确定</Button>
+ </div>
+ <ErrorCodeForm ref="errorCodeForm" :data="modalEditData"></ErrorCodeForm>
+ </Modal>
+ </div>
+</template>
+<script>
+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},
+ data() {
+ return {
+ searchName: "",
+ page: {
+ totalSize: 0,
+ pageSize: 10,
+ pageNow: 1,
+ },
+ tableColumnNum: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 100,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "名称",
+ key: 'name',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "分类",
+ key: 'category',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "用户名",
+ key: 'userName',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "描述",
+ key: 'description',
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: "父级Key",
+ key: 'parent',
+ tooltip: true,
+ align: 'center',
+ },
+
+ {
+ title: "创建时间",
+ key: 'createTime',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ render: (h,params)=>{
+ return h('div',
+ formatDate(new Date(params.row.createTime),'yyyy-MM-dd hh:mm')
+ )
+ }
+ },
+ {
+ title: "更新时间",
+ key: 'updateTime',
+ minWidth: 50,
+ tooltip: true,
+ align: 'center',
+ render: (h,params)=>{
+ return h('div',
+ formatDate(new Date(params.row.createTime),'yyyy-MM-dd hh:mm')
+ )
+ }
+ },
+ {
+ title: this.$t('message.linkis.datasource.action'),
+ width: 150,
+ slot: 'action',
+ align: 'center',
+ },
+
+ ],
+ pageDatalist: [],
+ modalShow: false,
+ modalAddMode: 'add',
+ modalEditData: {},
+ modalLoading: false
+ };
+ },
+ created() {
+ this.load()
+ },
+ mounted() {
+ this.init();
+ },
+ methods: {
+ init() {
+ console.log(this.$route.query.isSkip);
+ },
+ load() {
+ let params = {
+ searchName: this.searchName,
+ currentPage: this.page.pageNow,
+ pageSize: this.page.pageSize
+ }
+ getList(params).then((data) => {
+ this.pageDatalist = data.list.list
+ this.page.totalSize = data.list.total
+ })
+ },
+ changePage(value) {
+ this.page.pageNow = value
+ this.load()
+ },
+ onAdd(){
+ this.modalEditData={
+ id: "",
+ errorCode: "",
+ errorDesc: "",
+ errorRegex: '',
+ }
+ this.modalAddMode = 'add'
+ this.modalShow = true
+ },
+ onTableEdit(row){
+ this.modalEditData = row
+ this.modalAddMode = 'edit'
+ this.modalShow = true
+ },
+ onTableDelete(row){
+
+ this.$Modal.confirm({
+ title: "提示信息",
+ content: "确认是否删除该记录?",
+ onOk: ()=>{
+ let params = {
+ id: row.id
+ }
+ del(params).then((data)=>{
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "删除成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "删除失败"
+ })
+ }
+ })
+ this.load()
+ }
+ })
+
+ },
+ onModalOk(){
+ this.$refs.errorCodeForm.formModel.submit((formData)=>{
+ this.modalLoading = true
+ if(this.modalAddMode=='add') {
+ add(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "添加成功"
+ })
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "添加失败"
+ })
+ }
+ })
+ }else {
+ edit(formData).then((data)=>{
+ console.log(data)
+ if(data.result) {
+ this.$Message.success({
+ duration: 3,
+ content: "编辑成功"
+ })
+ this.load()
+ }else{
+ this.$Message.success({
+ duration: 3,
+ content: "编辑失败"
+ })
+ }
+ })
+ }
+ this.modalLoading=false
+ this.modalShow = false
+ })
+ },
+ onModalCancel(){
+ this.modalLoading=false
+ this.modalShow = false
+ }
+ },
+};
+</script>
+
+<style lang="scss" src="./index.scss" scoped>
+</style>
diff --git a/linkis-web/src/apps/linkis/module/udfTree/service.js
b/linkis-web/src/apps/linkis/module/udfTree/service.js
new file mode 100644
index 000000000..6441d4c1f
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/udfTree/service.js
@@ -0,0 +1,25 @@
+import api from '@/common/service/api';
+
+const getList = (params)=> {
+ console.log(params)
+ return api.fetch('/basedata_manager/udf_tree', params , 'get')
+}
+
+const add = (data)=> {
+ return api.fetch('/basedata_manager/udf_tree', data , 'post')
+}
+
+const edit = (data)=> {
+ return api.fetch('/basedata_manager/udf_tree', data , 'put')
+}
+
+const del = (params)=> {
+ return api.fetch(`/basedata_manager/udf_tree/${params.id}`,'delete')
+}
+
+export{
+ getList,
+ add,
+ edit,
+ del
+}
diff --git a/linkis-web/src/apps/linkis/router.js
b/linkis-web/src/apps/linkis/router.js
index bfec3ad54..f0ed4e68a 100644
--- a/linkis-web/src/apps/linkis/router.js
+++ b/linkis-web/src/apps/linkis/router.js
@@ -138,36 +138,116 @@ export default [
publicPage: true,
},
},
- {
- name: 'microService',
- path: 'microService',
- component: () =>
- import('./module/microServiceManagement/index.vue'),
- meta: {
- title: 'microServiceManagement',
- publicPage: true,
+ {
+ name: 'microService',
+ path: 'microService',
+ component: () =>
+ import('./module/microServiceManagement/index.vue'),
+ meta: {
+ title: 'microServiceManagement',
+ publicPage: true,
+ },
},
- },
- {
- name: 'datasource',
- path: 'datasource',
- component: () =>
- import('./module/datasource/index.vue'),
- meta: {
- title: 'datasourceManagement',
- publicPage: true,
+ {
+ name: 'datasource',
+ path: 'datasource',
+ component: () =>
+ import('./module/datasource/index.vue'),
+ meta: {
+ title: 'datasourceManagement',
+ publicPage: true,
+ },
},
- },
- {
- name: 'EnginePluginManagement',
- path: 'EnginePluginManagement',
- component: () =>
- import('./module/EnginePluginManagement/index.vue'),
- meta: {
- title: 'EnginePluginManagement',
- publicPage: true,
+ {
+ name: 'errorCode',
+ path: 'errorCode',
+ component: () =>
+ import('./module/errorCode/index.vue'),
+ meta: {
+ title: 'errorCode',
+ publicPage: true,
+ },
+ },
+ {
+ name: 'gatewayAuthToken',
+ path: 'gatewayAuthToken',
+ component: () =>
+ import('./module/gatewayAuthToken/index.vue'),
+ meta: {
+ title: 'gatewayAuthToken',
+ publicPage: true,
+ },
+ },
+ {
+ name: 'rmExternalResourceProvider',
+ path: 'rmExternalResourceProvider',
+ component: () =>
+ import('./module/rmExternalResourceProvider/index.vue'),
+ meta: {
+ title: 'rmExternalResourceProvider',
+ publicPage: true,
+ },
+ },
+ {
+ name: 'udfManager',
+ path: 'udfManager',
+ component: () =>
+ import('./module/udfManager/index.vue'),
+ meta: {
+ title: 'udfManager',
+ publicPage: true,
+ },
+ },
+ {
+ name: 'udfTree',
+ path: 'udfTree',
+ component: () =>
+ import('./module/udfTree/index.vue'),
+ meta: {
+ title: 'udfTree',
+ publicPage: true,
+ },
+ },
+ {
+ name: 'datasourceAccess',
+ path: 'datasourceAccess',
+ component: () =>
+ import('./module/datasourceAccess/index.vue'),
+ meta: {
+ title: 'datasourceAccess',
+ publicPage: true,
+ },
+ },
+ {
+ name: 'datasourceEnv',
+ path: 'datasourceEnv',
+ component: () =>
+ import('./module/datasourceEnv/index.vue'),
+ meta: {
+ title: 'datasourceEnv',
+ publicPage: true,
+ },
+ },
+ {
+ name: 'datasourceType',
+ path: 'datasourceType',
+ component: () =>
+ import('./module/datasourceType/index.vue'),
+ meta: {
+ title: 'datasourceType',
+ publicPage: true,
+ }
},
- }
+ {
+ name: 'EnginePluginManagement',
+ path: 'EnginePluginManagement',
+ component: () =>
+ import('./module/EnginePluginManagement/index.vue'),
+ meta: {
+ title: 'EnginePluginManagement',
+ publicPage: true,
+ },
+ }
],
},
]
diff --git a/linkis-web/src/apps/linkis/view/linkis/index.vue
b/linkis-web/src/apps/linkis/view/linkis/index.vue
index 641289efd..1c1c63176 100644
--- a/linkis-web/src/apps/linkis/view/linkis/index.vue
+++ b/linkis-web/src/apps/linkis/view/linkis/index.vue
@@ -103,7 +103,15 @@ export default {
{ key: '1-7', name:
this.$t('message.linkis.sideNavList.function.children.microserviceManage'),
path: '/console/microService' },
{ key: '1-9', name:
this.$t('message.linkis.sideNavList.function.children.udfFunctionTitle'), path:
'/console/urm/udfManagement'},
{ key: '1-8', name:
this.$t('message.linkis.sideNavList.function.children.dataSourceManage'), path:
'/console/dataSource' },
- { key: '1-10', name:
this.$t('message.linkis.sideNavList.function.children.EnginePluginManagement'),
path: '/console/EnginePluginManagement' },
+ { 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.gatewayAuthToken'), path:
'/console/gatewayAuthToken' },
+ { key: '1-12', name:
this.$t('message.linkis.sideNavList.function.children.rmExternalResourceProvider'),
path: '/console/rmExternalResourceProvider' },
+ { key: '1-13', name:
this.$t('message.linkis.sideNavList.function.children.udfManager'), path:
'/console/udfManager' },
+ { key: '1-14', name:
this.$t('message.linkis.sideNavList.function.children.udfTree'), path:
'/console/udfTree' },
+ { key: '1-15', name:
this.$t('message.linkis.sideNavList.function.children.datasourceAccess'), path:
'/console/datasourceAccess' },
+ { key: '1-16', name:
this.$t('message.linkis.sideNavList.function.children.datasourceEnv'), path:
'/console/datasourceEnv' },
+ { key: '1-17', name:
this.$t('message.linkis.sideNavList.function.children.datasourceType'), path:
'/console/datasourceType' },
+ { key: '1-18', name:
this.$t('message.linkis.sideNavList.function.children.EnginePluginManagement'),
path: '/console/EnginePluginManagement' },
],
},
urmSideNavList: {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]