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

Updated semantics

parent 6e067503
Branches 491-update-sequential-ids-to-non-guessable-ids
Tags
2 merge requests!387Wrong model,!384Wrong model
This commit is part of merge request !384. Comments created here will be created in the context of that merge request.
No preview for this file type
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
v-if="recommendations.length === 0"> v-if="recommendations.length === 0">
<v-col> <v-col>
<v-btn <v-btn
v-if="finishedRecommendations"
color="secondary" color="secondary"
variant="flat" variant="flat"
size="small" size="small"
...@@ -165,6 +166,7 @@ export default { ...@@ -165,6 +166,7 @@ export default {
uri: null, uri: null,
valid: false, valid: false,
loading: false, loading: false,
finishedRecommendations: false,
loadingOntologies: false, loadingOntologies: false,
loadingSemantics: false, loadingSemantics: false,
cacheStore: useCacheStore() cacheStore: useCacheStore()
...@@ -172,7 +174,7 @@ export default { ...@@ -172,7 +174,7 @@ export default {
}, },
computed: { computed: {
title () { 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 () { ontologies () {
return this.cacheStore.getOntologies.filter(o => o.sparql || o.rdf) return this.cacheStore.getOntologies.filter(o => o.sparql || o.rdf)
...@@ -243,6 +245,13 @@ export default { ...@@ -243,6 +245,13 @@ export default {
action: 'assign' action: 'assign'
}) })
}) })
.catch(({code, message}) => {
const toast = useToastInstance()
if (typeof code !== 'string') {
return
}
toast.error(message)
})
.finally(() => { .finally(() => {
this.recommendation = null this.recommendation = null
this.$refs.form.reset() this.$refs.form.reset()
...@@ -255,10 +264,14 @@ export default { ...@@ -255,10 +264,14 @@ export default {
tableService.suggest(this.database.id, this.tableId, this.column.id) tableService.suggest(this.database.id, this.tableId, this.column.id)
.then((recommendations) => { .then((recommendations) => {
this.recommendations = recommendations this.recommendations = recommendations
this.finishedRecommendations = true
}) })
.catch((error) => { .catch(({code, message}) => {
const toast = useToastInstance() const toast = useToastInstance()
toast.error(this.$t('error.semantics.timeout')) if (typeof code !== 'string') {
return
}
toast.error(message)
}) })
.finally(() => { .finally(() => {
this.loadingSemantics = false this.loadingSemantics = false
......
...@@ -167,8 +167,8 @@ export default { ...@@ -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.SSS')) : [],
labels: history ? history.map(d => format(new UTCDate(d.timestamp), 'yyyy-MM-dd HH:mm:ss')) : [], labels: history ? history.map(d => format(new UTCDate(d.timestamp), 'yyyy-MM-dd HH:mm:ss')) : [],
datasets: [ datasets: [
{ backgroundColor: this.$vuetify.theme.current.colors.success, data: this.filterHistoryEventType(history, 'INSERT') }, { 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.error, data: this.filterHistoryEventType(history, 'delete') }
] ]
} }
}) })
......
...@@ -541,7 +541,7 @@ ...@@ -541,7 +541,7 @@
} }
}, },
"semantics": { "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", "subtitle": "Semantic instances help machines to get the proper context of your dataset",
"recommended": "Recommended semantic instances", "recommended": "Recommended semantic instances",
"bullet": "●", "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