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
9542a3f6
Commit
9542a3f6
authored
Jul 09, 2021
by
wenmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
session展示
parent
7aa316d7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
9 deletions
+43
-9
StudioController.java
.../src/main/java/com/dlink/controller/StudioController.java
+1
-1
SessionForm.tsx
...StudioLeftTool/StudioConnector/components/SessionForm.tsx
+2
-2
index.tsx
...omponents/Studio/StudioLeftTool/StudioConnector/index.tsx
+39
-5
model.ts
dlink-web/src/pages/FlinkSqlStudio/model.ts
+1
-1
No files found.
dlink-admin/src/main/java/com/dlink/controller/StudioController.java
View file @
9542a3f6
...
@@ -70,7 +70,7 @@ public class StudioController {
...
@@ -70,7 +70,7 @@ public class StudioController {
/**
/**
* 创建session
* 创建session
*/
*/
@P
os
tMapping
(
"/createSession"
)
@P
u
tMapping
(
"/createSession"
)
public
Result
createSession
(
@RequestBody
SessionDTO
sessionDTO
)
{
public
Result
createSession
(
@RequestBody
SessionDTO
sessionDTO
)
{
return
Result
.
succeed
(
studioService
.
createSession
(
sessionDTO
,
"admin"
),
"创建成功"
);
return
Result
.
succeed
(
studioService
.
createSession
(
sessionDTO
,
"admin"
),
"创建成功"
);
}
}
...
...
dlink-web/src/components/Studio/StudioLeftTool/StudioConnector/components/SessionForm.tsx
View file @
9542a3f6
...
@@ -75,7 +75,7 @@ const SessionForm: React.FC<UpdateFormProps> = (props) => {
...
@@ -75,7 +75,7 @@ const SessionForm: React.FC<UpdateFormProps> = (props) => {
<
Item
<
Item
name=
"type"
name=
"type"
label=
"访问权限"
label=
"访问权限"
rules=
{
[{
required
:
true
,
message
:
'请输入别名!'
}]
}
>
>
<
Select
defaultValue=
"PUBLIC"
>
<
Select
defaultValue=
"PUBLIC"
>
<
Option
value=
"PUBLIC"
>
共享
</
Option
>
<
Option
value=
"PUBLIC"
>
共享
</
Option
>
<
Option
value=
"PRIVATE"
>
私密
</
Option
>
<
Option
value=
"PRIVATE"
>
私密
</
Option
>
...
@@ -84,7 +84,7 @@ const SessionForm: React.FC<UpdateFormProps> = (props) => {
...
@@ -84,7 +84,7 @@ const SessionForm: React.FC<UpdateFormProps> = (props) => {
<
Item
<
Item
name=
"useRemote"
name=
"useRemote"
label=
"是否远程"
label=
"是否远程"
rules=
{
[{
required
:
true
,
message
:
'禁用则为本地模式'
}]
}
>
>
<
Switch
checkedChildren=
"启用"
unCheckedChildren=
"禁用"
<
Switch
checkedChildren=
"启用"
unCheckedChildren=
"禁用"
defaultChecked=
{
formVals
.
useRemote
}
/>
defaultChecked=
{
formVals
.
useRemote
}
/>
</
Item
>
</
Item
>
...
...
dlink-web/src/components/Studio/StudioLeftTool/StudioConnector/index.tsx
View file @
9542a3f6
...
@@ -121,6 +121,8 @@ const StudioConnector = (props:any) => {
...
@@ -121,6 +121,8 @@ const StudioConnector = (props:any) => {
const
keySessionsEvent
=
(
key
,
item
)
=>
{
const
keySessionsEvent
=
(
key
,
item
)
=>
{
if
(
key
==
'delete'
){
if
(
key
==
'delete'
){
clearSession
(
item
.
session
,
current
.
task
,
dispatch
);
clearSession
(
item
.
session
,
current
.
task
,
dispatch
);
}
else
if
(
key
==
'connect'
){
}
else
{
}
else
{
message
.
warn
(
"敬请期待"
);
message
.
warn
(
"敬请期待"
);
}
}
...
@@ -171,6 +173,41 @@ const StudioConnector = (props:any) => {
...
@@ -171,6 +173,41 @@ const StudioConnector = (props:any) => {
key
:
"session"
,
key
:
"session"
,
sorter
:
true
,
sorter
:
true
,
...
getColumnSearchProps
(
"session"
),
...
getColumnSearchProps
(
"session"
),
},{
title
:
"执行模式"
,
key
:
"useRemote"
,
sorter
:
true
,
...
getColumnSearchProps
(
"useRemote"
),
render
:
function
(
text
,
record
,
index
)
{
return
record
.
sessionConfig
.
useRemote
?
'远程'
:
'本地'
;
}
},{
title
:
"集群名"
,
key
:
"clusterName"
,
sorter
:
true
,
...
getColumnSearchProps
(
"clusterName"
),
render
:
function
(
text
,
record
,
index
)
{
return
record
.
sessionConfig
.
clusterName
;
}
},{
title
:
"JobManager地址"
,
key
:
"address"
,
sorter
:
true
,
...
getColumnSearchProps
(
"address"
),
render
:
function
(
text
,
record
,
index
)
{
return
record
.
sessionConfig
.
address
;
}
},{
title
:
"创建人"
,
dataIndex
:
"createUser"
,
key
:
"createUser"
,
sorter
:
true
,
...
getColumnSearchProps
(
"createUser"
),
},{
title
:
"创建时间"
,
dataIndex
:
"createTime"
,
key
:
"createTime"
,
sorter
:
true
,
},{
},{
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'option'
,
dataIndex
:
'option'
,
...
@@ -181,7 +218,7 @@ const StudioConnector = (props:any) => {
...
@@ -181,7 +218,7 @@ const StudioConnector = (props:any) => {
message
.
warn
(
'敬请期待'
);
message
.
warn
(
'敬请期待'
);
}
}
}
}
>
>
描述
连接
</
a
>,<
Divider
type=
"vertical"
/>,<
a
</
a
>,<
Divider
type=
"vertical"
/>,<
a
onClick=
{
()
=>
{
onClick=
{
()
=>
{
keySessionsEvent
(
'delete'
,
record
);
keySessionsEvent
(
'delete'
,
record
);
...
@@ -276,17 +313,14 @@ const StudioConnector = (props:any) => {
...
@@ -276,17 +313,14 @@ const StudioConnector = (props:any) => {
</
ModalForm
>
</
ModalForm
>
<
SessionForm
<
SessionForm
onSubmit=
{
async
(
value
)
=>
{
onSubmit=
{
async
(
value
)
=>
{
console
.
log
(
value
);
const
success
=
await
handleAddOrUpdate
(
"api/studio/createSession"
,
value
);
const
success
=
await
handleAddOrUpdate
(
"api/studio/createSession"
,
value
);
if
(
success
)
{
if
(
success
)
{
handleCreateSessionModalVisible
(
false
);
handleCreateSessionModalVisible
(
false
);
/*if (actionRef.current) {
actionRef.current.reload();
}*/
}
}
}
}
}
}
onCancel=
{
()
=>
{
onCancel=
{
()
=>
{
handleCreateSessionModalVisible
(
false
);
handleCreateSessionModalVisible
(
false
);
// setFormValues(
{});
}
}
}
}
updateModalVisible=
{
createSessionModalVisible
}
updateModalVisible=
{
createSessionModalVisible
}
values=
{
{}
}
values=
{
{}
}
...
...
dlink-web/src/pages/FlinkSqlStudio/model.ts
View file @
9542a3f6
import
{
Effect
,
Reducer
}
from
"umi"
;
import
{
Effect
,
Reducer
}
from
"umi"
;
import
{
import
{
getData
,
handleAddOrUpdate
handleAddOrUpdate
}
from
"@/components/Common/crud"
;
}
from
"@/components/Common/crud"
;
export
type
ClusterType
=
{
export
type
ClusterType
=
{
...
...
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