diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkEnv.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkEnv.java index 60db283150..2a498ebc48 100644 --- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkEnv.java +++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkEnv.java @@ -23,6 +23,7 @@ import org.apache.streampark.console.base.exception.ApiDetailException; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.StringUtils; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; @@ -61,6 +62,12 @@ public class FlinkEnv implements Serializable { private transient FlinkVersion flinkVersion; + private transient String versionOfLarge; + + private transient String versionOfMiddle; + + private transient String versionOfLast; + private transient String streamParkScalaVersion = scala.util.Properties.versionNumberString(); public void doSetFlinkConf() throws ApiDetailException { @@ -101,23 +108,31 @@ public void unzipFlinkConf() { this.flinkConf = DeflaterUtils.unzipString(this.flinkConf); } - @JsonIgnore public String getLargeVersion() { - return this.version.substring(0, this.version.lastIndexOf(".")); + if (StringUtils.isNotEmpty(this.version)) { + return this.version.substring(0, this.version.lastIndexOf(".")); + } + return null; } - @JsonIgnore public String getVersionOfFirst() { - return this.version.split("\\.")[0]; + if (StringUtils.isNotEmpty(this.version)) { + return this.version.split("\\.")[0]; + } + return null; } - @JsonIgnore public String getVersionOfMiddle() { - return this.version.split("\\.")[1]; + if (StringUtils.isNotEmpty(this.version)) { + return this.version.split("\\.")[1]; + } + return null; } - @JsonIgnore public String getVersionOfLast() { - return this.version.split("\\.")[2]; + if (StringUtils.isNotEmpty(this.version)) { + return this.version.split("\\.")[2]; + } + return null; } } diff --git a/streampark-console/streampark-console-webapp/src/api/flink/setting/flinkEnv.ts b/streampark-console/streampark-console-webapp/src/api/flink/setting/flinkEnv.ts index 7693cc75d7..49d9893d2f 100644 --- a/streampark-console/streampark-console-webapp/src/api/flink/setting/flinkEnv.ts +++ b/streampark-console/streampark-console-webapp/src/api/flink/setting/flinkEnv.ts @@ -34,12 +34,19 @@ enum FLINK_API { * flink environment data * @returns Promise */ -export function fetchFlinkEnv() { +export function fetchListFlinkEnv() { return defHttp.post({ url: FLINK_API.LIST, }); } +export function fetchFlinkEnv(id: string) { + return defHttp.post({ + url: FLINK_API.GET, + data: { id: id }, + }); +} + /** * Set the default * @param {String} id diff --git a/streampark-console/streampark-console-webapp/src/design/public.less b/streampark-console/streampark-console-webapp/src/design/public.less index af007f3db6..3975f9c048 100644 --- a/streampark-console/streampark-console-webapp/src/design/public.less +++ b/streampark-console/streampark-console-webapp/src/design/public.less @@ -66,7 +66,7 @@ } } -.extra .conf-switch { +.tip-info { + margin-top: 10px; color: darkgrey; - margin-left: 5px; } 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 70236a86a9..3dfd8ade71 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 @@ -69,6 +69,8 @@ export default { status: 'Run Status', startTime: 'Start Time', endTime: 'End Time', + restoreModeTip: + 'restore mode is supported since flink 1.15, usually, you do not have to set this parameter', 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/zh-CN/flink/app.ts b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts index 92e788091f..d1b94b5b9a 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 @@ -68,6 +68,7 @@ export default { status: '运行状态', startTime: '启动时间', endTime: '结束时间', + restoreModeTip: 'flink 1.15开始支持restore模式,一般情况下不用设置该参数', release: { releaseTitle: '该应用程序的当前启动正在进行中.', releaseDesc: '您确定要强制进行另一次构建吗', 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 fec877c32a..32bb55830b 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 @@ -24,7 +24,7 @@ }); - diff --git a/streampark-console/streampark-console-webapp/src/views/setting/FlinkHome/index.vue b/streampark-console/streampark-console-webapp/src/views/setting/FlinkHome/index.vue index 6715dd307c..a819533142 100644 --- a/streampark-console/streampark-console-webapp/src/views/setting/FlinkHome/index.vue +++ b/streampark-console/streampark-console-webapp/src/views/setting/FlinkHome/index.vue @@ -38,7 +38,7 @@ import { fetchValidity, fetchDefaultSet, - fetchFlinkEnv, + fetchListFlinkEnv, fetchFlinkEnvRemove, fetchFlinkInfo, } from '/@/api/flink/setting/flinkEnv'; @@ -102,7 +102,7 @@ /* Get flink environment data */ async function getFlinkSetting() { - flinks.value = await fetchFlinkEnv(); + flinks.value = await fetchListFlinkEnv(); } onMounted(() => { diff --git a/streampark-flink/pom.xml b/streampark-flink/pom.xml index 19184ab60e..961a6e784b 100644 --- a/streampark-flink/pom.xml +++ b/streampark-flink/pom.xml @@ -31,7 +31,6 @@ streampark-flink-shims streampark-flink-core - streampark-flink-connector streampark-flink-sqlclient streampark-flink-udf streampark-flink-client @@ -76,4 +75,13 @@ + + + connector + + streampark-flink-connector + + + +