Skip to content
Snippets Groups Projects
Commit 6cff602e authored by Kirill Stytsenko's avatar Kirill Stytsenko
Browse files

fda-ui needs the /tmp volume

Former-commit-id: c7bed7e9
parent a30875ab
No related branches found
No related tags found
1 merge request!42Fixed the query service tests
......@@ -330,6 +330,7 @@ services:
ports:
- "3000:3000"
volumes:
- /tmp:/tmp
- "./fda-ui/.prod:/certs"
depends_on:
fda-gateway-service:
......
......@@ -100,6 +100,20 @@ export default {
},
loadingColor () {
return this.error ? 'red lighten-2' : 'primary'
},
canCreateTable () {
if (this.name === null) { return false }
if (this.description === '') { return false }
if (!this.columns.length) { return false }
for (let i = 0; i < this.columns.length; i++) {
const col = this.columns[i]
if (col.name === '') { return false }
if (col.type === '') { return false }
if (col.name === 'id' && (!col.primaryKey)) {
return false
}
}
return true
}
},
mounted () {
......@@ -139,17 +153,6 @@ export default {
removeColumn (idx) {
this.columns.splice(idx, 1)
},
canCreateTable () {
if (this.name === null) { return false }
if (this.description === '') { return false }
if (!this.columns.length) { return false }
for (let i = 0; i < this.columns.length; i++) {
const col = this.columns[i]
if (col.name === '') { return false }
if (col.type === '') { return false }
}
return true
},
async createTable () {
const data = {
name: this.name,
......
export default function ({ $axios, redirect }) {
console.log('axios intercepter args', arguments)
// TODO show a toast error when something goes wrong
// TODO console.log('axios intercepter args', arguments)
}
// export default function (item) {
......
......@@ -26,13 +26,17 @@ app.post('/table_from_csv', upload.single('file'), async (req, res) => {
// send path to analyse service
let analysis
try {
analysis = await fetch(`${process.env.API}/api/analyse/determinedt`, {
const url = `${process.env.API}/api/analyse/determinedt`
console.log('analyse service url', url)
analysis = await fetch(url, {
method: 'post',
body: JSON.stringify({ filepath: path }),
headers: { 'Content-Type': 'application/json' }
})
console.debug('analyzed', analysis)
analysis = JSON.parse(await analysis.json())
const json = await analysis.json()
console.log('json', json)
analysis = JSON.parse(json)
console.log(analysis)
if (!analysis.columns) {
return res.json({ success: false, message: 'Columns array missing' })
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment