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
18d8a598
Unverified
Commit
18d8a598
authored
Feb 02, 2023
by
zhu-mingye
Committed by
GitHub
Feb 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: delete global var alias (#1599)
* refactor: delete global var alias * refactor: delete global var alias && format code * added sql * refactor: delete studiofragment tsx
parent
3114c400
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
2 additions
and
132 deletions
+2
-132
FragmentVariable.java
...admin/src/main/java/org/dinky/model/FragmentVariable.java
+0
-5
FragmentVariableMapper.xml
...dmin/src/main/resources/mapper/FragmentVariableMapper.xml
+0
-3
dinky.sql
dinky-doc/sql/dinky.sql
+0
-1
dinky_ddl.sql
dinky-doc/sql/upgrade/0.8.0_schema/mysql/dinky_ddl.sql
+1
-1
index.tsx
...components/Studio/StudioLeftTool/StudioFragment/index.tsx
+0
-95
index.tsx
dlink-web/src/components/Studio/StudioLeftTool/index.tsx
+0
-7
pages.ts
dlink-web/src/locales/en-US/pages.ts
+0
-2
pages.ts
dlink-web/src/locales/zh-CN/pages.ts
+0
-2
FragmentForm.tsx
...rationCenter/FragmentVariable/components/FragmentForm.tsx
+1
-8
index.tsx
...b/src/pages/RegistrationCenter/FragmentVariable/index.tsx
+0
-7
data.d.ts
dlink-web/src/pages/RegistrationCenter/data.d.ts
+0
-1
No files found.
dinky-admin/src/main/java/org/dinky/model/FragmentVariable.java
View file @
18d8a598
...
...
@@ -21,8 +21,6 @@ package org.dinky.model;
import
org.dinky.db.model.SuperEntity
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.AllArgsConstructor
;
...
...
@@ -43,9 +41,6 @@ import lombok.NoArgsConstructor;
@TableName
(
"dinky_fragment"
)
public
class
FragmentVariable
extends
SuperEntity
{
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
String
alias
;
private
Integer
tenantId
;
private
String
fragmentValue
;
private
String
note
;
...
...
dinky-admin/src/main/resources/mapper/FragmentVariableMapper.xml
View file @
18d8a598
...
...
@@ -34,9 +34,6 @@
<if
test=
'param.name!=null and param.name!=""'
>
and a.name like "%${param.name}%"
</if>
<if
test=
'param.alias!=null and param.alias!=""'
>
and a.alias like "%${param.alias}%"
</if>
<if
test=
'param.note!=null and param.note!=""'
>
and a.note like "%${param.note}%"
</if>
...
...
dinky-doc/sql/dinky.sql
View file @
18d8a598
...
...
@@ -441,7 +441,6 @@ DROP TABLE IF EXISTS `dinky_fragment`;
CREATE
TABLE
`dinky_fragment`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'id'
,
`name`
varchar
(
50
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NOT
NULL
COMMENT
'fragment name'
,
`alias`
varchar
(
50
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'alias'
,
`tenant_id`
int
(
11
)
NOT
NULL
DEFAULT
1
COMMENT
'tenant id'
,
`fragment_value`
text
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NOT
NULL
COMMENT
'fragment value'
,
`note`
text
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
COMMENT
'note'
,
...
...
dinky-doc/sql/upgrade/0.8.0_schema/mysql/dinky_ddl.sql
View file @
18d8a598
...
...
@@ -70,5 +70,5 @@ ALTER TABLE dinky_user_tenant RENAME INDEX `dlink_user_role_un` TO `user_tenant_
ALTER
TABLE
dinky_catalogue
RENAME
INDEX
`dlink_catalogue_un`
TO
`catalogue_un_idx1`
;
ALTER
TABLE
dinky_schema_history
RENAME
INDEX
`dlink_schema_history_s_idx`
TO
`schema_history_idx`
;
ALTER
TABLE
dinky_fragment
DROP
COLUMN
`alias`
;
ALTER
TABLE
dinky_database
DROP
COLUMN
`alias`
;
dlink-web/src/components/Studio/StudioLeftTool/StudioFragment/index.tsx
deleted
100644 → 0
View file @
3114c400
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import
React
,
{
useState
}
from
"react"
;
import
{
ProColumns
,
ProTable
}
from
"@ant-design/pro-table"
;
import
{
Drawer
}
from
"antd"
;
import
ProDescriptions
from
'@ant-design/pro-descriptions'
;
import
{
queryData
}
from
"@/components/Common/crud"
;
import
{
FragmentVariableTableListItem
}
from
"@/pages/RegistrationCenter/data"
;
const
StudioFragment
=
(
props
:
any
)
=>
{
const
{
toolHeight
,
dispatch
}
=
props
;
const
[
row
,
setRow
]
=
useState
<
{}
>
();
const
url
=
"/api/fragment"
const
getColumns
:
ProColumns
<
FragmentVariableTableListItem
>
[]
=
[
{
title
:
'名称'
,
dataIndex
:
'name'
,
tip
:
'名称是唯一的'
,
sorter
:
true
,
render
:
(
dom
,
entity
)
=>
{
return
<
a
onClick=
{
()
=>
setRow
(
entity
)
}
>
{
dom
}
</
a
>;
},
},
{
title
:
'引用名称'
,
copyable
:
true
,
render
:
(
dom
,
entity
)
=>
{
return
<>
$
{
"{"
+
entity
?.
name
+
"}"
}
</>;
},
},
];
return
(
<>
<
ProTable
<
FragmentVariableTableListItem
>
columns=
{
getColumns
}
style=
{
{
width
:
'100%'
}
}
request=
{
(
params
,
sorter
,
filter
)
=>
queryData
(
url
,
{
params
,
sorter
,
filter
})
}
pagination=
{
{
defaultPageSize
:
10
,
showSizeChanger
:
true
,
}
}
search=
{
false
}
size="small"
/
>
<
Drawer
width=
{
600
}
visible=
{
!!
row
?.
name
}
onClose=
{
()
=>
{
setRow
(
undefined
);
}
}
closable=
{
false
}
>
<
ProDescriptions
column=
{
1
}
title=
{
row
?.
name
}
request=
{
async
()
=>
({
data
:
row
||
{},
})
}
params=
{
{
name
:
row
?.
name
,
}
}
columns=
{
getColumns
}
/>
</
Drawer
>
</>
);
};
export default StudioFragment;
dlink-web/src/components/Studio/StudioLeftTool/index.tsx
View file @
18d8a598
...
...
@@ -52,13 +52,6 @@ const StudioLeftTool = (props: any) => {
<
TabPane
tab=
{
<
span
><
AppstoreOutlined
/>
{
l
(
'pages.datastudio.label.meta'
)
}
</
span
>
}
key=
"MetaData"
>
<
StudioMetaData
/>
</
TabPane
>
{
/*<TabPane tab={<span><CloudOutlined/> {l('pages.datastudio.label.globalvariable')}</span>}*/
}
{
/* key="fragment">*/
}
{
/* <StudioFragment/>*/
}
{
/*</TabPane>*/
}
{
/*<TabPane tab={<span><FunctionOutlined/> {l('pages.datastudio.label.function')}</span>} key="Function">*/
}
{
/* <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>*/
}
{
/*</TabPane>*/
}
</
Tabs
>
);
};
...
...
dlink-web/src/locales/en-US/pages.ts
View file @
18d8a598
...
...
@@ -770,7 +770,6 @@ export default {
'pages.rc.fv.Management'
:
'Global Variable Management'
,
'pages.rc.fv.id'
:
'Global Variable ID'
,
'pages.rc.fv.name'
:
'Name'
,
'pages.rc.fv.alias'
:
'Alias'
,
'pages.rc.fv.fragmentValue'
:
'Global Variable value'
,
'pages.rc.fv.create'
:
'Create Global Variable'
,
'pages.rc.fv.modify'
:
'Modify Global Variables'
,
...
...
@@ -782,7 +781,6 @@ export default {
'pages.rc.fv.disableConfirm'
:
'Are you sure you want to disable the selected Global Variable? '
,
'pages.rc.fv.disableTotalOf'
:
'Total Of {total} Global Variables Is Disabled'
,
'pages.rc.fv.namePlaceholder'
:
'Please enter a name!'
,
'pages.rc.fv.aliasPlaceholder'
:
'Please enter an alias!'
,
'pages.rc.fv.fragmentValuePlaceholder'
:
'Please enter the Global Variable value'
,
'pages.rc.fv.enabledPlaceholder'
:
'Please choose whether to enable!'
,
...
...
dlink-web/src/locales/zh-CN/pages.ts
View file @
18d8a598
...
...
@@ -773,7 +773,6 @@ export default {
'pages.rc.fv.Management'
:
'全局变量管理'
,
'pages.rc.fv.id'
:
'全局变量 ID'
,
'pages.rc.fv.name'
:
'名称'
,
'pages.rc.fv.alias'
:
'别名'
,
'pages.rc.fv.fragmentValue'
:
'全局变量值'
,
'pages.rc.fv.create'
:
'创建全局变量'
,
'pages.rc.fv.modify'
:
'修改全局变量'
,
...
...
@@ -785,7 +784,6 @@ export default {
'pages.rc.fv.disableConfirm'
:
'确定禁用选中的全局变量吗?'
,
'pages.rc.fv.disableTotalOf'
:
'被禁用的全局变量共 {total} 个'
,
'pages.rc.fv.namePlaceholder'
:
'请输入名称!'
,
'pages.rc.fv.aliasPlaceholder'
:
'请输入别名!'
,
'pages.rc.fv.fragmentValuePlaceholder'
:
'请输入全局变量值'
,
'pages.rc.fv.enabledPlaceholder'
:
'请选择是否启用!'
,
...
...
dlink-web/src/pages/RegistrationCenter/FragmentVariable/components/FragmentForm.tsx
View file @
18d8a598
...
...
@@ -46,7 +46,6 @@ const FragmentForm: React.FC<FragmentFormProps> = (props: any) => {
const
[
formVals
,
setFormVals
]
=
useState
<
Partial
<
FragmentVariableTableListItem
>>
({
id
:
props
.
values
.
id
,
name
:
props
.
values
.
name
,
alias
:
props
.
values
.
alias
,
fragmentValue
:
props
.
values
.
fragmentValue
,
note
:
props
.
values
.
note
,
enabled
:
props
.
values
.
enabled
,
...
...
@@ -77,12 +76,6 @@ const FragmentForm: React.FC<FragmentFormProps> = (props: any) => {
rules=
{
[{
required
:
true
,
message
:
l
(
'pages.rc.fv.namePlaceholder'
)}]
}
>
<
Input
placeholder=
{
l
(
'pages.rc.fv.namePlaceholder'
)
}
/>
</
FormItem
>
<
FormItem
name=
"alias"
label=
{
l
(
'pages.rc.fv.alias'
)
}
rules=
{
[{
required
:
true
,
message
:
l
(
'pages.rc.fv.aliasPlaceholder'
)}]
}
>
<
Input
placeholder=
{
l
(
'pages.rc.fv.aliasPlaceholder'
)
}
/>
</
FormItem
>
<
FormItem
name=
"note"
label=
{
l
(
'global.table.note'
)
}
...
...
@@ -124,7 +117,7 @@ const FragmentForm: React.FC<FragmentFormProps> = (props: any) => {
bodyStyle=
{
{
padding
:
'32px 40px 48px'
}
}
destroyOnClose
title=
{
formVals
.
id
?
l
(
'pages.rc.fv.modify'
)
:
l
(
'pages.rc.fv.create'
)
}
visible
=
{
modalVisible
}
open
=
{
modalVisible
}
footer=
{
renderFooter
()
}
onCancel=
{
()
=>
handleModalVisible
()
}
>
...
...
dlink-web/src/pages/RegistrationCenter/FragmentVariable/index.tsx
View file @
18d8a598
...
...
@@ -94,13 +94,6 @@ const FragmentTableList: React.FC<{}> = (props: any) => {
return
<
a
onClick=
{
()
=>
setRow
(
entity
)
}
>
{
dom
}
</
a
>;
},
},
{
title
:
l
(
'pages.rc.fv.alias'
),
dataIndex
:
'alias'
,
hideInForm
:
false
,
hideInSearch
:
false
,
hideInTable
:
false
,
},
{
title
:
l
(
'pages.rc.fv.fragmentValue'
),
sorter
:
true
,
...
...
dlink-web/src/pages/RegistrationCenter/data.d.ts
View file @
18d8a598
...
...
@@ -142,7 +142,6 @@ export type DocumentTableListItem = {
export
type
FragmentVariableTableListItem
=
{
id
:
number
,
name
:
string
,
alias
:
string
,
fragmentValue
:
string
,
note
:
string
,
enabled
:
boolean
,
...
...
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