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
a44b08df
Unverified
Commit
a44b08df
authored
May 27, 2022
by
aiwenmo
Committed by
GitHub
May 27, 2022
Browse files
Options
Browse Files
Download
Plain Diff
[Fix-541] Fix the problem that the datasource && metadata does not set alias
[Fix-541] Fix the problem that the datasource && metadata does not set alias
parents
841296da
019eb858
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
index.tsx
...components/Studio/StudioLeftTool/StudioDataBase/index.tsx
+2
-2
index.tsx
...components/Studio/StudioLeftTool/StudioMetaData/index.tsx
+4
-4
No files found.
dlink-web/src/components/Studio/StudioLeftTool/StudioDataBase/index.tsx
View file @
a44b08df
...
@@ -31,7 +31,7 @@ const StudioDataBase = (props: any) => {
...
@@ -31,7 +31,7 @@ const StudioDataBase = (props: any) => {
key
:
"alias"
,
key
:
"alias"
,
sorter
:
true
,
sorter
:
true
,
render
:
(
dom
,
entity
)
=>
{
render
:
(
dom
,
entity
)
=>
{
return
<
a
onClick=
{
()
=>
setRow
(
entity
)
}
>
{
dom
}
</
a
>;
return
<
a
onClick=
{
()
=>
setRow
(
entity
)
}
>
{
entity
.
alias
===
""
?
entity
.
name
:
entity
.
alias
}
</
a
>;
},
},
}];
}];
};
};
...
@@ -186,7 +186,7 @@ const StudioDataBase = (props: any) => {
...
@@ -186,7 +186,7 @@ const StudioDataBase = (props: any) => {
const
onDeleteDataBase
=
(
record
)
=>
{
const
onDeleteDataBase
=
(
record
)
=>
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'删除数据源'
,
title
:
'删除数据源'
,
content
:
`确定删除该数据源【
${
record
.
alias
}
】吗?`
,
content
:
`确定删除该数据源【
${
record
.
alias
===
""
?
record
.
name
:
record
.
alias
}
】吗?`
,
okText
:
'确认'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
cancelText
:
'取消'
,
onOk
:
async
()
=>
{
onOk
:
async
()
=>
{
...
...
dlink-web/src/components/Studio/StudioLeftTool/StudioMetaData/index.tsx
View file @
a44b08df
...
@@ -55,9 +55,9 @@ const StudioMetaData = (props: any) => {
...
@@ -55,9 +55,9 @@ const StudioMetaData = (props: any) => {
};
};
const
getDataBaseOptions
=
()
=>
{
const
getDataBaseOptions
=
()
=>
{
return
<>
{
database
.
map
(({
id
,
alias
,
type
,
enabled
})
=>
(
return
<>
{
database
.
map
(({
id
,
name
,
alias
,
type
,
enabled
})
=>
(
<
Option
value=
{
id
}
label=
{
<><
Tag
color=
{
enabled
?
"processing"
:
"error"
}
>
{
type
}
</
Tag
>
{
alias
}
</>
}
>
<
Option
value=
{
id
}
label=
{
<><
Tag
color=
{
enabled
?
"processing"
:
"error"
}
>
{
type
}
</
Tag
>
{
alias
===
""
?
name
:
alias
}
</>
}
>
<
Tag
color=
{
enabled
?
"processing"
:
"error"
}
>
{
type
}
</
Tag
>
{
alias
}
<
Tag
color=
{
enabled
?
"processing"
:
"error"
}
>
{
type
}
</
Tag
>
{
alias
===
""
?
name
:
alias
}
</
Option
>
</
Option
>
))
}
</>
))
}
</>
};
};
...
@@ -77,7 +77,7 @@ const StudioMetaData = (props: any) => {
...
@@ -77,7 +77,7 @@ const StudioMetaData = (props: any) => {
return
(
return
(
<>
<>
<
Select
<
Select
// style={{width: '10
0%'}}
style=
{
{
width
:
'9
0%'
}
}
placeholder=
"选择数据源"
placeholder=
"选择数据源"
optionLabelProp=
"label"
optionLabelProp=
"label"
onChange=
{
onChangeDataBase
}
onChange=
{
onChangeDataBase
}
...
...
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