You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by kr...@apache.org on 2022/11/13 08:07:20 UTC
[incubator-streampark] branch dev updated: [improve] variable page improvement (#2013)
This is an automated email from the ASF dual-hosted git repository.
kriszu pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new 49dea9de0 [improve] variable page improvement (#2013)
49dea9de0 is described below
commit 49dea9de0ae61f7eac09fb0ce83db1fec71fd34e
Author: benjobs <be...@apache.org>
AuthorDate: Sun Nov 13 16:07:14 2022 +0800
[improve] variable page improvement (#2013)
---
.../src/assembly/script/data/mysql-data.sql | 4 ++--
.../src/assembly/script/data/pgsql-data.sql | 4 ++--
.../src/assembly/script/upgrade/mysql/1.2.4.sql | 4 ++--
.../src/main/resources/db/data-h2.sql | 4 ++--
.../variable.ts => flink/variable/index.ts} | 3 +--
.../variable}/model/variableModel.ts | 7 ++++++
.../src/locales/lang/en/flink/app.ts | 2 +-
.../locales/lang/en/{system => flink}/variable.ts | 0
.../src/locales/lang/zh-CN/flink/app.ts | 2 +-
.../lang/zh-CN/{system => flink}/variable.ts | 0
.../src/router/constant.ts | 2 +-
.../src/views/flink/app/components/FlinkSql.vue | 21 +++++++++--------
.../src/views/flink/app/components/ProgramArgs.vue | 27 ++++++++++------------
.../src/views/flink/app/hooks/useAppTableAction.ts | 26 ++++++++++-----------
.../flink/app/hooks/useCreateAndEditSchema.ts | 2 +-
.../src/views/flink/app/styles/Add.less | 2 ++
.../{system => flink}/variable/DependApps.vue | 10 ++++----
.../src/views/{system => flink}/variable/View.vue | 20 ++++++++--------
.../variable/components/VariableDrawer.vue | 24 +++++++++----------
.../variable/components/VariableInfo.vue | 2 +-
.../{system => flink}/variable/variable.data.ts | 10 ++++----
21 files changed, 91 insertions(+), 85 deletions(-)
diff --git a/streampark-console/streampark-console-service/src/assembly/script/data/mysql-data.sql b/streampark-console/streampark-console-service/src/assembly/script/data/mysql-data.sql
index a263e424e..39bf64997 100644
--- a/streampark-console/streampark-console-service/src/assembly/script/data/mysql-data.sql
+++ b/streampark-console/streampark-console-service/src/assembly/script/data/mysql-data.sql
@@ -102,11 +102,11 @@ insert into `t_menu` values (100050, 100048, 'update', null, null, 'member:updat
insert into `t_menu` values (100051, 100048, 'delete', null, null, 'member:delete', null, '1', 1, null, now(), now());
insert into `t_menu` values (100052, 100048, 'role view', null, null, 'role:view', null, '1', 1, null, now(), now());
insert into `t_menu` values (100053, 100001, 'types', null, null, 'user:types', null, '1', 1, null, now(), now());
-insert into `t_menu` values (100054, 100013, 'Variable', '/system/variable', 'system/variable/View', null, 'code', '0', 1, 3, now(), now());
+insert into `t_menu` values (100054, 100013, 'Variable', '/flink/variable', 'flink/variable/View', null, 'code', '0', 1, 3, now(), now());
insert into `t_menu` values (100055, 100054, 'add', NULL, NULL, 'variable:add', NULL, '1', 1, NULL, now(), now());
insert into `t_menu` values (100056, 100054, 'update', NULL, NULL, 'variable:update', NULL, '1', 1, NULL, now(), now());
insert into `t_menu` values (100057, 100054, 'delete', NULL, NULL, 'variable:delete', NULL, '1', 1, NULL, now(), now());
-insert into `t_menu` values (100058, 100054, 'depend apps', '/system/variable/depend_apps', 'system/variable/DependApps', 'variable:depend_apps', '', '0', 0, NULL, now(), now());
+insert into `t_menu` values (100058, 100054, 'depend apps', '/flink/variable/depend_apps', 'flink/variable/DependApps', 'variable:depend_apps', '', '0', 0, NULL, now(), now());
insert into `t_menu` values (100059, 100054, 'show original', NULL, NULL, 'variable:show_original', NULL, '1', 1, NULL, now(), now());
insert into `t_menu` values (100060, 100001, 'view', null, null, 'user:view', null, '1', 1, null, now(), now());
insert into `t_menu` values (100061, 100038, 'view', null, null, 'token:view', null, '1', 1, null, now(), now());
diff --git a/streampark-console/streampark-console-service/src/assembly/script/data/pgsql-data.sql b/streampark-console/streampark-console-service/src/assembly/script/data/pgsql-data.sql
index 65f42d17e..6f45172fe 100644
--- a/streampark-console/streampark-console-service/src/assembly/script/data/pgsql-data.sql
+++ b/streampark-console/streampark-console-service/src/assembly/script/data/pgsql-data.sql
@@ -98,11 +98,11 @@ insert into "public"."t_menu" values (100050, 100048, 'update', null, null, 'mem
insert into "public"."t_menu" values (100051, 100048, 'delete', null, null, 'member:delete', null, '1', 1, null, now(), now());
insert into "public"."t_menu" values (100052, 100048, 'role view', null, null, 'role:view', null, '1', 1, null, now(), now());
insert into "public"."t_menu" values (100053, 100001, 'types', null, null, 'user:types', null, '1', 1, null, now(), now());
-insert into "public"."t_menu" values (100054, 100013, 'Variable', '/system/variable', 'system/variable/View', null, 'code', '0', 1, 3, now(), now());
+insert into "public"."t_menu" values (100054, 100013, 'Variable', '/flink/variable', 'flink/variable/View', null, 'code', '0', 1, 3, now(), now());
insert into "public"."t_menu" values (100055, 100054, 'add', NULL, NULL, 'variable:add', NULL, '1', 1, NULL, now(), now());
insert into "public"."t_menu" values (100056, 100054, 'update', NULL, NULL, 'variable:update', NULL, '1', 1, NULL, now(), now());
insert into "public"."t_menu" values (100057, 100054, 'delete', NULL, NULL, 'variable:delete', NULL, '1', 1, NULL, now(), now());
-insert into "public"."t_menu" values (100058, 100054, 'depend apps', '/system/variable/depend_apps', 'system/variable/DependApps', 'variable:depend_apps', '', '0', 0, NULL, now(), now());
+insert into "public"."t_menu" values (100058, 100054, 'depend apps', '/flink/variable/depend_apps', 'flink/variable/DependApps', 'variable:depend_apps', '', '0', 0, NULL, now(), now());
insert into "public"."t_menu" values (100059, 100054, 'show original', NULL, NULL, 'variable:show_original', NULL, '1', 1, NULL, now(), now());
insert into "public"."t_menu" values (100060, 100001, 'view', null, null, 'user:view', null, '1', 1, null, now(), now());
insert into "public"."t_menu" values (100061, 100038, 'view', null, null, 'token:view', null, '1', 1, null, now(), now());
diff --git a/streampark-console/streampark-console-service/src/assembly/script/upgrade/mysql/1.2.4.sql b/streampark-console/streampark-console-service/src/assembly/script/upgrade/mysql/1.2.4.sql
index 7ae8ae4a8..4fc3a3f4d 100644
--- a/streampark-console/streampark-console-service/src/assembly/script/upgrade/mysql/1.2.4.sql
+++ b/streampark-console/streampark-console-service/src/assembly/script/upgrade/mysql/1.2.4.sql
@@ -172,11 +172,11 @@ insert into `t_menu` values (100050, 100048, 'update', null, null, 'member:updat
insert into `t_menu` values (100051, 100048, 'delete', null, null, 'member:delete', null, '1', 1, null, now(), now());
insert into `t_menu` values (100052, 100048, 'role view', null, null, 'role:view', null, '1', 1, null, now(), now());
insert into `t_menu` values (100053, 100001, 'types', null, null, 'user:types', null, '1', 1, null, now(), now());
-insert into `t_menu` values (100054, 100013, 'Variable', '/system/variable', 'system/variable/View', null, 'code', '0', 1, 3, now(), now());
+insert into `t_menu` values (100054, 100013, 'Variable', '/flink/variable', 'flink/variable/View', null, 'code', '0', 1, 3, now(), now());
insert into `t_menu` values (100055, 100054, 'add', NULL, NULL, 'variable:add', NULL, '1', 1, NULL, now(), now());
insert into `t_menu` values (100056, 100054, 'update', NULL, NULL, 'variable:update', NULL, '1', 1, NULL, now(), now());
insert into `t_menu` values (100057, 100054, 'delete', NULL, NULL, 'variable:delete', NULL, '1', 1, NULL, now(), now());
-insert into `t_menu` values (100058, 100054, 'depend apps', '/system/variable/depend_apps', 'system/variable/DependApps', 'variable:depend_apps', '', '0', 0, NULL, now(), now());
+insert into `t_menu` values (100058, 100054, 'depend apps', '/flink/variable/depend_apps', 'flink/variable/DependApps', 'variable:depend_apps', '', '0', 0, NULL, now(), now());
insert into `t_menu` values (100059, 100054, 'show original', NULL, NULL, 'variable:show_original', NULL, '1', 1, NULL, now(), now());
insert into `t_menu` values (100060, 100001, 'view', null, null, 'user:view', null, '1', 1, null, now(), now());
insert into `t_menu` values (100061, 100038, 'view', null, null, 'token:view', null, '1', 1, null, now(), now());
diff --git a/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql b/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql
index 89d0893fe..2d54b5628 100644
--- a/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql
+++ b/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql
@@ -97,11 +97,11 @@ insert into `t_menu` values (100050, 100048, 'update', null, null, 'member:updat
insert into `t_menu` values (100051, 100048, 'delete', null, null, 'member:delete', null, '1', 1, null, now(), now());
insert into `t_menu` values (100052, 100048, 'role view', null, null, 'role:view', null, '1', 1, null, now(), now());
insert into `t_menu` values (100053, 100001, 'types', null, null, 'user:types', null, '1', 1, null, now(), now());
-insert into `t_menu` values (100054, 100013, 'Variable', '/system/variable', 'system/variable/View', null, 'code', '0', 1, 3, now(), now());
+insert into `t_menu` values (100054, 100013, 'Variable', '/flink/variable', 'flink/variable/View', null, 'code', '0', 1, 3, now(), now());
insert into `t_menu` values (100055, 100054, 'add', NULL, NULL, 'variable:add', NULL, '1', 1, NULL, now(), now());
insert into `t_menu` values (100056, 100054, 'update', NULL, NULL, 'variable:update', NULL, '1', 1, NULL, now(), now());
insert into `t_menu` values (100057, 100054, 'delete', NULL, NULL, 'variable:delete', NULL, '1', 1, NULL, now(), now());
-insert into `t_menu` values (100058, 100054, 'depend apps', '/system/variable/depend_apps', 'system/variable/DependApps', 'variable:depend_apps', '', '0', 0, NULL, now(), now());
+insert into `t_menu` values (100058, 100054, 'depend apps', '/flink/variable/depend_apps', 'flink/variable/DependApps', 'variable:depend_apps', '', '0', 0, NULL, now(), now());
insert into `t_menu` values (100059, 100054, 'show original', NULL, NULL, 'variable:show_original', NULL, '1', 1, NULL, now(), now());
insert into `t_menu` values (100060, 100001, 'view', null, null, 'user:view', null, '1', 1, null, now(), now());
insert into `t_menu` values (100061, 100038, 'view', null, null, 'token:view', null, '1', 1, null, now(), now());
diff --git a/streampark-console/streampark-console-webapp/src/api/system/variable.ts b/streampark-console/streampark-console-webapp/src/api/flink/variable/index.ts
similarity index 95%
rename from streampark-console/streampark-console-webapp/src/api/system/variable.ts
rename to streampark-console/streampark-console-webapp/src/api/flink/variable/index.ts
index fc4426bb0..ec02e3fa7 100644
--- a/streampark-console/streampark-console-webapp/src/api/system/variable.ts
+++ b/streampark-console/streampark-console-webapp/src/api/flink/variable/index.ts
@@ -17,8 +17,7 @@
import { AxiosResponse } from 'axios';
import { defHttp } from '/@/utils/http/axios';
import { Result } from '/#/axios';
-import { BasicTableParams } from '../model/baseModel';
-import { VariableDeleteParam, VariableListRecord, VariableParam } from './model/variableModel';
+import { BasicTableParams, VariableDeleteParam, VariableListRecord, VariableParam } from './model/variableModel';
enum VARIABLE_API {
PAGE = '/variable/page',
diff --git a/streampark-console/streampark-console-webapp/src/api/system/model/variableModel.ts b/streampark-console/streampark-console-webapp/src/api/flink/variable/model/variableModel.ts
similarity index 90%
rename from streampark-console/streampark-console-webapp/src/api/system/model/variableModel.ts
rename to streampark-console/streampark-console-webapp/src/api/flink/variable/model/variableModel.ts
index ebd13ab01..384f81c7b 100644
--- a/streampark-console/streampark-console-webapp/src/api/system/model/variableModel.ts
+++ b/streampark-console/streampark-console-webapp/src/api/flink/variable/model/variableModel.ts
@@ -42,3 +42,10 @@ export interface VariableDeleteParam {
variableValue: string;
teamId: string;
}
+
+export interface BasicTableParams {
+ page: number;
+ pageSize: number;
+ teamId: string;
+ [key: string]: Nullable<string | number>;
+}
diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts
index b043d2088..e8a660057 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts
@@ -134,7 +134,7 @@ export default {
appidCheck: 'appid can not be empty',
sqlCheck: 'SQL check error',
},
- tableAction: {
+ operation: {
edit: 'Edit Application',
launch: 'Launch Application',
launchDetail: 'Launching Progress Detail',
diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/en/system/variable.ts b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/variable.ts
similarity index 100%
rename from streampark-console/streampark-console-webapp/src/locales/lang/en/system/variable.ts
rename to streampark-console/streampark-console-webapp/src/locales/lang/en/flink/variable.ts
diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts
index d015be82a..4e4ae73f7 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts
@@ -132,7 +132,7 @@ export default {
appidCheck: 'appid 不能为空',
sqlCheck: 'SQL 检查错误',
},
- tableAction: {
+ operation: {
edit: '编辑作业',
launch: '发布作业',
launchDetail: '发布详情',
diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/system/variable.ts b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/variable.ts
similarity index 100%
rename from streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/system/variable.ts
rename to streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/variable.ts
diff --git a/streampark-console/streampark-console-webapp/src/router/constant.ts b/streampark-console/streampark-console-webapp/src/router/constant.ts
index c3448b591..b8bf3e286 100644
--- a/streampark-console/streampark-console-webapp/src/router/constant.ts
+++ b/streampark-console/streampark-console-webapp/src/router/constant.ts
@@ -40,7 +40,7 @@ export const getParentLayout = (_name?: string) => {
};
const projectPath = '/flink/project';
const settingPath = '/flink/setting';
-const variablePath = '/system/variable';
+const variablePath = '/flink/variable';
const applicationPath = '/flink/app';
export const menuMap = {
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/components/FlinkSql.vue b/streampark-console/streampark-console-webapp/src/views/flink/app/components/FlinkSql.vue
index 629f94b31..247b0d84c 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/components/FlinkSql.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/components/FlinkSql.vue
@@ -201,19 +201,20 @@
<div ref="flinkSql" class="overflow-hidden w-full mt-5px" :class="flinkEditorClass"></div>
<ButtonGroup class="flinksql-tool" v-if="!fullScreenStatus">
+ <a-button size="small" class="flinksql-tool-item" type="primary" @click="handleVerifySql">
+ <Icon icon="ant-design:check-outlined" />
+ {{ t('flink.app.flinkSql.verify') }}
+ </a-button>
<a-button
class="flinksql-tool-item"
size="small"
+ type="default"
v-if="canPreview"
@click="emit('preview', value)"
>
<Icon icon="ant-design:eye-outlined" />
{{ t('flink.app.flinkSql.preview') }}
</a-button>
- <a-button size="small" class="flinksql-tool-item" type="primary" @click="handleVerifySql">
- <Icon icon="ant-design:check-outlined" />
- {{ t('flink.app.flinkSql.verify') }}
- </a-button>
<a-button class="flinksql-tool-item" size="small" type="default" @click="handleFormatSql">
<Icon icon="ant-design:thunderbolt-outlined" />
{{ t('flink.app.flinkSql.format') }}
@@ -233,16 +234,16 @@
</div>
</div>
<div class="flinksql-tool">
- <a-button v-if="canPreview" @click="emit('preview', value)">
+ <a-button type="primary" @click="handleVerifySql">
<div class="flex items-center">
- <Icon icon="ant-design:eye-outlined" />
- {{ t('flink.app.flinkSql.preview') }}
+ <Icon icon="ant-design:check-outlined" />
+ {{ t('flink.app.flinkSql.verify') }}
</div>
</a-button>
- <a-button type="primary" @click="handleVerifySql" class="ml-10px">
+ <a-button v-if="canPreview" @click="emit('preview', value)" class="ml-10px">
<div class="flex items-center">
- <Icon icon="ant-design:check-outlined" />
- {{ t('flink.app.flinkSql.verify') }}
+ <Icon icon="ant-design:eye-outlined" />
+ {{ t('flink.app.flinkSql.preview') }}
</div>
</a-button>
<a-button type="default" @click="handleFormatSql" class="ml-10px">
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/components/ProgramArgs.vue b/streampark-console/streampark-console-webapp/src/views/flink/app/components/ProgramArgs.vue
index 9f601e14e..2233dab0f 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/components/ProgramArgs.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/components/ProgramArgs.vue
@@ -29,35 +29,32 @@
</Tooltip>
</div>
<div ref="programArgRef" :class="fullEditorClass" class="w-full program-box mt-5px"> </div>
- <div class="relative flinksql-tool" v-if="!fullScreenStatus">
+ <ButtonGroup class="flinksql-tool" v-if="!fullScreenStatus">
<a-button
class="flinksql-tool-item"
v-if="canReview"
+ type="primary"
@click="emit('preview', value)"
size="small"
>
<Icon icon="ant-design:eye-outlined" />
{{ t('flink.app.flinkSql.preview') }}
</a-button>
- <a-button class="flinksql-tool-item" size="small" type="default" @click="toggle">
+ <a-button class="flinksql-tool-item" size="small" :type="canReview?'default':'primary'" @click="toggle">
<Icon icon="ant-design:fullscreen-outlined" />
{{ t('layout.header.tooltipEntryFull') }}
</a-button>
- </div>
- <div v-else class="text-right py-10px">
- <a-button type="primary" v-if="canReview" @click="emit('preview', value)">
- <div class="flex items-center">
- <Icon icon="ant-design:eye-outlined" />
- {{ t('flink.app.flinkSql.preview') }}
- </div>
+ </ButtonGroup>
+ <ButtonGroup v-else class="flinksql-tool">
+ <a-button type="primary" class="flinksql-tool-item" v-if="canReview" @click="emit('preview', value)">
+ <Icon icon="ant-design:eye-outlined" />
+ {{ t('flink.app.flinkSql.preview') }}
</a-button>
- <a-button type="primary" @click="toggle" class="ml-10px">
- <div class="flex items-center">
- <Icon icon="ant-design:fullscreen-exit-outlined" />
- {{ t('layout.header.tooltipExitFull') }}
- </div>
+ <a-button class="flinksql-tool-item" size="small" :type="canReview?'default':'primary'" @click="toggle">
+ <Icon icon="ant-design:fullscreen-exit-outlined" />
+ {{ t('layout.header.tooltipExitFull') }}
</a-button>
- </div>
+ </ButtonGroup>
</div>
</template>
<script lang="ts">
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableAction.ts b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableAction.ts
index 7fb1e5904..96e8d22aa 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableAction.ts
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableAction.ts
@@ -62,47 +62,47 @@ export const useAppTableAction = (
function getTableActions(record: AppListRecord, currentPgaeNo: any): ActionItem[] {
return [
{
- tooltip: { title: t('flink.app.tableAction.edit') },
+ tooltip: { title: t('flink.app.operation.edit') },
auth: 'app:update',
icon: 'clarity:note-edit-line',
onClick: handleEdit.bind(null, record, currentPgaeNo),
},
{
- tooltip: { title: t('flink.app.tableAction.launch') },
+ tooltip: { title: t('flink.app.operation.launch') },
ifShow: [-1, 1, 4].includes(record.launch) && record['optionState'] === 0,
auth: 'app:launch',
icon: 'ant-design:cloud-upload-outlined',
onClick: handleCheckLaunchApp.bind(null, record),
},
{
- tooltip: { title: t('flink.app.tableAction.launchDetail') },
+ tooltip: { title: t('flink.app.operation.launchDetail') },
ifShow: [-1, 2].includes(record.launch) || record['optionState'] === 1,
auth: 'app:launch',
icon: 'ant-design:container-outlined',
onClick: () => openBuildDrawer(true, { appId: record.id }),
},
{
- tooltip: { title: t('flink.app.tableAction.start') },
+ tooltip: { title: t('flink.app.operation.start') },
ifShow: handleIsStart(record, optionApps),
auth: 'app:start',
icon: 'ant-design:play-circle-outlined',
onClick: handleAppCheckStart.bind(null, record),
},
{
- tooltip: { title: t('flink.app.tableAction.cancel') },
+ tooltip: { title: t('flink.app.operation.cancel') },
ifShow: record.state === 5 && record['optionState'] === 0,
auth: 'app:cancel',
icon: 'ant-design:pause-circle-outlined',
onClick: handleCancel.bind(null, record),
},
{
- tooltip: { title: t('flink.app.tableAction.detail') },
+ tooltip: { title: t('flink.app.operation.detail') },
auth: 'app:detail',
icon: 'carbon:data-view-alt',
onClick: handleDetail.bind(null, record),
},
{
- tooltip: { title: t('flink.app.tableAction.startLog') },
+ tooltip: { title: t('flink.app.operation.startLog') },
ifShow: [ExecModeEnum.KUBERNETES_SESSION, ExecModeEnum.KUBERNETES_APPLICATION].includes(
record.executionMode,
),
@@ -111,7 +111,7 @@ export const useAppTableAction = (
onClick: () => openLogModal(true, { app: record }),
},
{
- tooltip: { title: t('flink.app.tableAction.force') },
+ tooltip: { title: t('flink.app.operation.force') },
ifShow: handleCanStop(record),
auth: 'app:cancel',
icon: 'ant-design:pause-circle-outlined',
@@ -148,20 +148,20 @@ export const useAppTableAction = (
function getActionDropdown(record: AppListRecord): ActionItem[] {
return [
{
- label: t('flink.app.tableAction.copy'),
+ label: t('flink.app.operation.copy'),
auth: 'app:copy',
icon: 'ant-design:copy-outlined',
onClick: handleCopy.bind(null, record),
},
{
- label: t('flink.app.tableAction.remapping'),
+ label: t('flink.app.operation.remapping'),
ifShow: [0, 7, 10, 11, 13].includes(record.state),
auth: 'app:mapping',
icon: 'ant-design:deployment-unit-outlined',
onClick: handleMapping.bind(null, record),
},
{
- label: t('flink.app.tableAction.flameGraph'),
+ label: t('flink.app.operation.flameGraph'),
ifShow: record.flameGraph,
auth: 'app:flameGraph',
icon: 'ant-design:fire-outlined',
@@ -169,7 +169,7 @@ export const useAppTableAction = (
},
{
popConfirm: {
- title: t('flink.app.tableAction.deleteTip'),
+ title: t('flink.app.operation.deleteTip'),
confirm: handleDelete.bind(null, record),
},
label: t('common.delText'),
@@ -266,7 +266,7 @@ export const useAppTableAction = (
{
label: t('flink.app.searchName'),
field: 'jobName',
- component: 'InputSearch',
+ component: 'Input',
componentProps: {
placeholder: t('flink.app.searchName'),
onChange: handlePageDataReload.bind(null, false),
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts
index 10c77daf0..7e6d94345 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts
@@ -35,7 +35,7 @@ import { useDrawer } from '/@/components/Drawer';
import { Alert } from 'ant-design-vue';
import Icon from '/@/components/Icon';
import { useMessage } from '/@/hooks/web/useMessage';
-import { fetchVariableAll } from '/@/api/system/variable';
+import { fetchVariableAll } from '/@/api/flink/variable';
import {
fetchFlinkBaseImages,
fetchK8sNamespaces,
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/styles/Add.less b/streampark-console/streampark-console-webapp/src/views/flink/app/styles/Add.less
index 2010634e1..b684efc11 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/styles/Add.less
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/styles/Add.less
@@ -107,6 +107,8 @@
.pod-template-tool,
.flinksql-tool {
z-index: 99;
+ float: right;
+ margin-right: 5px;
cursor: pointer;
margin-top: 5px;
}
diff --git a/streampark-console/streampark-console-webapp/src/views/system/variable/DependApps.vue b/streampark-console/streampark-console-webapp/src/views/flink/variable/DependApps.vue
similarity index 87%
rename from streampark-console/streampark-console-webapp/src/views/system/variable/DependApps.vue
rename to streampark-console/streampark-console-webapp/src/views/flink/variable/DependApps.vue
index 7d509b3dc..bc26cee6c 100644
--- a/streampark-console/streampark-console-webapp/src/views/system/variable/DependApps.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/variable/DependApps.vue
@@ -21,7 +21,7 @@
</script>
<script setup lang="ts" name="DependApp">
import { useRoute, useRouter } from 'vue-router';
- import { fetchDependApps } from '/@/api/system/variable';
+ import { fetchDependApps } from '/@/api/flink/variable';
import Icon from '/@/components/Icon';
import { PageWrapper } from '/@/components/Page';
import { BasicTable, useTable } from '/@/components/Table';
@@ -30,7 +30,7 @@
const route = useRoute();
const router = useRouter();
const [registerTable] = useTable({
- title: t('system.variable.depend.title'),
+ title: t('flink.variable.depend.title'),
api: fetchDependApps,
canResize: false,
showIndexColumn: false,
@@ -43,8 +43,8 @@
return params;
},
columns: [
- { title: t('system.variable.depend.jobName'), dataIndex: 'jobName', width: 500 },
- { title: t('system.variable.depend.nickName'), dataIndex: 'nickName' },
+ { title: t('flink.variable.depend.jobName'), dataIndex: 'jobName', width: 500 },
+ { title: t('flink.variable.depend.nickName'), dataIndex: 'nickName' },
{ title: t('common.createTime'), dataIndex: 'createTime' },
],
});
@@ -62,7 +62,7 @@
<Icon icon="ant-design:arrow-left-outlined" />
</a-button>
<span class="app-bar">
- {{ t('system.variable.depend.headerTitle', [route.query.id]) }}
+ {{ t('flink.variable.depend.headerTitle', [route.query.id]) }}
</span>
</div>
<BasicTable @register="registerTable" />
diff --git a/streampark-console/streampark-console-webapp/src/views/system/variable/View.vue b/streampark-console/streampark-console-webapp/src/views/flink/variable/View.vue
similarity index 87%
rename from streampark-console/streampark-console-webapp/src/views/system/variable/View.vue
rename to streampark-console/streampark-console-webapp/src/views/flink/variable/View.vue
index 390424f7d..263f9b6fb 100644
--- a/streampark-console/streampark-console-webapp/src/views/system/variable/View.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/variable/View.vue
@@ -31,7 +31,7 @@
{
icon: 'clarity:note-edit-line',
auth: 'variable:update',
- tooltip: t('system.variable.modifyVariable'),
+ tooltip: t('flink.variable.modifyVariable'),
onClick: handleEdit.bind(null, record),
},
{
@@ -41,18 +41,18 @@
},
{
icon: 'icon-park-outline:mind-mapping',
- tooltip: t('system.variable.table.depend'),
+ tooltip: t('flink.variable.table.depend'),
auth: 'variable:depend_apps',
onClick: () =>
- router.push('/system/variable/depend_apps?id=' + record.variableCode),
+ router.push('/flink/variable/depend_apps?id=' + record.variableCode),
},
{
icon: 'ant-design:delete-outlined',
color: 'error',
- tooltip: t('system.variable.deleteVariable'),
+ tooltip: t('flink.variable.deleteVariable'),
auth: 'variable:delete',
popConfirm: {
- title: t('system.variable.deletePopConfirm'),
+ title: t('flink.variable.deletePopConfirm'),
confirm: handleDelete.bind(null, record),
},
},
@@ -80,7 +80,7 @@
import { columns, searchFormSchema } from './variable.data';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
- import { fetchVariableDelete, fetchVariableList } from '/@/api/system/variable';
+ import { fetchVariableDelete, fetchVariableList } from '/@/api/flink/variable';
import Icon from '/@/components/Icon';
import { useRouter } from 'vue-router';
@@ -90,7 +90,7 @@
const { createMessage } = useMessage();
const { t } = useI18n();
const [registerTable, { reload }] = useTable({
- title: t('system.variable.table.title'),
+ title: t('flink.variable.table.title'),
api: fetchVariableList,
columns,
formConfig: {
@@ -147,16 +147,16 @@
variableValue: record.variableValue,
});
if (data.status === 'success') {
- createMessage.success(t('system.variable.deleteVariable') + t('system.variable.success'));
+ createMessage.success(t('flink.variable.deleteVariable') + t('flink.variable.success'));
reload();
} else {
- createMessage.error(t('system.variable.deleteVariable') + t('system.variable.fail'));
+ createMessage.error(t('flink.variable.deleteVariable') + t('flink.variable.fail'));
}
}
function handleSuccess(isUpdate: boolean) {
createMessage.success(
- `${isUpdate ? t('common.edit') : t('system.variable.add')}${t('system.variable.success')}`,
+ `${isUpdate ? t('common.edit') : t('flink.variable.add')}${t('flink.variable.success')}`,
);
reload();
}
diff --git a/streampark-console/streampark-console-webapp/src/views/system/variable/components/VariableDrawer.vue b/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableDrawer.vue
similarity index 89%
rename from streampark-console/streampark-console-webapp/src/views/system/variable/components/VariableDrawer.vue
rename to streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableDrawer.vue
index 5c33ca00c..252f658c9 100644
--- a/streampark-console/streampark-console-webapp/src/views/system/variable/components/VariableDrawer.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableDrawer.vue
@@ -47,8 +47,8 @@
fetchCheckVariableCode,
fetchUpdateVariable,
fetchVariableInfo,
- } from '/@/api/system/variable';
- import { VariableListRecord } from '/@/api/system/model/variableModel';
+ } from '/@/api/flink/variable';
+ import { VariableListRecord } from '/@/api/flink/variable/model/variableModel';
const emit = defineEmits(['success', 'register']);
@@ -65,11 +65,11 @@
setValidateStatus('validating');
if (value.length < 3 || value.length > 50) {
setValidateStatus('error');
- setHelp(t('system.variable.form.len'));
+ setHelp(t('flink.variable.form.len'));
return Promise.reject();
} else if (!new RegExp(/^([A-Za-z])+([A-Za-z0-9._-])+$/).test(value)) {
setValidateStatus('error');
- setHelp(t('system.variable.form.regExp'));
+ setHelp(t('flink.variable.form.regExp'));
} else {
const { data } = await fetchCheckVariableCode({
variableCode: value,
@@ -84,13 +84,13 @@
return Promise.resolve();
} else {
setValidateStatus('error');
- setHelp(t('system.variable.form.exists'));
+ setHelp(t('flink.variable.form.exists'));
return Promise.reject();
}
}
} else {
setValidateStatus('error');
- setHelp(t('system.variable.form.empty'));
+ setHelp(t('flink.variable.form.empty'));
return Promise.reject();
}
}
@@ -99,7 +99,7 @@
return [
{
field: 'variableCode',
- label: t('system.variable.table.variableCode'),
+ label: t('flink.variable.table.variableCode'),
component: 'Input',
componentProps: { disabled: unref(isUpdate), onblur: handleVariableCodeBlur },
itemProps: getItemProp.value,
@@ -107,7 +107,7 @@
},
{
field: 'variableValue',
- label: t('system.variable.table.variableValue'),
+ label: t('flink.variable.table.variableValue'),
component: 'InputTextArea',
componentProps: { rows: 4, placeholder: 'Please enter Variable Value' },
rules: [{ required: true, message: 'please enter Variable Value' }],
@@ -117,11 +117,11 @@
label: t('common.description'),
component: 'InputTextArea',
componentProps: { rows: 4 },
- rules: [{ max: 100, message: t('system.variable.form.descriptionMessage') }],
+ rules: [{ max: 100, message: t('flink.variable.form.descriptionMessage') }],
},
{
field: 'desensitization',
- label: t('system.variable.form.desensitization'),
+ label: t('flink.variable.form.desensitization'),
component: 'Switch',
componentProps: {
checkedChildren: 'ON',
@@ -131,7 +131,7 @@
afterItem: h(
'span',
{ class: 'conf-switch' },
- t('system.variable.form.desensitizationDesc'),
+ t('flink.variable.form.desensitizationDesc'),
),
},
];
@@ -178,7 +178,7 @@
);
const getTitle = computed(() =>
- !unref(isUpdate) ? t('system.variable.addVariable') : t('system.variable.modifyVariable'),
+ !unref(isUpdate) ? t('flink.variable.addVariable') : t('flink.variable.modifyVariable'),
);
// form submit
async function handleSubmit() {
diff --git a/streampark-console/streampark-console-webapp/src/views/system/variable/components/VariableInfo.vue b/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableInfo.vue
similarity index 98%
rename from streampark-console/streampark-console-webapp/src/views/system/variable/components/VariableInfo.vue
rename to streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableInfo.vue
index 9a04b3253..693ac4144 100644
--- a/streampark-console/streampark-console-webapp/src/views/system/variable/components/VariableInfo.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableInfo.vue
@@ -40,7 +40,7 @@
import { Description, DescItem } from '/@/components/Description';
import Icon from '/@/components/Icon';
import { useDrawerInner, BasicDrawer } from '/@/components/Drawer';
- import { fetchVariableInfo } from '/@/api/system/variable';
+ import { fetchVariableInfo } from '/@/api/flink/variable';
import { usePermission } from '/@/hooks/web/usePermission';
const variableInfo = ref<Recordable>({});
diff --git a/streampark-console/streampark-console-webapp/src/views/system/variable/variable.data.ts b/streampark-console/streampark-console-webapp/src/views/flink/variable/variable.data.ts
similarity index 79%
rename from streampark-console/streampark-console-webapp/src/views/system/variable/variable.data.ts
rename to streampark-console/streampark-console-webapp/src/views/flink/variable/variable.data.ts
index 62dc53991..47f5c36a8 100644
--- a/streampark-console/streampark-console-webapp/src/views/system/variable/variable.data.ts
+++ b/streampark-console/streampark-console-webapp/src/views/flink/variable/variable.data.ts
@@ -18,8 +18,8 @@ import { BasicColumn, FormSchema } from '/@/components/Table';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
export const columns: BasicColumn[] = [
- { title: t('system.variable.table.variableCode'), dataIndex: 'variableCode' },
- { title: t('system.variable.table.variableValue'), dataIndex: 'variableValue' },
+ { title: t('flink.variable.table.variableCode'), dataIndex: 'variableCode' },
+ { title: t('flink.variable.table.variableValue'), dataIndex: 'variableValue' },
{ title: t('common.description'), dataIndex: 'description' },
{
title: t('common.createTime'),
@@ -36,16 +36,16 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [
{
field: 'variableCode',
- label: t('system.variable.table.variableCode'),
+ label: t('flink.variable.table.variableCode'),
component: 'Input',
- componentProps: { placeholder: t('system.variable.table.variableCodePlaceholder') },
+ componentProps: { placeholder: t('flink.variable.table.variableCodePlaceholder') },
colProps: { span: 8 },
},
{
field: 'description',
label: t('common.description'),
component: 'Input',
- componentProps: { placeholder: t('system.variable.table.variableValuePlaceholder') },
+ componentProps: { placeholder: t('flink.variable.table.variableValuePlaceholder') },
colProps: { span: 8 },
},
];