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
11be8fb7
Unverified
Commit
11be8fb7
authored
Jan 18, 2024
by
Zzm0809
Committed by
GitHub
Jan 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix] fix gitlab auth error (#3018)
Co-authored-by:
Zzm0809
<
Zzm0809@users.noreply.github.com
>
parent
71e8a1fc
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
43 deletions
+34
-43
GitRepository.java
dinky-admin/src/main/java/org/dinky/utils/GitRepository.java
+1
-0
global.less
dinky-web/src/global.less
+2
-2
index.tsx
...ject/components/CodeTree/CodeTreeShow/SiderTree/index.tsx
+1
-1
index.tsx
.../GitProject/components/ProjectModal/ProjectForm/index.tsx
+27
-39
index.tsx
...es/RegCenter/GitProject/components/ProjectModal/index.tsx
+2
-0
constants.tsx
dinky-web/src/services/constants.tsx
+1
-1
No files found.
dinky-admin/src/main/java/org/dinky/utils/GitRepository.java
View file @
11be8fb7
...
@@ -124,6 +124,7 @@ public class GitRepository {
...
@@ -124,6 +124,7 @@ public class GitRepository {
super
.
write
(
str
);
super
.
write
(
str
);
}
}
}))
}))
.
setCredentialsProvider
(
new
UsernamePasswordCredentialsProvider
(
username
,
password
))
.
call
();
.
call
();
git
.
close
();
git
.
close
();
}
else
{
}
else
{
...
...
dinky-web/src/global.less
View file @
11be8fb7
...
@@ -254,8 +254,8 @@ ol {
...
@@ -254,8 +254,8 @@ ol {
}
}
.gitCodeTree {
.gitCodeTree {
min-height: 7
0
vh;
min-height: 7
3
vh;
max-height: 7
0
vh;
max-height: 7
3
vh;
}
}
.schemaTree {
.schemaTree {
...
...
dinky-web/src/pages/RegCenter/GitProject/components/CodeTree/CodeTreeShow/SiderTree/index.tsx
View file @
11be8fb7
...
@@ -49,7 +49,7 @@ export const SiderTree: React.FC<SiderTreeProps> = (props) => {
...
@@ -49,7 +49,7 @@ export const SiderTree: React.FC<SiderTreeProps> = (props) => {
<
PageLoading
/>
<
PageLoading
/>
)
:
treeData
.
length
>
0
?
(
)
:
treeData
.
length
>
0
?
(
<
DirectoryTree
<
DirectoryTree
className=
{
'siderTree'
}
className=
{
'siderTree
treeList gitCodeTree
'
}
onSelect=
{
(
_
,
info
)
=>
onNodeClick
(
info
)
}
onSelect=
{
(
_
,
info
)
=>
onNodeClick
(
info
)
}
treeData=
{
buildTreeData
(
treeData
)
}
treeData=
{
buildTreeData
(
treeData
)
}
/>
/>
...
...
dinky-web/src/pages/RegCenter/GitProject/components/ProjectModal/ProjectForm/index.tsx
View file @
11be8fb7
...
@@ -50,8 +50,8 @@ type ProjectFormProps = {
...
@@ -50,8 +50,8 @@ type ProjectFormProps = {
*/
*/
const
CodeEditProps
=
{
const
CodeEditProps
=
{
height
:
'15vh'
,
height
:
'15vh'
,
width
:
'
20
vw'
,
width
:
'
45
vw'
,
lineNumbers
:
'o
ff
'
,
lineNumbers
:
'o
n
'
,
language
:
'shell'
language
:
'shell'
};
};
...
@@ -113,23 +113,20 @@ const ProjectForm: React.FC<ProjectFormProps> = (props) => {
...
@@ -113,23 +113,20 @@ const ProjectForm: React.FC<ProjectFormProps> = (props) => {
placeholder=
{
l
(
'rc.gp.namePlaceholder'
)
}
placeholder=
{
l
(
'rc.gp.namePlaceholder'
)
}
/>
/>
<
ProFormSelect
name=
'type'
hidden
shouldUpdate
initialValue=
{
cloneType
}
/>
<
ProFormSelect
name=
'type'
hidden
shouldUpdate
initialValue=
{
cloneType
}
/>
<
ProFormText
<
ProFormText
name=
'url'
name=
'url'
width=
{
'
xs
'
}
width=
{
'
md
'
}
label=
{
l
(
'rc.gp.url'
)
}
label=
{
l
(
'rc.gp.url'
)
}
placeholder=
{
l
(
'rc.gp.urlPlaceholder'
)
}
rules=
{
[{
required
:
true
,
message
:
l
(
'rc.gp.urlPlaceholder'
)
}]
}
rules=
{
[{
required
:
true
,
message
:
l
(
'rc.gp.urlPlaceholder'
)
}]
}
addonBefore=
{
renderUrlBeforeSelect
()
}
addonBefore=
{
renderUrlBeforeSelect
()
}
>
<
Input
style=
{
{
width
:
'18vw'
}
}
addonBefore=
{
undefined
}
onBlur=
{
cloneType
===
1
?
getBranchList
:
()
=>
Promise
<
void
>
}
placeholder=
{
l
(
'rc.gp.urlPlaceholder'
)
}
/>
/>
</
ProFormText
>
<
ProFormSwitch
width=
'xs'
name=
'enabled'
label=
{
l
(
'global.table.isEnable'
)
}
{
...
SWITCH_OPTIONS
()}
/>
</
ProForm
.
Group
>
</
ProForm
.
Group
>
<
ProForm
.
Group
>
<
ProForm
.
Group
>
...
@@ -162,43 +159,24 @@ const ProjectForm: React.FC<ProjectFormProps> = (props) => {
...
@@ -162,43 +159,24 @@ const ProjectForm: React.FC<ProjectFormProps> = (props) => {
<
ProFormText
.
Password
<
ProFormText
.
Password
name=
'password'
name=
'password'
width=
{
'sm'
}
label=
{
l
(
'rc.gp.password'
)
}
label=
{
l
(
'rc.gp.password'
)
}
placeholder=
{
l
(
'rc.gp.passwordPlaceholder'
)
}
placeholder=
{
l
(
'rc.gp.passwordPlaceholder'
)
}
/>
/>
<
ProFormSelect
<
ProFormSelect
options=
{
branches
}
options=
{
branches
}
shouldUpdate
disabled=
{
cloneType
===
1
?
!
form
.
getFieldsValue
().
url
:
!
form
.
getFieldsValue
().
privateKey
&&
!
form
.
getFieldsValue
().
url
}
colon=
{
true
}
name=
'branch'
name=
'branch'
width=
{
'sm'
}
width=
{
'sm'
}
label=
{
l
(
'rc.gp.branch'
)
}
label=
{
l
(
'rc.gp.branch'
)
}
placeholder=
{
l
(
'rc.gp.branchPlaceholder'
)
}
placeholder=
{
l
(
'rc.gp.branchPlaceholder'
)
}
rules=
{
[{
required
:
true
,
message
:
l
(
'rc.gp.branchPlaceholder'
)
}]
}
rules=
{
[{
required
:
true
,
message
:
l
(
'rc.gp.branchPlaceholder'
)
}]
}
fieldProps=
{
{
onFocus
:
getBranchList
}
}
showSearch
showSearch
/>
/>
</
ProForm
.
Group
>
<
ProForm
.
Group
>
<
ProForm
.
Item
name=
'buildArgs'
label=
{
l
(
'rc.gp.buildArgs'
)
}
>
<
CodeEdit
onChange=
{
(
value
)
=>
setBuildArgsValue
(
value
??
''
)
}
code=
{
buildArgs
}
{
...
CodeEditProps
}
/>
</
ProForm
.
Item
>
<
ProFormSwitch
width=
'xs'
name=
'enabled'
label=
{
l
(
'global.table.isEnable'
)
}
{
...
SWITCH_OPTIONS
()}
/>
<
ProFormRadio
.
Group
<
ProFormRadio
.
Group
name=
'codeType'
name=
'codeType'
width=
{
'xs'
}
width=
{
'xs'
}
...
@@ -212,16 +190,26 @@ const ProjectForm: React.FC<ProjectFormProps> = (props) => {
...
@@ -212,16 +190,26 @@ const ProjectForm: React.FC<ProjectFormProps> = (props) => {
</
ProFormRadio
.
Group
>
</
ProFormRadio
.
Group
>
</
ProForm
.
Group
>
</
ProForm
.
Group
>
<
ProForm
.
Group
>
<
ProForm
.
Item
name=
'buildArgs'
label=
{
l
(
'rc.gp.buildArgs'
)
}
>
<
CodeEdit
onChange=
{
(
value
:
string
)
=>
setBuildArgsValue
(
value
??
''
)
}
code=
{
buildArgs
}
{
...
CodeEditProps
}
/>
</
ProForm
.
Item
>
</
ProForm
.
Group
>
<
ProForm
.
Group
>
<
ProForm
.
Group
>
<
ProFormTextArea
<
ProFormTextArea
name=
'pom'
name=
'pom'
width=
{
'
md
'
}
width=
{
'
lg
'
}
label=
{
l
(
'rc.gp.pom'
)
}
label=
{
l
(
'rc.gp.pom'
)
}
placeholder=
{
l
(
'rc.gp.pomPlaceholder'
)
}
placeholder=
{
l
(
'rc.gp.pomPlaceholder'
)
}
/>
/>
<
ProFormTextArea
<
ProFormTextArea
name=
'description'
name=
'description'
width=
{
'
md
'
}
width=
{
'
lg
'
}
label=
{
l
(
'global.table.note'
)
}
label=
{
l
(
'global.table.note'
)
}
placeholder=
{
l
(
'global.table.notePlaceholder'
)
}
placeholder=
{
l
(
'global.table.notePlaceholder'
)
}
/>
/>
...
@@ -232,7 +220,7 @@ const ProjectForm: React.FC<ProjectFormProps> = (props) => {
...
@@ -232,7 +220,7 @@ const ProjectForm: React.FC<ProjectFormProps> = (props) => {
return
(
return
(
<>
<>
<
ProForm
form=
{
form
}
submitter=
{
false
}
initialValues=
{
values
}
>
<
ProForm
form=
{
form
}
submitter=
{
false
}
initialValues=
{
values
}
syncToInitialValues
>
{
renderGitProjectForm
()
}
{
renderGitProjectForm
()
}
</
ProForm
>
</
ProForm
>
</>
</>
...
...
dinky-web/src/pages/RegCenter/GitProject/components/ProjectModal/index.tsx
View file @
11be8fb7
...
@@ -120,6 +120,8 @@ const ProjectModal: React.FC<ProjectModalProps> = (props) => {
...
@@ -120,6 +120,8 @@ const ProjectModal: React.FC<ProjectModalProps> = (props) => {
destroyOnClose
:
true
,
destroyOnClose
:
true
,
onCancel
:
()
=>
handleCancel
()
onCancel
:
()
=>
handleCancel
()
}
}
}
}
onValuesChange=
{
(
changedValues
,
allValues
)
=>
form
.
setFieldsValue
(
allValues
)
}
syncToInitialValues
>
>
<
ProjectForm
values=
{
values
}
form=
{
form
}
/>
<
ProjectForm
values=
{
values
}
form=
{
form
}
/>
</
ModalForm
>
</
ModalForm
>
...
...
dinky-web/src/services/constants.tsx
View file @
11be8fb7
...
@@ -93,7 +93,7 @@ export const FORM_LAYOUT_PUBLIC = {
...
@@ -93,7 +93,7 @@ export const FORM_LAYOUT_PUBLIC = {
* the modal form layout of public
* the modal form layout of public
*/
*/
export
const
MODAL_FORM_STYLE
:
any
=
{
export
const
MODAL_FORM_STYLE
:
any
=
{
width
:
'5
0
%'
,
width
:
'5
5
%'
,
style
:
{
style
:
{
maxHeight
:
'70vh'
,
maxHeight
:
'70vh'
,
overflowY
:
'auto'
overflowY
:
'auto'
...
...
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