This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev-2.1.3
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev-2.1.3 by this push:
new cc6ad6e3b [Improve] FE style improvement
cc6ad6e3b is described below
commit cc6ad6e3bc9847c832e68fe69ace8d2113f781e4
Author: benjobs <[email protected]>
AuthorDate: Thu Jan 18 01:09:50 2024 +0800
[Improve] FE style improvement
---
.../src/design/ant/index.less | 7 +--
.../src/locales/lang/en/flink/app.ts | 30 ++++++++++++-
.../src/locales/lang/en/sys.ts | 6 +--
.../src/locales/lang/zh-CN/flink/app.ts | 28 +++++++++++-
.../src/locales/lang/zh-CN/sys.ts | 4 --
.../src/views/flink/app/View.vue | 14 +-----
.../src/views/flink/app/components/State.tsx | 50 ++++++++++++----------
.../views/flink/app/hooks/useAppTableColumns.ts | 2 +-
.../flink/kubernetes/FlinkK8sWatchController.scala | 4 +-
.../kubernetes/watcher/FlinkJobStatusWatcher.scala | 9 ----
10 files changed, 94 insertions(+), 60 deletions(-)
diff --git
a/streampark-console/streampark-console-webapp/src/design/ant/index.less
b/streampark-console/streampark-console-webapp/src/design/ant/index.less
index 5d4f5ce84..587b4e5bd 100644
--- a/streampark-console/streampark-console-webapp/src/design/ant/index.less
+++ b/streampark-console/streampark-console-webapp/src/design/ant/index.less
@@ -69,11 +69,12 @@ span.anticon:not(.app-iconify) {
.bold-tag,
.bold-tag>.ant-tag {
- border-radius: 1px !important;
- padding: 0 3px !important;
+ border-radius: 2px !important;
+ padding: 0 2px !important;
+ font-weight: 400;
cursor: default;
font-size: 10px;
- line-height: 16px;
+ line-height: 18px;
}
.app-bar,
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 6bc8ec70a..8cab36c2b 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
@@ -23,8 +23,8 @@ export default {
flinkVersion: 'Flink Version',
duration: 'Duration',
modifiedTime: 'Modified Time',
- runStatus: 'Run Status',
- releaseBuild: 'Release Status',
+ runStatus: 'Status',
+ releaseBuild: 'Release',
jobType: 'Job Type',
developmentMode: 'Development Mode',
executionMode: 'Execution Mode',
@@ -66,6 +66,32 @@ export default {
status: 'Run Status',
startTime: 'Start Time',
endTime: 'End Time',
+ runState: {
+ added: 'ADDED',
+ initializing: 'INITIALIZING',
+ created: 'CREATED',
+ starting: 'STARTING',
+ restarting: 'RESTARTING',
+ running: 'RUNNING',
+ failing: 'FAILING',
+ failed: 'FAILED',
+ lost: 'LOST',
+ cancelling: 'CANCELLING',
+ canceled: 'CANCELED',
+ finished: 'FINISHED',
+ suspended: 'SUSPENDED',
+ reconciling: 'RECONCILING',
+ mapping: 'MAPPING',
+ silent: 'SILENT',
+ terminated: 'TERMINATED',
+ },
+ releaseState: {
+ failed: 'FAILED',
+ success: 'SUCCESS',
+ waiting: 'WAITING',
+ releasing: 'RELEASING',
+ pending: 'PENDING',
+ },
release: {
releaseTitle: 'The current release of the application is in progress.',
releaseDesc: 'are you sure you want to force another build',
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 9ab4fa2d3..6feb14a32 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
@@ -22,10 +22,8 @@ export default {
timeoutMessage: 'Login timed out, please log in again!',
apiTimeoutMessage: 'The interface request timed out, please refresh the
page and try again!',
apiRequestFailed: 'The interface request failed, please try again later!',
- networkException: 'network anomaly',
- networkExceptionMsg:
- 'Please check if your network connection is normal! The network is
abnormal',
-
+ networkException: 'network error',
+ networkExceptionMsg: 'Network error, please check your network connection!
🌐⚠️',
errMsg401: 'The user does not have permission (token, user name, password
error)!',
errMsg403: 'The user is authorized, but access is forbidden!',
errMsg404: 'Network request error, the resource was not found!',
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 9cbb9c7ab..8768f295b 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
@@ -65,6 +65,25 @@ export default {
status: '运行状态',
startTime: '启动时间',
endTime: '结束时间',
+ runState: {
+ added: '新增',
+ initializing: '初始化',
+ created: '创建',
+ starting: '启动中',
+ restarting: '重启中',
+ running: '运行中',
+ failing: '失败中',
+ failed: '失败',
+ lost: '失联',
+ cancelling: '取消中',
+ canceled: '已取消',
+ finished: '已完成',
+ suspended: '已暂停',
+ reconciling: '调节中',
+ mapping: '映射中',
+ silent: '沉默',
+ terminated: '终止',
+ },
release: {
releaseTitle: '该应用程序的当前启动正在进行中.',
releaseDesc: '您确定要强制进行另一次构建吗',
@@ -188,13 +207,20 @@ export default {
starting: '启动中',
running: '运行中',
failed: '失败',
+ lost: '失联',
canceled: '已取消',
finished: '已完成',
suspended: '暂停',
- lost: '丢失',
silent: '静默',
terminated: '终止',
},
+ releaseState: {
+ failed: '失败',
+ success: '成功',
+ waiting: '待发布',
+ releasing: '发布中',
+ pending: '待回滚',
+ },
addAppTips: {
developmentModePlaceholder: '请选择开发模式',
developmentModeIsRequiredMessage: '开发模式必填',
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 ddac5abdb..5447ab88b 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
@@ -51,15 +51,11 @@ export default {
tableColumnFile: '文件',
tableColumnMsg: '错误信息',
tableColumnStackMsg: 'stack信息',
-
tableActionDesc: '详情',
-
modalTitle: '错误详情',
-
fireVueError: '点击触发vue错误',
fireResourceError: '点击触发资源加载错误',
fireAjaxError: '点击触发ajax错误',
-
enableMessage: '只在`/src/settings/projectSetting.ts`
内的useErrorHandle=true时生效.',
},
exception: {
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 86b43f198..f679ec9e2 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
@@ -25,7 +25,7 @@
import { useI18n } from '/@/hooks/web/useI18n';
import { AppStateEnum, JobTypeEnum, OptionStateEnum, ReleaseStateEnum } from
'/@/enums/flinkEnum';
import { useTimeoutFn } from '@vueuse/core';
- import { Tooltip, Badge, Divider, Tag, Popover } from 'ant-design-vue';
+ import { Tooltip, Badge, Tag, Popover } from 'ant-design-vue';
import { fetchAppRecord } from '/@/api/flink/app/app';
import { useTable } from '/@/components/Table';
import { PageWrapper } from '/@/components/Page';
@@ -192,11 +192,6 @@
optionApps,
);
- // build Detail
- function openBuildProgressDetailDrawer(app: AppListRecord) {
- openBuildDrawer(true, { appId: app.id });
- }
-
/* view */
async function handleJobView(app: AppListRecord) {
// Task is running, restarting, in savePoint
@@ -331,13 +326,6 @@
:title="releaseTitleMap[record.release] || ''"
:data="record"
/>
- <Divider type="vertical" style="margin: 0 4px"
v-if="record.buildStatus" />
- <State
- option="build"
- :maxTitle="titleLenRef.maxBuild"
- :click="openBuildProgressDetailDrawer.bind(null, record)"
- :data="record"
- />
</template>
<template v-if="column.dataIndex === 'operation'">
<TableAction v-bind="getTableActions(record, currentTablePage)" />
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 a1b12c9e4..990f1a76c 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
@@ -19,58 +19,60 @@ import { computed, defineComponent, toRefs, unref } from
'vue';
import { Tag, Tooltip } from 'ant-design-vue';
import './State.less';
import { AppStateEnum, ReleaseStateEnum, OptionStateEnum } from
'/@/enums/flinkEnum';
+import { useI18n } from '/@/hooks/web/useI18n';
+const { t } = useI18n();
/* state map*/
export const stateMap = {
- [AppStateEnum.ADDED]: { color: '#2f54eb', title: 'ADDED' },
+ [AppStateEnum.ADDED]: { color: '#2f54eb', title:
t('flink.app.runState.added') },
[AppStateEnum.INITIALIZING]: {
color: '#738df8',
title: 'INITIALIZING',
class: 'status-processing-initializing',
},
- [AppStateEnum.CREATED]: { color: '#2f54eb', title: 'CREATED' },
+ [AppStateEnum.CREATED]: { color: '#2f54eb', title:
t('flink.app.runState.created') },
[AppStateEnum.STARTING]: {
color: '#1AB58E',
- title: 'STARTING',
+ title: t('flink.app.runState.starting'),
class: 'status-processing-starting',
},
[AppStateEnum.RESTARTING]: {
color: '#13c2c2',
- title: 'RESTARTING',
+ title: t('flink.app.runState.restarting'),
class: 'status-processing-restarting',
},
[AppStateEnum.RUNNING]: {
color: '#52c41a',
- title: 'RUNNING',
+ title: t('flink.app.runState.running'),
class: 'status-processing-running',
},
[AppStateEnum.FAILING]: {
color: '#fa541c',
- title: 'FAILING',
+ title: t('flink.app.runState.failing'),
class: 'status-processing-failing',
},
- [AppStateEnum.FAILED]: { color: '#f5222d', title: 'FAILED' },
- [AppStateEnum.CANCELLING]: { color: '#faad14', title: 'CANCELLING' },
- [AppStateEnum.CANCELED]: { color: '#fa8c16', title: 'CANCELED' },
- [AppStateEnum.FINISHED]: { color: '#1890ff', title: 'FINISHED' },
- [AppStateEnum.SUSPENDED]: { color: '#722ed1', title: 'SUSPENDED' },
+ [AppStateEnum.FAILED]: { color: '#f5222d', title:
t('flink.app.runState.failed') },
+ [AppStateEnum.CANCELLING]: { color: '#faad14', title:
t('flink.app.runState.cancelling') },
+ [AppStateEnum.CANCELED]: { color: '#fa8c16', title:
t('flink.app.runState.canceled') },
+ [AppStateEnum.FINISHED]: { color: '#1890ff', title:
t('flink.app.runState.finished') },
+ [AppStateEnum.SUSPENDED]: { color: '#722ed1', title:
t('flink.app.runState.suspended') },
[AppStateEnum.RECONCILING]: {
color: '#eb2f96',
- title: 'RECONCILING',
+ title: t('flink.app.runState.reconciling'),
class: 'status-processing-reconciling',
},
- [AppStateEnum.LOST]: { color: '#000000', title: 'LOST' },
+ [AppStateEnum.LOST]: { color: '#000000', title: t('flink.app.runState.lost')
},
[AppStateEnum.MAPPING]: {
color: '#13c2c2',
- title: 'MAPPING',
+ title: t('flink.app.runState.mapping'),
class: 'status-processing-restarting',
},
[AppStateEnum.SILENT]: {
color: '#738df8',
- title: 'SILENT',
+ title: t('flink.app.runState.silent'),
class: 'status-processing-initializing',
},
- [AppStateEnum.TERMINATED]: { color: '#8E50FF', title: 'TERMINATED' },
+ [AppStateEnum.TERMINATED]: { color: '#8E50FF', title:
t('flink.app.runState.terminated') },
};
/* option state map*/
export const optionStateMap = {
@@ -98,16 +100,19 @@ export const optionStateMap = {
/* release state map*/
export const releaseStateMap = {
- [ReleaseStateEnum.FAILED]: { color: '#f5222d', title: 'FAILED' },
- [ReleaseStateEnum.DONE]: { color: '#52c41a', title: 'DONE' },
- [ReleaseStateEnum.NEED_RELEASE]: { color: '#fa8c16', title: 'WAITING' },
+ [ReleaseStateEnum.FAILED]: { color: '#f5222d', title:
t('flink.app.releaseState.failed') },
+ [ReleaseStateEnum.DONE]: { color: '#52c41a', title:
t('flink.app.releaseState.success') },
+ [ReleaseStateEnum.NEED_RELEASE]: { color: '#fa8c16', title:
t('flink.app.releaseState.waiting') },
[ReleaseStateEnum.RELEASING]: {
color: '#52c41a',
- title: 'RELEASING',
+ title: t('flink.app.releaseState.releasing'),
class: 'status-processing-deploying',
},
- [ReleaseStateEnum.NEED_RESTART]: { color: '#fa8c16', title: 'PENDING' },
- [ReleaseStateEnum.NEED_ROLLBACK]: { color: '#fa8c16', title: 'WAITING' },
+ [ReleaseStateEnum.NEED_RESTART]: { color: '#fa8c16', title:
t('flink.app.releaseState.pending') },
+ [ReleaseStateEnum.NEED_ROLLBACK]: {
+ color: '#fa8c16',
+ title: t('flink.app.releaseState.waiting'),
+ },
};
/* build state map*/
@@ -122,6 +127,7 @@ export const buildStatusMap = {
3: { color: '#2ECC71', title: 'SUCCESS' },
4: { color: '#E74C3C', title: 'FAILURE' },
};
+
const overviewMap = {
running: { color: '#52c41a', title: 'RUNNING' },
canceled: { color: '#fa8c16', title: 'CANCELED' },
diff --git
a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableColumns.ts
b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableColumns.ts
index 95058e9cd..822bb5f24 100644
---
a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableColumns.ts
+++
b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableColumns.ts
@@ -29,7 +29,7 @@ export const useAppTableColumns = () => {
flinkVersion: 110,
tags: 150,
state: 120,
- release: 190,
+ release: 120,
duration: 150,
modifyTime: 165,
nickName: 100,
diff --git
a/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/FlinkK8sWatchController.scala
b/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/FlinkK8sWatchController.scala
index 94020f170..584b1df6f 100644
---
a/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/FlinkK8sWatchController.scala
+++
b/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/FlinkK8sWatchController.scala
@@ -93,7 +93,9 @@ class FlinkK8sWatchController extends Logger with
AutoCloseable {
/** get flink job-manager rest url from cache which will auto refresh when
it it empty. */
def getClusterRestUrl(clusterKey: ClusterKey): Option[String] = {
-
Option(endpoints.get(clusterKey)).filter(_.nonEmpty).orElse(refreshClusterRestUrl(clusterKey))
+ Option(endpoints.get(clusterKey))
+ .filter(_.nonEmpty)
+ .orElse(refreshClusterRestUrl(clusterKey))
}
/** refresh flink job-manager rest url from remote flink cluster, and cache
it. */
diff --git
a/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/watcher/FlinkJobStatusWatcher.scala
b/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/watcher/FlinkJobStatusWatcher.scala
index 8bb89e623..72bb3c4be 100644
---
a/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/watcher/FlinkJobStatusWatcher.scala
+++
b/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/watcher/FlinkJobStatusWatcher.scala
@@ -91,10 +91,6 @@ class FlinkJobStatusWatcher(conf: JobStatusWatcherConfig =
JobStatusWatcherConfi
/** single flink job status tracking task */
override def doWatch(): Unit = {
this.synchronized {
- logDebug(
- "[FlinkJobStatusWatcher]: Status monitoring process begins - " + Thread
- .currentThread()
- .getName)
// get all legal tracking ids
val trackIds = Try(watchController.getAllWatchingIds())
.filter(_.nonEmpty)
@@ -160,11 +156,6 @@ class FlinkJobStatusWatcher(conf: JobStatusWatcherConfig =
JobStatusWatcherConfi
s" limitSeconds=${conf.requestTimeoutSec}," +
s" trackIds=${trackIds.mkString(",")}")
}
-
- logDebug(
- "[FlinkJobStatusWatcher]: End of status monitoring process - " + Thread
- .currentThread()
- .getName)
}
}