Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DBRepo
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FAIR Data Austria DB Repository
DBRepo
Commits
f4f117af
Verified
Commit
f4f117af
authored
3 years ago
by
Kirill Stytsenko
Browse files
Options
Downloads
Patches
Plain Diff
Handle whitespace in CreateDB #131
parent
8b4e20b4
No related branches found
No related tags found
4 merge requests
!81
New stable release
,
!43
Merge dev to master
,
!40
Misc
,
!39
Column units
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
fda-ui/components/dialogs/CreateDB.vue
+13
-9
13 additions, 9 deletions
fda-ui/components/dialogs/CreateDB.vue
with
13 additions
and
9 deletions
fda-ui/components/dialogs/CreateDB.vue
+
13
−
9
View file @
f4f117af
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
name=
"database"
name=
"database"
label=
"Name *"
label=
"Name *"
autofocus
autofocus
:rules=
"[v =>
!!v
|| $t('Required')]"
:rules=
"[v =>
notEmpty(v)
|| $t('Required')]"
required
/>
required
/>
<v-textarea
<v-textarea
id=
"description"
id=
"description"
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
name=
"description"
name=
"description"
rows=
"2"
rows=
"2"
label=
"Description *"
label=
"Description *"
:rules=
"[v =>
!!v
|| $t('Required')]"
:rules=
"[v =>
notEmpty(v)
|| $t('Required')]"
required
/>
required
/>
<v-select
<v-select
id=
"engine"
id=
"engine"
...
@@ -120,6 +120,9 @@ export default {
...
@@ -120,6 +120,9 @@ export default {
setTimeout
(
resolve
,
ms
)
setTimeout
(
resolve
,
ms
)
})
})
},
},
notEmpty
(
str
)
{
return
typeof
str
===
'
string
'
&&
str
.
trim
().
length
>
0
},
async
createDB
()
{
async
createDB
()
{
let
res
let
res
// create a container
// create a container
...
@@ -129,8 +132,8 @@ export default {
...
@@ -129,8 +132,8 @@ export default {
this
.
loading
=
true
this
.
loading
=
true
this
.
error
=
false
this
.
error
=
false
res
=
await
this
.
$axios
.
post
(
'
/api/container
'
,
{
res
=
await
this
.
$axios
.
post
(
'
/api/container
'
,
{
name
:
this
.
database
,
name
:
this
.
database
.
trim
()
,
description
:
this
.
description
,
description
:
this
.
description
.
trim
()
,
repository
:
this
.
engine
.
repository
,
repository
:
this
.
engine
.
repository
,
tag
:
this
.
engine
.
tag
tag
:
this
.
engine
.
tag
},
{
},
{
...
@@ -156,7 +159,8 @@ export default {
...
@@ -156,7 +159,8 @@ export default {
try
{
try
{
this
.
loading
=
true
this
.
loading
=
true
this
.
error
=
false
this
.
error
=
false
res
=
await
this
.
$axios
.
put
(
`/api/container/
${
containerId
}
`
,
{
action
:
'
START
'
},
{
res
=
await
this
.
$axios
.
put
(
`/api/container/
${
containerId
}
`
,
{
action
:
'
START
'
},
{
headers
:
{
Authorization
:
`Bearer
${
this
.
token
}
`
}
headers
:
{
Authorization
:
`Bearer
${
this
.
token
}
`
}
})
})
console
.
debug
(
'
started container
'
,
res
.
data
)
console
.
debug
(
'
started container
'
,
res
.
data
)
...
@@ -176,8 +180,8 @@ export default {
...
@@ -176,8 +180,8 @@ export default {
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
try
{
try
{
res
=
await
this
.
$axios
.
post
(
`/api/container/
${
containerId
}
/database`
,
{
res
=
await
this
.
$axios
.
post
(
`/api/container/
${
containerId
}
/database`
,
{
name
:
this
.
database
,
name
:
this
.
database
.
trim
()
,
description
:
this
.
description
,
description
:
this
.
description
.
trim
()
,
is_public
:
this
.
isPublic
is_public
:
this
.
isPublic
},
{
},
{
headers
:
{
Authorization
:
`Bearer
${
this
.
token
}
`
}
headers
:
{
Authorization
:
`Bearer
${
this
.
token
}
`
}
...
...
This diff is collapsed.
Click to expand it.
Kirill Stytsenko
@stytsenkok39
mentioned in commit
608ce7c3
·
3 years ago
mentioned in commit
608ce7c3
mentioned in commit 608ce7c384edba95acbd6b9209d1e308fe11d68c
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment