Skip to content
Snippets Groups Projects
Verified Commit f3bdaded authored by Martin Weise's avatar Martin Weise
Browse files

Merge branch 'dev' into 391-modify-storage-solutions-in-regards-to-cloud-readiness

parents 3671611e 335e6a3f
No related branches found
No related tags found
4 merge requests!231CI: Remove build for log-service,!228Better error message handling in the frontend,!223Release of version 1.4.0,!212Resolve "Modify storage solutions in regards to cloud readiness"
......@@ -23,8 +23,8 @@ class QueryMapper {
{ value: 'mediumint', text: 'MEDIUMINT(size)', defaultSize: 10 },
{ value: 'bigint', text: 'BIGINT(size)', defaultSize: 255 },
{ value: 'float', text: 'FLOAT(p)', defaultSize: 24 },
{ value: 'double', text: 'DOUBLE(size, d)', defaultSize: 25, defaultD: 0 },
{ value: 'decimal', text: 'DECIMAL(size, d)', defaultSize: 10, defaultD: 0 },
{ value: 'double', text: 'DOUBLE(size, d)', defaultSize: 25, defaultD: 4 },
{ value: 'decimal', text: 'DECIMAL(size, d)', defaultSize: 10, defaultD: 4 },
{ value: 'date', text: 'DATE' },
{ value: 'datetime', text: 'DATETIME(fsp)' },
{ value: 'timestamp', text: 'TIMESTAMP(fsp)' },
......
......@@ -133,7 +133,7 @@ export default {
},
tableImport: {
location: null,
quote: null,
quote: '"',
false_element: null,
true_element: null,
null_element: null,
......
......@@ -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(filename, this.tableImport.separator)
.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 = filename
if (separator !== this.tableImport.separator) {
this.warnAnalyseSeparator = true
this.suggestedAnalyseSeparator = separator
} else {
this.step = 4
}
})
.finally(() => {
this.loadingAnalyse = false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment