Bläddra i källkod

:sparkles: 添加新特性: 租户管理

pigxcloud 6 år sedan
förälder
incheckning
00cd07edc0

+ 56 - 0
src/api/admin/tenant.js

@@ -0,0 +1,56 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+import request from '@/router/axios'
+
+export function fetchList(query) {
+  return request({
+    url: '/admin/tenant/page',
+    method: 'get',
+    params: query
+  })
+}
+
+export function addObj(obj) {
+  return request({
+    url: '/admin/tenant',
+    method: 'post',
+    data: obj
+  })
+}
+
+export function getObj(id) {
+  return request({
+    url: '/admin/tenant/' + id,
+    method: 'get'
+  })
+}
+
+export function delObj(id) {
+  return request({
+    url: '/admin/tenant/' + id,
+    method: 'delete'
+  })
+}
+
+export function putObj(obj) {
+  return request({
+    url: '/admin/tenant',
+    method: 'put',
+    data: obj
+  })
+}

+ 1 - 1
src/config/env.js

@@ -3,7 +3,7 @@
 const env = process.env
 let baseUrl = ''
 // 图表库为avue和pig2套地址
-let iconfontVersion = ['567566_qo5lxgtishg', '667895_92fjyfrcqpr']
+let iconfontVersion = ['567566_qo5lxgtishg', '667895_q0o1zivh0e']
 let iconfontUrl = `//at.alicdn.com/t/font_$key.css`
 let codeUrl = `${window.location.origin}/code`
 let actUrl = `${window.location.origin}/act/modeler.html?modelId=`

+ 8 - 0
src/const/crud/admin/dict.js

@@ -41,6 +41,14 @@ export const tableOption = {
       message: '请输入字典描述',
       trigger: 'blur'
     }]
+  }, {
+    label: '字典类型',
+    prop: 'system',
+    type: 'select',
+    dicUrl: '/admin/dict/type/dict_type',
+    addVisdiplay: false,
+    editVisdiplay: false,
+    search: true
   }, {
     label: '备注信息',
     prop: 'remarks'

+ 8 - 9
src/const/crud/admin/sys-public-param.js

@@ -65,21 +65,20 @@ export const tableOption = {
       prop: 'validateCode',
     },
     {
-      width: 150,
-      label: '创建时间',
-      prop: 'createTime',
-      type: 'datetime',
+      label: '作用',
+      prop: 'system',
+      type: 'select',
+      dicUrl: '/admin/dict/type/dict_type',
       addVisdiplay: false,
-      editDisabled: true,
-      format: 'yyyy-MM-dd HH:mm',
-      valueFormat: 'yyyy-MM-dd HH:mm:ss'
+      editVisdiplay: false,
+      search: true
     },
     {
       label: '状态',
-      prop: 'delFlag',
+      prop: 'status',
       width: 80,
       type: 'select',
-      dicUrl: '/admin/dict/type/log_type'
+      dicUrl: '/admin/dict/type/status_type'
     },
     {
       label: '类型',

+ 83 - 0
src/const/crud/admin/tenant.js

@@ -0,0 +1,83 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+export const tableOption = {
+  border: true,
+  index: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  align: 'center',
+  column: [
+    {
+      label: '租户id',
+      prop: 'id',
+      hide: true,
+      editDisabled: true,
+      addVisdiplay: false
+    },
+    {
+      label: '租户名称',
+      prop: 'name',
+      rules: [{
+        required: true,
+        message: '请输入租户名称',
+        trigger: 'blur'
+      }]
+    },
+    {
+      label: '租户编号',
+      prop: 'code',
+      rules: [{
+        required: true,
+        message: '请输入租户编号',
+        trigger: 'blur'
+      }]
+    },
+    {
+      label: '开始时间',
+      prop: 'startTime',
+      type: 'datetime',
+      format: 'yyyy-MM-dd',
+      valueFormat: 'yyyy-MM-dd',
+      rules: [{
+        required: true,
+        message: '请输入结束时间',
+        trigger: 'blur'
+      }]
+    },
+    {
+      label: '结束时间',
+      prop: 'endTime',
+      type: 'datetime',
+      format: 'yyyy-MM-dd',
+      valueFormat: 'yyyy-MM-dd',
+      rules: [{
+        required: true,
+        message: '请输入结束时间',
+        trigger: 'blur'
+      }]
+    },
+    {
+      label: '状态',
+      prop: 'status',
+      type: 'select',
+      dicUrl: '/admin/dict/type/status_type',
+      search: true
+    }
+  ]
+}

+ 2 - 1
src/const/iconList.js

@@ -29,7 +29,8 @@ export default [
       "icon-weixincaidan",
       "icon-xiaoxiguanli",
       "icon-zhexiantu",
-      "icon-canshu"
+      "icon-canshu",
+      "icon-erji-zuhushouye"
     ]
   }
 ]

+ 13 - 3
src/page/login/index.vue

@@ -22,8 +22,7 @@
               @change="handleCommand"
               placeholder="点击请选择租户"
               size="mini">
-              <el-option label="租户1 用户登录" value="1"></el-option>
-              <el-option label="租户2 用户登录" value="2"></el-option>
+              <el-option  :key="tenant.id" :label="tenant.name" :value="tenant.id" v-for="tenant in tenantList"/>
             </el-select>
           </h4>
           <userLogin v-if="activeName==='user'"></userLogin>
@@ -45,6 +44,7 @@
   </div>
 </template>
 <script>
+  import request from '@/router/axios'
   import userLogin from "./userlogin";
   import codeLogin from "./codelogin";
   import thirdLogin from "./thirdlogin";
@@ -64,6 +64,7 @@
     },
     data() {
       return {
+        tenantList:[],
         time: "",
         active: "",
         activeName: "user",
@@ -97,6 +98,7 @@
       }
     },
     created() {
+      this.getTenantList()
       this.active = getStore({name: "tenantId"});
       this.getTime();
       setInterval(() => {
@@ -106,7 +108,7 @@
     mounted() {
     },
     computed: {
-      ...mapGetters(["website",'tagWel'])
+      ...mapGetters(["website", 'tagWel'])
     },
     props: [],
     methods: {
@@ -115,6 +117,14 @@
       },
       getTime() {
         this.time = dateFormat(new Date());
+      },
+      getTenantList() {
+        request({
+          url: '/admin/tenant/list',
+          method: 'get'
+        }).then(response => {
+          this.tenantList = response.data.data
+        })
       }
     }
   };

+ 2 - 2
src/views/admin/dict/index.vue

@@ -155,7 +155,7 @@
        *
        **/
       handleUpdate: function (row, index, done) {
-        putObj(row).then(() => {
+        putObj(this.filterForm(row)).then(() => {
           this.tableData.splice(index, 1, Object.assign({}, row))
           this.$message({
             showClose: true,
@@ -173,7 +173,7 @@
        *
        **/
       handleSave: function (row, done) {
-        addObj(row).then(() => {
+        addObj(this.filterForm(row)).then(() => {
           this.tableData.push(Object.assign({}, row))
           this.$message({
             showClose: true,

+ 5 - 15
src/views/admin/param/index.vue

@@ -35,21 +35,11 @@
 </template>
 
 <script>
-    import {
-        fetchList,
-        getObj,
-        addObj,
-        putObj,
-        delObj
-    } from '@/api/admin/sys-public-param'
-    import {
-        tableOption
-    } from '@/const/crud/admin/sys-public-param'
-    import {
-        mapGetters
-    } from 'vuex'
+  import {addObj, delObj, fetchList, putObj} from '@/api/admin/sys-public-param'
+  import {tableOption} from '@/const/crud/admin/sys-public-param'
+  import {mapGetters} from 'vuex'
 
-    export default {
+  export default {
         name: 'syspublicparam',
         data() {
             return {
@@ -133,7 +123,7 @@
        *
        **/
       handleSave: function(row, done) {
-        addObj(row).then(data => {
+        addObj(this.filterForm(row)).then(data => {
           this.tableData.push(Object.assign({}, row))
           this.$message({
             showClose: true,

+ 156 - 0
src/views/admin/tenant/index.vue

@@ -0,0 +1,156 @@
+<!--
+  -    Copyright (c) 2018-2025, lengleng All rights reserved.
+  -
+  - Redistribution and use in source and binary forms, with or without
+  - modification, are permitted provided that the following conditions are met:
+  -
+  - Redistributions of source code must retain the above copyright notice,
+  - this list of conditions and the following disclaimer.
+  - Redistributions in binary form must reproduce the above copyright
+  - notice, this list of conditions and the following disclaimer in the
+  - documentation and/or other materials provided with the distribution.
+  - Neither the name of the pig4cloud.com developer nor the names of its
+  - contributors may be used to endorse or promote products derived from
+  - this software without specific prior written permission.
+  - Author: lengleng (wangiegie@gmail.com)
+  -->
+<template>
+  <div class="execution">
+    <basic-container>
+      <avue-crud ref="crud"
+                 :page="page"
+                 :data="tableData"
+                 :permission="permissionList"
+                 :table-loading="tableLoading"
+                 :option="tableOption"
+                 @on-load="getList"
+                 @search-change="searchChange"
+                 @refresh-change="refreshChange"
+                 @row-update="handleUpdate"
+                 @row-save="handleSave"
+                 @row-del="rowDel">
+      </avue-crud>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+  import {addObj, delObj, fetchList, putObj} from '@/api/admin/tenant'
+  import {tableOption} from '@/const/crud/admin/tenant'
+  import {mapGetters} from 'vuex'
+
+  export default {
+    name: 'tenant',
+    data() {
+      return {
+        tableData: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20 // 每页显示多少条
+        },
+        tableLoading: false,
+        tableOption: tableOption
+      }
+    },
+    computed: {
+      ...mapGetters(['permissions']),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permissions.admin_systenant_add, false),
+          delBtn: this.vaildData(this.permissions.admin_systenant_del, false),
+          editBtn: this.vaildData(this.permissions.admin_systenant_edit, false)
+        };
+      }
+    },
+    methods: {
+      getList(page, params) {
+        this.tableLoading = true
+        fetchList(Object.assign({
+          current: page.currentPage,
+          size: page.pageSize
+        }, params)).then(response => {
+          this.tableData = response.data.data.records
+          this.page.total = response.data.data.total
+          this.tableLoading = false
+        }).catch(() => {
+          this.tableLoading = false
+        })
+      },
+      rowDel: function (row, index) {
+        var _this = this
+        this.$confirm('是否确认删除ID为' + row.id, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function () {
+          return delObj(row.id)
+        }).then(data => {
+          _this.tableData.splice(index, 1)
+          _this.$message({
+            showClose: true,
+            message: '删除成功',
+            type: 'success'
+          })
+          this.getList(this.page)
+        })
+      },
+      /**
+       * @title 数据更新
+       * @param row 为当前的数据
+       * @param index 为当前更新数据的行数
+       * @param done 为表单关闭函数
+       *
+       **/
+      handleUpdate: function (row, index, done, loading) {
+        putObj(row).then(data => {
+          this.tableData.splice(index, 1, Object.assign({}, row))
+          this.$message({
+            showClose: true,
+            message: '修改成功',
+            type: 'success'
+          })
+          done()
+          this.getList(this.page)
+        }).catch(() => {
+          loading();
+        });
+      },
+      /**
+       * @title 数据添加
+       * @param row 为当前的数据
+       * @param done 为表单关闭函数
+       *
+       **/
+      handleSave: function (row, done, loading) {
+        addObj(row).then(data => {
+          this.tableData.push(Object.assign({}, row))
+          this.$message({
+            showClose: true,
+            message: '添加成功',
+            type: 'success'
+          })
+          done()
+          this.getList(this.page)
+        }).catch(() => {
+          loading();
+        });
+      },
+      /**
+       * 搜索回调
+       */
+      searchChange(form) {
+        this.getList(this.page, this.filterForm(form))
+      },
+      /**
+       * 刷新回调
+       */
+      refreshChange() {
+        this.getList(this.page)
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 49 - 59
src/views/monitor/redis/index.vue

@@ -1,35 +1,25 @@
 <template>
   <basic-container>
-    <el-tabs type="card" v-model="activeName">
-      <el-tab-pane label="缓存监控" name="first">
-        <el-row :span="24">
-          <el-col :span="12">
-            <v-chart :options="useKeyCumulate"/>
-          </el-col>
-          <el-col :span="12">
-            <avue-data-display :option="infomationCumulate"/>
-          </el-col>
-        </el-row>
-        <el-row :span="24">
-          <el-col :span="12">
-            <v-chart :options="memoryCumulate"/>
-          </el-col>
-          <el-col :span="12">
-            <v-chart :options="dbSizeCumulate"/>
-          </el-col>
-        </el-row>
-      </el-tab-pane>
-      <el-tab-pane label="命令行终端" name="second">
-        <el-row :span="24">
-          <terminal/>
-        </el-row>
-      </el-tab-pane>
-    </el-tabs>
+    <el-row :span="24">
+      <el-col :span="12">
+        <v-chart :options="useKeyCumulate"/>
+      </el-col>
+      <el-col :span="12">
+        <avue-data-display :option="infomationCumulate"/>
+      </el-col>
+    </el-row>
+    <el-row :span="24">
+      <el-col :span="12">
+        <v-chart :options="memoryCumulate"/>
+      </el-col>
+      <el-col :span="12">
+        <v-chart :options="dbSizeCumulate"/>
+      </el-col>
+    </el-row>
   </basic-container>
 </template>
 
 <script>
-  import Terminal from './terminal'
   import ECharts from 'vue-echarts'
   import 'echarts/lib/chart/line'
   import 'echarts/lib/chart/pie'
@@ -44,7 +34,6 @@
 
   export default {
     components: {
-      Terminal,
       'v-chart': ECharts
     },
 
@@ -280,43 +269,44 @@
       this.useKeyCumulate.backgroundColor.image = bgPatternImg
       this.useKeyCumulate.series[0].itemStyle.normal.color.image = piePatternImg
       this.getInfo()
+      clearInterval(this.timer)
+      this.timer = setInterval(() => {
+        this.getInfo()
+      }, 3000);
     },
     methods: {
       getInfo: function () {
-        clearInterval(this.timer)
-        this.timer = setInterval(() => {
-          fetchInfo().then(response => {
-            this.memoryCumulate.series[0].data.push(parseFloat(response.data.data.info.used_memory_human))
-            this.memoryCumulate.series[1].data.push(parseFloat(response.data.data.info.used_memory_peak_human))
-            this.memoryCumulate.xAxis.data.push(response.data.data.time)
-            this.dbSizeCumulate.series[0].data.push(parseInt(response.data.data.dbSize))
-            this.dbSizeCumulate.xAxis.data.push(response.data.data.time)
-            this.useKeyCumulate.series[0].data = response.data.data.commandStats
+        fetchInfo().then(response => {
+          this.memoryCumulate.series[0].data.push(parseFloat(response.data.data.info.used_memory_human))
+          this.memoryCumulate.series[1].data.push(parseFloat(response.data.data.info.used_memory_peak_human))
+          this.memoryCumulate.xAxis.data.push(response.data.data.time)
+          this.dbSizeCumulate.series[0].data.push(parseInt(response.data.data.dbSize))
+          this.dbSizeCumulate.xAxis.data.push(response.data.data.time)
+          this.useKeyCumulate.series[0].data = response.data.data.commandStats
 
-            // infomation
-            this.infomationCumulate.data[0].count = response.data.data.info.redis_version
-            this.infomationCumulate.data[1].count = response.data.data.info.redis_mode
-            this.infomationCumulate.data[2].count = response.data.data.info.tcp_port
-            this.infomationCumulate.data[3].count = response.data.data.info.connected_clients
-            this.infomationCumulate.data[4].count = response.data.data.info.uptime_in_seconds
-            this.infomationCumulate.data[5].count = response.data.data.info.uptime_in_days
-            this.infomationCumulate.data[6].count = response.data.data.info.maxmemory
-            this.infomationCumulate.data[7].count = response.data.data.info.maxmemory_human
-            this.infomationCumulate.data[8].count = response.data.data.info.aof_enabled
-            this.infomationCumulate.data[9].count = response.data.data.info.rdb_last_bgsave_status
-            this.infomationCumulate.data[10].count = response.data.data.info.instantaneous_input_kbps + "kps"
-            this.infomationCumulate.data[11].count = response.data.data.info.instantaneous_output_kbps + "kps"
+          // infomation
+          this.infomationCumulate.data[0].count = response.data.data.info.redis_version
+          this.infomationCumulate.data[1].count = response.data.data.info.redis_mode
+          this.infomationCumulate.data[2].count = response.data.data.info.tcp_port
+          this.infomationCumulate.data[3].count = response.data.data.info.connected_clients
+          this.infomationCumulate.data[4].count = response.data.data.info.uptime_in_seconds
+          this.infomationCumulate.data[5].count = response.data.data.info.uptime_in_days
+          this.infomationCumulate.data[6].count = response.data.data.info.maxmemory
+          this.infomationCumulate.data[7].count = response.data.data.info.maxmemory_human
+          this.infomationCumulate.data[8].count = response.data.data.info.aof_enabled
+          this.infomationCumulate.data[9].count = response.data.data.info.rdb_last_bgsave_status
+          this.infomationCumulate.data[10].count = response.data.data.info.instantaneous_input_kbps + "kps"
+          this.infomationCumulate.data[11].count = response.data.data.info.instantaneous_output_kbps + "kps"
 
-            // 删除第一个元素
-            if (this.memoryCumulate.series[0].data.length > 7) {
-              this.memoryCumulate.series[0].data.shift()
-              this.memoryCumulate.series[1].data.shift()
-              this.dbSizeCumulate.series[0].data.shift()
-              this.memoryCumulate.xAxis.data.shift()
-              this.dbSizeCumulate.xAxis.data.shift()
-            }
-          })
-        }, 3000);
+          // 删除第一个元素
+          if (this.memoryCumulate.series[0].data.length > 7) {
+            this.memoryCumulate.series[0].data.shift()
+            this.memoryCumulate.series[1].data.shift()
+            this.dbSizeCumulate.series[0].data.shift()
+            this.memoryCumulate.xAxis.data.shift()
+            this.dbSizeCumulate.xAxis.data.shift()
+          }
+        })
       }
     }
   }

+ 0 - 165
src/views/monitor/redis/terminal.vue

@@ -1,165 +0,0 @@
-<template>
-  <vue-terminal style="width:50%;height:1000px;margin:0 auto"
-                :task-list="taskList"
-                :command-list="commandList"
-                title="redis-cli"
-                :greeting="greeting"
-                :prompt="prompt"
-                :showHelpMessage="showHelpMessage"
-                :unknownCommandMessage="unknownCommandMessage"
-                :showInitialCd="showInitialCd"
-  />
-</template>
-
-<script>
-  import VueTerminal from 'vue-terminal';
-  import {fetchExec} from '@/api/monitor/monitor'
-
-  export default {
-    name: "terminal",
-    components: {VueTerminal},
-    data: function () {
-      return {
-        greeting: '欢迎使用pigx redis-cli',
-        prompt: 'pigx-redis:6379>',
-        showInitialCd: false,
-        showHelpMessage: false,
-        unknownCommandMessage: {
-          type: 'error',
-          label: 'Error',
-          message: '不支持该命令,输出help 查看支持列表'
-        },
-        taskList: {
-          get: {
-            description: 'Get the value of a key | get key',
-            get(pushToList, input) {
-              const p = new Promise(resolve => {
-                fetchExec(Object.assign({
-                  command: input,
-                })).then((response) => {
-                  resolve({type: response.data.msg, label: response.data.msg, message: response.data.data})
-                })
-              })
-              return p
-            }
-          },
-          hget: {
-            description: 'Get the value of a hash field | hget key field',
-            hget(pushToList, input) {
-              const p = new Promise(resolve => {
-                fetchExec(Object.assign({
-                  command: input,
-                })).then((response) => {
-                  resolve({type: response.data.msg, label: response.data.msg, message: response.data.data})
-                })
-              })
-              return p
-            }
-          },
-          hgetall: {
-            description: 'Get all the fields and values in a hash | hgetall key',
-            hgetall(pushToList, input) {
-              const p = new Promise(resolve => {
-                fetchExec(Object.assign({
-                  command: input,
-                })).then((response) => {
-                  resolve({type: response.data.msg, label: response.data.msg, message: response.data.data})
-                })
-              })
-              return p
-            }
-          },
-          lrange: {
-            description: 'Get a range of elements from a list | lrange key start end',
-            lrange(pushToList, input) {
-              const p = new Promise(resolve => {
-                fetchExec(Object.assign({
-                  command: input,
-                })).then((response) => {
-                  resolve({type: response.data.msg, label: response.data.msg, message: response.data.data})
-                })
-              })
-              return p
-            }
-          },
-          llen: {
-            description: 'Get the length of a list | llen key',
-            llen(pushToList, input) {
-              const p = new Promise(resolve => {
-                fetchExec(Object.assign({
-                  command: input,
-                })).then((response) => {
-                  resolve({type: response.data.msg, label: response.data.msg, message: response.data.data})
-                })
-              })
-              return p
-            }
-          },
-          scan: {
-            description: 'Incrementally iterate the keys space | scan index ',
-            ttl(pushToList, input) {
-              const p = new Promise(resolve => {
-                fetchExec(Object.assign({
-                  command: input,
-                })).then((response) => {
-                  resolve({type: response.data.msg, label: response.data.msg, message: response.data.data})
-                })
-              })
-              return p
-            }
-          },
-          ttl: {
-            description: 'Get the time to live for a key | ttl key',
-            ttl(pushToList, input) {
-              const p = new Promise(resolve => {
-                fetchExec(Object.assign({
-                  command: input,
-                })).then((response) => {
-                  resolve({type: response.data.msg, label: response.data.msg, message: response.data.data})
-                })
-              })
-              return p
-            }
-          },
-          dbsize: {
-            description: 'Return the number of keys in the selected database',
-            dbsize(pushToList, input) {
-              const p = new Promise(resolve => {
-                fetchExec(Object.assign({
-                  command: input,
-                })).then((response) => {
-                  resolve({type: response.data.msg, label: response.data.msg, message: response.data.data})
-                })
-              })
-              return p
-            }
-          },
-          defaultTask: {
-            description: '默认任务,系统内置',
-            defaultTask() {
-              const p = new Promise(resolve => {
-                resolve({type: 'success', label: 'Success', message: '详细使用请输入 help'})
-              })
-              return p
-            }
-          }
-        },
-        commandList: {
-          desc: {
-            description: '命令行特别说明',
-            messages: [
-              {message: 'web 端目前只开发查询类功能,避免安全问题,更多信息联系DBA操作'}
-            ]
-          }
-        }
-      }
-    },
-    methods: {
-      exec: function (input) {
-        fetchList(Object.assign({
-          command: input,
-        }))
-      }
-    }
-  }
-</script>

+ 2 - 2
vue.config.js

@@ -49,11 +49,11 @@ module.exports = {
           '^/code': '/code'
         }
       },
-      '/code': {
+      '/gen': {
         target: url,
         ws: true,
         pathRewrite: {
-          '^/code': '/code'
+          '^/gen': '/gen'
         }
       },
       '/actuator': {