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 4c98bf06e [Fix] data type check bug (#2079)
4c98bf06e is described below
commit 4c98bf06e132f1c8aea0cd028395e2a656b3d112
Author: WSZ <[email protected]>
AuthorDate: Wed Nov 23 03:20:46 2022 +0800
[Fix] data type check bug (#2079)
* [Fix] data type check bug
* [Improve] change api param
---
.../streampark-console-webapp/src/api/flink/app/app.ts | 14 ++------------
.../streampark-console-webapp/src/views/flink/app/Add.vue | 4 ++--
.../streampark-console-webapp/src/views/flink/app/View.vue | 2 +-
.../src/views/flink/app/components/AppView/BuildDrawer.vue | 4 ++--
.../flink/app/components/AppView/StopApplicationModal.vue | 8 ++++----
.../src/views/flink/app/hooks/useAppTableAction.ts | 2 +-
.../src/views/flink/app/utils/index.ts | 2 +-
7 files changed, 13 insertions(+), 23 deletions(-)
diff --git
a/streampark-console/streampark-console-webapp/src/api/flink/app/app.ts
b/streampark-console/streampark-console-webapp/src/api/flink/app/app.ts
index f4ec9c276..dd40bd8b5 100644
--- a/streampark-console/streampark-console-webapp/src/api/flink/app/app.ts
+++ b/streampark-console/streampark-console-webapp/src/api/flink/app/app.ts
@@ -196,24 +196,14 @@ export function fetchStartLog(data):
Promise<AxiosResponse<any>> {
* @param {Object} data app Id
* @returns {Promise<AxiosResponse<Result>>}
*/
-export function fetchCheckSavepointPath(data: { id: string }):
Promise<AxiosResponse<Result>> {
- return defHttp.post(
- { url: APP_API.CHECK_SAVEPOINT_PATH, data },
- { isReturnNativeResponse: true },
- );
-}
-/**
- * verify Schema
- * @param {String} path
- * @returns {Promise<AxiosResponse<Result>>}
- */
-export function fetchVerifySchema(data: { path: string }):
Promise<AxiosResponse<Result>> {
+export function fetchCheckSavepointPath(data: { id?: string, savePoint?:
string }): Promise<AxiosResponse<Result>> {
return defHttp.post(
{ url: APP_API.CHECK_SAVEPOINT_PATH, data },
{ isReturnNativeResponse: true },
);
}
+
/**
* Cancel
* @param {CancelParam} data
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/app/Add.vue
b/streampark-console/streampark-console-webapp/src/views/flink/app/Add.vue
index 38e3b8818..9979c3220 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/Add.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/Add.vue
@@ -110,7 +110,7 @@
/* Open the sqlConf drawer */
async function handleSQLConf(checked: boolean, model: Recordable) {
if (checked) {
- if (model.configOverride != null) {
+ if (model.configOverride) {
openConfDrawer(true, {
configOverride: model.configOverride,
});
@@ -184,7 +184,7 @@
handleSubmitParams(params, values, k8sTemplate);
// common params...
const resourceFrom = values.resourceFrom;
- if (resourceFrom != null) {
+ if (resourceFrom) {
if (resourceFrom === 'csv') {
params['resourceFrom'] = ResourceFromEnum.CICD;
//streampark flink
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 5e0fdf8fc..82510262f 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
@@ -236,7 +236,7 @@
</template>
<template v-if="column.dataIndex === 'launch'">
<State option="launch" :title="launchTitleMap[record.launch] || ''"
:data="record" />
- <Divider type="vertical" style="margin: 0 4px"
v-if="record.buildStatus != null" />
+ <Divider type="vertical" style="margin: 0 4px"
v-if="record.buildStatus" />
<State
option="build"
:click="openBuildProgressDetailDrawer.bind(null, record)"
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/BuildDrawer.vue
b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/BuildDrawer.vue
index d3146ef8f..93d5689ab 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/BuildDrawer.vue
+++
b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/BuildDrawer.vue
@@ -96,7 +96,7 @@
<Icon icon="ant-design:dashboard-outlined" />
Summary
</h3>
- <template v-if="appBuildDetail.pipeline != null">
+ <template v-if="appBuildDetail.pipeline">
<div>
<Progress
v-if="appBuildDetail.pipeline.hasError"
@@ -136,7 +136,7 @@
{{ t('flink.app.view.stepTitle') }}
</h3>
- <template v-if="appBuildDetail.pipeline != null">
+ <template v-if="appBuildDetail.pipeline">
<Timeline style="margin-top: 20px">
<TimelineItem
v-for="stepItem in appBuildDetail.pipeline.steps"
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 d2bff9bcb..12e8d77dc 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
@@ -27,7 +27,7 @@
import { SvgIcon } from '/@/components/Icon';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
- import { fetchCancel, fetchCheckSavepointPath, fetchVerifySchema } from
'/@/api/flink/app/app';
+ import { fetchCancel, fetchCheckSavepointPath } from '/@/api/flink/app/app';
import { CancelParam } from '/@/api/flink/app/app.type';
import { h } from 'vue';
const emit = defineEmits(['register', 'updateOption']);
@@ -99,9 +99,9 @@
};
if (stopSavePointed) {
- if (customSavepoint != null) {
- const { data } = await fetchVerifySchema({
- path: customSavepoint,
+ if (customSavepoint) {
+ const { data } = await fetchCheckSavepointPath({
+ savePoint: customSavepoint,
});
if (data.data === false) {
createErrorSwal('custom savePoint path is invalid, ' +
data.message);
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 37889c3b9..9119d2c7b 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
@@ -213,7 +213,7 @@ export const useAppTableAction = (
appId: app.id,
width: document.documentElement.offsetWidth ||
document.body.offsetWidth,
});
- if (data != null) {
+ if (data) {
const blob = new Blob([data], { type: 'image/svg+xml' });
const imageUrl = (window.URL ||
window.webkitURL).createObjectURL(blob);
window.open(imageUrl);
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 9ee8e27e9..21d5d1944 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
@@ -119,7 +119,7 @@ export async function handleView(app: AppListRecord, yarn:
Nullable<string>) {
window.open(yarn + '/proxy/' + app['appId'] + '/');
}
} else {
- if (app.flinkRestUrl != null) {
+ if (app.flinkRestUrl) {
window.open(app.flinkRestUrl);
}
}