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
90c8101b
Unverified
Commit
90c8101b
authored
Nov 25, 2023
by
Martin Weise
Browse files
Options
Downloads
Patches
Plain Diff
Updated result set for units and concepts
parent
031c4379
No related branches found
No related tags found
4 merge requests
!231
CI: Remove build for log-service
,
!228
Better error message handling in the frontend
,
!223
Release of version 1.4.0
,
!215
Resolve "Fix the unit independent search"
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
dbrepo-ui/api/index.js
+10
-0
10 additions, 0 deletions
dbrepo-ui/api/index.js
dbrepo-ui/api/semantic.service.js
+11
-32
11 additions, 32 deletions
dbrepo-ui/api/semantic.service.js
dbrepo-ui/pages/search/index.vue
+20
-6
20 additions, 6 deletions
dbrepo-ui/pages/search/index.vue
with
41 additions
and
38 deletions
dbrepo-ui/api/index.js
+
10
−
0
View file @
90c8101b
import
axios
from
'
axios
'
import
Vue
from
'
vue
'
const
baseUrl
=
`
${
location
.
protocol
}
//
${
location
.
host
}
`
...
...
@@ -10,4 +11,13 @@ const instance = axios.create({
baseURL
:
baseUrl
})
function
displayError
(
error
,
warning
)
{
const
{
code
,
message
}
=
error
.
response
.
data
console
.
error
(
warning
,
error
)
Vue
.
$toast
.
error
(
`[
${
code
}
]
${
warning
}
:
${
message
}
`
)
}
export
default
instance
export
{
displayError
}
This diff is collapsed.
Click to expand it.
dbrepo-ui/api/semantic.service.js
+
11
−
32
View file @
90c8101b
import
Vue
from
'
vue
'
import
api
from
'
@/api
'
import
api
,
{
displayError
}
from
'
@/api
'
class
SemanticService
{
findAllOntologies
()
{
...
...
@@ -11,9 +10,7 @@ class SemanticService {
resolve
(
ontologies
)
})
.
catch
((
error
)
=>
{
const
{
code
,
message
}
=
error
.
response
.
data
console
.
error
(
'
Failed to load ontologies
'
,
error
)
Vue
.
$toast
.
error
(
`[
${
code
}
] Failed to load ontologies:
${
message
}
`
)
displayError
(
error
,
'
Failed to load ontologies
'
)
reject
(
error
)
})
})
...
...
@@ -28,9 +25,7 @@ class SemanticService {
resolve
(
concepts
)
})
.
catch
((
error
)
=>
{
const
{
code
,
message
}
=
error
.
response
.
data
console
.
error
(
'
Failed to load concepts
'
,
error
)
Vue
.
$toast
.
error
(
`[
${
code
}
] Failed to load concepts:
${
message
}
`
)
displayError
(
error
,
'
Failed to load concepts
'
)
reject
(
error
)
})
})
...
...
@@ -45,9 +40,7 @@ class SemanticService {
resolve
(
concept
)
})
.
catch
((
error
)
=>
{
const
{
code
,
message
}
=
error
.
response
.
data
console
.
error
(
'
Failed to update concept
'
,
error
)
Vue
.
$toast
.
error
(
`[
${
code
}
] Failed to update concept:
${
message
}
`
)
displayError
(
error
,
'
Failed to update concept
'
)
reject
(
error
)
})
})
...
...
@@ -62,9 +55,7 @@ class SemanticService {
resolve
(
units
)
})
.
catch
((
error
)
=>
{
const
{
code
,
message
}
=
error
.
response
.
data
console
.
error
(
'
Failed to load units
'
,
error
)
Vue
.
$toast
.
error
(
`[
${
code
}
] Failed to load units:
${
message
}
`
)
displayError
(
error
,
'
Failed to load units
'
)
reject
(
error
)
})
})
...
...
@@ -79,9 +70,7 @@ class SemanticService {
resolve
(
unit
)
})
.
catch
((
error
)
=>
{
const
{
code
,
message
}
=
error
.
response
.
data
console
.
error
(
'
Failed to update unit
'
,
error
)
Vue
.
$toast
.
error
(
`[
${
code
}
] Failed to update unit:
${
message
}
`
)
displayError
(
error
,
'
Failed to update unit
'
)
reject
(
error
)
})
})
...
...
@@ -96,9 +85,7 @@ class SemanticService {
resolve
(
ontology
)
})
.
catch
((
error
)
=>
{
const
{
code
,
message
}
=
error
.
response
.
data
console
.
error
(
'
Failed to load ontology
'
,
error
)
Vue
.
$toast
.
error
(
`[
${
code
}
] Failed to load ontology:
${
message
}
`
)
displayError
(
error
,
'
Failed to find ontology
'
)
reject
(
error
)
})
})
...
...
@@ -113,9 +100,7 @@ class SemanticService {
resolve
(
ontology
)
})
.
catch
((
error
)
=>
{
const
{
code
,
message
}
=
error
.
response
.
data
console
.
error
(
'
Failed to register ontology
'
,
error
)
Vue
.
$toast
.
error
(
`[
${
code
}
] Failed to register ontology:
${
message
}
`
)
displayError
(
error
,
'
Failed to register ontology
'
)
reject
(
error
)
})
})
...
...
@@ -130,9 +115,7 @@ class SemanticService {
resolve
(
ontology
)
})
.
catch
((
error
)
=>
{
const
{
code
,
message
}
=
error
.
response
.
data
console
.
error
(
'
Failed to update ontology
'
,
error
)
Vue
.
$toast
.
error
(
`[
${
code
}
] Failed to update ontology:
${
message
}
`
)
displayError
(
error
,
'
Failed to update ontology
'
)
reject
(
error
)
})
})
...
...
@@ -143,9 +126,7 @@ class SemanticService {
api
.
delete
(
`/api/semantic/ontology/
${
id
}
`
,
{
headers
:
{
Accept
:
'
application/json
'
}
})
.
then
(()
=>
resolve
())
.
catch
((
error
)
=>
{
const
{
code
,
message
}
=
error
.
response
.
data
console
.
error
(
'
Failed to delete ontology
'
,
error
)
Vue
.
$toast
.
error
(
`[
${
code
}
] Failed to delete ontology:
${
message
}
`
)
displayError
(
error
,
'
Failed to unregister ontology
'
)
reject
(
error
)
})
})
...
...
@@ -160,9 +141,7 @@ class SemanticService {
resolve
(
semantics
)
})
.
catch
((
error
)
=>
{
const
{
code
,
message
}
=
error
.
response
.
data
console
.
error
(
'
Failed to load table column semantics
'
,
error
)
Vue
.
$toast
.
error
(
`[
${
code
}
] Failed to load table column semantics:
${
message
}
`
)
displayError
(
error
,
'
Failed to suggest table column semantic
'
)
reject
(
error
)
})
})
...
...
This diff is collapsed.
Click to expand it.
dbrepo-ui/pages/search/index.vue
+
20
−
6
View file @
90c8101b
...
...
@@ -137,6 +137,24 @@ export default {
}
return
item
.
exchangeName
!==
undefined
},
isConcept
(
item
)
{
if
(
!
item
)
{
return
false
}
if
(
'
_class
'
in
item
)
{
return
/at.tuwien.api.database.table.columns.concepts.ConceptDto/
.
test
(
item
.
_class
)
}
return
false
},
isUnit
(
item
)
{
if
(
!
item
)
{
return
false
}
if
(
'
_class
'
in
item
)
{
return
/at.tuwien.api.database.table.columns.concepts.UnitDto/
.
test
(
item
.
_class
)
}
return
false
},
isTable
(
item
)
{
if
(
!
item
)
{
return
false
...
...
@@ -188,7 +206,7 @@ export default {
return
false
},
title
(
item
)
{
if
(
this
.
isDatabase
(
item
)
||
this
.
isTable
(
item
)
||
this
.
isColumn
(
item
)
||
this
.
isView
(
item
))
{
if
(
this
.
isDatabase
(
item
)
||
this
.
isTable
(
item
)
||
this
.
isColumn
(
item
)
||
this
.
isView
(
item
)
||
this
.
isConcept
(
item
)
||
this
.
isUnit
(
item
)
)
{
return
item
.
name
}
else
if
(
this
.
isIdentifier
(
item
))
{
return
item
.
title
...
...
@@ -196,16 +214,12 @@ export default {
return
null
},
description
(
item
)
{
if
(
this
.
isDatabase
(
item
))
{
return
item
.
description
}
else
if
(
this
.
isTable
(
item
))
{
if
(
this
.
isDatabase
(
item
)
||
this
.
isTable
(
item
)
||
this
.
isIdentifier
(
item
)
||
this
.
isConcept
(
item
)
||
this
.
isUnit
(
item
))
{
return
item
.
description
}
else
if
(
this
.
isColumn
(
item
))
{
return
null
}
else
if
(
this
.
isView
(
item
))
{
return
item
.
query
}
else
if
(
this
.
isIdentifier
(
item
))
{
return
item
.
description
}
return
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