Skip to content

Commit d9c2997

Browse files
committed
[Bug] vue router-name bug fixed.
1 parent eb43366 commit d9c2997

File tree

12 files changed

+31
-19
lines changed

12 files changed

+31
-19
lines changed

streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/DistributedTaskServiceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ public void saveDistributedTask(BaseEntity appParam, boolean autoStart, Distribu
226226
return;
227227
}
228228
this.save(distributedTask);
229-
} catch (JsonProcessingException e) {
229+
} catch (Exception e) {
230230
log.error("Failed to save Distributed task: {}", e.getMessage());
231231
}
232232
}
233233

234234
public DistributedTask getDistributedTaskByFlinkApp(FlinkApplication appParam, boolean autoStart,
235-
DistributedTaskEnum action) throws JsonProcessingException {
235+
DistributedTaskEnum action) throws Exception {
236236
FlinkTaskItem flinkTaskItem = new FlinkTaskItem();
237237
flinkTaskItem.setAppId(appParam.getId());
238238
flinkTaskItem.setAutoStart(autoStart);
@@ -252,7 +252,7 @@ public DistributedTask getDistributedTaskByFlinkApp(FlinkApplication appParam, b
252252
}
253253

254254
public DistributedTask getDistributedTaskBySparkApp(SparkApplication appParam, boolean autoStart,
255-
DistributedTaskEnum action) throws JsonProcessingException {
255+
DistributedTaskEnum action) throws Exception {
256256
SparkTaskItem sparkTaskItem = new SparkTaskItem();
257257
sparkTaskItem.setAppId(appParam.getId());
258258
sparkTaskItem.setAutoStart(autoStart);

streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/DatabaseServiceTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ public class DatabaseServiceTest extends MysqlBaseITCASE {
4040

4141
@Autowired
4242
private FlinkCatalogService catalogService;
43+
4344
@Autowired
4445
private DatabaseService databaseService;
46+
4547
private FlinkCatalogParams flinkCatalog = new FlinkCatalogParams();
4648

4749
@BeforeEach

streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/DistributedTaskServiceTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.apache.streampark.console.core.enums.DistributedTaskEnum;
2626
import org.apache.streampark.console.core.service.impl.DistributedTaskServiceImpl;
2727

28-
import com.fasterxml.jackson.core.JacksonException;
2928
import lombok.extern.slf4j.Slf4j;
3029
import org.junit.jupiter.api.Test;
3130

@@ -68,7 +67,7 @@ void testFlinkTaskAndApp() {
6867
FlinkTaskItem flinkTaskItem = distributionTaskService.getFlinkTaskItem(distributedTask);
6968
FlinkApplication newApplication = distributionTaskService.getAppByFlinkTaskItem(flinkTaskItem);
7069
assert (application.equals(newApplication));
71-
} catch (JacksonException e) {
70+
} catch (Exception e) {
7271
log.error("testFlinkTaskAndApp failed:", e);
7372
}
7473
}
@@ -83,7 +82,7 @@ void testSparkTaskAndApp() {
8382
SparkTaskItem sparkTaskItem = distributionTaskService.getSparkTaskItem(distributedTask);
8483
SparkApplication newApplication = distributionTaskService.getAppBySparkTaskItem(sparkTaskItem);
8584
assert (application.equals(newApplication));
86-
} catch (JacksonException e) {
85+
} catch (Exception e) {
8786
log.error("testSparkTaskAndApp failed:", e);
8887
}
8988
}

streampark-console/streampark-console-webapp/src/components/Application/src/AppDarkModeToggle.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@
6363
height: 18px;
6464
background-color: #fff;
6565
border-radius: 50%;
66-
transition: transform 0.5s, background-color 0.5s;
66+
transition:
67+
transform 0.5s,
68+
background-color 0.5s;
6769
will-change: transform;
6870
}
6971

streampark-console/streampark-console-webapp/src/components/ContextMenu/src/ContextMenu.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@
179179
background-color: @component-background;
180180
border: 1px solid rgb(0 0 0 / 8%);
181181
border-radius: 0.25rem;
182-
box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 10%),
182+
box-shadow:
183+
0 2px 2px 0 rgb(0 0 0 / 14%),
184+
0 3px 1px -2px rgb(0 0 0 / 10%),
183185
0 1px 5px 0 rgb(0 0 0 / 6%);
184186
background-clip: padding-box;
185187
user-select: none;

