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
9f89e370
Commit
9f89e370
authored
Jul 21, 2021
by
wenmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
database前端卡片列表
parent
b421f890
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
2 deletions
+96
-2
DataBase.java
dlink-admin/src/main/java/com/dlink/model/DataBase.java
+2
-0
DataBaseMapper.xml
dlink-admin/src/main/resources/mapper/DataBaseMapper.xml
+2
-1
dlink.sql
dlink-doc/sql/dlink.sql
+1
-1
routes.ts
dlink-web/config/routes.ts
+6
-0
menu.ts
dlink-web/src/locales/zh-CN/menu.ts
+1
-0
data.d.ts
dlink-web/src/pages/DataBase/data.d.ts
+18
-0
index.tsx
dlink-web/src/pages/DataBase/index.tsx
+66
-0
No files found.
dlink-admin/src/main/java/com/dlink/model/DataBase.java
View file @
9f89e370
...
...
@@ -37,4 +37,6 @@ public class DataBase extends SuperEntity {
private
String
note
;
private
String
dbVersion
;
private
boolean
status
;
}
dlink-admin/src/main/resources/mapper/DataBaseMapper.xml
View file @
9f89e370
...
...
@@ -16,6 +16,7 @@
<result
column=
"password"
property=
"password"
/>
<result
column=
"db_version"
property=
"dbVersion"
/>
<result
column=
"note"
property=
"note"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"enabled"
property=
"enabled"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
...
...
@@ -23,7 +24,7 @@
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, name, alias,group_name, type,ip,port, url,username,password,db_version,note, enabled, create_time, update_time
id, name, alias,group_name, type,ip,port, url,username,password,db_version,note,
status,
enabled, create_time, update_time
</sql>
...
...
dlink-doc/sql/dlink.sql
View file @
9f89e370
...
...
@@ -341,7 +341,6 @@ CREATE TABLE `dlink_database` (
`alias`
varchar
(
50
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
COMMENT
'数据源标题'
,
`group_name`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
'Default'
COMMENT
'数据源分组'
,
`type`
varchar
(
50
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
COMMENT
'类型'
,
`driver_class_name`
varchar
(
50
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'Driver'
,
`ip`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'IP'
,
`port`
int
(
11
)
NULL
DEFAULT
NULL
COMMENT
'端口号'
,
`url`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'url'
,
...
...
@@ -349,6 +348,7 @@ CREATE TABLE `dlink_database` (
`password`
varchar
(
50
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'密码'
,
`note`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'注释'
,
`db_version`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'版本,如oracle的11g,hbase的2.2.3'
,
`status`
tinyint
(
1
)
NULL
COMMENT
'状态'
,
`enabled`
tinyint
(
1
)
NOT
NULL
DEFAULT
1
COMMENT
'启用'
,
`create_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'最近修改时间'
,
...
...
dlink-web/config/routes.ts
View file @
9f89e370
...
...
@@ -39,6 +39,12 @@ export default [
icon
:
'cluster'
,
component
:
'./Cluster'
,
},
{
path
:
'/database'
,
name
:
'database'
,
icon
:
'database'
,
component
:
'./DataBase'
,
},
{
path
:
'/document'
,
name
:
'document'
,
...
...
dlink-web/src/locales/zh-CN/menu.ts
View file @
9f89e370
...
...
@@ -51,6 +51,7 @@ export default {
'menu.editor.koni'
:
'拓扑编辑器'
,
'menu.demo'
:
'Demo 开发模板'
,
'menu.cluster'
:
'集群中心'
,
'menu.database'
:
'数据源中心'
,
'menu.studio'
:
'FlinkSql IDE'
,
'menu.flinksqlstudio'
:
'FlinkSql Studio'
,
'menu.task'
:
'作业中心'
,
...
...
dlink-web/src/pages/DataBase/data.d.ts
0 → 100644
View file @
9f89e370
export
type
DataBaseTableListItem
=
{
id
:
number
,
name
:
string
,
alias
:
string
,
groupName
:
string
,
type
:
string
,
ip
:
string
,
port
:
number
,
url
:
string
,
username
:
string
,
password
:
string
,
note
:
string
,
dbVersion
:
string
,
status
:
boolean
,
enabled
:
boolean
,
createTime
:
Date
,
updateTime
:
Date
,
};
dlink-web/src/pages/DataBase/index.tsx
0 → 100644
View file @
9f89e370
import
React
from
"react"
;
import
{
PageContainer
,
FooterToolbar
}
from
'@ant-design/pro-layout'
;
import
{
DownOutlined
,
HeartOutlined
,
PlusOutlined
,
UserOutlined
}
from
'@ant-design/icons'
;
import
{
Progress
,
Tag
,
Button
,
Space
,
Badge
,
Typography
}
from
'antd'
;
import
ProList
from
'@ant-design/pro-list'
;
import
{
queryData
}
from
"@/components/Common/crud"
;
const
{
Text
}
=
Typography
;
const
url
=
'/api/database'
;
const
DataBaseTableList
:
React
.
FC
<
{}
>
=
(
props
:
any
)
=>
{
return
(
<
PageContainer
>
<
ProList
toolBarRender=
{
()
=>
{
return
[
<
Button
key=
"3"
type=
"primary"
>
<
PlusOutlined
/>
新建
</
Button
>,
];
}
}
pagination=
{
{
defaultPageSize
:
8
,
showSizeChanger
:
false
,
}
}
grid=
{
{
gutter
:
16
,
column
:
4
}
}
request=
{
(
params
,
sorter
,
filter
)
=>
queryData
(
url
,{...
params
,
sorter
:{
id
:
'descend'
},
filter
})
}
metas=
{
{
title
:
{
dataIndex
:
'alias'
,
title
:
'alias'
,
},
subTitle
:
{
render
:
(
_
,
row
)
=>
{
return
(
<
Space
size=
{
0
}
>
<
Tag
color=
"blue"
key=
{
row
.
name
}
>
{
row
.
name
}
</
Tag
>
<
Tag
color=
"gray"
key=
{
row
.
groupName
}
>
{
row
.
groupName
}
</
Tag
>
{
(
row
.
status
)
?
(<><
Badge
status=
"success"
/><
Text
type=
"success"
>
正常
</
Text
></>):
<><
Badge
status=
"error"
/><
Text
type=
"danger"
>
异常
</
Text
></>
}
</
Space
>
);
},
},
type
:
{},
avatar
:
{},
content
:
{},
actions
:
{},
}
}
headerTitle=
"数据源"
// dataSource={data}
/>
</
PageContainer
>
);
};
export
default
DataBaseTableList
;
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