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
837c185f
Commit
837c185f
authored
Jun 17, 2021
by
wenmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.2.2 bug修复
parent
4830cde7
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
74 additions
and
13 deletions
+74
-13
README.md
README.md
+1
-1
Task.java
dlink-admin/src/main/java/com/dlink/model/Task.java
+3
-0
TaskServiceImpl.java
...src/main/java/com/dlink/service/impl/TaskServiceImpl.java
+6
-0
index.less
dlink-web/src/components/Studio/StudioConnector/index.less
+5
-0
index.tsx
dlink-web/src/components/Studio/StudioConnector/index.tsx
+15
-4
index.tsx
...src/components/Studio/StudioConsole/StudioTable/index.tsx
+1
-1
index.tsx
dlink-web/src/components/Studio/StudioMenu/index.tsx
+2
-2
index.tsx
dlink-web/src/components/Studio/StudioSetting/index.tsx
+12
-4
index.tsx
dlink-web/src/components/Studio/StudioTree/index.tsx
+1
-0
pages.ts
dlink-web/src/locales/zh-CN/pages.ts
+1
-1
model.ts
dlink-web/src/pages/FlinkSqlStudio/model.ts
+5
-0
Welcome.tsx
dlink-web/src/pages/Welcome.tsx
+22
-0
No files found.
README.md
View file @
837c185f
...
...
@@ -93,7 +93,7 @@ DataLink 开源项目及社区正在建设,希望本项目可以帮助你更
### 最新版本
dlink-0.2.
2
dlink-0.2.
3
### 从安装包开始
...
...
dlink-admin/src/main/java/com/dlink/model/Task.java
View file @
837c185f
...
...
@@ -40,6 +40,9 @@ public class Task extends SuperEntity{
@TableField
(
exist
=
false
)
private
String
statement
;
@TableField
(
exist
=
false
)
private
String
clusterName
;
public
ExecutorSetting
getLocalExecutorSetting
(){
return
new
ExecutorSetting
(
Executor
.
LOCAL
,
checkPoint
,
parallelism
,
fragment
,
savePointPath
,
alias
);
}
...
...
dlink-admin/src/main/java/com/dlink/service/impl/TaskServiceImpl.java
View file @
837c185f
...
...
@@ -62,6 +62,12 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
Task
task
=
this
.
getById
(
id
);
if
(
task
!=
null
)
{
Statement
statement
=
statementService
.
getById
(
id
);
if
(
task
.
getClusterId
()!=
null
)
{
Cluster
cluster
=
clusterService
.
getById
(
task
.
getClusterId
());
if
(
cluster
!=
null
){
task
.
setClusterName
(
cluster
.
getAlias
());
}
}
if
(
statement
!=
null
)
{
task
.
setStatement
(
statement
.
getStatement
());
}
...
...
dlink-web/src/components/Studio/StudioConnector/index.less
0 → 100644
View file @
837c185f
@import '~antd/lib/style/themes/default.less';
.session-path{
line-height: 32px;
}
dlink-web/src/components/Studio/StudioConnector/index.tsx
View file @
837c185f
import
{
message
,
Input
,
Button
,
Space
,
Table
,
Dropdown
,
Menu
,
Empty
,
Divider
,
Tooltip
}
from
"antd"
;
import
{
message
,
Input
,
Button
,
Space
,
Table
,
Dropdown
,
Menu
,
Empty
,
Divider
,
Tooltip
,
Breadcrumb
}
from
"antd"
;
import
{
StateType
}
from
"@/pages/FlinkSqlStudio/model"
;
import
{
connect
}
from
"umi"
;
import
{
useState
}
from
"react"
;
// import Highlighter from 'react-highlight-words'
;
import
{
SearchOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
styles
from
"./index.less"
;
import
{
SearchOutlined
,
DownOutlined
,
DeleteOutlined
,
CommentOutlined
}
from
'@ant-design/icons'
;
import
React
from
"react"
;
import
{
executeDDL
}
from
"@/pages/FlinkSqlStudio/service"
;
import
{
handleRemove
}
from
"@/components/Common/crud"
;
...
...
@@ -16,6 +17,8 @@ const StudioConnector = (props:any) => {
const
[
loadings
,
setLoadings
]
=
useState
<
boolean
[]
>
([]);
const
[
searchText
,
setSearchText
]
=
useState
<
string
>
(
''
);
const
[
searchedColumn
,
setSearchedColumn
]
=
useState
<
string
>
(
''
);
const
[
clusterName
,
setClusterName
]
=
useState
<
string
>
(
''
);
const
[
session
,
setSession
]
=
useState
<
string
>
(
''
);
const
getColumnSearchProps
=
(
dIndex
)
=>
({
filterDropdown
:
({
setSelectedKeys
,
selectedKeys
,
confirm
,
clearFilters
})
=>
(
...
...
@@ -141,6 +144,8 @@ const StudioConnector = (props:any) => {
session
:
current
.
task
.
session
,
});
res
.
then
((
result
)
=>
{
setClusterName
(
current
.
task
.
clusterName
);
setSession
(
current
.
task
.
session
);
if
(
result
.
datas
.
result
.
rowData
.
length
>
0
){
setTableData
(
result
.
datas
.
result
.
rowData
);
}
else
{
...
...
@@ -216,6 +221,12 @@ const StudioConnector = (props:any) => {
/>
</
Tooltip
>
</
div
>
<
Breadcrumb
className=
{
styles
[
"session-path"
]
}
>
<
CommentOutlined
/>
<
Divider
type=
"vertical"
/>
<
Breadcrumb
.
Item
>
{
clusterName
}
</
Breadcrumb
.
Item
>
<
Breadcrumb
.
Item
>
{
session
}
</
Breadcrumb
.
Item
>
</
Breadcrumb
>
{
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 @
837c185f
...
...
@@ -115,7 +115,7 @@ const StudioTable = (props:any) => {
{
item
.
jobName
&&
<
Text
code
>
{
item
.
jobName
}
</
Text
>
}
{
item
.
jobId
&&
<
Text
code
>
{
item
.
jobId
}
</
Text
>
}
<
Text
keyboard
>
{
item
.
time
}
ms
</
Text
>
{
item
.
statement
.
substring
(
0
,
20
)
+
"..."
}
</>);
{
item
.
statement
}
</>);
return
(<
Option
value=
{
index
}
label=
{
tag
}
>
{
tag
}
</
Option
>)
...
...
dlink-web/src/components/Studio/StudioMenu/index.tsx
View file @
837c185f
...
...
@@ -9,7 +9,7 @@ import Button from "antd/es/button/button";
import
Breadcrumb
from
"antd/es/breadcrumb/Breadcrumb"
;
import
{
StateType
}
from
"@/pages/FlinkSqlStudio/model"
;
import
{
connect
}
from
"umi"
;
import
{
handleSubmit
,
postDataArray
}
from
"@/components/Common/crud"
;
import
{
postDataArray
}
from
"@/components/Common/crud"
;
import
{
executeSql
}
from
"@/pages/FlinkSqlStudio/service"
;
import
StudioHelp
from
"../StudioHelp"
;
...
...
@@ -42,7 +42,7 @@ const StudioMenu = (props: any) => {
maxRowNum
:
current
.
task
.
maxRowNum
,
fragment
:
current
.
task
.
fragment
,
savePointPath
:
current
.
task
.
savePointPath
,
jobName
:
current
.
task
.
alias
,
jobName
:
current
.
task
.
jobName
,
};
const
key
=
current
.
key
;
const
taskKey
=
(
Math
.
random
()
*
1000
)
+
''
;
...
...
dlink-web/src/components/Studio/StudioSetting/index.tsx
View file @
837c185f
...
...
@@ -80,6 +80,12 @@ const StudioSetting = (props: any) => {
//initialValues={current.task}
onValuesChange=
{
onValuesChange
}
>
<
Form
.
Item
label=
"jobName"
className=
{
styles
.
form_item
}
name=
"jobName"
tooltip=
'设置任务名称,默认为作业名'
>
<
Input
placeholder=
"hdfs://..."
/>
</
Form
.
Item
>
<
Row
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"CheckPoint"
tooltip=
"设置Flink任务的检查点步长,0 代表不启用"
name=
"checkPoint"
...
...
@@ -122,7 +128,7 @@ const StudioSetting = (props: any) => {
<
Input
placeholder=
"hdfs://..."
/>
</
Form
.
Item
>
<
Row
>
<
Col
span=
{
11
}
>
<
Col
span=
{
24
}
>
<
Form
.
Item
label=
"Flink集群"
tooltip=
"选择Flink集群进行远程提交任务"
name=
"clusterId"
className=
{
styles
.
form_item
}
>
<
Select
...
...
@@ -139,9 +145,11 @@ const StudioSetting = (props: any) => {
</
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
11
}
offset=
{
1
}
>
</
Row
>
<
Row
>
<
Col
span=
{
24
}
>
<
Form
.
Item
label=
"共享会话"
tooltip=
"选择会话进行 Flink Catalog 的共享"
name=
"session"
label=
"共享会话"
tooltip=
"选择会话进行 Flink Catalog 的共享
,当未选择时默认禁用该功能
"
name=
"session"
className=
{
styles
.
form_item
}
>
<
Select
placeholder=
"选择会话"
...
...
@@ -152,7 +160,7 @@ const StudioSetting = (props: any) => {
{
menu
}
<
Divider
style=
{
{
margin
:
'4px 0'
}
}
/>
<
div
style=
{
{
display
:
'flex'
,
flexWrap
:
'nowrap'
,
padding
:
8
}
}
>
<
Input
style=
{
{
flex
:
'auto'
}
}
<
Input
style=
{
{
flex
:
'auto'
}
}
value=
{
newSesstion
}
onChange=
{
(
e
)
=>
{
setNewSesstion
(
e
.
target
.
value
);
}
}
...
...
dlink-web/src/components/Studio/StudioTree/index.tsx
View file @
837c185f
...
...
@@ -138,6 +138,7 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
task
:{
session
:
''
,
maxRowNum
:
100
,
jobName
:
node
.
name
,
...
result
.
datas
},
console
:{
...
...
dlink-web/src/locales/zh-CN/pages.ts
View file @
837c185f
...
...
@@ -29,7 +29,7 @@ export default {
'pages.welcome.link'
:
'欢迎加入'
,
'pages.welcome.star'
:
'欢迎 Star '
,
'pages.welcome.advancedLayout'
:
'Github'
,
'pages.welcome.alertMessage'
:
'实时计算平台 Dlink & Apache Flink 即将发布,目前为体验版,版本号为 0.2.
2
。'
,
'pages.welcome.alertMessage'
:
'实时计算平台 Dlink & Apache Flink 即将发布,目前为体验版,版本号为 0.2.
3
。'
,
'pages.admin.subPage.title'
:
' 这个页面只有 admin 权限才能查看'
,
'pages.admin.subPage.alertMessage'
:
'umi ui 现已发布,欢迎使用 npm run ui 启动体验。'
,
'pages.searchTable.createForm.newRule'
:
'新建规则'
,
...
...
dlink-web/src/pages/FlinkSqlStudio/model.ts
View file @
837c185f
...
...
@@ -39,6 +39,7 @@ export type TaskType = {
statement
?:
string
,
session
:
string
;
maxRowNum
:
number
;
jobName
:
string
;
};
export
type
ConsoleType
=
{
...
...
@@ -118,11 +119,13 @@ const Model: ModelType = {
closable
:
false
,
path
:
[
'草稿'
],
task
:{
jobName
:
'草稿'
,
checkPoint
:
0
,
savePointPath
:
''
,
parallelism
:
1
,
fragment
:
true
,
clusterId
:
0
,
clusterName
:
"本地环境"
,
maxRowNum
:
100
,
session
:
''
,
alias
:
'草稿'
,
...
...
@@ -144,11 +147,13 @@ const Model: ModelType = {
closable
:
false
,
path
:
[
'草稿'
],
task
:{
jobName
:
'草稿'
,
checkPoint
:
0
,
savePointPath
:
''
,
parallelism
:
1
,
fragment
:
true
,
clusterId
:
0
,
clusterName
:
"本地环境"
,
session
:
''
,
maxRowNum
:
100
,
alias
:
'草稿'
,
...
...
dlink-web/src/pages/Welcome.tsx
View file @
837c185f
...
...
@@ -229,6 +229,28 @@ export default (): React.ReactNode => {
</
ul
>
</
Paragraph
>
</
Timeline
.
Item
>
<
Timeline
.
Item
><
Text
code
>
0.2.3
</
Text
>
<
Text
type=
"secondary"
>
2021-06-17
</
Text
>
<
p
>
</
p
>
<
Paragraph
>
<
ul
>
<
li
>
<
Link
>
优化了任务配置集群下拉框的展示
</
Link
>
</
li
>
<
li
>
<
Link
>
解决了新增会话后输入框的值仍保留的问题
</
Link
>
</
li
>
<
li
>
<
Link
>
修改了历史下拉框语句为全部展示
</
Link
>
</
li
>
<
li
>
<
Link
>
增加了作业同步执行时的任务名配置
</
Link
>
</
li
>
<
li
>
<
Link
>
增加了连接器当前的集群与会话显示
</
Link
>
</
li
>
</
ul
>
</
Paragraph
>
</
Timeline
.
Item
>
</
Timeline
>
</
Card
>
</
PageContainer
>
...
...
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