Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
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
wangpeng
dinky
Commits
756d82bb
Unverified
Commit
756d82bb
authored
Oct 31, 2023
by
zhu-mingye
Committed by
GitHub
Oct 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix project expand bug (#2467)
* fix project expand bug * Spotless Apply --------- Co-authored-by:
zhu-mingye
<
zhu-mingye@users.noreply.github.com
>
parent
bce0f34e
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
89 additions
and
79 deletions
+89
-79
index.tsx
dinky-web/src/components/CustomEditor/CodeShow/index.tsx
+2
-2
menu.ts
dinky-web/src/locales/zh-CN/menu.ts
+0
-1
index.tsx
...ages/DataStudio/BottomContainer/Tools/JsonToSql/index.tsx
+38
-27
service.tsx
...es/DataStudio/BottomContainer/Tools/JsonToSql/service.tsx
+1
-2
index.tsx
...-web/src/pages/DataStudio/LeftContainer/Catalog/index.tsx
+39
-39
service.tsx
...eb/src/pages/DataStudio/LeftContainer/Catalog/service.tsx
+0
-1
index.tsx
.../pages/DataStudio/LeftContainer/Project/JobTree/index.tsx
+1
-0
index.tsx
...-web/src/pages/DataStudio/LeftContainer/Project/index.tsx
+2
-2
route.tsx
dinky-web/src/pages/DataStudio/route.tsx
+6
-5
No files found.
dinky-web/src/components/CustomEditor/CodeShow/index.tsx
View file @
756d82bb
...
@@ -25,7 +25,7 @@ import { convertCodeEditTheme } from '@/utils/function';
...
@@ -25,7 +25,7 @@ import { convertCodeEditTheme } from '@/utils/function';
import
{
Editor
,
useMonaco
}
from
'@monaco-editor/react'
;
import
{
Editor
,
useMonaco
}
from
'@monaco-editor/react'
;
import
{
editor
}
from
'monaco-editor'
;
import
{
editor
}
from
'monaco-editor'
;
import
{
EditorLanguage
}
from
'monaco-editor/esm/metadata'
;
import
{
EditorLanguage
}
from
'monaco-editor/esm/metadata'
;
import
{
CSSProperties
,
useEffect
,
useState
}
from
'react'
;
import
{
CSSProperties
,
useEffect
,
useState
}
from
'react'
;
import
FullscreenBtn
from
'../FullscreenBtn'
;
import
FullscreenBtn
from
'../FullscreenBtn'
;
// loader.config({monaco});
// loader.config({monaco});
...
@@ -245,7 +245,7 @@ const CodeShow = (props: CodeShowFormProps) => {
...
@@ -245,7 +245,7 @@ const CodeShow = (props: CodeShowFormProps) => {
horizontalScrollbarSize
:
8
,
horizontalScrollbarSize
:
8
,
arrowSize
:
30
arrowSize
:
30
},
},
...
options
,
...
options
}
}
}
}
onMount=
{
editorDidMount
}
onMount=
{
editorDidMount
}
theme=
{
convertCodeEditTheme
()
}
theme=
{
convertCodeEditTheme
()
}
...
...
dinky-web/src/locales/zh-CN/menu.ts
View file @
756d82bb
...
@@ -96,5 +96,4 @@ export default {
...
@@ -96,5 +96,4 @@ export default {
'menu.datastudio.tool.text-comparison'
:
'文本比对'
,
'menu.datastudio.tool.text-comparison'
:
'文本比对'
,
'menu.datastudio.tool.jsonToSql'
:
'JSON转Flink-SQL'
'menu.datastudio.tool.jsonToSql'
:
'JSON转Flink-SQL'
};
};
dinky-web/src/pages/DataStudio/BottomContainer/Tools/JsonToSql/index.tsx
View file @
756d82bb
import
React
,
{
useState
}
from
"react"
;
import
CodeEdit
from
'@/components/CustomEditor/CodeEdit'
;
import
{
Button
,
Space
}
from
"antd"
;
import
CodeShow
from
'@/components/CustomEditor/CodeShow'
;
import
CodeShow
from
"@/components/CustomEditor/CodeShow"
;
import
useThemeValue
from
'@/hooks/useThemeValue'
;
import
useThemeValue
from
"@/hooks/useThemeValue"
;
import
{
jsonToSql
}
from
'@/pages/DataStudio/BottomContainer/Tools/JsonToSql/service'
;
import
{
jsonToSql
}
from
"@/pages/DataStudio/BottomContainer/Tools/JsonToSql/service"
;
import
{
StateType
}
from
'@/pages/DataStudio/model'
;
import
{
convertCodeEditTheme
}
from
"@/utils/function"
;
import
{
convertCodeEditTheme
}
from
'@/utils/function'
;
import
{
connect
}
from
"@@/exports"
;
import
{
connect
}
from
'@@/exports'
;
import
{
StateType
}
from
"@/pages/DataStudio/model"
;
import
{
Button
,
Space
}
from
'antd'
;
import
CodeEdit
from
"@/components/CustomEditor/CodeEdit"
;
import
React
,
{
useState
}
from
'react'
;
const
padding
=
10
;
const
padding
=
10
;
const
JsonToSql
:
React
.
FC
=
(
props
:
connect
)
=>
{
const
JsonToSql
:
React
.
FC
=
(
props
:
connect
)
=>
{
const
{
height
}
=
props
;
const
{
height
}
=
props
;
const
maxHeight
=
height
-
36
-
(
padding
*
2
)
-
32
-
12
;
const
maxHeight
=
height
-
36
-
padding
*
2
-
32
-
12
;
const
themeValue
=
useThemeValue
();
const
themeValue
=
useThemeValue
();
const
border
=
`1px solid
${
themeValue
.
borderColor
}
`
;
const
border
=
`1px solid
${
themeValue
.
borderColor
}
`
;
const
[
jsonData
,
setJsonData
]
=
useState
(
""
);
const
[
jsonData
,
setJsonData
]
=
useState
(
''
);
const
[
sqlData
,
setSqlData
]
=
useState
(
""
);
const
[
sqlData
,
setSqlData
]
=
useState
(
''
);
return
(
return
(
<
div
style=
{
{
padding
:
padding
}
}
>
<
div
style=
{
{
padding
:
padding
}
}
>
<
Space
>
<
Space
>
<
Button
<
Button
children=
{
"Convert"
}
children=
{
'Convert'
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
jsonToSql
({
"data"
:
jsonData
}).
then
(
setSqlData
)
jsonToSql
({
data
:
jsonData
}).
then
(
setSqlData
);
}
}
}
}
/>
/>
</
Space
>
</
Space
>
<
div
style=
{
{
display
:
"flex"
,
paddingBlockStart
:
padding
}
}
>
<
div
style=
{
{
display
:
'flex'
,
paddingBlockStart
:
padding
}
}
>
<
div
style=
{
{
width
:
"50%"
,
border
}
}
>
<
div
style=
{
{
width
:
'50%'
,
border
}
}
>
<
CodeEdit
height=
{
maxHeight
+
"px"
}
code=
{
jsonData
}
language=
{
"json"
}
theme=
{
convertCodeEditTheme
()
}
onChange=
{
(
x
)
=>
{
<
CodeEdit
setJsonData
(
x
??
""
);
height=
{
maxHeight
+
'px'
}
}
}
/>
code=
{
jsonData
}
language=
{
'json'
}
theme=
{
convertCodeEditTheme
()
}
onChange=
{
(
x
)
=>
{
setJsonData
(
x
??
''
);
}
}
/>
</
div
>
</
div
>
<
div
style=
{
{
width
:
"50%"
}
}
>
<
div
style=
{
{
width
:
'50%'
}
}
>
<
CodeShow
height=
{
maxHeight
}
code=
{
sqlData
}
language=
{
"json"
}
style=
{
{
border
}
}
<
CodeShow
options=
{
{
minimap
:
true
}
}
/>
height=
{
maxHeight
}
code=
{
sqlData
}
language=
{
'json'
}
style=
{
{
border
}
}
options=
{
{
minimap
:
true
}
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
)
);
}
}
;
export
default
connect
(({
Studio
}:
{
Studio
:
StateType
})
=>
({
export
default
connect
(({
Studio
}:
{
Studio
:
StateType
})
=>
({
height
:
Studio
.
bottomContainer
.
height
height
:
Studio
.
bottomContainer
.
height
}))(
JsonToSql
);
}))(
JsonToSql
);
dinky-web/src/pages/DataStudio/BottomContainer/Tools/JsonToSql/service.tsx
View file @
756d82bb
import
{
postAll
}
from
"@/services/api"
;
import
{
postAll
}
from
'@/services/api'
;
export
async
function
jsonToSql
(
params
:
any
)
{
export
async
function
jsonToSql
(
params
:
any
)
{
return
(
await
postAll
(
'/api/tools/jsonToFlinkSql'
,
params
)).
data
;
return
(
await
postAll
(
'/api/tools/jsonToFlinkSql'
,
params
)).
data
;
...
...
dinky-web/src/pages/DataStudio/LeftContainer/Catalog/index.tsx
View file @
756d82bb
...
@@ -17,12 +17,15 @@
...
@@ -17,12 +17,15 @@
*
*
*/
*/
import
{
TableDataNode
}
from
'@/pages/DataStudio/LeftContainer/Catalog/data'
;
import
{
getCurrentData
}
from
'@/pages/DataStudio/function'
;
import
{
StateType
}
from
'@/pages/DataStudio/model'
;
import
{
isSql
}
from
'@/pages/DataStudio/HeaderContainer/service'
;
import
{
BtnRoute
}
from
'@/pages/DataStudio/route'
;
import
{
TableDataNode
}
from
'@/pages/DataStudio/LeftContainer/Catalog/data'
;
import
{
StateType
}
from
'@/pages/DataStudio/model'
;
import
{
BtnRoute
}
from
'@/pages/DataStudio/route'
;
import
ColumnInfo
from
'@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/SchemaDesc/ColumnInfo'
;
import
ColumnInfo
from
'@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/SchemaDesc/ColumnInfo'
;
import
TableInfo
from
'@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/SchemaDesc/TableInfo'
;
import
TableInfo
from
'@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/SchemaDesc/TableInfo'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
DIALECT
}
from
'@/services/constants'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
import
{
AppstoreOutlined
,
AppstoreOutlined
,
BlockOutlined
,
BlockOutlined
,
...
@@ -31,38 +34,35 @@ import {
...
@@ -31,38 +34,35 @@ import {
FunctionOutlined
,
FunctionOutlined
,
TableOutlined
TableOutlined
}
from
'@ant-design/icons'
;
}
from
'@ant-design/icons'
;
import
{
Button
,
Col
,
Empty
,
Modal
,
Row
,
Select
,
Spin
,
Tabs
}
from
'antd'
;
import
{
connect
}
from
'@umijs/max'
;
import
{
DataNode
}
from
'antd/es/tree'
;
import
{
Button
,
Col
,
Empty
,
Modal
,
Row
,
Select
,
Spin
,
Tabs
}
from
'antd'
;
import
{
DataNode
}
from
'antd/es/tree'
;
import
DirectoryTree
from
'antd/es/tree/DirectoryTree'
;
import
DirectoryTree
from
'antd/es/tree/DirectoryTree'
;
import
{
DefaultOptionType
}
from
'rc-select/lib/Select'
;
import
{
DefaultOptionType
}
from
'rc-select/lib/Select'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
getMSCatalogs
,
getMSColumns
,
getMSSchemaInfo
}
from
'./service'
;
import
{
getMSCatalogs
,
getMSColumns
,
getMSSchemaInfo
}
from
'./service'
;
import
{
getCurrentData
}
from
"@/pages/DataStudio/function"
;
import
{
DIALECT
}
from
"@/services/constants"
;
import
{
isSql
}
from
"@/pages/DataStudio/HeaderContainer/service"
;
import
{
connect
}
from
"@umijs/max"
;
const
Catalog
:
React
.
FC
=
(
props
:
connect
)
=>
{
const
Catalog
:
React
.
FC
=
(
props
:
connect
)
=>
{
const
{
tabs
}
=
props
;
const
{
tabs
}
=
props
;
const
currentData
=
getCurrentData
(
tabs
.
panes
,
tabs
.
activeKey
);
const
currentData
=
getCurrentData
(
tabs
.
panes
,
tabs
.
activeKey
);
if
(
!
currentData
)
{
if
(
!
currentData
)
{
return
<
Empty
description=
{
l
(
"pages.datastudio.catalog.selectDatasource"
)
}
/>
return
<
Empty
description=
{
l
(
'pages.datastudio.catalog.selectDatasource'
)
}
/>;
}
}
const
dialect
=
currentData
?.
dialect
.
toLowerCase
()
??
""
;
const
dialect
=
currentData
?.
dialect
.
toLowerCase
()
??
''
;
const
fragment
=
currentData
?.
fragment
??
true
;
const
fragment
=
currentData
?.
fragment
??
true
;
let
envId
:
number
|
undefined
;
let
envId
:
number
|
undefined
;
let
databaseId
:
number
|
undefined
;
let
databaseId
:
number
|
undefined
;
let
engine
:
string
|
undefined
;
let
engine
:
string
|
undefined
;
if
(
dialect
===
DIALECT
.
FLINKSQLENV
)
{
if
(
dialect
===
DIALECT
.
FLINKSQLENV
)
{
envId
=
currentData
?.
id
;
envId
=
currentData
?.
id
;
engine
=
"Flink"
;
engine
=
'Flink'
;
}
else
if
(
dialect
===
DIALECT
.
FLINK_SQL
)
{
}
else
if
(
dialect
===
DIALECT
.
FLINK_SQL
)
{
envId
=
currentData
?.
envId
;
envId
=
currentData
?.
envId
;
engine
=
"Flink"
;
engine
=
'Flink'
;
}
else
if
(
isSql
(
dialect
))
{
}
else
if
(
isSql
(
dialect
))
{
databaseId
=
currentData
?.
databaseId
;
databaseId
=
currentData
?.
databaseId
;
if
(
!
databaseId
)
{
if
(
!
databaseId
)
{
return
<
Empty
description=
{
l
(
"pages.datastudio.catalog.openMission"
)
}
/>
return
<
Empty
description=
{
l
(
'pages.datastudio.catalog.openMission'
)
}
/>;
}
}
}
}
envId
=
envId
??
-
1
;
envId
=
envId
??
-
1
;
...
@@ -82,7 +82,7 @@ const Catalog: React.FC = (props: connect) => {
...
@@ -82,7 +82,7 @@ const Catalog: React.FC = (props: connect) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
getCatalogs
();
getCatalogs
();
},
[
envId
,
databaseId
]);
},
[
envId
,
databaseId
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
table
)
{
if
(
table
)
{
...
@@ -139,7 +139,7 @@ const Catalog: React.FC = (props: connect) => {
...
@@ -139,7 +139,7 @@ const Catalog: React.FC = (props: connect) => {
tablesData
.
push
({
tablesData
.
push
({
title
:
t
.
name
,
title
:
t
.
name
,
key
:
t
.
name
,
key
:
t
.
name
,
icon
:
<
TableOutlined
/>,
icon
:
<
TableOutlined
/>,
isLeaf
:
true
,
isLeaf
:
true
,
isTable
:
true
,
isTable
:
true
,
name
:
t
.
name
,
name
:
t
.
name
,
...
@@ -166,7 +166,7 @@ const Catalog: React.FC = (props: connect) => {
...
@@ -166,7 +166,7 @@ const Catalog: React.FC = (props: connect) => {
viewsData
.
push
({
viewsData
.
push
({
title
:
res
.
views
[
i
],
title
:
res
.
views
[
i
],
key
:
res
.
views
[
i
],
key
:
res
.
views
[
i
],
icon
:
<
BlockOutlined
/>,
icon
:
<
BlockOutlined
/>,
isLeaf
:
true
isLeaf
:
true
});
});
}
}
...
@@ -183,7 +183,7 @@ const Catalog: React.FC = (props: connect) => {
...
@@ -183,7 +183,7 @@ const Catalog: React.FC = (props: connect) => {
functionsData
.
push
({
functionsData
.
push
({
title
:
res
.
functions
[
i
],
title
:
res
.
functions
[
i
],
key
:
res
.
functions
[
i
],
key
:
res
.
functions
[
i
],
icon
:
<
FunctionOutlined
/>,
icon
:
<
FunctionOutlined
/>,
isLeaf
:
true
isLeaf
:
true
});
});
}
}
...
@@ -200,7 +200,7 @@ const Catalog: React.FC = (props: connect) => {
...
@@ -200,7 +200,7 @@ const Catalog: React.FC = (props: connect) => {
userFunctionsData
.
push
({
userFunctionsData
.
push
({
title
:
res
.
userFunctions
[
i
],
title
:
res
.
userFunctions
[
i
],
key
:
res
.
userFunctions
[
i
],
key
:
res
.
userFunctions
[
i
],
icon
:
<
FunctionOutlined
/>,
icon
:
<
FunctionOutlined
/>,
isLeaf
:
true
isLeaf
:
true
});
});
}
}
...
@@ -217,7 +217,7 @@ const Catalog: React.FC = (props: connect) => {
...
@@ -217,7 +217,7 @@ const Catalog: React.FC = (props: connect) => {
modulesData
.
push
({
modulesData
.
push
({
title
:
res
.
modules
[
i
],
title
:
res
.
modules
[
i
],
key
:
res
.
modules
[
i
],
key
:
res
.
modules
[
i
],
icon
:
<
AppstoreOutlined
/>,
icon
:
<
AppstoreOutlined
/>,
isLeaf
:
true
isLeaf
:
true
});
});
}
}
...
@@ -261,7 +261,7 @@ const Catalog: React.FC = (props: connect) => {
...
@@ -261,7 +261,7 @@ const Catalog: React.FC = (props: connect) => {
);
);
});
});
}
}
}
};
const
refreshMetaStoreTables
=
()
=>
{
const
refreshMetaStoreTables
=
()
=>
{
if
(
database
)
{
if
(
database
)
{
...
@@ -290,12 +290,12 @@ const Catalog: React.FC = (props: connect) => {
...
@@ -290,12 +290,12 @@ const Catalog: React.FC = (props: connect) => {
return
(
return
(
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
}
>
<
div
style=
{
{
paddingInline
:
10
,
paddingBlock
:
5
}
}
>
<
div
style=
{
{
paddingInline
:
10
,
paddingBlock
:
5
}
}
>
<
Row
style=
{
{
paddingBlock
:
10
}
}
>
<
Row
style=
{
{
paddingBlock
:
10
}
}
>
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
Select
<
Select
value=
{
database
?
database
:
null
}
value=
{
database
?
database
:
null
}
style=
{
{
width
:
'100%'
}
}
style=
{
{
width
:
'100%'
}
}
placeholder=
{
l
(
'pages.datastudio.catalog.catalogSelect'
)
}
placeholder=
{
l
(
'pages.datastudio.catalog.catalogSelect'
)
}
optionLabelProp=
'label'
optionLabelProp=
'label'
onChange=
{
onChangeMetaStoreCatalogs
}
onChange=
{
onChangeMetaStoreCatalogs
}
...
@@ -307,14 +307,14 @@ const Catalog: React.FC = (props: connect) => {
...
@@ -307,14 +307,14 @@ const Catalog: React.FC = (props: connect) => {
{
treeData
.
length
>
0
?
(
{
treeData
.
length
>
0
?
(
<
DirectoryTree
<
DirectoryTree
showIcon
showIcon
switcherIcon=
{
<
DownOutlined
/>
}
switcherIcon=
{
<
DownOutlined
/>
}
treeData=
{
treeData
}
treeData=
{
treeData
}
onRightClick=
{
({
event
,
node
}:
any
)
=>
{
onRightClick=
{
({
event
,
node
}:
any
)
=>
{
openColumnInfo
(
event
,
node
);
openColumnInfo
(
event
,
node
);
}
}
}
}
/>
/>
)
:
(
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
)
}
</
div
>
</
div
>
<
Modal
<
Modal
...
@@ -343,25 +343,25 @@ const Catalog: React.FC = (props: connect) => {
...
@@ -343,25 +343,25 @@ const Catalog: React.FC = (props: connect) => {
key
:
'tableInfo'
,
key
:
'tableInfo'
,
label
:
(
label
:
(
<
span
>
<
span
>
<
TableOutlined
/>
<
TableOutlined
/>
{
l
(
'pages.datastudio.catalog.tableInfo'
)
}
{
l
(
'pages.datastudio.catalog.tableInfo'
)
}
</
span
>
</
span
>
),
),
children
:
row
?
(
children
:
row
?
(
<
TableInfo
tableInfo=
{
row
}
/>
<
TableInfo
tableInfo=
{
row
}
/>
)
:
(
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
)
},
},
{
{
key
:
'columnsInfo'
,
key
:
'columnsInfo'
,
label
:
(
label
:
(
<
span
>
<
span
>
<
CodepenOutlined
/>
<
CodepenOutlined
/>
{
l
(
'pages.datastudio.catalog.fieldInformation'
)
}
{
l
(
'pages.datastudio.catalog.fieldInformation'
)
}
</
span
>
</
span
>
),
),
children
:
<
Spin
spinning=
{
loading
}
>
{
<
ColumnInfo
columnInfo=
{
columnData
}
/>
}
</
Spin
>
children
:
<
Spin
spinning=
{
loading
}
>
{
<
ColumnInfo
columnInfo=
{
columnData
}
/>
}
</
Spin
>
}
}
]
}
]
}
/>
/>
...
@@ -369,6 +369,6 @@ const Catalog: React.FC = (props: connect) => {
...
@@ -369,6 +369,6 @@ const Catalog: React.FC = (props: connect) => {
</
Spin
>
</
Spin
>
);
);
};
};
export
default
connect
(({
Studio
}:
{
Studio
:
StateType
})
=>
({
export
default
connect
(({
Studio
}:
{
Studio
:
StateType
})
=>
({
tabs
:
Studio
.
tabs
tabs
:
Studio
.
tabs
}))(
Catalog
);
}))(
Catalog
);
dinky-web/src/pages/DataStudio/LeftContainer/Catalog/service.tsx
View file @
756d82bb
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
import
{
StudioMetaStoreParam
}
from
'@/pages/DataStudio/LeftContainer/Catalog/data'
;
import
{
StudioMetaStoreParam
}
from
'@/pages/DataStudio/LeftContainer/Catalog/data'
;
import
{
postAll
}
from
'@/services/api'
;
import
{
postAll
}
from
'@/services/api'
;
import
{
getDataByParamsReturnResult
}
from
'@/services/BusinessCrud'
;
export
async
function
getMSSchemaInfo
(
params
:
StudioMetaStoreParam
)
{
export
async
function
getMSSchemaInfo
(
params
:
StudioMetaStoreParam
)
{
return
(
await
postAll
(
'/api/studio/getMSSchemaInfo'
,
params
)).
data
;
return
(
await
postAll
(
'/api/studio/getMSSchemaInfo'
,
params
)).
data
;
...
...
dinky-web/src/pages/DataStudio/LeftContainer/Project/JobTree/index.tsx
View file @
756d82bb
...
@@ -148,6 +148,7 @@ const JobTree: React.FC<TreeProps & connect> = (props) => {
...
@@ -148,6 +148,7 @@ const JobTree: React.FC<TreeProps & connect> = (props) => {
onSelect=
{
(
_
,
info
)
=>
onNodeClick
(
info
)
}
onSelect=
{
(
_
,
info
)
=>
onNodeClick
(
info
)
}
onRightClick=
{
onRightClick
}
onRightClick=
{
onRightClick
}
expandedKeys=
{
expandKeys
}
expandedKeys=
{
expandKeys
}
expandAction=
{
'doubleClick'
}
selectedKeys=
{
selectKey
}
selectedKeys=
{
selectKey
}
onExpand=
{
onExpand
}
onExpand=
{
onExpand
}
treeData=
{
data
}
treeData=
{
data
}
...
...
dinky-web/src/pages/DataStudio/LeftContainer/Project/index.tsx
View file @
756d82bb
...
@@ -103,7 +103,7 @@ const Project: React.FC = (props: connect) => {
...
@@ -103,7 +103,7 @@ const Project: React.FC = (props: connect) => {
const
onExpand
=
(
expandedKeys
:
Key
[])
=>
{
const
onExpand
=
(
expandedKeys
:
Key
[])
=>
{
dispatch
({
dispatch
({
type
:
STUDIO_MODEL
.
updateProjectExpandKey
,
type
:
STUDIO_MODEL
.
updateProjectExpandKey
,
payload
:
[...
expandedKeys
,
...
expandKeys
]
payload
:
expandedKeys
});
});
};
};
...
@@ -124,7 +124,7 @@ const Project: React.FC = (props: connect) => {
...
@@ -124,7 +124,7 @@ const Project: React.FC = (props: connect) => {
dispatch
({
type
:
STUDIO_MODEL
.
updateProjectSelectKey
,
payload
:
[
key
]
});
dispatch
({
type
:
STUDIO_MODEL
.
updateProjectSelectKey
,
payload
:
[
key
]
});
if
(
!
isLeaf
)
{
if
(
!
isLeaf
)
{
dispatch
({
type
:
STUDIO_MODEL
.
updateProjectExpandKey
,
payload
:
[
key
,
...
expandKeys
]
});
dispatch
({
type
:
STUDIO_MODEL
.
updateProjectExpandKey
,
payload
:
[
...
expandKeys
,
key
]
});
return
;
return
;
}
}
...
...
dinky-web/src/pages/DataStudio/route.tsx
View file @
756d82bb
...
@@ -22,7 +22,9 @@ import Console from '@/pages/DataStudio/BottomContainer/Console';
...
@@ -22,7 +22,9 @@ import Console from '@/pages/DataStudio/BottomContainer/Console';
import
Lineage
from
'@/pages/DataStudio/BottomContainer/Lineage'
;
import
Lineage
from
'@/pages/DataStudio/BottomContainer/Lineage'
;
import
Result
from
'@/pages/DataStudio/BottomContainer/Result'
;
import
Result
from
'@/pages/DataStudio/BottomContainer/Result'
;
import
TableData
from
'@/pages/DataStudio/BottomContainer/TableData'
;
import
TableData
from
'@/pages/DataStudio/BottomContainer/TableData'
;
import
JsonToSql
from
'@/pages/DataStudio/BottomContainer/Tools/JsonToSql'
;
import
{
isSql
}
from
'@/pages/DataStudio/HeaderContainer/service'
;
import
{
isSql
}
from
'@/pages/DataStudio/HeaderContainer/service'
;
import
Catalog
from
'@/pages/DataStudio/LeftContainer/Catalog'
;
import
DataSource
from
'@/pages/DataStudio/LeftContainer/DataSource'
;
import
DataSource
from
'@/pages/DataStudio/LeftContainer/DataSource'
;
import
Project
from
'@/pages/DataStudio/LeftContainer/Project'
;
import
Project
from
'@/pages/DataStudio/LeftContainer/Project'
;
import
{
TabsPageSubType
,
TabsPageType
}
from
'@/pages/DataStudio/model'
;
import
{
TabsPageSubType
,
TabsPageType
}
from
'@/pages/DataStudio/model'
;
...
@@ -50,7 +52,8 @@ import {
...
@@ -50,7 +52,8 @@ import {
PlusCircleOutlined
,
PlusCircleOutlined
,
PlusOutlined
,
PlusOutlined
,
ReloadOutlined
,
ReloadOutlined
,
RightSquareOutlined
,
RotateRightOutlined
,
RightSquareOutlined
,
RotateRightOutlined
,
SettingOutlined
,
SettingOutlined
,
ShrinkOutlined
,
ShrinkOutlined
,
TableOutlined
,
TableOutlined
,
...
@@ -58,8 +61,6 @@ import {
...
@@ -58,8 +61,6 @@ import {
}
from
'@ant-design/icons'
;
}
from
'@ant-design/icons'
;
import
{
DiffEditor
}
from
'@monaco-editor/react'
;
import
{
DiffEditor
}
from
'@monaco-editor/react'
;
import
{
ReactNode
}
from
'react'
;
import
{
ReactNode
}
from
'react'
;
import
Catalog
from
"@/pages/DataStudio/LeftContainer/Catalog"
;
import
JsonToSql
from
"@/pages/DataStudio/BottomContainer/Tools/JsonToSql"
;
export
const
LeftSide
=
[
export
const
LeftSide
=
[
{
{
...
@@ -218,8 +219,8 @@ export const LeftBottomMoreTabs: { [c: string]: TabProp[] } = {
...
@@ -218,8 +219,8 @@ export const LeftBottomMoreTabs: { [c: string]: TabProp[] } = {
},
},
{
{
key
:
'menu.datastudio.tool.jsonToSql'
,
key
:
'menu.datastudio.tool.jsonToSql'
,
icon
:<
RotateRightOutlined
/>,
icon
:
<
RotateRightOutlined
/>,
label
:
l
(
"menu.datastudio.tool.jsonToSql"
),
label
:
l
(
'menu.datastudio.tool.jsonToSql'
),
children
:
<
JsonToSql
/>
children
:
<
JsonToSql
/>
}
}
]
]
...
...
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