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/streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new 00d9cf4e7 [Bug] FE route name issue#4211 fixed. (#4224)
00d9cf4e7 is described below
commit 00d9cf4e72f53008c75999683f043ab308824a70
Author: benjobs <[email protected]>
AuthorDate: Fri Apr 11 17:18:55 2025 +0800
[Bug] FE route name issue#4211 fixed. (#4224)
* [Improve] ci bug fixed.
* [Bug] vue router-name bug fixed.
---
.github/workflows/backend.yml | 2 +-
.github/workflows/docs.yml | 2 +-
.github/workflows/e2e.yml | 2 +-
.github/workflows/frontend.yml | 2 +-
.github/workflows/unit-test.yml | 2 +-
.../console/core/service/impl/DistributedTaskServiceImpl.java | 6 +++---
.../streampark/console/core/service/DatabaseServiceTest.java | 2 ++
.../console/core/service/DistributedTaskServiceTest.java | 5 ++---
.../src/components/Application/src/AppDarkModeToggle.vue | 4 +++-
.../src/components/ContextMenu/src/ContextMenu.vue | 4 +++-
.../src/components/Form/src/BasicForm.vue | 2 +-
.../src/components/Page/src/PageFooter.vue | 4 +++-
.../src/components/Table/src/components/HeaderCell.vue | 2 +-
.../streampark-console-webapp/src/hooks/web/useLockPage.ts | 9 ++++++---
.../src/router/guard/permissionGuard.ts | 6 ++++--
.../streampark-console-webapp/src/router/routes/basic.ts | 2 +-
streampark-console/streampark-console-webapp/src/utils/props.ts | 2 +-
.../streampark-console-webapp/src/views/setting/alarm/View.vue | 2 +-
18 files changed, 36 insertions(+), 24 deletions(-)
diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml
index 7a0a79ab2..8ea6222e7 100644
--- a/.github/workflows/backend.yml
+++ b/.github/workflows/backend.yml
@@ -43,7 +43,7 @@ jobs:
not-ignore: ${{ steps.filter.outputs.not-ignore }}
steps:
- uses: actions/checkout@v4
- - uses: dorny/paths-filter@v3
+ - uses: dorny/[email protected]
id: filter
with:
filters: |
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index a3fc1eab0..225181d3c 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -43,7 +43,7 @@ jobs:
not-ignore: ${{ steps.filter.outputs.not-ignore }}
steps:
- uses: actions/checkout@v4
- - uses: dorny/paths-filter@v3
+ - uses: dorny/[email protected]
id: filter
with:
filters: |
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 77904aa08..070e984b5 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -38,7 +38,7 @@ jobs:
not-ignore: ${{ steps.filter.outputs.not-ignore }}
steps:
- uses: actions/checkout@v4
- - uses: dorny/paths-filter@v3
+ - uses: dorny/[email protected]
id: filter
with:
filters: |
diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml
index 12c9aaa12..869161831 100644
--- a/.github/workflows/frontend.yml
+++ b/.github/workflows/frontend.yml
@@ -38,7 +38,7 @@ jobs:
not-ignore: ${{ steps.filter.outputs.not-ignore }}
steps:
- uses: actions/checkout@v4
- - uses: dorny/paths-filter@v3
+ - uses: dorny/[email protected]
id: filter
with:
filters: |
diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
index 9baee33b0..3359cde54 100644
--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@ -43,7 +43,7 @@ jobs:
not-ignore: ${{ steps.filter.outputs.not-ignore }}
steps:
- uses: actions/checkout@v4
- - uses: dorny/paths-filter@v3
+ - uses: dorny/[email protected]
id: filter
with:
filters: |
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/DistributedTaskServiceImpl.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/DistributedTaskServiceImpl.java
index 7d33973e3..639bc3bb1 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/DistributedTaskServiceImpl.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/DistributedTaskServiceImpl.java
@@ -226,13 +226,13 @@ public class DistributedTaskServiceImpl extends
ServiceImpl<DistributedTaskMappe
return;
}
this.save(distributedTask);
- } catch (JsonProcessingException e) {
+ } catch (Exception e) {
log.error("Failed to save Distributed task: {}", e.getMessage());
}
}
public DistributedTask getDistributedTaskByFlinkApp(FlinkApplication
appParam, boolean autoStart,
- DistributedTaskEnum
action) throws JsonProcessingException {
+ DistributedTaskEnum
action) throws Exception {
FlinkTaskItem flinkTaskItem = new FlinkTaskItem();
flinkTaskItem.setAppId(appParam.getId());
flinkTaskItem.setAutoStart(autoStart);
@@ -252,7 +252,7 @@ public class DistributedTaskServiceImpl extends
ServiceImpl<DistributedTaskMappe
}
public DistributedTask getDistributedTaskBySparkApp(SparkApplication
appParam, boolean autoStart,
- DistributedTaskEnum
action) throws JsonProcessingException {
+ DistributedTaskEnum
action) throws Exception {
SparkTaskItem sparkTaskItem = new SparkTaskItem();
sparkTaskItem.setAppId(appParam.getId());
sparkTaskItem.setAutoStart(autoStart);
diff --git
a/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/DatabaseServiceTest.java
b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/DatabaseServiceTest.java
index d86f2f8d7..99bf17ba4 100644
---
a/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/DatabaseServiceTest.java
+++
b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/DatabaseServiceTest.java
@@ -40,8 +40,10 @@ public class DatabaseServiceTest extends MysqlBaseITCASE {
@Autowired
private FlinkCatalogService catalogService;
+
@Autowired
private DatabaseService databaseService;
+
private FlinkCatalogParams flinkCatalog = new FlinkCatalogParams();
@BeforeEach
diff --git
a/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/DistributedTaskServiceTest.java
b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/DistributedTaskServiceTest.java
index 5e1b3adf8..9149101b0 100644
---
a/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/DistributedTaskServiceTest.java
+++
b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/DistributedTaskServiceTest.java
@@ -25,7 +25,6 @@ import
org.apache.streampark.console.core.entity.SparkApplication;
import org.apache.streampark.console.core.enums.DistributedTaskEnum;
import
org.apache.streampark.console.core.service.impl.DistributedTaskServiceImpl;
-import com.fasterxml.jackson.core.JacksonException;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
@@ -68,7 +67,7 @@ class DistributedTaskServiceTest {
FlinkTaskItem flinkTaskItem =
distributionTaskService.getFlinkTaskItem(distributedTask);
FlinkApplication newApplication =
distributionTaskService.getAppByFlinkTaskItem(flinkTaskItem);
assert (application.equals(newApplication));
- } catch (JacksonException e) {
+ } catch (Exception e) {
log.error("testFlinkTaskAndApp failed:", e);
}
}
@@ -83,7 +82,7 @@ class DistributedTaskServiceTest {
SparkTaskItem sparkTaskItem =
distributionTaskService.getSparkTaskItem(distributedTask);
SparkApplication newApplication =
distributionTaskService.getAppBySparkTaskItem(sparkTaskItem);
assert (application.equals(newApplication));
- } catch (JacksonException e) {
+ } catch (Exception e) {
log.error("testSparkTaskAndApp failed:", e);
}
}
diff --git
a/streampark-console/streampark-console-webapp/src/components/Application/src/AppDarkModeToggle.vue
b/streampark-console/streampark-console-webapp/src/components/Application/src/AppDarkModeToggle.vue
index 19ba3b151..d4e0ce164 100644
---
a/streampark-console/streampark-console-webapp/src/components/Application/src/AppDarkModeToggle.vue
+++
b/streampark-console/streampark-console-webapp/src/components/Application/src/AppDarkModeToggle.vue
@@ -63,7 +63,9 @@
height: 18px;
background-color: #fff;
border-radius: 50%;
- transition: transform 0.5s, background-color 0.5s;
+ transition:
+ transform 0.5s,
+ background-color 0.5s;
will-change: transform;
}
diff --git
a/streampark-console/streampark-console-webapp/src/components/ContextMenu/src/ContextMenu.vue
b/streampark-console/streampark-console-webapp/src/components/ContextMenu/src/ContextMenu.vue
index e08c25f36..78cac5c5b 100644
---
a/streampark-console/streampark-console-webapp/src/components/ContextMenu/src/ContextMenu.vue
+++
b/streampark-console/streampark-console-webapp/src/components/ContextMenu/src/ContextMenu.vue
@@ -179,7 +179,9 @@
background-color: @component-background;
border: 1px solid rgb(0 0 0 / 8%);
border-radius: 0.25rem;
- box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 10%),
+ box-shadow:
+ 0 2px 2px 0 rgb(0 0 0 / 14%),
+ 0 3px 1px -2px rgb(0 0 0 / 10%),
0 1px 5px 0 rgb(0 0 0 / 6%);
background-clip: padding-box;
user-select: none;
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 1cd7e3809..e5a9dacf6 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
@@ -113,7 +113,7 @@
});
const getBindValue = computed(
- () => ({ ...attrs, ...props, ...unref(getProps) } as Recordable),
+ () => ({ ...attrs, ...props, ...unref(getProps) }) as Recordable,
);
const getSchema = computed((): FormSchema[] => {
diff --git
a/streampark-console/streampark-console-webapp/src/components/Page/src/PageFooter.vue
b/streampark-console/streampark-console-webapp/src/components/Page/src/PageFooter.vue
index e89a6ce97..8fdbc8f41 100644
---
a/streampark-console/streampark-console-webapp/src/components/Page/src/PageFooter.vue
+++
b/streampark-console/streampark-console-webapp/src/components/Page/src/PageFooter.vue
@@ -39,7 +39,9 @@
line-height: 44px;
background-color: @component-background;
border-top: 1px solid @border-color-base;
- box-shadow: 0 -6px 16px -8px rgb(0 0 0 / 8%), 0 -9px 28px 0 rgb(0 0 0 /
5%),
+ box-shadow:
+ 0 -6px 16px -8px rgb(0 0 0 / 8%),
+ 0 -9px 28px 0 rgb(0 0 0 / 5%),
0 -12px 48px 16px rgb(0 0 0 / 3%);
transition: width 0.2s;
diff --git
a/streampark-console/streampark-console-webapp/src/components/Table/src/components/HeaderCell.vue
b/streampark-console/streampark-console-webapp/src/components/Table/src/components/HeaderCell.vue
index 35c080269..36ab854c5 100644
---
a/streampark-console/streampark-console-webapp/src/components/Table/src/components/HeaderCell.vue
+++
b/streampark-console/streampark-console-webapp/src/components/Table/src/components/HeaderCell.vue
@@ -22,7 +22,7 @@
props: {
column: {
type: Object as PropType<BasicColumn>,
- default: () => ({} as BasicColumn),
+ default: () => ({}) as BasicColumn,
},
},
setup(props) {
diff --git
a/streampark-console/streampark-console-webapp/src/hooks/web/useLockPage.ts
b/streampark-console/streampark-console-webapp/src/hooks/web/useLockPage.ts
index c543be954..9a6607421 100644
--- a/streampark-console/streampark-console-webapp/src/hooks/web/useLockPage.ts
+++ b/streampark-console/streampark-console-webapp/src/hooks/web/useLockPage.ts
@@ -32,9 +32,12 @@ export function useLockPage() {
}
clear();
- timeId = setTimeout(() => {
- lockPage();
- }, lockTime * 60 * 1000);
+ timeId = setTimeout(
+ () => {
+ lockPage();
+ },
+ lockTime * 60 * 1000,
+ );
}
function lockPage(): void {
diff --git
a/streampark-console/streampark-console-webapp/src/router/guard/permissionGuard.ts
b/streampark-console/streampark-console-webapp/src/router/guard/permissionGuard.ts
index 4dc4c408a..57d598728 100644
---
a/streampark-console/streampark-console-webapp/src/router/guard/permissionGuard.ts
+++
b/streampark-console/streampark-console-webapp/src/router/guard/permissionGuard.ts
@@ -7,6 +7,8 @@ import { useUserStoreWithOut } from '/@/store/modules/user';
import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic';
+import { PAGE_NOT_FOUND_NAME } from '/@/router/constant';
+
import { RootRoute } from '/@/router/routes';
const LOGIN_PATH = PageEnum.BASE_LOGIN;
@@ -73,7 +75,7 @@ export function createPermissionGuard(router: Router) {
// Jump to the 404 page after processing the login
if (
from.path === LOGIN_PATH &&
- to.name === PAGE_NOT_FOUND_ROUTE.name &&
+ to.name === PAGE_NOT_FOUND_NAME &&
to.fullPath !== (userStore.getUserInfo.homePath || PageEnum.BASE_HOME)
) {
next(userStore.getUserInfo.homePath || PageEnum.BASE_HOME);
@@ -104,7 +106,7 @@ export function createPermissionGuard(router: Router) {
permissionStore.setDynamicAddedRoute(true);
- if (to.name === PAGE_NOT_FOUND_ROUTE.name) {
+ if (to.name === PAGE_NOT_FOUND_NAME) {
// After dynamically adding the route, it should be redirected to
fullPath here, otherwise the 404 page content will load
next({ path: to.fullPath, replace: true, query: to.query });
} else {
diff --git
a/streampark-console/streampark-console-webapp/src/router/routes/basic.ts
b/streampark-console/streampark-console-webapp/src/router/routes/basic.ts
index ff37f756f..217da43a8 100644
--- a/streampark-console/streampark-console-webapp/src/router/routes/basic.ts
+++ b/streampark-console/streampark-console-webapp/src/router/routes/basic.ts
@@ -10,7 +10,7 @@ import {
// 404 on a page
export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
path: '/:path(.*)*',
- name: PAGE_NOT_FOUND_NAME,
+ name: PAGE_NOT_FOUND_NAME + '_PARENT',
component: LAYOUT,
meta: {
title: 'ErrorPage',
diff --git a/streampark-console/streampark-console-webapp/src/utils/props.ts
b/streampark-console/streampark-console-webapp/src/utils/props.ts
index 4a15ec465..368f490f2 100644
--- a/streampark-console/streampark-console-webapp/src/utils/props.ts
+++ b/streampark-console/streampark-console-webapp/src/utils/props.ts
@@ -175,7 +175,7 @@ export const buildProps = <
: never;
};
-export const definePropType = <T>(val: any) => ({ [wrapperKey]: val } as
PropWrapper<T>);
+export const definePropType = <T>(val: any) => ({ [wrapperKey]: val }) as
PropWrapper<T>;
export const keyOf = <T extends Object>(arr: T) => Object.keys(arr) as
Array<keyof T>;
export const mutable = <T extends readonly any[] | Record<string,
unknown>>(val: T) =>
diff --git
a/streampark-console/streampark-console-webapp/src/views/setting/alarm/View.vue
b/streampark-console/streampark-console-webapp/src/views/setting/alarm/View.vue
index 45ea6c566..cc43a43e5 100644
---
a/streampark-console/streampark-console-webapp/src/views/setting/alarm/View.vue
+++
b/streampark-console/streampark-console-webapp/src/views/setting/alarm/View.vue
@@ -164,7 +164,7 @@
</script>
<template>
- <PageWrapper contentFullHeight fixed-height content-class="flex flex-col">
+ <PageWrapper contentFullHeight content-class="flex flex-col">
<div class="bg-white py-16px px-24px">
<span class="alarm-title">{{ t('setting.alarm.alertSetting') }}</span>
<div v-auth="'project:create'">