Skip to content

Commit

Permalink
[Feature][scaleph-ui-react] update monaco loader.js (#749)
Browse files Browse the repository at this point in the history
* feature: update prometheus operator 部署

* feature: update prometheus operator 部署

* feature: update prometheus operator values

* feature: upgrade seatunnel to 2.3.6

* feature: upgrade seatunnel to 2.3.6

* fix: update monaco load

---------

Co-authored-by: wangqi <wangqi@xinxuan.net>
  • Loading branch information
kalencaya and wangqi authored Aug 23, 2024
1 parent 253ce47 commit 9198a6f
Show file tree
Hide file tree
Showing 14 changed files with 153 additions and 78 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-manual-docker-seatunnel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ on:
seatunnelVersion:
description: 'seatunnel version'
required: true
default: '2.3.5'
default: '2.3.6'
type: choice
options:
- 2.3.5
- 2.3.6
flinkVersion:
description: 'flink version'
required: true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Scaleph is driven by personal interest and evolves actively through faithful dev
* Data Integration
* Web-ui click-and-drag data integration ways backended by [Apache SeaTunnel](https://seatunnel.apache.org/) on Flink engine.

* Support the latest 2.3.5 V2 out-of-the-box connectors and transforms.
* Support the latest 2.3.6 V2 out-of-the-box connectors and transforms.

* DataSource management.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public enum FlinkImageMapping {
SQL_1_17(FlinkJobType.SQL, OperatorFlinkVersion.v1_17, FlinkVersionMapping.V_1_17, "ghcr.io/flowerfine/scaleph-sql-template:1.17"),
SQL_1_18(FlinkJobType.SQL, OperatorFlinkVersion.v1_18, FlinkVersionMapping.V_1_18, "ghcr.io/flowerfine/scaleph-sql-template:1.18"),

SEATUNNEL_1_16(FlinkJobType.SEATUNNEL, OperatorFlinkVersion.v1_16, FlinkVersionMapping.V_1_16, "ghcr.io/flowerfine/scaleph-seatunnel:2.3.5-flink-1.16"),
SEATUNNEL_1_16(FlinkJobType.SEATUNNEL, OperatorFlinkVersion.v1_16, FlinkVersionMapping.V_1_16, "ghcr.io/flowerfine/scaleph-seatunnel:2.3.6-flink-1.16"),
FLINK_CDC_1_18(FlinkJobType.FLINK_CDC, OperatorFlinkVersion.v1_18, FlinkVersionMapping.V_1_18, "ghcr.io/flowerfine/scaleph-flink-cdc:3.0.0-flink-1.18"),
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ public enum SeaTunnelPluginName implements DictInstance {
SLACK("SlackSink", "Slack"),
HTTP("Http", "Http"),
FEISHU("Feishu", "Feishu"),

@Deprecated
WECHAT("WeChat", "WeChat"),

DINGTALK("DingTalk", "DingTalk"),
MYHOURS("MyHours", "MyHours"),
LEMLIST("Lemlist", "Lemlist"),
Expand All @@ -56,13 +59,15 @@ public enum SeaTunnelPluginName implements DictInstance {
OSS_FILE("OssFile", "OssFile"),
OSS_JINDO_FILE("OssJindoFile", "OssJindoFile"),
COS_FILE("CosFile", "CosFile"),
OBS_FILE("ObsFile", "ObsFile"),

KAFKA("Kafka", "Kafka"),
PULSAR("Pulsar", "Pulsar"),
ROCKETMQ("Rocketmq", "RocketMQ"),
DATAHUB("DataHub", "DataHub"),
AMAZON_SQS("AmazonSqs", "AmazonSQS"),
RABBITMQ("RabbitMQ", "RabbitMQ"),
ACTIVEMQ("ActiveMQ", "ActiveMQ"),

JDBC("Jdbc", "Jdbc"),
REDIS("Redis", "Redis"),
Expand Down Expand Up @@ -93,11 +98,17 @@ public enum SeaTunnelPluginName implements DictInstance {
MAXCOMPUTE("Maxcompute", "MaxCompute"),
HBASE("Hbase", "Hbase"),
KUDU("Kudu", "Kudu"),
DRUID("Druid", "Druid"),

IOTDB("IoTDB", "IoTDB"),
OPENMLDB("OpenMldb", "OpenMldb"),
NEO4J("Neo4j", "Neo4j"),
INFLUXDB("InfluxDB", "InfluxDB"),
TDENGINE("TDengine", "TDengine"),
SLS("Sls", "Sls"),

MILVUS("Milvus", "Milvus"),
WEB3J("Web3j", "Web3j"),

SENTRY("Sentry", "Sentry"),
GOOGLE_SHEETS("GoogleSheets", "GoogleSheets"),
Expand All @@ -109,6 +120,9 @@ public enum SeaTunnelPluginName implements DictInstance {
REPLACE("Replace", "Replace"),
SPLIT("Split", "Split"),
SQL("Sql", "Sql"),
JSON_PATH("JsonPath", "JsonPath"),
DYNAMIC_COMPILE("DynamicCompile", "DynamicCompile"),
LLM("LLM", "LLM"),
;

@JsonCreator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public enum SeaTunnelVersion implements DictInstance {
V_2_3_3("2.3.3", "2.3.3"),
V_2_3_4("2.3.4", "2.3.4"),
V_2_3_5("2.3.5", "2.3.5"),
V_2_3_6("2.3.6", "2.3.6"),
;

@JsonCreator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useRef, useState } from 'react';
import { Button, message } from 'antd';
import { useIntl, useModel, useLocation } from '@umijs/max';
import { Editor } from '@monaco-editor/react';
import Editor, {loader, useMonaco} from '@monaco-editor/react';
import { language } from 'monaco-editor/esm/vs/basic-languages/sql/sql';
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
import * as sqlFormatter from 'sql-formatter';
Expand All @@ -25,6 +25,7 @@ const CodeEditor: React.FC = () => {
const { setExecutionData } = useModel('executionResult'); //存储执行结果

useEffect(() => {
loader.config({monaco})
setSqlScript(flinkArtifactSql?.script);
const projectId = localStorage.getItem(WORKSPACE_CONF.projectId);
(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Editor} from '@monaco-editor/react';
import {Button, message, Modal, Table, Typography} from 'antd';
import React, {useEffect, useMemo, useState} from 'react';
import {Button, message, Modal, Table, Typography} from 'antd';
import Editor, {loader, useMonaco} from "@monaco-editor/react";
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
import styles from './index.less';

interface IViewTableCellData {
Expand All @@ -16,6 +17,7 @@ const EditorRightResultTable: React.FC = ({result, lastOneData, verticalSplitSiz
// const heightTable = useRef()

useEffect(() => {
loader.config({monaco})
const data = result?.columns?.map((item: any) => ({
dataType: item?.dataType,
name: item?.columnName,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {useEffect, useRef} from "react";
import {ProCard} from "@ant-design/pro-components";
import {useIntl, connect} from "@umijs/max";
import Editor, {Monaco, useMonaco} from "@monaco-editor/react";
import {connect, useIntl} from "@umijs/max";
import Editor, {loader, Monaco, useMonaco} from "@monaco-editor/react";

const DataIntegrationFlinkCDCStepYaml: React.FC = (props: any) => {
const intl = useIntl();
Expand All @@ -11,6 +11,9 @@ const DataIntegrationFlinkCDCStepYaml: React.FC = (props: any) => {
useEffect(() => {
// do conditional chaining
monaco?.languages.typescript.javascriptDefaults.setEagerModelSync(true);
if (monaco) {
loader.config({monaco})
}
}, [monaco]);

const handleEditorDidMount = (editor, monaco: Monaco) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, {useEffect, useRef, useState} from 'react';
import {Drawer} from "antd";
import Editor, {useMonaco} from "@monaco-editor/react";
import Editor, {loader, useMonaco} from "@monaco-editor/react";
import * as monaco from "monaco-editor";
import {ModalFormProps} from "@/typings";
import {WsArtifactSeaTunnel} from "@/services/project/typings";
import {WsArtifactSeaTunnelService} from "@/services/project/WsArtifactSeaTunnelService";
Expand All @@ -20,6 +21,7 @@ const SeaTunnelConfModal: React.FC<ModalFormProps<WsArtifactSeaTunnel>> = ({
monaco?.languages.typescript.javascriptDefaults.setEagerModelSync(true);
// or make sure that it exists by other ways
if (monaco) {
loader.config({ monaco })
// console.log("here is the monaco instance:", monaco);
}
}, [monaco]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const SeaTunnelConnectorDagNode = ({node}: { node: Node }) => {
>
<Popover title={<div>
<Typography.Text>{node.data.label}</Typography.Text>
<a href="https://seatunnel.apache.org/docs/2.3.5/about/" target="_blank">
<a href="https://seatunnel.apache.org/docs/2.3.6/about/" target="_blank">
<Button shape="default" type="link" icon={<InfoCircleOutlined/>}/>
</a>
</div>}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useEffect, useRef} from "react";
import Editor, {Monaco, useMonaco} from "@monaco-editor/react";
import Editor, {Monaco, loader, useMonaco} from "@monaco-editor/react";
import {Props} from '@/app.d';
import {WsFlinkKubernetesTemplate} from "@/services/project/typings";
import {connect} from "umi";
Expand All @@ -11,6 +11,9 @@ const DorisInstanceDetailYAMLStatus: React.FC<Props<WsFlinkKubernetesTemplate>>
useEffect(() => {
// do conditional chaining
monaco?.languages.typescript.javascriptDefaults.setEagerModelSync(true);
if (monaco) {
loader.config({monaco})
}
}, [monaco]);

const handleEditorDidMount = (editor, monaco: Monaco) => {
Expand Down
2 changes: 1 addition & 1 deletion tools/docker/build/scaleph-seatunnel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARG FLINK_VERSION=1.16
ARG BASE_RELEASE_IMAGE=flink:${FLINK_VERSION}
FROM $BASE_RELEASE_IMAGE as release

ARG SEATUNNEL_VERSION=2.3.5
ARG SEATUNNEL_VERSION=2.3.6
ARG TAR_FILE=apache-seatunnel-${SEATUNNEL_VERSION}-bin.tar.gz

ENV SEATUNNEL_HOME=/opt/seatunnel
Expand Down
14 changes: 7 additions & 7 deletions tools/docker/mysql/init.d/scaleph-ws-mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -176,25 +176,25 @@ create table ws_artifact_seatunnel
) engine = innodb comment 'artifact seatunnel';
INSERT INTO ws_artifact_seatunnel(id, artifact_id, seatunnel_engine, flink_version, seatunnel_version, dag_id, current,
creator, editor)
VALUES (1, 4, 'seatunnel', '1.16.3', '2.3.5', 1, 1, 'sys', 'sys');
VALUES (1, 4, 'seatunnel', '1.16.3', '2.3.6', 1, 1, 'sys', 'sys');
INSERT INTO ws_artifact_seatunnel(id, artifact_id, seatunnel_engine, flink_version, seatunnel_version, dag_id, current,
creator, editor)
VALUES (2, 5, 'seatunnel', '1.16.3', '2.3.5', 2, 1, 'sys', 'sys');
VALUES (2, 5, 'seatunnel', '1.16.3', '2.3.6', 2, 1, 'sys', 'sys');
INSERT INTO ws_artifact_seatunnel(id, artifact_id, seatunnel_engine, flink_version, seatunnel_version, dag_id, current,
creator, editor)
VALUES (3, 11, 'seatunnel', '1.16.3', '2.3.5', 8, 1, 'sys', 'sys');
VALUES (3, 11, 'seatunnel', '1.16.3', '2.3.6', 8, 1, 'sys', 'sys');
INSERT INTO ws_artifact_seatunnel(id, artifact_id, seatunnel_engine, flink_version, seatunnel_version, dag_id, current,
creator, editor)
VALUES (4, 12, 'seatunnel', '1.16.3', '2.3.5', 9, '1', 'sys', 'sys');
VALUES (4, 12, 'seatunnel', '1.16.3', '2.3.6', 9, '1', 'sys', 'sys');
INSERT INTO `ws_artifact_seatunnel`(`id`, `artifact_id`, `seatunnel_engine`, `flink_version`, `seatunnel_version`,
`dag_id`, `current`, `creator`, `editor`)
VALUES (5, 13, 'seatunnel', '1.16.3', '2.3.5', 10, '1', 'sys', 'sys');
VALUES (5, 13, 'seatunnel', '1.16.3', '2.3.6', 10, '1', 'sys', 'sys');
INSERT INTO `ws_artifact_seatunnel`(`id`, `artifact_id`, `seatunnel_engine`, `flink_version`, `seatunnel_version`,
`dag_id`, `current`, `creator`, `editor`)
VALUES (6, 14, 'seatunnel', '1.16.3', '2.3.5', 11, '1', 'sys', 'sys');
VALUES (6, 14, 'seatunnel', '1.16.3', '2.3.6', 11, '1', 'sys', 'sys');
INSERT INTO `ws_artifact_seatunnel`(`id`, `artifact_id`, `seatunnel_engine`, `flink_version`, `seatunnel_version`,
`dag_id`, `current`, `creator`, `editor`)
VALUES (7, 15, 'seatunnel', '1.16.3', '2.3.5', 12, '1', 'sys', 'sys');
VALUES (7, 15, 'seatunnel', '1.16.3', '2.3.6', 12, '1', 'sys', 'sys');

DROP TABLE IF EXISTS ws_flink_kubernetes_template;
CREATE TABLE ws_flink_kubernetes_template
Expand Down
Loading

0 comments on commit 9198a6f

Please sign in to comment.