streampark-console/streampark-console-webapp/src/components/Form/src/BasicForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
});
114114
115115
const getBindValue = computed(
116-
() => ({ ...attrs, ...props, ...unref(getProps) } as Recordable),
116+
() => ({ ...attrs, ...props, ...unref(getProps) }) as Recordable,
117117
);
118118
119119
const getSchema = computed((): FormSchema[] => {

streampark-console/streampark-console-webapp/src/components/Page/src/PageFooter.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
line-height: 44px;
4040
background-color: @component-background;
4141
border-top: 1px solid @border-color-base;
42-
box-shadow: 0 -6px 16px -8px rgb(0 0 0 / 8%), 0 -9px 28px 0 rgb(0 0 0 / 5%),
42+
box-shadow:
43+
0 -6px 16px -8px rgb(0 0 0 / 8%),
44+
0 -9px 28px 0 rgb(0 0 0 / 5%),
4345
0 -12px 48px 16px rgb(0 0 0 / 3%);
4446
transition: width 0.2s;
4547

streampark-console/streampark-console-webapp/src/components/Table/src/components/HeaderCell.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
props: {
2323
column: {
2424
type: Object as PropType<BasicColumn>,
25-
default: () => ({} as BasicColumn),
25+
default: () => ({}) as BasicColumn,
2626
},
2727
},
2828
setup(props) {

streampark-console/streampark-console-webapp/src/hooks/web/useLockPage.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ export function useLockPage() {
3232
}
3333
clear();
3434

35-
timeId = setTimeout(() => {
36-
lockPage();
37-
}, lockTime * 60 * 1000);
35+
timeId = setTimeout(
36+
() => {
37+
lockPage();
38+
},
39+
lockTime * 60 * 1000,
40+
);
3841
}
3942

4043
function lockPage(): void {

streampark-console/streampark-console-webapp/src/router/guard/permissionGuard.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { useUserStoreWithOut } from '/@/store/modules/user';
77

88
import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic';
99

10+
import { PAGE_NOT_FOUND_NAME } from '/@/router/constant';
11+
1012
import { RootRoute } from '/@/router/routes';
1113

1214
const LOGIN_PATH = PageEnum.BASE_LOGIN;
@@ -73,7 +75,7 @@ export function createPermissionGuard(router: Router) {
7375
// Jump to the 404 page after processing the login
7476
if (
7577
from.path === LOGIN_PATH &&
76-
to.name === PAGE_NOT_FOUND_ROUTE.name &&
78+
to.name === PAGE_NOT_FOUND_NAME &&
7779
to.fullPath !== (userStore.getUserInfo.homePath || PageEnum.BASE_HOME)
7880
) {
7981
next(userStore.getUserInfo.homePath || PageEnum.BASE_HOME);
@@ -104,7 +106,7 @@ export function createPermissionGuard(router: Router) {
104106

105107
permissionStore.setDynamicAddedRoute(true);
106108

107-
if (to.name === PAGE_NOT_FOUND_ROUTE.name) {
109+
if (to.name === PAGE_NOT_FOUND_NAME) {
108110
// After dynamically adding the route, it should be redirected to fullPath here, otherwise the 404 page content will load
109111
next({ path: to.fullPath, replace: true, query: to.query });
110112
} else {

streampark-console/streampark-console-webapp/src/router/routes/basic.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
// 404 on a page
1111
export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
1212
path: '/:path(.*)*',
13-
name: PAGE_NOT_FOUND_NAME,
13+
name: PAGE_NOT_FOUND_NAME + '_PARENT',
1414
component: LAYOUT,
1515
meta: {
1616
title: 'ErrorPage',
@@ -20,7 +20,7 @@ export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
2020
children: [
2121
{
2222
path: '/:path(.*)*',
23-
name: PAGE_NOT_FOUND_NAME + '_CHILDREN',
23+
name: PAGE_NOT_FOUND_NAME,
2424
component: EXCEPTION_COMPONENT,
2525
meta: {
2626
title: 'ErrorPage',

streampark-console/streampark-console-webapp/src/utils/props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export const buildProps = <
175175
: never;
176176
};
177177

178-
export const definePropType = <T>(val: any) => ({ [wrapperKey]: val } as PropWrapper<T>);
178+
export const definePropType = <T>(val: any) => ({ [wrapperKey]: val }) as PropWrapper<T>;
179179

180180
export const keyOf = <T extends Object>(arr: T) => Object.keys(arr) as Array<keyof T>;
181181
export const mutable = <T extends readonly any[] | Record<string, unknown>>(val: T) =>

0 commit comments

Comments
 (0)