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

Updated semantics

parent 6e067503
No related branches found
No related tags found
2 merge requests!387Wrong model,!384Wrong model
No preview for this file type
......@@ -55,6 +55,7 @@
v-if="recommendations.length === 0">
<v-col>
<v-btn
v-if="finishedRecommendations"
color="secondary"
variant="flat"
size="small"
......@@ -165,6 +166,7 @@ export default {
uri: null,
valid: false,
loading: false,
finishedRecommendations: false,
loadingOntologies: false,
loadingSemantics: false,
cacheStore: useCacheStore()
......@@ -172,7 +174,7 @@ export default {
},
computed: {
title () {
return this.$t('pages.table.subpages.semantics.title') + ' ' + this.column.internal_name
return this.$t('pages.table.subpages.semantics.title', { type: this.mode }) + ' ' + this.column.internal_name
},
ontologies () {
return this.cacheStore.getOntologies.filter(o => o.sparql || o.rdf)
......@@ -243,6 +245,13 @@ export default {
action: 'assign'
})
})
.catch(({code, message}) => {
const toast = useToastInstance()
if (typeof code !== 'string') {
return
}
toast.error(message)
})
.finally(() => {
this.recommendation = null
this.$refs.form.reset()
......@@ -255,10 +264,14 @@ export default {
tableService.suggest(this.database.id, this.tableId, this.column.id)
.then((recommendations) => {
this.recommendations = recommendations
this.finishedRecommendations = true
})
.catch((error) => {
.catch(({code, message}) => {
const toast = useToastInstance()
toast.error(this.$t('error.semantics.timeout'))
if (typeof code !== 'string') {
return
}
toast.error(message)
})
.finally(() => {
this.loadingSemantics = false
......
......@@ -167,8 +167,8 @@ export default {
// labels: history ? history.map(d => format(new UTCDate(d.timestamp), 'yyyy-MM-dd HH:mm:ss.SSS')) : [],
labels: history ? history.map(d => format(new UTCDate(d.timestamp), 'yyyy-MM-dd HH:mm:ss')) : [],
datasets: [
{ backgroundColor: this.$vuetify.theme.current.colors.success, data: this.filterHistoryEventType(history, 'INSERT') },
{ backgroundColor: this.$vuetify.theme.current.colors.error, data: this.filterHistoryEventType(history, 'DELETE') }
{ backgroundColor: this.$vuetify.theme.current.colors.success, data: this.filterHistoryEventType(history, 'insert') },
{ backgroundColor: this.$vuetify.theme.current.colors.error, data: this.filterHistoryEventType(history, 'delete') }
]
}
})
......
......@@ -541,7 +541,7 @@
}
},
"semantics": {
"title": "Assign semantic instance for table column",
"title": "Assign semantic {type} for table column",
"subtitle": "Semantic instances help machines to get the proper context of your dataset",
"recommended": "Recommended semantic instances",
"bullet": "●",
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment