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
a5052c91
Commit
a5052c91
authored
Jan 20, 2022
by
wenmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
F2全屏开发
parent
37f29408
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
9 deletions
+33
-9
index.tsx
dlink-web/src/components/Studio/StudioHome/index.tsx
+2
-1
index.tsx
dlink-web/src/components/Studio/StudioMenu/index.tsx
+22
-2
index.tsx
dlink-web/src/components/Studio/StudioTabs/index.tsx
+3
-3
index.tsx
dlink-web/src/components/Studio/index.tsx
+3
-3
Welcome.tsx
dlink-web/src/pages/Welcome.tsx
+3
-0
No files found.
dlink-web/src/components/Studio/StudioHome/index.tsx
View file @
a5052c91
...
@@ -22,7 +22,8 @@ const StudioHome = (props: any) => {
...
@@ -22,7 +22,8 @@ const StudioHome = (props: any) => {
<
Text
keyboard
>
Alt + 1
</
Text
>
保存
<
Divider
type=
"vertical"
/>
<
Text
keyboard
>
Alt + 1
</
Text
>
保存
<
Divider
type=
"vertical"
/>
<
Text
keyboard
>
Alt + 2
</
Text
>
校验
<
Divider
type=
"vertical"
/>
<
Text
keyboard
>
Alt + 2
</
Text
>
校验
<
Divider
type=
"vertical"
/>
<
Text
keyboard
>
Alt + 3
</
Text
>
美化
<
Divider
type=
"vertical"
/>
<
Text
keyboard
>
Alt + 3
</
Text
>
美化
<
Divider
type=
"vertical"
/>
<
Text
keyboard
>
Esc
</
Text
>
关闭弹框
<
Divider
type=
"vertical"
/>
<
Text
keyboard
>
F2
</
Text
>
全屏
<
Divider
type=
"vertical"
/>
<
Text
keyboard
>
Esc
</
Text
>
关闭弹框及全屏
<
Divider
type=
"vertical"
/>
<
Text
keyboard
>
F1
</
Text
>
更多快捷键
<
Text
keyboard
>
F1
</
Text
>
更多快捷键
</
Paragraph
>
</
Paragraph
>
<
Paragraph
>
<
Paragraph
>
...
...
dlink-web/src/components/Studio/StudioMenu/index.tsx
View file @
a5052c91
...
@@ -16,7 +16,7 @@ import {executeSql, getJobPlan} from "@/pages/FlinkSqlStudio/service";
...
@@ -16,7 +16,7 @@ import {executeSql, getJobPlan} from "@/pages/FlinkSqlStudio/service";
import
StudioHelp
from
"./StudioHelp"
;
import
StudioHelp
from
"./StudioHelp"
;
import
StudioGraph
from
"./StudioGraph"
;
import
StudioGraph
from
"./StudioGraph"
;
import
{
showCluster
,
showTables
}
from
"@/components/Studio/StudioEvent/DDL"
;
import
{
showCluster
,
showTables
}
from
"@/components/Studio/StudioEvent/DDL"
;
import
{
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
StudioExplain
from
"../StudioConsole/StudioExplain"
;
import
StudioExplain
from
"../StudioConsole/StudioExplain"
;
import
{
DIALECT
,
isOnline
,
isSql
}
from
"@/components/Studio/conf"
;
import
{
DIALECT
,
isOnline
,
isSql
}
from
"@/components/Studio/conf"
;
import
{
import
{
...
@@ -24,6 +24,7 @@ import {
...
@@ -24,6 +24,7 @@ import {
}
from
'@ant-design/pro-form'
;
}
from
'@ant-design/pro-form'
;
import
SqlExport
from
"@/pages/FlinkSqlStudio/SqlExport"
;
import
SqlExport
from
"@/pages/FlinkSqlStudio/SqlExport"
;
import
{
Dispatch
}
from
"@@/plugin-dva/connect"
;
import
{
Dispatch
}
from
"@@/plugin-dva/connect"
;
import
StudioTabs
from
"@/components/Studio/StudioTabs"
;
const
menu
=
(
const
menu
=
(
<
Menu
>
<
Menu
>
...
@@ -34,10 +35,11 @@ const menu = (
...
@@ -34,10 +35,11 @@ const menu = (
const
StudioMenu
=
(
props
:
any
)
=>
{
const
StudioMenu
=
(
props
:
any
)
=>
{
const
{
tabs
,
current
,
currentPath
,
form
,
refs
,
dispatch
,
currentSession
}
=
props
;
const
{
tabs
,
current
,
currentPath
,
form
,
width
,
height
,
refs
,
dispatch
,
currentSession
}
=
props
;
const
[
modalVisible
,
handleModalVisible
]
=
useState
<
boolean
>
(
false
);
const
[
modalVisible
,
handleModalVisible
]
=
useState
<
boolean
>
(
false
);
const
[
exportModalVisible
,
handleExportModalVisible
]
=
useState
<
boolean
>
(
false
);
const
[
exportModalVisible
,
handleExportModalVisible
]
=
useState
<
boolean
>
(
false
);
const
[
graphModalVisible
,
handleGraphModalVisible
]
=
useState
<
boolean
>
(
false
);
const
[
graphModalVisible
,
handleGraphModalVisible
]
=
useState
<
boolean
>
(
false
);
const
[
editModalVisible
,
handleEditModalVisible
]
=
useState
<
boolean
>
(
false
);
const
[
graphData
,
setGraphData
]
=
useState
();
const
[
graphData
,
setGraphData
]
=
useState
();
const
onKeyDown
=
useCallback
((
e
)
=>
{
const
onKeyDown
=
useCallback
((
e
)
=>
{
...
@@ -47,6 +49,12 @@ const StudioMenu = (props: any) => {
...
@@ -47,6 +49,12 @@ const StudioMenu = (props: any) => {
props
.
saveTask
(
current
);
props
.
saveTask
(
current
);
}
}
}
}
if
(
e
.
keyCode
===
113
){
e
.
preventDefault
();
if
(
current
)
{
handleEditModalVisible
(
true
);
}
}
},
[
current
]);
},
[
current
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -455,6 +463,18 @@ const StudioMenu = (props: any) => {
...
@@ -455,6 +463,18 @@ const StudioMenu = (props: any) => {
>
>
<
SqlExport
id=
{
current
.
task
.
id
}
/>
<
SqlExport
id=
{
current
.
task
.
id
}
/>
</
ModalForm
>:
undefined
}
</
ModalForm
>:
undefined
}
{
current
?<
Modal
width=
{
width
}
bodyStyle=
{
{
padding
:
0
}
}
style=
{
{
top
:
0
,
padding
:
0
,
margin
:
0
,
maxWidth
:
'100vw'
}
}
destroyOnClose
maskClosable=
{
false
}
closable=
{
false
}
visible=
{
editModalVisible
}
footer=
{
null
}
onCancel=
{
()
=>
handleEditModalVisible
(
false
)
}
>
<
StudioTabs
width=
{
width
}
height=
{
height
}
/>
</
Modal
>:
undefined
}
</
Row
>
</
Row
>
);
);
};
};
...
...
dlink-web/src/components/Studio/StudioTabs/index.tsx
View file @
a5052c91
...
@@ -10,7 +10,7 @@ import StudioHome from "@/components/Studio/StudioHome";
...
@@ -10,7 +10,7 @@ import StudioHome from "@/components/Studio/StudioHome";
const
{
TabPane
}
=
Tabs
;
const
{
TabPane
}
=
Tabs
;
const
EditorTabs
=
(
props
:
any
)
=>
{
const
EditorTabs
=
(
props
:
any
)
=>
{
const
{
tabs
,
dispatch
,
current
,
toolHeight
,
width
}
=
props
;
const
{
tabs
,
dispatch
,
current
,
toolHeight
,
width
,
height
}
=
props
;
const
onChange
=
(
activeKey
:
any
)
=>
{
const
onChange
=
(
activeKey
:
any
)
=>
{
dispatch
&&
dispatch
&&
...
@@ -116,13 +116,13 @@ const EditorTabs = (props: any) => {
...
@@ -116,13 +116,13 @@ const EditorTabs = (props: any) => {
activeKey=
{
tabs
.
activeKey
+
''
}
activeKey=
{
tabs
.
activeKey
+
''
}
onEdit=
{
onEdit
}
onEdit=
{
onEdit
}
className=
{
styles
[
'edit-tabs'
]
}
className=
{
styles
[
'edit-tabs'
]
}
style=
{
{
height
:
toolHeight
}
}
style=
{
{
height
:
height
?
height
:
toolHeight
}
}
>
>
{
tabs
.
panes
.
map
((
pane
)
=>
(
{
tabs
.
panes
.
map
((
pane
)
=>
(
<
TabPane
tab=
{
Tab
(
pane
)
}
key=
{
pane
.
key
}
closable=
{
pane
.
closable
}
>
<
TabPane
tab=
{
Tab
(
pane
)
}
key=
{
pane
.
key
}
closable=
{
pane
.
closable
}
>
<
StudioEdit
<
StudioEdit
tabsKey=
{
pane
.
key
}
tabsKey=
{
pane
.
key
}
height=
{
toolHeight
-
32
}
height=
{
height
?
height
:(
toolHeight
-
32
)
}
width=
{
width
}
width=
{
width
}
language=
{
current
.
task
.
dialect
===
DIALECT
.
JAVA
?
'java'
:
'sql'
}
language=
{
current
.
task
.
dialect
===
DIALECT
.
JAVA
?
'java'
:
'sql'
}
/>
/>
...
...
dlink-web/src/components/Studio/index.tsx
View file @
a5052c91
...
@@ -32,12 +32,12 @@ const Studio = (props: any) => {
...
@@ -32,12 +32,12 @@ const Studio = (props: any) => {
midMargin
:
46
,
midMargin
:
46
,
};
};
const
[
size
,
setSize
]
=
useState
({
const
[
size
,
setSize
]
=
useState
({
width
:
document
.
documentElement
.
clientWidth
-
1
,
width
:
document
.
documentElement
.
clientWidth
,
height
:
document
.
documentElement
.
clientHeight
,
height
:
document
.
documentElement
.
clientHeight
,
});
});
const
onResize
=
useCallback
(()
=>
{
const
onResize
=
useCallback
(()
=>
{
setSize
({
setSize
({
width
:
document
.
documentElement
.
clientWidth
-
1
,
width
:
document
.
documentElement
.
clientWidth
,
height
:
document
.
documentElement
.
clientHeight
,
height
:
document
.
documentElement
.
clientHeight
,
})
})
},
[]);
},
[]);
...
@@ -73,7 +73,7 @@ const Studio = (props: any) => {
...
@@ -73,7 +73,7 @@ const Studio = (props: any) => {
return
(
return
(
<
div
onClick=
{
onClick
}
style=
{
{
'margin'
:
'-24px'
}
}
>
<
div
onClick=
{
onClick
}
style=
{
{
'margin'
:
'-24px'
}
}
>
<
StudioMenu
form=
{
form
}
/>
<
StudioMenu
form=
{
form
}
width=
{
size
.
width
}
height=
{
size
.
height
}
/>
<
Card
bordered=
{
false
}
className=
{
styles
.
card
}
size=
"small"
id=
"studio_card"
style=
{
{
marginBottom
:
0
}
}
>
<
Card
bordered=
{
false
}
className=
{
styles
.
card
}
size=
"small"
id=
"studio_card"
style=
{
{
marginBottom
:
0
}
}
>
<
DraggleVerticalLayout
<
DraggleVerticalLayout
containerWidth=
{
size
.
width
}
containerWidth=
{
size
.
width
}
...
...
dlink-web/src/pages/Welcome.tsx
View file @
a5052c91
...
@@ -586,6 +586,9 @@ export default (): React.ReactNode => {
...
@@ -586,6 +586,9 @@ export default (): React.ReactNode => {
<
li
>
<
li
>
<
Link
>
修复 前端多处bug
</
Link
>
<
Link
>
修复 前端多处bug
</
Link
>
</
li
>
</
li
>
<
li
>
<
Link
>
新增 F2 全屏开发
</
Link
>
</
li
>
</
ul
>
</
ul
>
</
Paragraph
>
</
Paragraph
>
</
Timeline
.
Item
>
</
Timeline
.
Item
>
...
...
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