Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaowei
dlink
Commits
99174be3
Commit
99174be3
authored
Jun 11, 2021
by
godkaikai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.2.1
parent
61576e02
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
206 additions
and
49 deletions
+206
-49
pom.xml
dlink-admin/pom.xml
+1
-1
pom.xml
dlink-client/dlink-client-1.12/pom.xml
+1
-1
pom.xml
dlink-client/pom.xml
+1
-1
pom.xml
dlink-connectors/dlink-connector-jdbc/pom.xml
+1
-1
pom.xml
dlink-connectors/pom.xml
+1
-1
pom.xml
dlink-core/pom.xml
+1
-1
JobManager.java
dlink-core/src/main/java/com/dlink/job/JobManager.java
+8
-8
index.tsx
dlink-web/src/components/Studio/StudioConnector/index.tsx
+18
-16
index.tsx
...src/components/Studio/StudioConsole/StudioTable/index.tsx
+1
-1
index.tsx
dlink-web/src/components/Studio/StudioConsole/index.tsx
+1
-1
index.tsx
dlink-web/src/components/Studio/StudioEdit/index.tsx
+1
-1
index.tsx
dlink-web/src/components/Studio/StudioHelp/index.tsx
+36
-0
index.tsx
dlink-web/src/components/Studio/StudioMenu/index.tsx
+43
-5
index.tsx
dlink-web/src/components/Studio/StudioSetting/index.tsx
+16
-2
index.tsx
dlink-web/src/components/Studio/StudioTree/index.tsx
+48
-4
index.less
dlink-web/src/components/Studio/index.less
+8
-0
index.tsx
dlink-web/src/components/Studio/index.tsx
+1
-1
pages.ts
dlink-web/src/locales/zh-CN/pages.ts
+1
-1
Welcome.tsx
dlink-web/src/pages/Welcome.tsx
+17
-2
pom.xml
pom.xml
+1
-1
No files found.
dlink-admin/pom.xml
View file @
99174be3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
dlink
</artifactId>
<artifactId>
dlink
</artifactId>
<groupId>
com.dlink
</groupId>
<groupId>
com.dlink
</groupId>
<version>
0.
3.0-SNAPSHOT
</version>
<version>
0.
2.1
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
...
...
dlink-client/dlink-client-1.12/pom.xml
View file @
99174be3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
dlink-client
</artifactId>
<artifactId>
dlink-client
</artifactId>
<groupId>
com.dlink
</groupId>
<groupId>
com.dlink
</groupId>
<version>
0.
3.0-SNAPSHOT
</version>
<version>
0.
2.1
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
...
...
dlink-client/pom.xml
View file @
99174be3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
dlink
</artifactId>
<artifactId>
dlink
</artifactId>
<groupId>
com.dlink
</groupId>
<groupId>
com.dlink
</groupId>
<version>
0.
3.0-SNAPSHOT
</version>
<version>
0.
2.1
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
...
...
dlink-connectors/dlink-connector-jdbc/pom.xml
View file @
99174be3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
dlink-connectors
</artifactId>
<artifactId>
dlink-connectors
</artifactId>
<groupId>
com.dlink
</groupId>
<groupId>
com.dlink
</groupId>
<version>
0.
3.0-SNAPSHOT
</version>
<version>
0.
2.1
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
...
...
dlink-connectors/pom.xml
View file @
99174be3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
dlink
</artifactId>
<artifactId>
dlink
</artifactId>
<groupId>
com.dlink
</groupId>
<groupId>
com.dlink
</groupId>
<version>
0.
3.0-SNAPSHOT
</version>
<version>
0.
2.1
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
...
...
dlink-core/pom.xml
View file @
99174be3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
dlink
</artifactId>
<artifactId>
dlink
</artifactId>
<groupId>
com.dlink
</groupId>
<groupId>
com.dlink
</groupId>
<version>
0.
3.0-SNAPSHOT
</version>
<version>
0.
2.1
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
...
...
dlink-core/src/main/java/com/dlink/job/JobManager.java
View file @
99174be3
...
@@ -113,16 +113,16 @@ public class JobManager {
...
@@ -113,16 +113,16 @@ public class JobManager {
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
/*
StackTraceElement[] trace = e.getStackTrace();
StackTraceElement
[]
trace
=
e
.
getStackTrace
();
StringBuffer
resMsg
=
new
StringBuffer
(
""
);
StringBuffer
resMsg
=
new
StringBuffer
(
""
);
for
(
StackTraceElement
s
:
trace
)
{
for
(
StackTraceElement
s
:
trace
)
{
resMsg
.
append
(
" \n "
+
s
+
" "
);
resMsg
.
append
(
" \n "
+
s
+
" "
);
}
*/
}
runResult
.
setFinishDate
(
LocalDateTime
.
now
());
runResult
.
setFinishDate
(
LocalDateTime
.
now
());
runResult
.
setSuccess
(
false
);
runResult
.
setSuccess
(
false
);
// runResult.setError(LocalDateTime.now().toString() + ":" + "运行第" + currentIndex + "行sql时出现异常:" + e.getMessage());
// runResult.setError(LocalDateTime.now().toString() + ":" + "运行第" + currentIndex + "行sql时出现异常:" + e.getMessage());
//
runResult.setError(LocalDateTime.now().toString() + ":" + "运行第" + currentIndex + "行sql时出现异常:" + e.getMessage() + " \n >>>堆栈信息<<<" + resMsg.toString());
runResult
.
setError
(
LocalDateTime
.
now
().
toString
()
+
":"
+
"运行第"
+
currentIndex
+
"行sql时出现异常:"
+
e
.
getMessage
()
+
" \n >>>堆栈信息<<<"
+
resMsg
.
toString
());
runResult
.
setError
(
LocalDateTime
.
now
().
toString
()
+
":"
+
"运行第"
+
currentIndex
+
"行sql时出现异常:"
+
e
.
getMessage
()
+
"\n >>>异常原因<<< \n"
+
e
.
getCause
().
toString
());
//
runResult.setError(LocalDateTime.now().toString() + ":" + "运行第" + currentIndex + "行sql时出现异常:" + e.getMessage() + "\n >>>异常原因<<< \n" + e.getCause().toString());
return
runResult
;
return
runResult
;
}
}
return
runResult
;
return
runResult
;
...
@@ -172,15 +172,15 @@ public class JobManager {
...
@@ -172,15 +172,15 @@ public class JobManager {
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
/*
StackTraceElement[] trace = e.getStackTrace();
StackTraceElement
[]
trace
=
e
.
getStackTrace
();
StringBuilder
resMsg
=
new
StringBuilder
();
StringBuilder
resMsg
=
new
StringBuilder
();
for
(
StackTraceElement
s
:
trace
)
{
for
(
StackTraceElement
s
:
trace
)
{
resMsg
.
append
(
" \n "
+
s
+
" "
);
resMsg
.
append
(
" \n "
+
s
+
" "
);
}
*/
}
result
.
setSuccess
(
false
);
result
.
setSuccess
(
false
);
// result.setError(LocalDateTime.now().toString() + ":" + "运行第" + currentIndex + "行sql时出现异常:" + e.getMessage());
// result.setError(LocalDateTime.now().toString() + ":" + "运行第" + currentIndex + "行sql时出现异常:" + e.getMessage());
//
result.setError(LocalDateTime.now().toString() + ":" + "运行第" + currentIndex + "行sql时出现异常:" + e.getMessage() + "\n >>>堆栈信息<<<" + resMsg.toString());
result
.
setError
(
LocalDateTime
.
now
().
toString
()
+
":"
+
"运行第"
+
currentIndex
+
"行sql时出现异常:"
+
e
.
getMessage
()
+
"\n >>>堆栈信息<<<"
+
resMsg
.
toString
());
result
.
setError
(
LocalDateTime
.
now
().
toString
()
+
":"
+
"运行第"
+
currentIndex
+
"行sql时出现异常:"
+
e
.
getMessage
()
+
"\n >>>异常原因<<< \n"
+
e
.
toString
());
//
result.setError(LocalDateTime.now().toString() + ":" + "运行第" + currentIndex + "行sql时出现异常:" + e.getMessage() + "\n >>>异常原因<<< \n" + e.toString());
return
result
;
return
result
;
}
}
...
...
dlink-web/src/components/Studio/StudioConnector/index.tsx
View file @
99174be3
import
{
message
,
Input
,
Button
,
Space
,
Table
,
Dropdown
,
Menu
,
Empty
,
Divider
}
from
"antd"
;
import
{
message
,
Input
,
Button
,
Space
,
Table
,
Dropdown
,
Menu
,
Empty
,
Divider
,
Tooltip
}
from
"antd"
;
import
{
StateType
}
from
"@/pages/FlinkSqlStudio/model"
;
import
{
StateType
}
from
"@/pages/FlinkSqlStudio/model"
;
import
{
connect
}
from
"umi"
;
import
{
connect
}
from
"umi"
;
import
{
useState
}
from
"react"
;
import
{
useState
}
from
"react"
;
...
@@ -200,21 +200,23 @@ const StudioConnector = (props:any) => {
...
@@ -200,21 +200,23 @@ const StudioConnector = (props:any) => {
return
(
return
(
<>
<>
<
Space
>
<
div
style=
{
{
float
:
"right"
}
}
>
<
Button
<
Tooltip
title=
"刷新连接器"
>
type=
"primary"
<
Button
icon=
{
<
SearchOutlined
/>
}
type=
"text"
loading=
{
loadings
[
0
]
}
icon=
{
<
SearchOutlined
/>
}
onClick=
{
()
=>
getTables
()
}
onClick=
{
getTables
}
/>
/>
<
Button
</
Tooltip
>
danger
<
Tooltip
title=
"清空连接器"
>
icon=
{
<
DeleteOutlined
/>
}
<
Button
loading=
{
loadings
[
2
]
}
type=
"text"
onClick=
{
()
=>
clearSession
()
}
icon=
{
<
DeleteOutlined
/>
}
/>
onClick=
{
clearSession
}
</
Space
>
/>
{
tableData
&&
tableData
.
length
>
0
?(<
Table
dataSource=
{
tableData
}
columns=
{
getColumns
()
}
/>):(<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>)
}
</
Tooltip
>
</
div
>
{
tableData
&&
tableData
.
length
>
0
?(<
Table
dataSource=
{
tableData
}
columns=
{
getColumns
()
}
size=
"small"
/>):(<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>)
}
</>
</>
);
);
};
};
...
...
dlink-web/src/components/Studio/StudioConsole/StudioTable/index.tsx
View file @
99174be3
...
@@ -115,7 +115,7 @@ const StudioTable = (props:any) => {
...
@@ -115,7 +115,7 @@ const StudioTable = (props:any) => {
{
item
.
jobName
&&
<
Text
code
>
{
item
.
jobName
}
</
Text
>
}
{
item
.
jobName
&&
<
Text
code
>
{
item
.
jobName
}
</
Text
>
}
{
item
.
jobId
&&
<
Text
code
>
{
item
.
jobId
}
</
Text
>
}
{
item
.
jobId
&&
<
Text
code
>
{
item
.
jobId
}
</
Text
>
}
<
Text
keyboard
>
{
item
.
time
}
ms
</
Text
>
<
Text
keyboard
>
{
item
.
time
}
ms
</
Text
>
{
item
.
statement
.
substring
(
0
,
20
)
}
</>);
{
item
.
statement
.
substring
(
0
,
20
)
+
"..."
}
</>);
return
(<
Option
value=
{
index
}
label=
{
tag
}
>
return
(<
Option
value=
{
index
}
label=
{
tag
}
>
{
tag
}
{
tag
}
</
Option
>)
</
Option
>)
...
...
dlink-web/src/components/Studio/StudioConsole/index.tsx
View file @
99174be3
...
@@ -16,7 +16,7 @@ const { TabPane } = Tabs;
...
@@ -16,7 +16,7 @@ const { TabPane } = Tabs;
const
StudioConsole
=
(
props
:
any
)
=>
{
const
StudioConsole
=
(
props
:
any
)
=>
{
return
(
return
(
<
Tabs
defaultActiveKey=
"StudioMsg"
size=
"small"
tabPosition=
"
bottom"
style=
{
{
border
:
"1px solid #f0f0f0
"
}
}
>
<
Tabs
defaultActiveKey=
"StudioMsg"
size=
"small"
tabPosition=
"
top"
style=
{
{
border
:
"1px solid #f0f0f0"
,
margin
:
"0 32px
"
}
}
>
<
TabPane
<
TabPane
tab=
{
tab=
{
<
span
>
<
span
>
...
...
dlink-web/src/components/Studio/StudioEdit/index.tsx
View file @
99174be3
...
@@ -21,7 +21,7 @@ interface IRightContent {
...
@@ -21,7 +21,7 @@ interface IRightContent {
const
FlinkSqlEditor
=
(
props
:
any
)
=>
{
const
FlinkSqlEditor
=
(
props
:
any
)
=>
{
const
{
const
{
height
=
'
300px
'
,
height
=
'
100%
'
,
width
=
'100%'
,
width
=
'100%'
,
language
=
'sql'
,
language
=
'sql'
,
onChange
=
(
val
:
string
,
event
:
{
changes
:
{
text
:
any
}[]
})
=>
{},
onChange
=
(
val
:
string
,
event
:
{
changes
:
{
text
:
any
}[]
})
=>
{},
...
...
dlink-web/src/components/Studio/StudioHelp/index.tsx
0 → 100644
View file @
99174be3
import
{
Typography
,
Divider
,
Badge
,
Empty
}
from
"antd"
;
const
{
Title
,
Paragraph
,
Text
,
Link
}
=
Typography
;
const
StudioMsg
=
()
=>
{
return
(
<
Typography
>
<
Title
level=
{
3
}
>
基本概念与使用
</
Title
>
<
Paragraph
>
介绍了 0.2.1 版本 Flink 集群、共享会话、同步执行、异步提交的概念及使用。
</
Paragraph
>
<
Title
level=
{
4
}
>
Flink 集群
</
Title
>
<
Paragraph
>
<
p
>
Flink 集群主要有两种,LOCAL 和 REMOTE,通过集群中心进行新集群的注册,注册成功后,点击心跳刷新状态,需要重新进入Studio后新集群才会被加载到下拉框。
</
p
>
<
p
>
LOCAL 模式为通过 dlink 自身环境和内存进行 FlinkSql 的执行。
</
p
>
<
p
>
REMOTE 模式会将 FlinkSql 进行解析处理后提交到目标集群进行执行。
</
p
>
</
Paragraph
>
<
Title
level=
{
4
}
>
共享会话
</
Title
>
<
Paragraph
>
<
p
>
FlinkSql 执行过程所有创建的 Table 等都被存储到了共享会话的 Catalogue 中,不同集群间的 Catalogue 不共享。
</
p
>
</
Paragraph
>
<
Title
level=
{
4
}
>
同步执行
</
Title
>
<
Paragraph
>
<
p
>
同步执行当前选项卡的 FlinkSql 在选中的集群上执行,执行完成后将数据结果展示在前端。
</
p
>
</
Paragraph
>
<
Title
level=
{
4
}
>
异步提交
</
Title
>
<
Paragraph
>
<
p
>
异步提交当前选项卡或右键的树节点的 FlinkSql 在选中的集群上异步执行,无返回值,不记录历史。
</
p
>
</
Paragraph
>
</
Typography
>
);
};
export
default
StudioMsg
;
dlink-web/src/components/Studio/StudioMenu/index.tsx
View file @
99174be3
...
@@ -2,15 +2,16 @@ import styles from "./index.less";
...
@@ -2,15 +2,16 @@ import styles from "./index.less";
import
{
Menu
,
Dropdown
,
Tooltip
,
Row
,
Col
,
Popconfirm
,
notification
,
Modal
,
message
}
from
"antd"
;
import
{
Menu
,
Dropdown
,
Tooltip
,
Row
,
Col
,
Popconfirm
,
notification
,
Modal
,
message
}
from
"antd"
;
import
{
PauseCircleTwoTone
,
CopyTwoTone
,
DeleteTwoTone
,
PlayCircleTwoTone
,
DiffTwoTone
,
import
{
PauseCircleTwoTone
,
CopyTwoTone
,
DeleteTwoTone
,
PlayCircleTwoTone
,
DiffTwoTone
,
FileAddTwoTone
,
FolderOpenTwoTone
,
SafetyCertificateTwoTone
,
SaveTwoTone
,
FlagTwoTone
,
FileAddTwoTone
,
FolderOpenTwoTone
,
SafetyCertificateTwoTone
,
SaveTwoTone
,
FlagTwoTone
,
EnvironmentOutlined
,
SmileOutlined
,
RocketTwoTone
}
from
"@ant-design/icons"
;
EnvironmentOutlined
,
SmileOutlined
,
RocketTwoTone
,
QuestionCircleTwoTone
}
from
"@ant-design/icons"
;
import
Space
from
"antd/es/space"
;
import
Space
from
"antd/es/space"
;
import
Divider
from
"antd/es/divider"
;
import
Divider
from
"antd/es/divider"
;
import
Button
from
"antd/es/button/button"
;
import
Button
from
"antd/es/button/button"
;
import
Breadcrumb
from
"antd/es/breadcrumb/Breadcrumb"
;
import
Breadcrumb
from
"antd/es/breadcrumb/Breadcrumb"
;
import
{
StateType
}
from
"@/pages/FlinkSqlStudio/model"
;
import
{
StateType
}
from
"@/pages/FlinkSqlStudio/model"
;
import
{
connect
}
from
"umi"
;
import
{
connect
}
from
"umi"
;
import
{
handleSubmit
,
post
All
}
from
"@/components/Common/crud"
;
import
{
handleSubmit
,
post
DataArray
}
from
"@/components/Common/crud"
;
import
{
executeSql
}
from
"@/pages/FlinkSqlStudio/service"
;
import
{
executeSql
}
from
"@/pages/FlinkSqlStudio/service"
;
import
StudioHelp
from
"../StudioHelp"
;
const
menu
=
(
const
menu
=
(
<
Menu
>
<
Menu
>
...
@@ -52,6 +53,11 @@ const StudioMenu = (props: any) => {
...
@@ -52,6 +53,11 @@ const StudioMenu = (props: any) => {
const
result
=
executeSql
(
param
);
const
result
=
executeSql
(
param
);
result
.
then
(
res
=>
{
result
.
then
(
res
=>
{
notification
.
close
(
taskKey
);
notification
.
close
(
taskKey
);
if
(
res
.
datas
.
success
){
message
.
success
(
'执行成功'
);
}
else
{
message
.
success
(
'执行失败'
);
}
let
newTabs
=
tabs
;
let
newTabs
=
tabs
;
for
(
let
i
=
0
;
i
<
newTabs
.
panes
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
newTabs
.
panes
.
length
;
i
++
){
if
(
newTabs
.
panes
[
i
].
key
==
key
){
if
(
newTabs
.
panes
[
i
].
key
==
key
){
...
@@ -75,16 +81,31 @@ const StudioMenu = (props: any) => {
...
@@ -75,16 +81,31 @@ const StudioMenu = (props: any) => {
message
.
error
(
`草稿【
${
current
.
title
}
】无法被提交,请创建或选择有效作业进行提交`
);
message
.
error
(
`草稿【
${
current
.
title
}
】无法被提交,请创建或选择有效作业进行提交`
);
return
false
;
return
false
;
}
}
const
taskKey
=
(
Math
.
random
()
*
1000
)
+
''
;
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'异步提交作业'
,
title
:
'异步提交作业'
,
content
:
`确定异步提交作业【
${
current
.
task
.
alias
}
】到其配置的集群吗?`
,
content
:
`确定异步提交作业【
${
current
.
task
.
alias
}
】到其配置的集群吗?
请确认您的作业是否已经被保存!
`
,
okText
:
'确认'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
cancelText
:
'取消'
,
onOk
:
async
()
=>
{
onOk
:
async
()
=>
{
let
task
=
{
let
task
=
{
id
:
current
.
task
.
id
,
id
:
current
.
task
.
id
,
};
};
handleSubmit
(
'/api/task/submit'
,
'异步提交作业'
,[
task
]);
notification
.
success
({
message
:
`任务【
${
current
.
task
.
alias
}
】正在异步提交`
,
description
:
current
.
task
.
statement
,
duration
:
null
,
key
:
taskKey
,
icon
:
<
SmileOutlined
style=
{
{
color
:
'#108ee9'
}
}
/>,
});
const
res
=
await
postDataArray
(
'/api/task/submit'
,[
task
.
id
]);
notification
.
close
(
taskKey
);
if
(
res
.
datas
[
0
].
success
){
message
.
success
(
'异步提交成功'
);
}
else
{
message
.
success
(
'异步提交失败'
);
}
}
}
});
});
};
};
...
@@ -121,6 +142,16 @@ const StudioMenu = (props: any) => {
...
@@ -121,6 +142,16 @@ const StudioMenu = (props: any) => {
return
itemList
;
return
itemList
;
};
};
const
showHelp
=
()
=>
{
Modal
.
info
({
title
:
'使用帮助'
,
width
:
1000
,
content
:
(
<
StudioHelp
/>
),
onOk
()
{},
});
};
return
(
return
(
<
Row
className=
{
styles
.
container
}
>
<
Row
className=
{
styles
.
container
}
>
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
...
@@ -168,7 +199,7 @@ const StudioMenu = (props: any) => {
...
@@ -168,7 +199,7 @@ const StudioMenu = (props: any) => {
type=
"text"
type=
"text"
icon=
{
<
FolderOpenTwoTone
twoToneColor=
"#ddd"
/>
}
icon=
{
<
FolderOpenTwoTone
twoToneColor=
"#ddd"
/>
}
/>
/>
<
Tooltip
title=
"保存当前的 FlinkSql"
>
<
Tooltip
title=
"保存当前的 FlinkSql
及配置
"
>
<
Button
<
Button
type=
"text"
type=
"text"
icon=
{
<
SaveTwoTone
/>
}
icon=
{
<
SaveTwoTone
/>
}
...
@@ -228,6 +259,13 @@ const StudioMenu = (props: any) => {
...
@@ -228,6 +259,13 @@ const StudioMenu = (props: any) => {
type=
"text"
type=
"text"
icon=
{
<
DeleteTwoTone
twoToneColor=
"#ddd"
/>
}
icon=
{
<
DeleteTwoTone
twoToneColor=
"#ddd"
/>
}
/>
/>
<
Tooltip
title=
"查看使用帮助"
>
<
Button
type=
"text"
icon=
{
<
QuestionCircleTwoTone
/>
}
onClick=
{
showHelp
}
/>
</
Tooltip
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
Col
>
</
Col
>
...
...
dlink-web/src/components/Studio/StudioSetting/index.tsx
View file @
99174be3
import
{
connect
}
from
"umi"
;
import
{
connect
}
from
"umi"
;
import
{
StateType
}
from
"@/pages/FlinkSqlStudio/model"
;
import
{
StateType
}
from
"@/pages/FlinkSqlStudio/model"
;
import
{
Form
,
InputNumber
,
Input
,
Switch
,
Select
,
Tag
,
Row
,
Col
,
Divider
}
from
"antd"
;
import
{
Form
,
InputNumber
,
Input
,
Switch
,
Select
,
Tag
,
Row
,
Col
,
Divider
,
Tooltip
,
Button
}
from
"antd"
;
import
{
InfoCircleOutlined
,
PlusOutlined
}
from
"@ant-design/icons"
;
import
{
InfoCircleOutlined
,
PlusOutlined
,
MinusSquareOutlined
}
from
"@ant-design/icons"
;
import
styles
from
"./index.less"
;
import
styles
from
"./index.less"
;
import
{
useEffect
,
useState
}
from
"react"
;
import
{
useEffect
,
useState
}
from
"react"
;
...
@@ -60,6 +60,19 @@ const StudioSetting = (props: any) => {
...
@@ -60,6 +60,19 @@ const StudioSetting = (props: any) => {
};
};
const
localOption
=
(<><
Tag
color=
"default"
>
Local
</
Tag
>
本地环境
</>);
const
localOption
=
(<><
Tag
color=
"default"
>
Local
</
Tag
>
本地环境
</>);
return
(
return
(
<>
<
Row
>
<
Col
span=
{
24
}
>
<
div
style=
{
{
float
:
"right"
}
}
>
<
Tooltip
title=
"最小化"
>
<
Button
type=
"text"
icon=
{
<
MinusSquareOutlined
/>
}
/>
</
Tooltip
>
</
div
>
</
Col
>
</
Row
>
<
Form
<
Form
form=
{
form
}
form=
{
form
}
layout=
"vertical"
layout=
"vertical"
...
@@ -163,6 +176,7 @@ const StudioSetting = (props: any) => {
...
@@ -163,6 +176,7 @@ const StudioSetting = (props: any) => {
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
Form
>
</
Form
>
</>
);
);
};
};
...
...
dlink-web/src/components/Studio/StudioTree/index.tsx
View file @
99174be3
import
React
,
{
useEffect
,
useRef
,
useState
}
from
"react"
;
import
React
,
{
useEffect
,
useRef
,
useState
}
from
"react"
;
import
{
connect
}
from
"umi"
;
import
{
connect
}
from
"umi"
;
import
{
DownOutlined
,
FrownFilled
,
FrownOutlined
,
MehOutlined
,
Smile
Outlined
}
from
"@ant-design/icons"
;
import
{
DownOutlined
,
SwitcherOutlined
,
FrownOutlined
,
MehOutlined
,
SmileOutlined
,
FolderAdd
Outlined
}
from
"@ant-design/icons"
;
import
{
Tree
,
Input
,
Menu
,
Empty
,
Button
,
message
,
Modal
}
from
'antd'
;
import
{
Tree
,
Input
,
Menu
,
Empty
,
Button
,
message
,
Modal
,
Tooltip
,
Row
,
Col
}
from
'antd'
;
import
{
getCatalogueTreeData
}
from
"@/pages/FlinkSqlStudio/service"
;
import
{
getCatalogueTreeData
}
from
"@/pages/FlinkSqlStudio/service"
;
import
{
convertToTreeData
,
DataType
,
TreeDataNode
}
from
"@/components/Studio/StudioTree/Function"
;
import
{
convertToTreeData
,
DataType
,
TreeDataNode
}
from
"@/components/Studio/StudioTree/Function"
;
import
style
from
"./index.less"
;
import
style
from
"./index.less"
;
...
@@ -48,6 +48,7 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
...
@@ -48,6 +48,7 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
const
[
treeData
,
setTreeData
]
=
useState
<
TreeDataNode
[]
>
();
const
[
treeData
,
setTreeData
]
=
useState
<
TreeDataNode
[]
>
();
const
[
dataList
,
setDataList
]
=
useState
<
[]
>
();
const
[
dataList
,
setDataList
]
=
useState
<
[]
>
();
const
[
expandedKeys
,
setExpandedKeys
]
=
useState
<
[]
>
();
const
[
rightClickNodeTreeItem
,
setRightClickNodeTreeItem
]
=
useState
<
RightClickMenu
>
();
const
[
rightClickNodeTreeItem
,
setRightClickNodeTreeItem
]
=
useState
<
RightClickMenu
>
();
const
{
rightClickMenu
,
dispatch
,
tabs
}
=
props
;
const
{
rightClickMenu
,
dispatch
,
tabs
}
=
props
;
const
[
updateCatalogueModalVisible
,
handleUpdateCatalogueModalVisible
]
=
useState
<
boolean
>
(
false
);
const
[
updateCatalogueModalVisible
,
handleUpdateCatalogueModalVisible
]
=
useState
<
boolean
>
(
false
);
...
@@ -85,6 +86,8 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
...
@@ -85,6 +86,8 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
toSubmit
(
rightClickNode
);
toSubmit
(
rightClickNode
);
}
else
if
(
key
==
'CreateCatalogue'
){
}
else
if
(
key
==
'CreateCatalogue'
){
createCatalogue
(
rightClickNode
);
createCatalogue
(
rightClickNode
);
}
else
if
(
key
==
'CreateRootCatalogue'
){
createRootCatalogue
(
rightClickNode
);
}
else
if
(
key
==
'CreateTask'
){
}
else
if
(
key
==
'CreateTask'
){
createTask
(
rightClickNode
);
createTask
(
rightClickNode
);
}
else
if
(
key
==
'Rename'
){
}
else
if
(
key
==
'Rename'
){
...
@@ -147,6 +150,16 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
...
@@ -147,6 +150,16 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
}
}
};
};
const
createRootCatalogue
=
()
=>
{
handleUpdateCatalogueModalVisible
(
true
);
setIsCreate
(
true
);
setCatalogueFormValues
({
isLeaf
:
false
,
parentId
:
0
,
});
getTreeData
();
};
const
toSubmit
=
(
node
:
TreeDataNode
)
=>
{
const
toSubmit
=
(
node
:
TreeDataNode
)
=>
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'提交作业'
,
title
:
'提交作业'
,
...
@@ -219,6 +232,7 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
...
@@ -219,6 +232,7 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
}
else
if
(
rightClickNode
&&
rightClickNode
.
children
&&
rightClickNode
.
children
.
length
>
0
){
}
else
if
(
rightClickNode
&&
rightClickNode
.
children
&&
rightClickNode
.
children
.
length
>
0
){
menuItems
=
(<>
menuItems
=
(<>
<
Menu
.
Item
key=
'CreateCatalogue'
>
{
'创建目录'
}
</
Menu
.
Item
>
<
Menu
.
Item
key=
'CreateCatalogue'
>
{
'创建目录'
}
</
Menu
.
Item
>
<
Menu
.
Item
key=
'CreateRootCatalogue'
>
{
'创建根目录'
}
</
Menu
.
Item
>
<
Menu
.
Item
key=
'CreateTask'
>
{
'创建作业'
}
</
Menu
.
Item
>
<
Menu
.
Item
key=
'CreateTask'
>
{
'创建作业'
}
</
Menu
.
Item
>
<
Menu
.
Item
key=
'Rename'
>
{
'重命名'
}
</
Menu
.
Item
>
<
Menu
.
Item
key=
'Rename'
>
{
'重命名'
}
</
Menu
.
Item
>
<
Menu
.
Item
disabled
>
{
'删除'
}
</
Menu
.
Item
>
<
Menu
.
Item
disabled
>
{
'删除'
}
</
Menu
.
Item
>
...
@@ -279,15 +293,45 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
...
@@ -279,15 +293,45 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
}
}
};
};
const
offExpandAll
=
()
=>
{
setExpandedKeys
([]);
};
const
onExpand
=
(
expandedKeys
:[])
=>
{
setExpandedKeys
(
expandedKeys
);
};
return
(
return
(
<
div
className=
{
style
.
tree_div
}
>
<
div
className=
{
style
.
tree_div
}
>
<
Search
style=
{
{
marginBottom
:
8
}
}
placeholder=
"Search"
onChange=
{
onChange
}
/>
<
Row
>
<
Col
span=
{
24
}
>
<
div
style=
{
{
float
:
"right"
}
}
>
<
Tooltip
title=
"创建根目录"
>
<
Button
type=
"text"
icon=
{
<
FolderAddOutlined
/>
}
onClick=
{
createRootCatalogue
}
/>
</
Tooltip
>
<
Tooltip
title=
"折叠目录"
>
<
Button
type=
"text"
icon=
{
<
SwitcherOutlined
/>
}
onClick=
{
offExpandAll
}
/>
</
Tooltip
>
</
div
>
</
Col
>
</
Row
>
{
/*<Search style={{marginBottom: 8}} placeholder="Search" onChange={onChange}/>*/
}
<
DirectoryTree
<
DirectoryTree
multiple
multiple
onRightClick=
{
onRightClick
}
onRightClick=
{
onRightClick
}
onSelect=
{
onSelect
}
onSelect=
{
onSelect
}
switcherIcon=
{
<
DownOutlined
/>
}
switcherIcon=
{
<
DownOutlined
/>
}
treeData=
{
treeData
}
treeData=
{
treeData
}
onExpand
={
onExpand
}
expandedKeys=
{
expandedKeys
}
/>
/>
{
getNodeTreeRightClickMenu
()
}
{
getNodeTreeRightClickMenu
()
}
{
getEmpty
()
}
{
getEmpty
()
}
...
...
dlink-web/src/components/Studio/index.less
View file @
99174be3
...
@@ -50,6 +50,14 @@
...
@@ -50,6 +50,14 @@
.anticon {
.anticon {
vertical-align: 0;
vertical-align: 0;
}
}
.ant-tabs-left > .ant-tabs-content-holder > .ant-tabs-content > .ant-tabs-tabpane, .ant-tabs-left > div > .ant-tabs-content-holder > .ant-tabs-content > .ant-tabs-tabpane {
padding-left: 10px;
}
.ant-tabs-right > .ant-tabs-content-holder > .ant-tabs-content > .ant-tabs-tabpane, .ant-tabs-right > div > .ant-tabs-content-holder > .ant-tabs-content > .ant-tabs-tabpane {
padding-right: 10px;
}
}
}
}
}
/* --- tabs 垂直样式 --- end */
/* --- tabs 垂直样式 --- end */
...
...
dlink-web/src/components/Studio/index.tsx
View file @
99174be3
...
@@ -66,7 +66,7 @@ const Studio: React.FC<StudioProps> = (props) => {
...
@@ -66,7 +66,7 @@ const Studio: React.FC<StudioProps> = (props) => {
<
TabPane
tab=
{
<
span
><
FireOutlined
/>
任务
</
span
>
}
key=
"FlinkTask"
>
<
TabPane
tab=
{
<
span
><
FireOutlined
/>
任务
</
span
>
}
key=
"FlinkTask"
>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
</
TabPane
>
</
TabPane
>
<
TabPane
tab=
{
<
span
><
FunctionOutlined
/>
函数
</
span
>
}
key=
"F
linkTask
"
>
<
TabPane
tab=
{
<
span
><
FunctionOutlined
/>
函数
</
span
>
}
key=
"F
unction
"
>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
</
TabPane
>
</
TabPane
>
</
Tabs
>
</
Tabs
>
...
...
dlink-web/src/locales/zh-CN/pages.ts
View file @
99174be3
...
@@ -29,7 +29,7 @@ export default {
...
@@ -29,7 +29,7 @@ export default {
'pages.welcome.link'
:
'欢迎加入'
,
'pages.welcome.link'
:
'欢迎加入'
,
'pages.welcome.star'
:
'欢迎 Star '
,
'pages.welcome.star'
:
'欢迎 Star '
,
'pages.welcome.advancedLayout'
:
'Github'
,
'pages.welcome.advancedLayout'
:
'Github'
,
'pages.welcome.alertMessage'
:
'实时计算平台 Dlink & Apache Flink 即将发布,目前为体验版,版本号为 0.2.
0
。'
,
'pages.welcome.alertMessage'
:
'实时计算平台 Dlink & Apache Flink 即将发布,目前为体验版,版本号为 0.2.
1
。'
,
'pages.admin.subPage.title'
:
' 这个页面只有 admin 权限才能查看'
,
'pages.admin.subPage.title'
:
' 这个页面只有 admin 权限才能查看'
,
'pages.admin.subPage.alertMessage'
:
'umi ui 现已发布,欢迎使用 npm run ui 启动体验。'
,
'pages.admin.subPage.alertMessage'
:
'umi ui 现已发布,欢迎使用 npm run ui 启动体验。'
,
'pages.searchTable.createForm.newRule'
:
'新建规则'
,
'pages.searchTable.createForm.newRule'
:
'新建规则'
,
...
...
dlink-web/src/pages/Welcome.tsx
View file @
99174be3
...
@@ -20,7 +20,7 @@ export default (): React.ReactNode => {
...
@@ -20,7 +20,7 @@ export default (): React.ReactNode => {
<
Alert
<
Alert
message=
{
intl
.
formatMessage
({
message=
{
intl
.
formatMessage
({
id
:
'pages.welcome.alertMessage'
,
id
:
'pages.welcome.alertMessage'
,
defaultMessage
:
'实时计算平台 Dlink & Apache Flink 即将发布,目前为体验版,版本号为 0.2.
0
。'
,
defaultMessage
:
'实时计算平台 Dlink & Apache Flink 即将发布,目前为体验版,版本号为 0.2.
1
。'
,
})
}
})
}
type=
"success"
type=
"success"
showIcon
showIcon
...
@@ -148,7 +148,7 @@ export default (): React.ReactNode => {
...
@@ -148,7 +148,7 @@ export default (): React.ReactNode => {
<
Paragraph
>
<
Paragraph
>
<
ul
>
<
ul
>
<
li
>
<
li
>
<
Link
href=
""
>
FlinkSql Studio 页面仿IDE设计改进
</
Link
>
<
Link
href=
""
>
FlinkSql Studio 页面仿IDE
紧凑型
设计改进
</
Link
>
</
li
>
</
li
>
<
li
>
<
li
>
<
Link
href=
""
>
解决了目录树右键菜单的不能任意点关闭问题
</
Link
>
<
Link
href=
""
>
解决了目录树右键菜单的不能任意点关闭问题
</
Link
>
...
@@ -159,6 +159,21 @@ export default (): React.ReactNode => {
...
@@ -159,6 +159,21 @@ export default (): React.ReactNode => {
<
li
>
<
li
>
<
Link
href=
""
>
解决了当前位置不根据选项卡刷新的问题
</
Link
>
<
Link
href=
""
>
解决了当前位置不根据选项卡刷新的问题
</
Link
>
</
li
>
</
li
>
<
li
>
<
Link
href=
""
>
增加了目录树非空文件夹的灰色删除按钮
</
Link
>
</
li
>
<
li
>
<
Link
href=
""
>
增加了目录树创建根目录按钮以及折叠按钮
</
Link
>
</
li
>
<
li
>
<
Link
href=
""
>
优化了连接器刷新与清空按钮
</
Link
>
</
li
>
<
li
>
<
Link
href=
""
>
优化了作业异步提交的提示
</
Link
>
</
li
>
<
li
>
<
Link
href=
""
>
增加了简易的使用帮助
</
Link
>
</
li
>
</
ul
>
</
ul
>
</
Paragraph
>
</
Paragraph
>
</
Timeline
.
Item
>
</
Timeline
.
Item
>
...
...
pom.xml
View file @
99174be3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<groupId>
com.dlink
</groupId>
<groupId>
com.dlink
</groupId>
<artifactId>
dlink
</artifactId>
<artifactId>
dlink
</artifactId>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<version>
0.
3.0-SNAPSHOT
</version>
<version>
0.
2.1
</version>
<modules>
<modules>
<module>
dlink-core
</module>
<module>
dlink-core
</module>
<module>
dlink-admin
</module>
<module>
dlink-admin
</module>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment