This is an automated email from the ASF dual-hosted git repository.
benjobs 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 e50835be0 [Fix] fix variable drawer bug,fix dark theme style bug
(#2016)
e50835be0 is described below
commit e50835be0a321b25887acd7a5653a53937e156a4
Author: WSZ <[email protected]>
AuthorDate: Sun Nov 13 20:58:13 2022 +0800
[Fix] fix variable drawer bug,fix dark theme style bug (#2016)
* [Fix] fix variable drawer bug,fix dark theme style bug
* [style] eslint style fix
* [Chore] fix build pom argument
* [improve] API error translation
---
.../streampark-console-service/pom.xml | 2 +-
.../build/generate/generateModifyVars.ts | 1 -
.../src/api/flink/variable/index.ts | 7 +++-
.../src/api/system/upload.ts | 2 +-
.../src/components/Form/src/BasicForm.vue | 2 +-
.../src/components/Table/src/BasicTable.vue | 9 +++--
.../src/components/settings/FullScreenSetting.vue | 1 -
.../src/enums/flinkEnum.ts | 46 +++++++++++++++++++++-
.../src/hooks/web/useI18n.ts | 1 +
.../components/user-dropdown/PasswordModal.vue | 29 +++++++-------
.../header/components/user-dropdown/index.vue | 2 +-
.../src/locales/lang/en/flink/app.ts | 18 ++++++---
.../src/locales/lang/en/flink/variable.ts | 3 +-
.../src/locales/lang/en/routes/dashboard.ts | 22 -----------
.../src/locales/lang/en/sys.ts | 16 ++++++++
.../src/locales/lang/en/system/menu.ts | 1 +
.../src/locales/lang/zh-CN/flink/app.ts | 3 +-
.../src/locales/lang/zh-CN/flink/variable.ts | 11 +++---
.../src/locales/lang/zh-CN/routes/dashboard.ts | 22 -----------
.../src/locales/lang/zh-CN/sys.ts | 15 +++++++
.../src/locales/lang/zh-CN/system/menu.ts | 1 +
.../src/settings/projectSetting.ts | 2 +-
.../src/utils/http/axios/errorHandle.ts | 28 ++++++-------
.../src/views/base/login/LoginForm.vue | 8 ++--
.../src/views/flink/app/View.vue | 4 +-
.../components/AppView/StartApplicationModal.vue | 27 +++++++------
.../components/AppView/StopApplicationModal.vue | 7 ++--
.../src/views/flink/app/components/ProgramArgs.vue | 25 ++++++++++--
.../src/views/flink/app/components/State.tsx | 37 ++++++++++++-----
.../views/flink/app/components/VariableReview.vue | 7 +++-
.../src/views/flink/app/data/index.ts | 15 +++----
.../src/views/flink/app/hooks/useAppTableAction.ts | 23 +++++++----
.../src/views/flink/app/styles/View.less | 10 ++++-
.../src/views/flink/app/utils/index.ts | 4 +-
.../src/views/flink/project/Edit.vue | 3 +-
.../src/views/flink/project/View.vue | 6 +--
.../views/flink/project/components/ListItem.vue | 18 ++++++---
.../views/flink/project/components/LogModal.vue | 2 +-
.../src/views/flink/project/project.data.ts | 30 ++++++--------
.../views/flink/setting/components/AlertModal.vue | 22 +++++------
.../flink/setting/components/FlinkEnvModal.vue | 4 +-
.../src/views/flink/variable/View.vue | 3 +-
.../flink/variable/components/VariableDrawer.vue | 14 +++----
.../src/views/flink/variable/variable.data.ts | 2 +-
.../src/views/system/menu/menu.data.ts | 18 +++++++--
45 files changed, 321 insertions(+), 212 deletions(-)
diff --git a/streampark-console/streampark-console-service/pom.xml
b/streampark-console/streampark-console-service/pom.xml
index 62f14fbe9..2e3873424 100644
--- a/streampark-console/streampark-console-service/pom.xml
+++ b/streampark-console/streampark-console-service/pom.xml
@@ -434,7 +434,7 @@
</goals>
<phase>generate-resources</phase>
<configuration>
- <arguments>run bootstrap</arguments>
+ <arguments>install</arguments>
</configuration>
</execution>
<execution>
diff --git
a/streampark-console/streampark-console-webapp/build/generate/generateModifyVars.ts
b/streampark-console/streampark-console-webapp/build/generate/generateModifyVars.ts
index c899f2646..4f3834d84 100644
---
a/streampark-console/streampark-console-webapp/build/generate/generateModifyVars.ts
+++
b/streampark-console/streampark-console-webapp/build/generate/generateModifyVars.ts
@@ -50,6 +50,5 @@ export function generateModifyVars(dark = false) {
'border-radius-sm': '2px',
'link-color': primary, // Link color
'app-content-background': '#f9fafc', // Link color
- 'shadow-color': '#e4e8f0', // Link color
};
}
diff --git
a/streampark-console/streampark-console-webapp/src/api/flink/variable/index.ts
b/streampark-console/streampark-console-webapp/src/api/flink/variable/index.ts
index ec02e3fa7..f44f0fa0b 100644
---
a/streampark-console/streampark-console-webapp/src/api/flink/variable/index.ts
+++
b/streampark-console/streampark-console-webapp/src/api/flink/variable/index.ts
@@ -17,7 +17,12 @@
import { AxiosResponse } from 'axios';
import { defHttp } from '/@/utils/http/axios';
import { Result } from '/#/axios';
-import { BasicTableParams, 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/upload.ts
b/streampark-console/streampark-console-webapp/src/api/system/upload.ts
index 1076601ae..748a0a34a 100644
--- a/streampark-console/streampark-console-webapp/src/api/system/upload.ts
+++ b/streampark-console/streampark-console-webapp/src/api/system/upload.ts
@@ -31,7 +31,7 @@ export function uploadApi(
return defHttp.uploadFile<UploadApiResult>(
{
url: uploadUrl,
- onUploadProgress,
+ onUploadProgress: onUploadProgress as any,
},
params,
);
diff --git
a/streampark-console/streampark-console-webapp/src/components/Form/src/BasicForm.vue
b/streampark-console/streampark-console-webapp/src/components/Form/src/BasicForm.vue
index ea6738e76..7e8ef420b 100644
---
a/streampark-console/streampark-console-webapp/src/components/Form/src/BasicForm.vue
+++
b/streampark-console/streampark-console-webapp/src/components/Form/src/BasicForm.vue
@@ -280,7 +280,7 @@
const formActionType: Partial<FormActionType> = {
getFieldsValue,
- setFieldsValue,
+ setFieldsValue: setFieldsValue as any,
resetFields,
updateSchema,
resetSchema,
diff --git
a/streampark-console/streampark-console-webapp/src/components/Table/src/BasicTable.vue
b/streampark-console/streampark-console-webapp/src/components/Table/src/BasicTable.vue
index 344b01abb..f59d9eb64 100644
---
a/streampark-console/streampark-console-webapp/src/components/Table/src/BasicTable.vue
+++
b/streampark-console/streampark-console-webapp/src/components/Table/src/BasicTable.vue
@@ -378,10 +378,11 @@
.ant-table-tbody > tr.ant-table-row-selected td {
background-color: #262626;
}
-
- .ant-table-wrapper,
- .ant-form {
- box-shadow: 0 2px 3px #262626 !important;
+ .@{prefix-cls} {
+ .ant-table-wrapper,
+ .ant-form {
+ box-shadow: 0 2px 3px #262626 !important;
+ }
}
}
diff --git
a/streampark-console/streampark-console-webapp/src/components/Table/src/components/settings/FullScreenSetting.vue
b/streampark-console/streampark-console-webapp/src/components/Table/src/components/settings/FullScreenSetting.vue
index a83ec00a6..b75407091 100644
---
a/streampark-console/streampark-console-webapp/src/components/Table/src/components/settings/FullScreenSetting.vue
+++
b/streampark-console/streampark-console-webapp/src/components/Table/src/components/settings/FullScreenSetting.vue
@@ -45,7 +45,6 @@
const isFullscreen = computed(() => {
return table.tableFullScreen.value;
});
- console.log('isFullscreen', isFullscreen);
function toggle() {
table.tableFullScreen.value = !isFullscreen.value;
}
diff --git
a/streampark-console/streampark-console-webapp/src/enums/flinkEnum.ts
b/streampark-console/streampark-console-webapp/src/enums/flinkEnum.ts
index 36c256f81..6e97e7c13 100644
--- a/streampark-console/streampark-console-webapp/src/enums/flinkEnum.ts
+++ b/streampark-console/streampark-console-webapp/src/enums/flinkEnum.ts
@@ -14,11 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-export enum BuildEnum {
- NOT_BUDIL = -1,
+
+export enum BuildStateEnum {
+ /** has changed, need rebuild */
NEED_REBUILD = -2,
+ /** has cancelled, not build */
+ NOT_BUDIL = -1,
+ /** building */
BUILDING = 0,
+ /** build successful */
SUCCESSFUL = 1,
+ /** build failed */
FAILED = 2,
}
/* ExecutionMode */
@@ -51,3 +57,39 @@ export const executionMap = {
/**6. kubernetes application */
KUBERNETES_APPLICATION: ExecModeEnum.KUBERNETES_APPLICATION,
};
+
+export enum LaunchStateEnum {
+ /** launch failed */
+ FAILED = -1,
+ /** launch done */
+ DONE = 0,
+ /** need relaunch after modify task */
+ NEED_LAUNCH = 1,
+ /** launching */
+ LAUNCHING = 2,
+ /** launch complete, need restart */
+ NEED_RESTART = 3,
+ /** need rollback */
+ NEED_ROLLBACK = 4,
+ /**
+ * project has changed, need to check the jar whether to be re-selected
+ */
+ NEED_CHECK = 5,
+ /**
+ * revoked
+ */
+ REVOKED = 10,
+}
+
+export enum OptionStateEnum {
+ /** Application which is currently action: none. */
+ NONE = 0,
+ /** Application which is currently action: deploying. */
+ LAUNCHING = 1,
+ /** Application which is currently action: cancelling. */
+ CANCELLING = 2,
+ /** Application which is currently action: starting. */
+ STARTING = 3,
+ /** Application which is currently action: savepointing. */
+ SAVEPOINTING = 4,
+}
diff --git
a/streampark-console/streampark-console-webapp/src/hooks/web/useI18n.ts
b/streampark-console/streampark-console-webapp/src/hooks/web/useI18n.ts
index 7f6ddccc5..6b198389a 100644
--- a/streampark-console/streampark-console-webapp/src/hooks/web/useI18n.ts
+++ b/streampark-console/streampark-console-webapp/src/hooks/web/useI18n.ts
@@ -55,6 +55,7 @@ export function useI18n(namespace?: string): {
const tFn: I18nGlobalTranslation = (key: string, ...arg: any[]) => {
if (!key) return '';
if (!key.includes('.') && !namespace) return key;
+ // @ts-ignore
return t(getKey(namespace, key), ...(arg as
I18nTranslationRestParameters));
};
return {
diff --git
a/streampark-console/streampark-console-webapp/src/layouts/default/header/components/user-dropdown/PasswordModal.vue
b/streampark-console/streampark-console-webapp/src/layouts/default/header/components/user-dropdown/PasswordModal.vue
index 4ac94dff9..ea3a8dd9c 100644
---
a/streampark-console/streampark-console-webapp/src/layouts/default/header/components/user-dropdown/PasswordModal.vue
+++
b/streampark-console/streampark-console-webapp/src/layouts/default/header/components/user-dropdown/PasswordModal.vue
@@ -30,7 +30,9 @@
const userStore = useUserStoreWithOut();
const { t } = useI18n();
const { createConfirm } = useMessage();
- const [registerModal, { changeOkLoading, closeModal }] = useModalInner();
+ const [registerModal, { changeOkLoading, closeModal }] = useModalInner(() =>
{
+ resetFields();
+ });
const [registerForm, { validate, resetFields }] = useForm({
labelWidth: 140,
colon: true,
@@ -39,23 +41,23 @@
schemas: [
{
field: 'username',
- label: 'UserName',
+ label: t('sys.login.userName'),
component: 'Input',
render: () => h(Alert, { type: 'info', message:
userStore.getUserInfo?.username }),
},
{
field: 'password',
- label: 'Password',
+ label: t('sys.login.password'),
component: 'InputPassword',
itemProps: { hasFeedback: true },
rules: [
- { required: true, message: 'Please input your password!', trigger:
'blur' },
- { min: 4, max: 16, message: 'The password contains 4 to 16
characters', trigger: 'blur' },
+ { required: true, message: t('sys.login.passwordPlaceholder'),
trigger: 'blur' },
+ { min: 8, message: t('system.user.form.passwordHelp'), trigger:
'blur' },
],
},
{
field: 'confirmpassword',
- label: 'Confirm Password',
+ label: t('sys.login.confirmPassword'),
component: 'InputPassword',
itemProps: { hasFeedback: true },
dynamicRules: ({ values }) => {
@@ -64,10 +66,10 @@
required: true,
validator: (_, value) => {
if (!value) {
- return Promise.reject('Please confirm your password!');
+ return
Promise.reject(t('sys.login.confirmPasswordPlaceholder'));
}
if (value !== values.password) {
- return Promise.reject('Two passwords that you enter is
inconsistent!');
+ return Promise.reject(t('sys.login.diffPwd'));
}
return Promise.resolve();
},
@@ -81,17 +83,16 @@
try {
changeOkLoading(true);
const formValue = await validate();
- console.log('formValue', formValue);
await fetchUserPasswordUpdate({
username: userStore.getUserInfo?.username,
password: formValue.password,
});
- resetFields();
+
createConfirm({
iconType: 'success',
- title: t('routes.demo.system.password'),
- content: 'The password has been changed successfully, and you are
about to exit the system',
- okText: '立即退出',
+ title: t('sys.modifyPassword.title'),
+ content: t('sys.modifyPassword.success'),
+ okText: t('sys.logoutNow'),
okType: 'danger',
onOk: () => {
userStore.logout(true);
@@ -109,7 +110,7 @@
<BasicModal v-bind="$attrs" @register="registerModal"
@ok="handleChangePassword">
<template #title>
<SettingOutlined style="color: green" />
- {{ t('routes.demo.system.password') }}
+ {{ t('sys.modifyPassword.title') }}
</template>
<BasicForm @register="registerForm" />
</BasicModal>
diff --git
a/streampark-console/streampark-console-webapp/src/layouts/default/header/components/user-dropdown/index.vue
b/streampark-console/streampark-console-webapp/src/layouts/default/header/components/user-dropdown/index.vue
index db6fd4d9f..5b3ea0e47 100644
---
a/streampark-console/streampark-console-webapp/src/layouts/default/header/components/user-dropdown/index.vue
+++
b/streampark-console/streampark-console-webapp/src/layouts/default/header/components/user-dropdown/index.vue
@@ -119,7 +119,7 @@
}
/* change password */
function openChangePassword() {
- openPasswordModal(true);
+ openPasswordModal(true, {});
}
function handleMenuClick(e: MenuInfo) {
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 e8a660057..53383c2cc 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
@@ -177,7 +177,8 @@ export default {
developmentModeIsRequiredMessage: 'Job Type is required',
executionModePlaceholder: 'please select execution mode',
executionModeIsRequiredMessage: 'Execution Mode is required',
- hadoopEnvInitMessage: 'Hadoop environment initialization failed, please
check the environment settings',
+ hadoopEnvInitMessage:
+ 'Hadoop environment initialization failed, please check the environment
settings',
resourceFromMessage: 'resource from is required',
mainClassPlaceholder: 'Please enter Main class',
mainClassIsRequiredMessage: 'Program Main is required',
@@ -192,9 +193,12 @@ export default {
appNamePlaceholder: 'Please enter application Name',
appNameIsRequiredMessage: 'The application Name is required',
appNameNotUniqueMessage: 'The application Name is already exists, must be
unique. ',
- appNameExistsInYarnMessage: 'The application name is already exists in
YARN, cannot be repeated. Please check',
- appNameExistsInK8sMessage: 'The application name is already exists in
Kubernetes,cannot be repeated. Please check',
- appNameNotValid: 'The application name is invalid.characters must be
(Chinese|English|"-"|"_"),two consecutive spaces cannot appear.Please check',
+ appNameExistsInYarnMessage:
+ 'The application name is already exists in YARN, cannot be repeated.
Please check',
+ appNameExistsInK8sMessage:
+ 'The application name is already exists in Kubernetes,cannot be
repeated. Please check',
+ appNameNotValid:
+ 'The application name is invalid.characters must be
(Chinese|English|"-"|"_"),two consecutive spaces cannot appear.Please check',
tagsPlaceholder: 'Please enter tags,if more than one, separate them with
commas(,)',
parallelismPlaceholder: 'The parallelism with which to run the program',
slotsOfPerTaskManagerPlaceholder: 'Number of slots per TaskManager',
@@ -208,9 +212,11 @@ export default {
kubernetesNamespacePlaceholder: 'Please enter kubernetes Namespace, e.g:
default',
kubernetesClusterIdPlaceholder: 'Please enter Kubernetes clusterId',
kubernetesClusterIdIsRequiredMessage: 'Kubernetes clusterId is required',
- flinkImagePlaceholder: 'Please enter the tag of Flink base docker image,
such as: flink:1.13.0-scala_2.11-java8',
+ flinkImagePlaceholder:
+ 'Please enter the tag of Flink base docker image, such as:
flink:1.13.0-scala_2.11-java8',
flinkImageIsRequiredMessage: 'Flink Base Docker Image is required',
k8sRestExposedTypePlaceholder: 'kubernetes.rest-service.exposed.type',
- hadoopXmlConfigFileTips: 'Automatically copy configuration files from
system environment parameters',
+ hadoopXmlConfigFileTips:
+ 'Automatically copy configuration files from system environment
parameters',
},
};
diff --git
a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/variable.ts
b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/variable.ts
index 8167d318b..81b061758 100644
---
a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/variable.ts
+++
b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/variable.ts
@@ -27,7 +27,8 @@ export default {
variableCode: 'Variable Code',
variableCodePlaceholder: 'Please enter the variable code to search',
variableValue: 'Variable Value',
- variableValuePlaceholder: 'Please enter description to search',
+ variableValuePlaceholder: 'Please enter Variable Value',
+ descriptionPlaceholder: 'Please enter description to search',
depend: 'depend apps',
},
form: {
diff --git
a/streampark-console/streampark-console-webapp/src/locales/lang/en/routes/dashboard.ts
b/streampark-console/streampark-console-webapp/src/locales/lang/en/routes/dashboard.ts
deleted file mode 100644
index 3868e7e63..000000000
---
a/streampark-console/streampark-console-webapp/src/locales/lang/en/routes/dashboard.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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
- *
- * https://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 {
- dashboard: 'Dashboard',
- about: 'About',
- workbench: 'Workbench',
- analysis: 'Analysis',
-};
diff --git
a/streampark-console/streampark-console-webapp/src/locales/lang/en/sys.ts
b/streampark-console/streampark-console-webapp/src/locales/lang/en/sys.ts
index 29eb50601..cb67ebd96 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/en/sys.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/en/sys.ts
@@ -37,6 +37,13 @@ export default {
errMsg503: 'The service is unavailable, the server is temporarily
overloaded or maintained!',
errMsg504: 'Network timeout!',
errMsg505: 'The http version does not support the request!',
+ error403:
+ "Sorry, you can't access. May be because you don't have permissions or
the Sign In is invalid",
+ error404: 'Sorry, resource not found',
+ error501: '<a href="https://streampark.apache.org/">View the official
documentation?</a>',
+ error502:
+ '<a
href="https://github.com/apache/incubator-streampark/issues/new/choose">report
issue ?</a>',
+ errorMsg: 'System error,Please contact the administrator',
},
app: {
logoutTip: 'Reminder',
@@ -98,6 +105,9 @@ export default {
forgetPassword: 'Forget Password?',
otherSignIn: 'Sign in with',
+ ldapTip: 'Sign in with LDAP',
+ passwordTip: 'Sign in with LDAP',
+
// notify
loginSuccessTitle: 'Login successful',
loginSuccessDesc: 'Welcome back',
@@ -105,6 +115,7 @@ export default {
// placeholder
accountPlaceholder: 'Please input username',
passwordPlaceholder: 'Please input password',
+ confirmPasswordPlaceholder: 'Please input confirm password',
smsPlaceholder: 'Please input sms code',
mobilePlaceholder: 'Please input mobile',
policyPlaceholder: 'Register after checking',
@@ -120,4 +131,9 @@ export default {
permission: {
noPermission: 'No permission, please contact the administrator',
},
+ modifyPassword: {
+ title: 'Change Password',
+ success: 'The password has been changed successfully, and you are about to
exit the system',
+ logout: 'Immediate exit',
+ },
};
diff --git
a/streampark-console/streampark-console-webapp/src/locales/lang/en/system/menu.ts
b/streampark-console/streampark-console-webapp/src/locales/lang/en/system/menu.ts
index 5b69b9547..defc00642 100644
---
a/streampark-console/streampark-console-webapp/src/locales/lang/en/system/menu.ts
+++
b/streampark-console/streampark-console-webapp/src/locales/lang/en/system/menu.ts
@@ -24,5 +24,6 @@ export default {
component: 'Vue Component',
permission: 'Permission',
order: 'order',
+ display: 'display',
},
};
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 4e4ae73f7..ecc286765 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
@@ -192,7 +192,8 @@ export default {
appNameNotUniqueMessage: '作业名称必须唯一, 输入的作业名称已经存在',
appNameExistsInYarnMessage: '应用程序名称已经在YARN集群中存在,不能重复。请检查',
appNameExistsInK8sMessage: '该应用程序名称已经在K8S集群中存在,不能重复。请检查',
- appNameNotValid: '应用程序名称无效。字符必须是(中文|英文|"-"|"_"),不能出现两个连续的空格,请检查',
+ appNameNotValid:
+ '应用程序名称无效。字符必须是(中文|英文|"-"|"_"),不能出现两个连续的空格,请检查',
tagsPlaceholder: '请输入标签,如果超过一个,用逗号(,)分隔',
parallelismPlaceholder: '运行程序的并行度',
slotsOfPerTaskManagerPlaceholder: '每个TaskManager的插槽数',
diff --git
a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/variable.ts
b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/variable.ts
index f5d8dc210..a1799c7fe 100644
---
a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/variable.ts
+++
b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/variable.ts
@@ -24,10 +24,11 @@ export default {
fail: '失败',
table: {
title: '变量列表',
- variableCode: 'Variable Code',
- variableCodePlaceholder: '输入 Variable Code 查询',
- variableValue: 'Variable Value',
- variableValuePlaceholder: '输入描述',
+ variableCode: '变量Code',
+ variableCodePlaceholder: '输入变量Code查询',
+ variableValue: '变量值',
+ variableValuePlaceholder: '输入变量值',
+ descriptionPlaceholder: '输入描述',
depend: 'application 依赖',
},
form: {
@@ -42,7 +43,7 @@ export default {
'是否需要脱敏,例如:对敏感数据(如密码)进行脱敏,如果启用,变量值将显示为********',
},
depend: {
- title: '变量依赖application',
+ title: 'application列表',
jobName: 'Application 名称',
nickName: '所属者',
headerTitle: '变量 " {0} " 使用列表',
diff --git
a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/routes/dashboard.ts
b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/routes/dashboard.ts
deleted file mode 100644
index 9662c44c8..000000000
---
a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/routes/dashboard.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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
- *
- * https://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 {
- dashboard: 'Dashboard',
- about: '关于',
- workbench: '工作台',
- analysis: '分析页',
-};
diff --git
a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/sys.ts
b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/sys.ts
index 167fd1d6c..84cc5c79a 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/sys.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/sys.ts
@@ -36,6 +36,12 @@ export default {
errMsg503: '服务不可用,服务器暂时过载或维护!',
errMsg504: '网络超时!',
errMsg505: 'http版本不支持该请求!',
+ error403: '抱歉,您无法访问。可能是因为你没有权限或登录无效',
+ error404: '抱歉,未找到资源',
+ error501: '<a href="https://streampark.apache.org/">查看官方文档?</a>',
+ error502:
+ '<a
href="https://github.com/apache/incubator-streampark/issues/new/choose">报告问题
?</a>',
+ errorMsg: '系统错误,请联系管理员',
},
app: { logoutTip: '温馨提醒', logoutMessage: '是否确认退出系统?', menuLoading:
'菜单加载中...' },
errorLog: {
@@ -92,6 +98,9 @@ export default {
forgetPassword: '忘记密码?',
otherSignIn: '其他登录方式',
+ ldapTip: '通过LDAP登录',
+ passwordTip: '通过密码登录',
+
// notify
loginSuccessTitle: '登录成功',
loginSuccessDesc: '欢迎回来',
@@ -99,6 +108,7 @@ export default {
// placeholder
accountPlaceholder: '请输入账号',
passwordPlaceholder: '请输入密码',
+ confirmPasswordPlaceholder: '请输入确认密码',
smsPlaceholder: '请输入验证码',
mobilePlaceholder: '请输入手机号码',
policyPlaceholder: '勾选后才能注册',
@@ -114,4 +124,9 @@ export default {
permission: {
noPermission: '没有权限,请联系管理员',
},
+ modifyPassword: {
+ title: '修改密码',
+ success: '密码已成功更改,您即将退出系统',
+ logout: '立即退出',
+ },
};
diff --git
a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/system/menu.ts
b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/system/menu.ts
index 97c32e7a0..0ffd9739b 100644
---
a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/system/menu.ts
+++
b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/system/menu.ts
@@ -24,5 +24,6 @@ export default {
component: 'Vue组件',
permission: '权限',
order: '排序',
+ display: '展示',
},
};
diff --git
a/streampark-console/streampark-console-webapp/src/settings/projectSetting.ts
b/streampark-console/streampark-console-webapp/src/settings/projectSetting.ts
index 7dd2a2936..b8d01933e 100644
---
a/streampark-console/streampark-console-webapp/src/settings/projectSetting.ts
+++
b/streampark-console/streampark-console-webapp/src/settings/projectSetting.ts
@@ -111,7 +111,7 @@ const setting: ProjectConfig = {
// Whether to show dom
hidden: false,
// Menu width
- menuWidth: 210,
+ menuWidth: 256,
// Menu mode
mode: MenuModeEnum.INLINE,
// Menu type
diff --git
a/streampark-console/streampark-console-webapp/src/utils/http/axios/errorHandle.ts
b/streampark-console/streampark-console-webapp/src/utils/http/axios/errorHandle.ts
index 37b76e1dc..e48977ba3 100644
---
a/streampark-console/streampark-console-webapp/src/utils/http/axios/errorHandle.ts
+++
b/streampark-console/streampark-console-webapp/src/utils/http/axios/errorHandle.ts
@@ -25,15 +25,14 @@ export function errorHandler(response: AxiosResponse<any>) {
const { Swal, notification } = useMessage();
const { t } = useI18n();
const stp = projectSetting.sessionTimeoutProcessing;
-
if (response) {
switch (response?.data?.code) {
case 501:
Swal.fire({
icon: 'error',
- title: 'Oops...',
+ title: t('sys.api.errorTip'),
text: response.data.message,
- footer: '<a href="https://streampark.apache.org/">View the official
documentation?</a>',
+ footer: t('sys.api.error501'),
});
break;
case 502:
@@ -44,23 +43,19 @@ export function errorHandler(response: AxiosResponse<any>) {
width *= 0.96;
Swal.fire({
icon: 'error',
- title: 'Oops...',
+ title: t('sys.api.errorTip'),
width: width,
html: '<pre class="propException">' + response.data.message +
'</pre>',
- footer:
- '<a
href="https://github.com/apache/incubator-streampark/issues/new/choose">report
issue ?</a>',
+ footer: t('sys.api.error502'),
focusConfirm: false,
});
break;
default:
- const errorMessage =
- response.data === null
- ? 'System error,Please contact the administrator'
- : response.data.message;
+ const errorMessage = response.data === null ? t('sys.api.errorMsg') :
response.data.message;
switch (response.status) {
case 404:
notification.error({
- message: 'Sorry, resource not found',
+ message: t('sys.api.error404'),
duration: 4,
});
break;
@@ -68,16 +63,17 @@ export function errorHandler(response: AxiosResponse<any>) {
case 401:
const userStore = useUserStore();
userStore.setToken(undefined);
- notification.warn({
- message:
- "Sorry, you can't access. May be because you don't have
permissions or the Sign In is invalid",
- duration: 4,
- });
if (stp === SessionTimeoutProcessingEnum.PAGE_COVERAGE) {
userStore.setSessionTimeout(true);
} else {
userStore.logout(true);
}
+ setTimeout(() => {
+ notification.warn({
+ message: t('sys.api.error403'),
+ duration: 4,
+ });
+ }, 500);
break;
default:
notification.error({
diff --git
a/streampark-console/streampark-console-webapp/src/views/base/login/LoginForm.vue
b/streampark-console/streampark-console-webapp/src/views/base/login/LoginForm.vue
index 022715a06..410be371d 100644
---
a/streampark-console/streampark-console-webapp/src/views/base/login/LoginForm.vue
+++
b/streampark-console/streampark-console-webapp/src/views/base/login/LoginForm.vue
@@ -119,12 +119,12 @@
});
const loginText = computed(() => {
- const localText = 'Sign in';
- const ldapText = 'Sign in with LDAP';
+ const localText = t('sys.login.loginButton');
+ const ldapText = t('sys.login.ldapTip');
if (loginType.value === LoginTypeEnum.LOCAL) {
- return { buttonText: localText, linkText: 'Sign in with LDAP' };
+ return { buttonText: localText, linkText: t('sys.login.ldapTip') };
}
- return { buttonText: ldapText, linkText: 'Sign in with password' };
+ return { buttonText: ldapText, linkText: t('sys.login.passwordTip') };
});
const { validForm } = useFormValid(formRef);
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/app/View.vue
b/streampark-console/streampark-console-webapp/src/views/flink/app/View.vue
index e5b5916ee..b29757790 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/View.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/View.vue
@@ -200,7 +200,7 @@
<template v-if="record['jobType'] === 1">
<Badge
- v-if="record.launch === 5"
+ v-if="record.launch == 5"
class="build-badge"
count="NEW"
:title="t('flink.app.view.recheck')"
@@ -231,7 +231,7 @@
<State option="state" :data="record" />
</template>
<template v-if="column.dataIndex === 'launch'">
- <State option="launch" :title="launchTitleMap.get(record.launch)"
:data="record" />
+ <State option="launch" :title="launchTitleMap[record.launch] || ''"
:data="record" />
<Divider type="vertical" style="margin: 0 4px"
v-if="record.buildStatus != null" />
<State
option="build"
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StartApplicationModal.vue
b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StartApplicationModal.vue
index 27a4705f7..64ca4e430 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StartApplicationModal.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StartApplicationModal.vue
@@ -62,7 +62,7 @@
unCheckedChildren: 'OFF',
},
defaultValue: false,
- afterItem: h('span', { class: 'conf-switch' }, 'flame Graph support'),
+ afterItem: () => h('span', { class: 'conf-switch' }, 'flame Graph
support'),
ifShow: () => isK8sExecMode(receiveData.executionMode),
},
{
@@ -74,11 +74,12 @@
unCheckedChildren: 'OFF',
},
defaultValue: true,
- afterItem: h(
- 'span',
- { class: 'conf-switch' },
- 'restore the application from savepoint or latest checkpoint',
- ),
+ afterItem: () =>
+ h(
+ 'span',
+ { class: 'conf-switch' },
+ 'restore the application from savepoint or latest checkpoint',
+ ),
},
{
field: 'startSavePoint',
@@ -87,11 +88,12 @@
receiveData.historySavePoint && receiveData.historySavePoint.length
> 0
? 'Select'
: 'Input',
- afterItem: h(
- 'span',
- { class: 'conf-switch' },
- 'restore the application from savepoint or latest checkpoint',
- ),
+ afterItem: () =>
+ h(
+ 'span',
+ { class: 'conf-switch' },
+ 'restore the application from savepoint or latest checkpoint',
+ ),
slot: 'savepoint',
ifShow: ({ values }) => values.startSavePointed &&
!receiveData.latestSavePoint,
required: true,
@@ -104,7 +106,8 @@
checkedChildren: 'ON',
unCheckedChildren: 'OFF',
},
- afterItem: h('span', { class: 'conf-switch' }, 'ignore savepoint then
cannot be restored'),
+ afterItem: () =>
+ h('span', { class: 'conf-switch' }, 'ignore savepoint then cannot be
restored'),
defaultValue: false,
ifShow: ({ values }) => values.startSavePointed,
},
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StopApplicationModal.vue
b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StopApplicationModal.vue
index f0916cfee..26c3a9007 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StopApplicationModal.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StopApplicationModal.vue
@@ -54,7 +54,8 @@
unCheckedChildren: 'OFF',
},
defaultValue: true,
- afterItem: h('span', { class: 'conf-switch' }, 'trigger savePoint
before taking cancel'),
+ afterItem: () =>
+ h('span', { class: 'conf-switch' }, 'trigger savePoint before taking
cancel'),
},
{
field: 'customSavepoint',
@@ -64,7 +65,7 @@
placeholder: 'Entry the custom savepoint path',
allowClear: true,
},
- afterItem: h('span', { class: 'conf-switch' }, 'cancel job with
savepoint path'),
+ afterItem: () => h('span', { class: 'conf-switch' }, 'cancel job with
savepoint path'),
ifShow: ({ values }) => !!values.stopSavePointed,
},
{
@@ -76,7 +77,7 @@
unCheckedChildren: 'OFF',
},
defaultValue: false,
- afterItem: h('span', { class: 'conf-switch' }, 'Send max watermark
before stopped'),
+ afterItem: () => h('span', { class: 'conf-switch' }, 'Send max
watermark before stopped'),
},
],
colon: true,
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 2233dab0f..be1326adf 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
@@ -40,17 +40,32 @@
<Icon icon="ant-design:eye-outlined" />
{{ t('flink.app.flinkSql.preview') }}
</a-button>
- <a-button class="flinksql-tool-item" size="small"
:type="canReview?'default':'primary'" @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>
</ButtonGroup>
<ButtonGroup v-else class="flinksql-tool">
- <a-button type="primary" class="flinksql-tool-item" v-if="canReview"
@click="emit('preview', value)">
+ <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 class="flinksql-tool-item" size="small"
:type="canReview?'default':'primary'" @click="toggle">
+ <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>
@@ -63,7 +78,7 @@
};
</script>
<script lang="ts" setup>
- import { Tooltip } from 'ant-design-vue';
+ import { Button, Tooltip } from 'ant-design-vue';
import { FullscreenExitOutlined } from '@ant-design/icons-vue';
import { computed, ref, toRefs, watchEffect } from 'vue';
import { getMonacoOptions } from '../data';
@@ -72,6 +87,8 @@
import { useI18n } from '/@/hooks/web/useI18n';
import { useMonaco } from '/@/hooks/web/useMonaco';
const { t } = useI18n();
+ const ButtonGroup = Button.Group;
+
const props = defineProps({
value: {
type: String,
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.tsx
b/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.tsx
index e61c6f487..ac7539c7f 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.tsx
+++
b/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.tsx
@@ -18,6 +18,7 @@
import { defineComponent, toRefs, unref } from 'vue';
import { Tag, Tooltip } from 'ant-design-vue';
import './State.less';
+import { LaunchStateEnum, OptionStateEnum } from '/@/enums/flinkEnum';
/* state map*/
const stateMap = {
@@ -41,23 +42,39 @@ const stateMap = {
};
/* option state map*/
const optionStateMap = {
- 1: { color: '#1ABBDC', title: 'LAUNCHING', class:
'status-processing-deploying' },
- 2: { color: '#faad14', title: 'CANCELLING', class:
'status-processing-cancelling' },
- 3: { color: '#1AB58E', title: 'STARTING', class:
'status-processing-starting' },
- 4: { color: '#faad14', title: 'SAVEPOINT', class:
'status-processing-cancelling' },
+ [OptionStateEnum.LAUNCHING]: {
+ color: '#1ABBDC',
+ title: 'LAUNCHING',
+ class: 'status-processing-deploying',
+ },
+ [OptionStateEnum.CANCELLING]: {
+ color: '#faad14',
+ title: 'CANCELLING',
+ class: 'status-processing-cancelling',
+ },
+ [OptionStateEnum.STARTING]: {
+ color: '#1AB58E',
+ title: 'STARTING',
+ class: 'status-processing-starting',
+ },
+ [OptionStateEnum.SAVEPOINTING]: {
+ color: '#faad14',
+ title: 'SAVEPOINT',
+ class: 'status-processing-cancelling',
+ },
};
/* launch state map*/
const launchStateMap = {
- 0: { color: '#52c41a', title: 'DONE' },
- 1: { color: '#fa8c16', title: 'WAITING' },
- 2: {
+ [LaunchStateEnum.DONE]: { color: '#52c41a', title: 'DONE' },
+ [LaunchStateEnum.NEED_LAUNCH]: { color: '#fa8c16', title: 'WAITING' },
+ [LaunchStateEnum.LAUNCHING]: {
color: '#52c41a',
title: 'LAUNCHING',
class: 'status-processing-deploying',
},
- 3: { color: '#fa8c16', title: 'PENDING' },
- 4: { color: '#fa8c16', title: 'WAITING' },
+ [LaunchStateEnum.NEED_RESTART]: { color: '#fa8c16', title: 'PENDING' },
+ [LaunchStateEnum.NEED_ROLLBACK]: { color: '#fa8c16', title: 'WAITING' },
};
launchStateMap[-1] = { color: '#f5222d', title: 'FAILED' };
@@ -129,7 +146,7 @@ export default defineComponent({
});
}
const renderOtherOption = () => {
- if ([4, 5, 6].includes(unref(data)?.state || unref(data)?.optionState
=== 4)) {
+ if ([4, 5, 6].includes(unref(data)?.state || unref(data)?.optionState ==
4)) {
return (
<div class="task-tag">
{unref(data).totalTask && (
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/app/components/VariableReview.vue
b/streampark-console/streampark-console-webapp/src/views/flink/app/components/VariableReview.vue
index 20782c9ac..3022a4361 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/app/components/VariableReview.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/app/components/VariableReview.vue
@@ -26,7 +26,7 @@
<EyeOutlined style="color: green" />
Flink SQL preview
</template>
- <div ref="flinkReviewRef" class="h-[calc(100vh-150px)] border"></div>
+ <div ref="flinkReviewRef" class="h-[calc(100vh-150px)]
flink-preview"></div>
</BasicDrawer>
</template>
@@ -58,3 +58,8 @@
}
});
</script>
+<style lang="less">
+ .flink-preview {
+ border: 1px solid @border-color-base;
+ }
+</style>
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/app/data/index.ts
b/streampark-console/streampark-console-webapp/src/views/flink/app/data/index.ts
index 1fb37f1ec..7fe8b8ce2 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/app/data/index.ts
+++
b/streampark-console/streampark-console-webapp/src/views/flink/app/data/index.ts
@@ -16,7 +16,7 @@
*/
import { dateToDuration } from '/@/utils/dateUtil';
import { BasicColumn } from '/@/components/Table';
-import { ExecModeEnum } from '/@/enums/flinkEnum';
+import { ExecModeEnum, LaunchStateEnum } from '/@/enums/flinkEnum';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
@@ -124,9 +124,10 @@ export const cpTriggerAction = [
{ label: 'alert', value: 1 },
{ label: 'restart', value: 2 },
];
-export const launchTitleMap = new Map();
-launchTitleMap.set(-1, 'launch failed');
-launchTitleMap.set(1, 'current job need relaunch');
-launchTitleMap.set(2, 'launching');
-launchTitleMap.set(3, 'launch finished,need restart');
-launchTitleMap.set(4, 'application is rollbacked,need relaunch');
+export const launchTitleMap = {
+ [LaunchStateEnum.FAILED]: 'launch failed',
+ [LaunchStateEnum.NEED_LAUNCH]: 'current job need relaunch',
+ [LaunchStateEnum.LAUNCHING]: 'launching',
+ [LaunchStateEnum.NEED_RESTART]: 'launch finished,need restart',
+ [LaunchStateEnum.NEED_ROLLBACK]: 'application is rollbacked,need relaunch',
+};
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 96e8d22aa..8633f4e6e 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
@@ -24,7 +24,7 @@ import { AppListRecord } from '/@/api/flink/app/app.type';
import { fetchFlamegraph } from '/@/api/flink/app/metrics';
import { ActionItem, FormProps } from '/@/components/Table';
import { useMessage } from '/@/hooks/web/useMessage';
-import { ExecModeEnum } from '/@/enums/flinkEnum';
+import { ExecModeEnum, LaunchStateEnum, OptionStateEnum } from
'/@/enums/flinkEnum';
import { usePermission } from '/@/hooks/web/usePermission';
import { useI18n } from '/@/hooks/web/useI18n';
export enum JobTypeEnum {
@@ -69,14 +69,21 @@ export const useAppTableAction = (
},
{
tooltip: { title: t('flink.app.operation.launch') },
- ifShow: [-1, 1, 4].includes(record.launch) && record['optionState']
=== 0,
+ ifShow:
+ [
+ LaunchStateEnum.FAILED,
+ LaunchStateEnum.NEED_LAUNCH,
+ LaunchStateEnum.NEED_ROLLBACK,
+ ].includes(record.launch) && record['optionState'] ==
OptionStateEnum.NONE,
auth: 'app:launch',
icon: 'ant-design:cloud-upload-outlined',
onClick: handleCheckLaunchApp.bind(null, record),
},
{
tooltip: { title: t('flink.app.operation.launchDetail') },
- ifShow: [-1, 2].includes(record.launch) || record['optionState'] === 1,
+ ifShow:
+ [LaunchStateEnum.FAILED,
LaunchStateEnum.LAUNCHING].includes(record.launch) ||
+ record['optionState'] == OptionStateEnum.LAUNCHING,
auth: 'app:launch',
icon: 'ant-design:container-outlined',
onClick: () => openBuildDrawer(true, { appId: record.id }),
@@ -90,7 +97,7 @@ export const useAppTableAction = (
},
{
tooltip: { title: t('flink.app.operation.cancel') },
- ifShow: record.state === 5 && record['optionState'] === 0,
+ ifShow: record.state === 5 && record['optionState'] ==
OptionStateEnum.NONE,
auth: 'app:cancel',
icon: 'ant-design:pause-circle-outlined',
onClick: handleCancel.bind(null, record),
@@ -107,7 +114,7 @@ export const useAppTableAction = (
record.executionMode,
),
auth: 'app:detail',
- icon: 'ant-design:sync-outlined',
+ icon: 'ant-design:code-outlined',
onClick: () => openLogModal(true, { app: record }),
},
{
@@ -124,10 +131,10 @@ export const useAppTableAction = (
// Record the current page number
sessionStorage.setItem('appPageNo', String(currentPageNo || 1));
flinkAppStore.setApplicationId(app.id);
- if (app.appType === 1) {
+ if (app.appType == 1) {
// jobType( 1 custom code 2: flinkSQL)
router.push({ path: '/flink/app/edit_streampark', query: { appId: app.id
} });
- } else if (app.appType === 2) {
+ } else if (app.appType == 2) {
//Apache Flink
router.push({ path: '/flink/app/edit_flink', query: { appId: app.id } });
}
@@ -140,7 +147,7 @@ export const useAppTableAction = (
}
// click stop application
function handleCancel(app: AppListRecord) {
- if (!optionApps.stopping.get(app.id) || app['optionState'] === 0) {
+ if (!optionApps.stopping.get(app.id) || app['optionState'] ==
OptionStateEnum.NONE) {
openStopModal(true, { application: app });
}
}
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/app/styles/View.less
b/streampark-console/streampark-console-webapp/src/views/flink/app/styles/View.less
index 393c23fbc..6d214d15b 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/app/styles/View.less
+++
b/streampark-console/streampark-console-webapp/src/views/flink/app/styles/View.less
@@ -166,6 +166,12 @@
}
}
-[data-theme='dark'] .app_list .app_sql {
- color: #f4f5f6;
+[data-theme='dark'] {
+ .app_list .app_sql {
+ color: #f4f5f6;
+ }
+
+ .gutter-box {
+ box-shadow: 0 2px 3px #000;
+ }
}
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/app/utils/index.ts
b/streampark-console/streampark-console-webapp/src/views/flink/app/utils/index.ts
index 561641106..0c11c04cb 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/app/utils/index.ts
+++
b/streampark-console/streampark-console-webapp/src/views/flink/app/utils/index.ts
@@ -18,7 +18,7 @@ import { optionsKeyMapping } from '../data/option';
import { fetchYarn } from '/@/api/flink/app/app';
import { AppListRecord } from '/@/api/flink/app/app.type';
import { fetchActiveURL } from '/@/api/flink/setting/flinkCluster';
-import { ExecModeEnum } from '/@/enums/flinkEnum';
+import { ExecModeEnum, LaunchStateEnum } from '/@/enums/flinkEnum';
export function handleAppBuildStatusColor(statusCode) {
switch (statusCode) {
@@ -152,7 +152,7 @@ export function handleIsStart(app, optionApps) {
* The posted task has been revoked REVOKED(10);
*/
- const launch = [0, 3].includes(app.launch);
+ const launch = [LaunchStateEnum.DONE,
LaunchStateEnum.NEED_RESTART].includes(app.launch);
const optionState = !optionApps.starting.get(app.id) || app['optionState']
=== 0 || false;
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/project/Edit.vue
b/streampark-console/streampark-console-webapp/src/views/flink/project/Edit.vue
index 0b5917d06..ab7ea4b90 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/project/Edit.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/project/Edit.vue
@@ -26,6 +26,7 @@
import { updateProject } from '/@/api/flink/project';
import { BasicForm } from '/@/components/Form';
import { PageWrapper } from '/@/components/Page';
+ import { BuildStateEnum } from '/@/enums/flinkEnum';
import { useI18n } from '/@/hooks/web/useI18n';
import { useMessage } from '/@/hooks/web/useMessage';
const { getLoading, registerForm, submit, handleSubmit, handleGet,
projectResource } =
@@ -47,7 +48,7 @@
projectResource.branches !== values.branches ||
projectResource.pom !== values.pom
) {
- buildState.value = -2;
+ buildState.value = BuildStateEnum.NEED_REBUILD;
} else {
buildState.value = projectResource.buildState;
}
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/project/View.vue
b/streampark-console/streampark-console-webapp/src/views/flink/project/View.vue
index 134528ea2..428e9fead 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/project/View.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/project/View.vue
@@ -43,7 +43,7 @@
<a-card :bordered="false">
<a-spin :spinning="loading">
<a-list>
- <list-item
+ <ListItem
:key="item.id"
v-for="item in projectDataSource"
:item="item"
@@ -60,7 +60,7 @@
import { defineComponent, onUnmounted, reactive, ref, unref, watch } from
'vue';
import { PageWrapper } from '/@/components/Page';
- import { statusList, BuildStatusEnum } from './project.data';
+ import { statusList } from './project.data';
import { RadioGroup, Radio, Input, Card, List, Spin } from 'ant-design-vue';
import { getList } from '/@/api/flink/project';
import { ProjectRecord } from '/@/api/flink/project/model/projectModel';
@@ -96,7 +96,7 @@
const loading = ref(false);
const queryParams = reactive({
- buildState: BuildStatusEnum.All,
+ buildState: '',
});
let projectDataSource = ref<Array<ProjectRecord>>([]);
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/project/components/ListItem.vue
b/streampark-console/streampark-console-webapp/src/views/flink/project/components/ListItem.vue
index 5a186eae3..3dd6c2dba 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/project/components/ListItem.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/project/components/ListItem.vue
@@ -64,8 +64,13 @@
</ul>
<div class="operation">
<a-tooltip title="See Build log">
- <a-button shape="circle" @click="handleSeeLog" class="!leading-26px">
- <Icon icon="ant-design:eye-outlined" />
+ <a-button
+ shape="circle"
+ @click="handleSeeLog"
+ class="!leading-26px"
+ v-auth="'project:build'"
+ >
+ <Icon icon="ant-design:code-outlined" />
</a-button>
</a-tooltip>
@@ -114,12 +119,13 @@
EditOutlined,
ThunderboltOutlined,
} from '@ant-design/icons-vue';
- import { BuildStatusEnum, ProjectType, buildStateMap } from
'../project.data';
+ import { ProjectType, buildStateMap } from '../project.data';
import { computed } from 'vue';
import { buildProject, deleteProject } from '/@/api/flink/project';
import { useMessage } from '/@/hooks/web/useMessage';
import { useGo } from '/@/hooks/web/usePage';
import { ProjectRecord } from '/@/api/flink/project/model/projectModel';
+ import { BuildStateEnum } from '/@/enums/flinkEnum';
const emit = defineEmits(['viewLog', 'success']);
@@ -128,10 +134,10 @@
const props = defineProps({
item: { type: Object as PropType<ProjectRecord>, required: true },
});
- const needBuild = computed(() => props.item.buildState ==
BuildStatusEnum.NeedBuild);
- const isBuilding = computed(() => props.item.buildState ==
BuildStatusEnum.Building);
+ const needBuild = computed(() => props.item.buildState ==
BuildStateEnum.NEED_REBUILD);
+ const isBuilding = computed(() => props.item.buildState ==
BuildStateEnum.BUILDING);
const buildState = computed(() => {
- return buildStateMap[props.item.buildState] ||
buildStateMap[BuildStatusEnum.BuildFail];
+ return buildStateMap[props.item.buildState] ||
buildStateMap[BuildStateEnum.FAILED];
});
const tagClass = computed(() => buildState.value.className || '');
const svgName = computed(() => {
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/project/components/LogModal.vue
b/streampark-console/streampark-console-webapp/src/views/flink/project/components/LogModal.vue
index 3784165ff..2257e63b2 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/project/components/LogModal.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/project/components/LogModal.vue
@@ -101,7 +101,7 @@
>
<template #title>
<Icon icon="ant-design:code-outlined" style="color: #477de9" />
- <span>{{ project.projectName }} build Log </span>
+ <span>{{ project.projectName }} Build Log </span>
</template>
<div ref="logRef" class="h-full min-h-500px"></div>
<template #footer>
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/project/project.data.ts
b/streampark-console/streampark-console-webapp/src/views/flink/project/project.data.ts
index 44c1d16cf..bca82b4a0 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/project/project.data.ts
+++
b/streampark-console/streampark-console-webapp/src/views/flink/project/project.data.ts
@@ -14,14 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-export enum BuildStatusEnum {
- All = ' ',
- NotBuild = '-1',
- Building = '0',
- BuildSuccess = '1',
- BuildFail = '2',
- NeedBuild = '-2',
-}
+
+import { BuildStateEnum } from '/@/enums/flinkEnum';
interface Status {
label?: string;
@@ -29,23 +23,23 @@ interface Status {
}
export const statusList: Status[] = [
- { label: 'All', key: BuildStatusEnum.All },
- { label: 'Not Build', key: BuildStatusEnum.NotBuild },
- { label: 'Building', key: BuildStatusEnum.Building },
- { label: 'Build Success', key: BuildStatusEnum.BuildSuccess },
- { label: 'Build Failed', key: BuildStatusEnum.BuildFail },
+ { label: 'All', key: '' },
+ { label: 'Not Build', key: String(BuildStateEnum.NOT_BUDIL) },
+ { label: 'Building', key: String(BuildStateEnum.BUILDING) },
+ { label: 'Build Success', key: String(BuildStateEnum.SUCCESSFUL) },
+ { label: 'Build Failed', key: String(BuildStateEnum.FAILED) },
];
export const buildStateMap = {
- [BuildStatusEnum.NotBuild]: { color: '#C0C0C0', label: 'NOT BUILD' },
- [BuildStatusEnum.NeedBuild]: { color: '#FFA500', label: 'NEED REBUILD' },
- [BuildStatusEnum.Building]: {
+ [String(BuildStateEnum.NOT_BUDIL)]: { color: '#C0C0C0', label: 'NOT BUILD' },
+ [String(BuildStateEnum.NEED_REBUILD)]: { color: '#FFA500', label: 'NEED
REBUILD' },
+ [String(BuildStateEnum.BUILDING)]: {
color: '#1AB58E',
label: 'BUILDING',
className: 'status-processing-building',
},
- [BuildStatusEnum.BuildSuccess]: { color: '#52c41a', label: 'SUCCESSFUL' },
- [BuildStatusEnum.BuildFail]: { color: '#f5222d', label: 'FAILED' },
+ [String(BuildStateEnum.SUCCESSFUL)]: { color: '#52c41a', label: 'SUCCESSFUL'
},
+ [String(BuildStateEnum.FAILED)]: { color: '#f5222d', label: 'FAILED' },
};
export enum ProjectType {
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/setting/components/AlertModal.vue
b/streampark-console/streampark-console-webapp/src/views/flink/setting/components/AlertModal.vue
index 549c5a671..f57530bb4 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/setting/components/AlertModal.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/setting/components/AlertModal.vue
@@ -30,11 +30,12 @@
import { fetchAlertAdd, fetchAlertUpdate, fetchExistsAlert } from
'/@/api/flink/setting/alert';
import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage';
+ import { useI18n } from '/@/hooks/web/useI18n';
const FormItem = Form.Item;
const SelectOption = Select.Option;
const InputTextArea = Input.TextArea;
-
+ const { t } = useI18n();
const emit = defineEmits(['reload', 'register']);
const alertId = ref<string | null>(null);
const alertType = ref<string[]>([]);
@@ -54,11 +55,8 @@
label: 'Alert Name',
component: 'Input',
componentProps: { allowClear: true, placeholder: 'Please enter alert
name' },
- afterItem: h(
- 'span',
- { class: 'conf-switch' },
- 'the alert name, e.g: StreamPark team alert',
- ),
+ afterItem: () =>
+ h('span', { class: 'conf-switch' }, 'the alert name, e.g: StreamPark
team alert'),
dynamicRules: () => {
return [
{
@@ -123,9 +121,7 @@
secretEnable: formValue.dingtalkSecretEnable,
secretToken: formValue.dingtalkSecretToken,
},
- weComParams: {
- token: formValue.weToken,
- },
+ weComParams: { token: formValue.weToken },
larkParams: {
token: formValue.larkToken,
isAtAll: formValue.larkIsAtAll,
@@ -134,7 +130,6 @@
},
isJsonType: true,
};
- console.log('Update alarm parameters:' + JSON.stringify(param));
// No id means new operation
if (!param.id) {
@@ -192,7 +187,12 @@
</script>
<template>
- <BasicModal ok-text="Submit" @register="registerModal" v-bind="$attrs"
@ok="handleSubmit">
+ <BasicModal
+ :ok-text="t('common.submitText')"
+ @register="registerModal"
+ v-bind="$attrs"
+ @ok="handleSubmit"
+ >
<template #title>
<SvgIcon name="alarm" size="25" />
Alert Setting
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/setting/components/FlinkEnvModal.vue
b/streampark-console/streampark-console-webapp/src/views/flink/setting/components/FlinkEnvModal.vue
index 9cc97b242..59b873224 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/setting/components/FlinkEnvModal.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/setting/components/FlinkEnvModal.vue
@@ -54,7 +54,7 @@
placeholder: 'Please enter flink name',
allowClear: true,
},
- afterItem: h('span', { class: 'conf-switch' }, 'the flink name, e.g:
flink-1.12'),
+ afterItem: () => h('span', { class: 'conf-switch' }, 'the flink name,
e.g: flink-1.12'),
rules: [{ required: true, message: 'flink name is required' }],
},
{
@@ -65,7 +65,7 @@
placeholder: 'Please enter flink home',
allowClear: true,
},
- afterItem: h('span', { class: 'conf-switch' }, 'The absolute path of
the FLINK_HOME'),
+ afterItem: () => h('span', { class: 'conf-switch' }, 'The absolute
path of the FLINK_HOME'),
rules: [{ required: true, message: 'flink home is required' }],
},
{
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/variable/View.vue
b/streampark-console/streampark-console-webapp/src/views/flink/variable/View.vue
index 263f9b6fb..0fa6a97b2 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/variable/View.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/variable/View.vue
@@ -43,8 +43,7 @@
icon: 'icon-park-outline:mind-mapping',
tooltip: t('flink.variable.table.depend'),
auth: 'variable:depend_apps',
- onClick: () =>
- router.push('/flink/variable/depend_apps?id=' +
record.variableCode),
+ onClick: () => router.push('/flink/variable/depend_apps?id=' +
record.variableCode),
},
{
icon: 'ant-design:delete-outlined',
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableDrawer.vue
b/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableDrawer.vue
index 252f658c9..4f1e4628c 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableDrawer.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableDrawer.vue
@@ -109,8 +109,11 @@
field: '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' }],
+ componentProps: {
+ rows: 4,
+ placeholder: t('flink.variable.table.variableValuePlaceholder'),
+ },
+ rules: [{ required: true, message:
t('flink.variable.table.variableValuePlaceholder') }],
},
{
field: 'description',
@@ -128,11 +131,8 @@
unCheckedChildren: 'OFF',
},
defaultValue: false,
- afterItem: h(
- 'span',
- { class: 'conf-switch' },
- t('flink.variable.form.desensitizationDesc'),
- ),
+ afterItem: () =>
+ h('span', { class: 'conf-switch' },
t('flink.variable.form.desensitizationDesc')),
},
];
});
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/variable/variable.data.ts
b/streampark-console/streampark-console-webapp/src/views/flink/variable/variable.data.ts
index 47f5c36a8..d3e6851e6 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/variable/variable.data.ts
+++
b/streampark-console/streampark-console-webapp/src/views/flink/variable/variable.data.ts
@@ -45,7 +45,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'description',
label: t('common.description'),
component: 'Input',
- componentProps: { placeholder:
t('flink.variable.table.variableValuePlaceholder') },
+ componentProps: { placeholder:
t('flink.variable.table.descriptionPlaceholder') },
colProps: { span: 8 },
},
];
diff --git
a/streampark-console/streampark-console-webapp/src/views/system/menu/menu.data.ts
b/streampark-console/streampark-console-webapp/src/views/system/menu/menu.data.ts
index a5f6617f3..ef7bd785a 100644
---
a/streampark-console/streampark-console-webapp/src/views/system/menu/menu.data.ts
+++
b/streampark-console/streampark-console-webapp/src/views/system/menu/menu.data.ts
@@ -50,7 +50,7 @@ export const columns: BasicColumn[] = [
},
},
{
- title: t('system.menu.table.icon'),
+ title: t('system.menu.table.type'),
dataIndex: 'type',
width: 90,
customRender: ({ record }) => {
@@ -60,9 +60,19 @@ export const columns: BasicColumn[] = [
},
{ title: t('system.menu.table.path'), dataIndex: 'path' },
{ title: t('system.menu.table.component'), dataIndex: 'component' },
- { title: t('system.menu.table.permission'), dataIndex: 'permission', width:
150 },
- { title: t('system.menu.table.order'), dataIndex: 'order', width: 90 },
- { title: t('common.createTime'), dataIndex: 'createTime' },
+ { title: t('system.menu.table.permission'), dataIndex: 'permission', width:
160 },
+ { title: t('system.menu.table.order'), dataIndex: 'order', width: 60 },
+ {
+ title: t('system.menu.table.display'),
+ dataIndex: 'display',
+ width: 80,
+ align: 'center',
+ customRender: ({ record }) => {
+ const text = record.display ? t('common.yes') : t('common.no');
+ return h(Tag, { color: record.display ? 'green' : 'red' }, () => text);
+ },
+ },
+ { title: t('common.createTime'), dataIndex: 'createTime', width: 180 },
];
export const searchFormSchema: FormSchema[] = [