You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by zh...@apache.org on 2023/02/12 06:07:43 UTC

[linkis] branch dev-1.3.2 updated: Add engine template for linkis web (#4047)

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

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


The following commit(s) were added to refs/heads/dev-1.3.2 by this push:
     new 1b904fedd Add engine template for linkis web (#4047)
1b904fedd is described below

commit 1b904fedd2d8e19892fab18278abbf691a1f7792
Author: Beacontownfc <89...@users.noreply.github.com>
AuthorDate: Sun Feb 12 14:07:35 2023 +0800

    Add engine template for linkis web (#4047)
    
    * Add engine template for linkis web
    
    * Add table horizontal scroll bart
    
    * Internationalization
    
    * add table selection
    
    * fix some bug
    
    * fix conflict
---
 linkis-web/src/apps/linkis/i18n/common/en.json     |  24 ++
 linkis-web/src/apps/linkis/i18n/common/zh.json     |  24 +-
 .../engineConfigurationTemplate/EditForm/index.vue | 278 ++++++++++++++++++
 .../module/engineConfigurationTemplate/index.js    |  25 ++
 .../module/engineConfigurationTemplate/index.vue   | 321 +++++++++++++++++++++
 .../module/engineConfigurationTemplate/service.js  |  49 ++++
 linkis-web/src/apps/linkis/router.js               |  10 +
 7 files changed, 730 insertions(+), 1 deletion(-)

diff --git a/linkis-web/src/apps/linkis/i18n/common/en.json b/linkis-web/src/apps/linkis/i18n/common/en.json
index 0797c58c0..5ed45f012 100644
--- a/linkis-web/src/apps/linkis/i18n/common/en.json
+++ b/linkis-web/src/apps/linkis/i18n/common/en.json
@@ -170,6 +170,7 @@
             "ipListManagement": "White List Management",
             "errorCode": "Error Manage",
             "gatewayAuthToken": "Token Manage",
+            "engineConfigurationTemplate": "Engine Configuration Template",
             "rmExternalResourceProvider": "External Resource Provider Manage",
             "udfManager": "UDF User Manage",
             "udfTree": "UDF Tree",
@@ -460,6 +461,29 @@
           "modalEditFail": "Edit failure"
         },
         "addUDFAdmin": "Add UDF administrator",
+        "engineConfigurationTemplate": {
+          "engineLabelId": "Engine Label Id",
+          "advanced": "Advanced",
+          "defaultValue": "Default Value",
+          "description": "Description",
+          "engineConnType": "Engine Type",
+          "key": "Key",
+          "level": "Level",
+          "name": "Name",
+          "treeName": "Tree Name",
+          "validateRange": "Validate Range",
+          "validateType": "Validate Type",
+          "hidden": "hidden",
+          "id": "ID",
+          "engineLabelList": "Engine Label List",
+          "yes": "yes",
+          "no": "no",
+          "delSuccess": "Deletion succeeded",
+          "delFail": "Deletion failed",
+          "ModSuccess": "Modification succeeded",
+          "ModFail": "Modification failed",
+          "edit": "edit"
+        },
         "gatewayAuthToken": {
           "tokenName": "Token Name",
           "legalUsers": "Legal Users",
diff --git a/linkis-web/src/apps/linkis/i18n/common/zh.json b/linkis-web/src/apps/linkis/i18n/common/zh.json
index cb6a97bdd..34a6109f4 100644
--- a/linkis-web/src/apps/linkis/i18n/common/zh.json
+++ b/linkis-web/src/apps/linkis/i18n/common/zh.json
@@ -178,7 +178,8 @@
                       "datasourceType": "数据源分类",
                       "EnginePluginManagement": "引擎物料管理",
                       "basedataManagement": "基础数据管理",
-                      "codeQuery": "代码检索"
+                      "codeQuery": "代码检索",
+                      "engineConfigurationTemplate": "引擎配置模板"
                   }
               }
           },
@@ -507,6 +508,27 @@
               "modifyUser": "更新者",
               "searchPlaceholder": "环境名称/环境描述/参数"
             },
