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
335e6a3f
Verified
Commit
335e6a3f
authored
1 year ago
by
Martin Weise
Browse files
Options
Downloads
Patches
Plain Diff
Display warning in UI when providing wrong separator
parent
d8f68f59
No related branches found
No related tags found
3 merge requests
!231
CI: Remove build for log-service
,
!228
Better error message handling in the frontend
,
!223
Release of version 1.4.0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
dbrepo-ui/pages/database/_database_id/table/_table_id/import.vue
+1
-1
1 addition, 1 deletion
...ui/pages/database/_database_id/table/_table_id/import.vue
dbrepo-ui/pages/database/_database_id/table/import.vue
+23
-3
23 additions, 3 deletions
dbrepo-ui/pages/database/_database_id/table/import.vue
with
24 additions
and
4 deletions
dbrepo-ui/pages/database/_database_id/table/_table_id/import.vue
+
1
−
1
View file @
335e6a3f
...
...
@@ -133,7 +133,7 @@ export default {
},
tableImport
:
{
location
:
null
,
quote
:
null
,
quote
:
'
"
'
,
false_element
:
null
,
true_element
:
null
,
null_element
:
null
,
...
...
This diff is collapsed.
Click to expand it.
dbrepo-ui/pages/database/_database_id/table/import.vue
+
23
−
3
View file @
335e6a3f
...
...
@@ -132,6 +132,19 @@
</v-stepper-step>
<v-stepper-content
step=
"3"
>
<v-form
ref=
"form"
v-model=
"validStep3"
@
submit.prevent=
"submit"
>
<v-row
dense
>
<v-col
cols=
"8"
>
<v-alert
v-if=
"warnAnalyseSeparator"
border=
"left"
color=
"warning"
>
We analysed your .csv/.tsv file and found that the separator you provided
<code>
{{
tableImport
.
separator
}}
</code>
is not correct, the separator
<code>
{{
suggestedAnalyseSeparator
}}
</code>
is more likely to be correct. If you really want to import
the .csv/.tsv file still, click "continue".
</v-alert>
</v-col>
</v-row>
<v-row
dense
>
<v-col
cols=
"8"
>
<v-file-input
...
...
@@ -240,7 +253,7 @@ export default {
},
tableImport
:
{
location
:
null
,
quote
:
null
,
quote
:
'
"
'
,
false_element
:
null
,
true_element
:
null
,
null_element
:
null
,
...
...
@@ -251,6 +264,8 @@ export default {
loadingUpload
:
false
,
loadingAnalyse
:
false
,
loadingImage
:
false
,
warnAnalyseSeparator
:
false
,
suggestedAnalyseSeparator
:
null
,
url
:
null
,
columns
:
[],
newTableId
:
42
// FIXME ???
...
...
@@ -331,7 +346,7 @@ export default {
this
.
loadingAnalyse
=
true
AnalyseService
.
determineDataTypes
(
path
)
.
then
((
analysis
)
=>
{
const
{
columns
}
=
analysis
const
{
columns
,
separator
}
=
analysis
const
dataTypes
=
QueryMapper
.
mySql8DataTypes
()
this
.
tableCreate
.
columns
=
Object
.
entries
(
columns
)
.
map
(([
key
,
val
])
=>
{
...
...
@@ -347,7 +362,12 @@ export default {
}
})
this
.
tableImport
.
location
=
path
if
(
separator
!==
this
.
tableImport
.
separator
)
{
this
.
warnAnalyseSeparator
=
true
this
.
suggestedAnalyseSeparator
=
separator
}
else
{
this
.
step
=
4
}
})
.
finally
(()
=>
{
this
.
loadingAnalyse
=
false
...
...
This diff is collapsed.
Click to expand it.
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