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
6da13cef
Commit
6da13cef
authored
Mar 10, 2022
by
wenmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化语法检测建议的结果提示
parent
b6fc8268
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
6 deletions
+26
-6
index.tsx
...c/components/Studio/StudioConsole/StudioExplain/index.tsx
+21
-4
conf.ts
dlink-web/src/pages/ClusterConfiguration/conf.ts
+2
-2
Welcome.tsx
dlink-web/src/pages/Welcome.tsx
+3
-0
No files found.
dlink-web/src/components/Studio/StudioConsole/StudioExplain/index.tsx
View file @
6da13cef
...
...
@@ -6,7 +6,7 @@ import ProList from '@ant-design/pro-list';
import
{
explainSql
}
from
"@/pages/FlinkSqlStudio/service"
;
import
{
useRef
,
useState
,
useEffect
}
from
"react"
;
const
{
Paragraph
}
=
Typography
;
const
{
Paragraph
,
Text
}
=
Typography
;
type
ExplainItem
=
{
index
:
number
;
...
...
@@ -27,6 +27,7 @@ export type StudioExplainProps = {
}
const
StudioExplain
=
(
props
:
any
)
=>
{
const
[
explainData
,
setExplainData
]
=
useState
([]);
const
[
result
,
setResult
]
=
useState
(<
Text
>
正在校验中...
</
Text
>);
const
{
onClose
,
modalVisible
,
...
...
@@ -35,7 +36,7 @@ const StudioExplain = (props: any) => {
}
=
props
;
useEffect
(()
=>
{
if
(
!
modalVisible
)
{
if
(
!
modalVisible
)
{
return
;
}
let
selectsql
=
null
;
...
...
@@ -54,11 +55,24 @@ const StudioExplain = (props: any) => {
configJson
:
JSON
.
stringify
(
current
.
task
.
config
),
statement
:
selectsql
,
};
setResult
(<
Text
>
正在校验中...
</
Text
>);
setExplainData
([]);
const
result
=
explainSql
(
param
);
result
.
then
(
res
=>
{
setExplainData
(
res
.
datas
);
let
errorCount
:
number
=
0
;
for
(
let
i
in
res
.
datas
)
{
if
(
!
res
.
datas
[
i
].
explainTrue
||
!
res
.
datas
[
i
].
parseTrue
)
{
errorCount
++
;
}
}
if
(
errorCount
==
0
)
{
setResult
(<
Text
type=
"success"
>
全部正确
</
Text
>);
}
else
{
setResult
(<
Text
type=
"danger"
>
存在错误,共计
{
errorCount
}
个
</
Text
>);
}
})
},
[
modalVisible
])
},
[
modalVisible
])
;
const
renderFooter
=
()
=>
{
return
(
...
...
@@ -162,12 +176,15 @@ const StudioExplain = (props: any) => {
footer=
{
renderFooter
()
}
onCancel=
{
onClose
}
>
<
Paragraph
>
<
blockquote
>
{
result
}
</
blockquote
>
</
Paragraph
>
{
renderContent
()
}
</
Modal
>
);
};
export default connect((
{
Studio
}
:
{
Studio
:
StateType
}
) =
>
(
{
export default connect((
{
Studio
}
:
{
Studio
:
StateType
}
) =
>
(
{
current
:
Studio
.
current
,
currentSession
:
Studio
.
currentSession
,
}
))(StudioExplain);
dlink-web/src/pages/ClusterConfiguration/conf.ts
View file @
6da13cef
...
...
@@ -33,8 +33,8 @@ export const FLINK_CONFIG_LIST: Config[] = [{
lable
:
'jobmanager.memory.process.size'
,
placeholder
:
'1600m'
,
},
{
name
:
'taskmanager.memory.
flink
.size'
,
lable
:
'taskmanager.memory.
flink
.size'
,
name
:
'taskmanager.memory.
process
.size'
,
lable
:
'taskmanager.memory.
process
.size'
,
placeholder
:
'2048m'
,
},
{
name
:
'taskmanager.memory.framework.heap.size'
,
...
...
dlink-web/src/pages/Welcome.tsx
View file @
6da13cef
...
...
@@ -716,6 +716,9 @@ export default (): React.ReactNode => {
<
li
>
<
Link
>
修复 集群配置参数项为空时无法正常提交perjob任务的bug
</
Link
>
</
li
>
<
li
>
<
Link
>
优化 语法检测建议的结果提示
</
Link
>
</
li
>
</
ul
>
</
Paragraph
>
</
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