+            "engineConfigurationTemplate": {
+              "engineLabelId": "引擎类型ID",
+              "advanced": "是否优先",
+              "defaultValue": "默认值",
+              "description": "描述",
+              "engineConnType": "引擎类型",
+              "key": "键值",
+              "level": "等级",
+              "name": "名称",
+              "treeName": "树名称",
+              "validateRange": "验证范围",
+              "validateType": "验证类型",
+              "hidden": "隐藏",
+              "id": "ID",
+              "engineLabelList": "引擎类型列表",
+              "yes": "是",
+              "no": "否",
+              "delSuccess": "删除成功",
+              "delFail": "删除失败",
+              "edit": "编辑"
+            },
             "datasourceType": {
               "name": "名称",
               "description": "描述",
diff --git a/linkis-web/src/apps/linkis/module/engineConfigurationTemplate/EditForm/index.vue b/linkis-web/src/apps/linkis/module/engineConfigurationTemplate/EditForm/index.vue
new file mode 100644
index 000000000..638a7c6c4
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/engineConfigurationTemplate/EditForm/index.vue
@@ -0,0 +1,278 @@
+<!--
+  ~ 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>
+import { cloneDeep } from 'lodash'
+export default {
+  props: {
+    mode: String,
+    data: Object,
+    typeOptions: Array
+  },
+  data() {
+    return {
+      keyToName: {},
+      formModel: {},
+      formData: {},
+      options: {
+        submitBtn: false,
+      },
+      rule: [
+        {
+          type: 'hidden',
+          title: "id",
+          field: 'id',
+          value: ''
+        },
+        {
+          type: "select",
+          field: "engineLabelId",
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.engineLabelId'),
+          value: 1,
+          options: [],
+          hidden: false,
+          validate: [
+            {
+              required: true,
+              type: 'number',
+              message: `${this.$t(
+                'message.linkis.datasource.pleaseInput'
+              )} `+this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.engineLabelId')
+            },
+          ],
+        },
+        {
+          type: 'input',
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.name'),
+          field: 'name',
+          value: '',
+          props: {
+            placeholder: "",
+          },
+          validate: [
+            {
+              required: true,
+              message: `${this.$t(
+                'message.linkis.datasource.pleaseInput'
+              )} `+this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.name'),
+              trigger: 'blur',
+            },
+          ],
+        },
+        {
+          type: 'input',
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.key'),
+          field: 'key',
+          value: '',
+          props: {
+            placeholder: "",
+          },
+          validate: [
+            {
+              required: true,
+              message: `${this.$t(
+                'message.linkis.datasource.pleaseInput'
+              )} `+this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.key'),
+              trigger: 'blur',
+            },
+          ],
+        },
+        {
+          type: 'input',
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.defaultValue'),
+          field: 'defaultValue',
+          value: '',
+          props: {
+            placeholder: "",
+          },
+          validate: [
+            {
+              required: true,
+              message: `${this.$t(
+                'message.linkis.datasource.pleaseInput'
+              )} `+this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.defaultValue'),
+              trigger: 'blur',
+            },
+          ],
+        },
+        {
+          type: 'input',
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.description'),
+          field: 'description',
+          value: '',
+          props: {
+            placeholder: "",
+          },
+          validate: [
+            {
+              required: true,
+              message: `${this.$t(
+                'message.linkis.datasource.pleaseInput'
+              )} `+this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.description'),
+              trigger: 'blur',
+            },
+          ],
+        },
+        {
+          type: "radio",
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.advanced'),
+          field: 'advanced',
+          value: '',
+          options: [
+            {value: 0, label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.no'),},
+            {value: 1, label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.yes'),},
+          ]
+        },
+        {
+          type: 'input',
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.engineConnType'),
+          field: 'engineConnType',
+          value: '',
+          props: {
+            placeholder: "",
+          },
+          validate: [
+            {
+              message: `${this.$t(
+                'message.linkis.datasource.pleaseInput'
+              )} `+this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.engineConnType'),
+              trigger: 'blur',
+            },
+          ],
+        },
+        {
+          type: "radio",
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.hidden'),
+          field: 'hidden',
+          value: '',
+          options: [
+            {value: 0, label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.no'),},
+            {value: 1, label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.yes'),},
+          ]
+        },
+        {
+          type: 'input',
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.level'),
+          field: 'level',
+          value: '',
+          props: {
+            placeholder: "",
+          },
+          validate: [
+            {
+              required: true,
+              message: `${this.$t(
+                'message.linkis.datasource.pleaseInput'
+              )} `+this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.level'),
+              trigger: 'blur',
+            },
+          ],
+        },
+        {
+          type: 'input',
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.validateRange'),
+          field: 'validateRange',
+          value: '',
+          props: {
+            placeholder: "",
+          },
+          validate: [
+            {
+              required: true,
+              message: `${this.$t(
+                'message.linkis.datasource.pleaseInput'
+              )} `+this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.validateRange'),
+              trigger: 'blur',
+            },
+          ],
+        },
+        {
+          type: 'input',
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.validateType'),
+          field: 'validateType',
+          value: '',
+          props: {
+            placeholder: "",
+          },
+          validate: [
+            {
+              required: true,
+              message: `${this.$t(
+                'message.linkis.datasource.pleaseInput'
+              )} `+this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.validateType'),
+              trigger: 'blur',
+            },
+          ],
+        },
+        {
+          type: 'input',
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.treeName'),
+          field: 'treeName',
+          value: '',
+          props: {
+            placeholder: "",
+          },
+          validate: [
+            {
+              required: true,
+              message: `${this.$t(
+                'message.linkis.datasource.pleaseInput'
+              )} `+this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.treeName'),
+              trigger: 'blur',
+            },
+          ],
+        }
+
+      ]
+    }
+  },
+  created() {
+    this.getData(this.data)
+  },
+  methods: {
+    getData(data){
+      this.formData = cloneDeep(data);
+    },
+  },
+  watch: {
+    data: {
+      handler(newV) {
+        this.getData(newV)
+        console.log(newV)
+      },
+      deep: true
+    },
+    formData: {
+      handler(){
+
+      },
+      deep: true
+    }
+  },
+}
+</script>
diff --git a/linkis-web/src/apps/linkis/module/engineConfigurationTemplate/index.js b/linkis-web/src/apps/linkis/module/engineConfigurationTemplate/index.js
new file mode 100644
index 000000000..d677bb94a
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/engineConfigurationTemplate/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/engineConfigurationTemplate/index.vue b/linkis-web/src/apps/linkis/module/engineConfigurationTemplate/index.vue
new file mode 100644
index 000000000..264dd91df
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/engineConfigurationTemplate/index.vue
@@ -0,0 +1,321 @@
+<!--
+  ~ 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 :style="{height: '100%', overflow: 'hidden'}">
+    <Row class="search-bar" type="flex">
+      <Col span="5">
+        <Card style="margin-right: 10px;">
+          <template #title>
+            {{$t('message.linkis.basedataManagement.engineConfigurationTemplate.engineLabelList')}}
+          </template>
+          <Menu width="auto" @on-select="queryEngineTemplateList">
+            <MenuItem v-for="item in engineList" :key="item.labelId" :name="item.labelId">
+              <Tag checkable color="success" v-if="item.install=='yes'">已安装</Tag>
+              <Tag checkable color="error" v-else>未安装</Tag>
+              {{item.engineName}}
+            </MenuItem>
+          </Menu>
+        </Card>
+      </Col>
+      <Col span="19">
+        <Card>
+          <Button type="success" class="enginBtn" @click="onTableEdit()">{{$t('message.linkis.basedataManagement.add')}}</Button>
+            <Select v-model="model" multiple :max-tag-count="2" style="width: 300px" class="enginBtn">
+              <Option v-for="item in showList" :value="item.value" :key="item.value">{{ item.label }}</Option>
+            </Select>
+          <Table stripe :columns="columns" :data="showInTableList" height="600">
+            <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.basedataManagement.edit') }}
+                </Button
+                >
+                <Button
+                  :disabled="row.expire"
+                  size="small"
+                  type="primary"
+                  @click="onTableDelete(row, index)"
+                >
+                  {{ $t('message.linkis.basedataManagement.remove') }}
+                </Button>
+              </ButtonGroup>
+            </template>
+          </Table>
+        </Card>
+      </Col>
+    </Row>
+    <Modal
+      width="800"
+      class="modal"
+      v-model="modalShow"
+      :title="editType == 'add' ? $t('message.linkis.basedataManagement.engineConfigurationTemplate.add') : $t('message.linkis.basedataManagement.engineConfigurationTemplate.edit')"
+    >
+      <div slot="footer">
+        <Button type="text" size="large" @click="onModalCancel()">{{$t('message.linkis.basedataManagement.modal.cancel')}}</Button>
+        <Button type="primary" size="large" @click="onModalOk()">{{$t('message.linkis.basedataManagement.modal.confirm')}}</Button>
+      </div>
+      <EditForm ref="editForm" :data="modalEditData"></EditForm>
+    </Modal>
+  </div>
+</template>
+<script>
+import mixin from '@/common/service/mixin';
+import EditForm from './EditForm/index'
+import {getEngineList, queryEngineByID, deleteTemplateByID, changeTemplate} from "./service";
+export default {
+  mixins: [mixin],
+  components: {EditForm},
+  created(){
+    getEngineList().then((data) => {
+      this.engineList = data['success: '];
+      console.log(this.engineList)
+    })
+    this.queryEngineTemplateList(this.labelId);
+  },
+  data(){
+    return {
+      editType: 'add',
+      modalEditData: {},
+      labelId: 5,
+      modalShow: false,
+      engineList: [],
+      engineTemplateList: [],
+      showInTableList: [],
+      showList: [
+        {
+          value: 'advanced',
+          label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.advanced'),
+        },
+        {
+          label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.defaultValue'),
+          value: 'defaultValue',
+        },
+        {
+          label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.description'),
+          value: 'description',
+        },
+        {
+          label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.engineConnType'),
+          value: 'engineConnType',
+        },
+        {
+          label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.hidden'),
+          value: 'hidden',
+        },
+        {
+          label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.key'),
+          value: 'key',
+        },
+        {
+          label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.level'),
+          value: 'level',
+        },
+        {
+          label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.name'),
+          value: 'name',
+        },
+        {
+          label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.treeName'),
+          value: 'treeName',
+        },
+        {
+          label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.validateRange'),
+          value: 'validateRange',
+        },
+        {
+          label: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.validateType'),
+          value: 'validateType',
+        }
+      ],
+      model: ['defaultValue','description','engineConnType','key','name','validateRange','validateType'],
+      tableColumnNum: [
+        {
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.advanced'),
+          key: 'advanced',
+          width: 100,
+          tooltip: true,
+          align: 'center',
+        },
+        {
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.defaultValue'),
+          key: 'defaultValue',
+          width: 100,
+          tooltip: true,
+          align: 'center',
+        },
+        {
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.description'),
+          key: 'description',
+          tooltip: true,
+          width: 300,
+          align: 'center',
+        },
+        {
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.engineConnType'),
+          key: 'engineConnType',
+          tooltip: true,
+          width: 100,
+          align: 'center',
+        },
+        {
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.hidden'),
+          key: 'hidden',
+          tooltip: true,
+          width: 100,
+          align: 'center',
+        },
+        /*{
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.id'),
+          key: 'id',
+          tooltip: true,
+          align: 'center',
+        },*/
+        {
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.key'),
+          key: 'key',
+          tooltip: true,
+          width: 300,
+          align: 'center',
+        },
+        {
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.level'),
+          key: 'level',
+          tooltip: true,
+          width: 100,
+          align: 'center',
+        },
+        {
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.name'),
+          key: 'name',
+          tooltip: true,
+          width: 200,
+          align: 'center',
+        },
+        {
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.treeName'),
+          key: 'treeName',
+          tooltip: true,
+          width: 200,
+          align: 'center',
+        },
+        {
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.validateRange'),
+          key: 'validateRange',
+          tooltip: true,
+          width: 300,
+          align: 'center',
+        },
+        {
+          title: this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.validateType'),
+          key: 'validateType',
+          tooltip: true,
+          width: 100,
+          align: 'center',
+        },
+        {
+          title: this.$t('message.linkis.basedataManagement.action'),
+          key: "action",
+          width: 150,
+          slot: 'action',
+          align: 'center',
+        },
+      ],
+      copyList: []
+    }
+  },
+  computed: {
+    columns(){
+      return this.tableColumnNum.filter(ele => {
+        return this.model.includes(ele.key);
+      }).concat([this.tableColumnNum[this.tableColumnNum.length - 1]]);
+    }
+  },
+  methods: {
+    handleOpen () {
+      this.visible = true;
+    },
+    handleClose () {
+      this.visible = false;
+    },
+    queryEngineTemplateList(labelId){
+      this.labelId = labelId;
+      queryEngineByID(labelId).then((data) => {
+        this.engineTemplateList = data['success: '];
+        this.convertTableData();
+      })
+    },
+    onTableDelete(row){
+      deleteTemplateByID(row.id).then((data) => {
+        if(data['success: ']) {this.$Message.success(this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.delSuccess')); this.queryEngineTemplateList(this.labelId);}
+        else this.$Message.error(this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.delFail'));
+      });
+    },
+    onTableEdit(row){
+      if(!row) {row = {}; this.editType = 'add';}
+      else {row.engineLabelId = this.labelId; this.editType = 'edit';}
+      this.engineList.forEach(ele => {
+        return this.$refs.editForm.rule[1].options.push({value: +ele.labelId, label: ele.engineName});
+      })
+      this.modalShow = true;
+      let tmp = this.engineTemplateList.find(ele => ele.id == row.id);
+      tmp.engineLabelId = this.labelId;
+      this.modalEditData = {...tmp};
+    },
+    onModalOk(){
+      //console.log(this.$refs['editForm'].formData);
+      this.modalShow = false;
+      changeTemplate(this.$refs['editForm'].formData, this.editType).then((data) => {
+        if(data['success: ']) {this.$Message.success('message.linkis.basedataManagement.engineConfigurationTemplate.ModSuccess'); this.queryEngineTemplateList(this.labelId);}
+        else this.$Message.error('message.linkis.basedataManagement.engineConfigurationTemplate.ModSuccess');
+      });
+    },
+    onModalCancel(){
+      this.modalShow = false;
+    },
+    convertTableData(){
+      this.showInTableList = [];
+      this.engineTemplateList.forEach(ele => {
+        let tmp = {...ele};
+        tmp.hidden = tmp.hidden == 0 ? this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.no') : this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.yes')
+        tmp.advanced = tmp.advanced == 0 ? this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.no') : this.$t('message.linkis.basedataManagement.engineConfigurationTemplate.yes')
+        this.showInTableList.push(tmp);
+      })
+    }
+  }
+};
+</script>
+
+
+<style lang="scss">
+.drowdownItem{
+  padding: 10px;
+  cursor: pointer;
+}
+.drowdownItem:hover{
+  background-color: #e8eaec;
+}
+
+.enginBtn{
+  margin-right: 10px;
+  margin-bottom: 10px;
+}
+</style>
diff --git a/linkis-web/src/apps/linkis/module/engineConfigurationTemplate/service.js b/linkis-web/src/apps/linkis/module/engineConfigurationTemplate/service.js
new file mode 100644
index 000000000..2303a5f18
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/engineConfigurationTemplate/service.js
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import api from '@/common/service/api';
+
+const dataSourceEnvBaseUrl = '/basedata-manager/configuration-template'
+
+const getEngineList = ()=> {
+  //console.log(params)
+  return api.fetch(dataSourceEnvBaseUrl + '/engin-list', 'get')
+}
+
+const queryEngineByID = (labelId) => {
+  return api.fetch(dataSourceEnvBaseUrl + '/template-list-by-label', {engineLabelId: labelId} , 'get')
+}
+
+const deleteTemplateByID = (keyID) => {
+  return api.fetch(dataSourceEnvBaseUrl + `/${keyID}`, 'delete')
+}
+
+const changeTemplate = (params, editType) => {
+  let postData = {...params};
+  delete postData['_index'];
+  delete postData['_rowKey'];
+  delete postData['__ob__'];
+  if(editType == 'add') delete postData['id'];
+  return api.fetch(dataSourceEnvBaseUrl + '/save', postData, 'post')
+}
+
+export{
+  getEngineList,
+  queryEngineByID,
+  deleteTemplateByID,
+  changeTemplate
+}
diff --git a/linkis-web/src/apps/linkis/router.js b/linkis-web/src/apps/linkis/router.js
index e644f97ef..991e4bf25 100644
--- a/linkis-web/src/apps/linkis/router.js
+++ b/linkis-web/src/apps/linkis/router.js
@@ -198,6 +198,16 @@ export default [
         publicPage: true,
       },
     },
+    {
+      name: 'engineConfigurationTemplate',
+      path: 'engineConfigurationTemplate',
+      component: () =>
+        import('./module/engineConfigurationTemplate/index.vue'),
+      meta: {
+        title: 'engineConfigurationTemplate',
+        publicPage: true,
+      },
+    },
     {
       name: 'rmExternalResourceProvider',
       path: 'rmExternalResourceProvider',


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