Commit 31f1db52 authored by Anton's avatar Anton

Merge branch 'release_2_2' of...

Merge branch 'release_2_2' of gitlab.rlp.net:motionbank/applications/systems-frontend into release_2_2
parents c3d0e408 5a702253
Pipeline #69250 passed with stage
in 3 minutes and 3 seconds
......@@ -380,7 +380,7 @@ module
lots of annotations need to be loaded
- Delete map no longer fails when encountering access
denied errors (still suffers from
[#119](https://gitlab.rlp.net/motionbank/systems-frontend/issues/119))
[#119](https://gitlab.rlp.net/motionbank/applications/systems-frontend/issues/119))
### Removed
......@@ -435,7 +435,7 @@ AnnotationList)
(works from version 15+)
- Perform date related queries to MongoDB with
properly formatted timezones (see:
[#106](https://gitlab.rlp.net/motionbank/systems-frontend/issues/106))
[#106](https://gitlab.rlp.net/motionbank/applications/systems-frontend/issues/106))
### Changed
......@@ -518,25 +518,25 @@ of a video cannot be retrieved
- Start proper versioning at 1.0.0
[Unreleased]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v2.2.0...release_2_2
[2.2.0]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v2.1.2...v2.2.0
[2.1.2]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v2.1.1...v2.1.2
[2.1.1]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v2.1.0...v2.1.1
[2.1.0]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v2.0.0...v2.1.0
[2.0.0]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.10...v2.0.0
[1.3.10]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.9...v1.3.10
[1.3.9]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.8...v1.3.9
[1.3.8]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.7...v1.3.8
[1.3.7]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.6...v1.3.7
[1.3.6]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.5...v1.3.6
[1.3.5]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.4...v1.3.5
[1.3.4]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.3...v1.3.4
[1.3.3]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.2...v1.3.3
[1.3.2]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.1...v1.3.2
[1.3.1]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.0...v1.3.1
[1.3.0]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.2.1...v1.3.0
[1.2.1]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.2.0...v1.2.1
[1.2.0]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.1.1...v1.2.0
[1.1.1]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.1.0...v1.1.1
[1.1.0]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.0.0...v1.1.0
[1.0.0]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/initial...v1.0.0
[Unreleased]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v2.2.0...release_2_2
[2.2.0]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v2.1.2...v2.2.0
[2.1.2]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v2.1.1...v2.1.2
[2.1.1]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v2.1.0...v2.1.1
[2.1.0]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v2.0.0...v2.1.0
[2.0.0]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.3.10...v2.0.0
[1.3.10]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.3.9...v1.3.10
[1.3.9]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.3.8...v1.3.9
[1.3.8]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.3.7...v1.3.8
[1.3.7]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.3.6...v1.3.7
[1.3.6]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.3.5...v1.3.6
[1.3.5]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.3.4...v1.3.5
[1.3.4]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.3.3...v1.3.4
[1.3.3]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.3.2...v1.3.3
[1.3.2]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.3.1...v1.3.2
[1.3.1]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.3.0...v1.3.1
[1.3.0]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.2.1...v1.3.0
[1.2.1]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.2.0...v1.2.1
[1.2.0]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.1.1...v1.2.0
[1.1.1]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.1.0...v1.1.1
[1.1.0]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/v1.0.0...v1.1.0
[1.0.0]: https://gitlab.rlp.net/motionbank/applications/systems-frontend/compare/initial...v1.0.0
......@@ -64,6 +64,21 @@
}
catch (e) { this.media[i].metadata = {} }
}
// const aggs = {
// annotations_per_minute: {
// date_histogram: {
// field: 'target.selector._valueMillis',
// calendar_interval: '1m'
// }
// }
// }
// const query = {
// match: { 'target.id': this.map.id }
// }
// const aggregations = await this.$store.dispatch('search/query', { index: 'annotations', aggs, query })
// console.debug('Aggregations', aggregations)
this.$q.loading.hide()
},
computed: {
......@@ -75,12 +90,11 @@
async search () {
this.$q.loading.show()
const query = {
'target.id': this.map.id,
'body.type': 'TextualBody',
'body.value': RegExp(`.*${this.query}.*`, 'ig')
match: { 'body.value': this.query }
}
const result = await this.$store.dispatch('annotations/find', query)
this.results = result && Array.isArray(result.items) ? result.items.sort(this.$sort.onRef) : []
const result = await this.$store.dispatch('search/query', { index: 'annotations', query })
this.results = (result && Array.isArray(result.hits) ? result.hits.sort(this.$sort.onRef) : [])
.map(hit => hit._source)
this.$q.loading.hide()
},
formatDate (millis) {
......@@ -94,7 +108,7 @@
videoEnd = videoStart.plus(video.metadata.duration * 1000)
if (annoTime >= videoStart && annoTime < videoEnd) return video
}
return {}
return { annotation: {}, metadata: {} }
}
}
}
......
......@@ -30,7 +30,8 @@ import {
queue,
swimLane,
vocabularies,
settings
settings,
search
} from './modules'
import mediaFactory from './modules/media'
......@@ -115,7 +116,8 @@ const modules = {
queue,
swimLane,
vocabularies,
settings
settings,
search
}
for (let key in mobaApiModules) {
if (mobaApiModules[key]) modules[key] = mobaApiModules[key]
......
......@@ -10,6 +10,7 @@ import files from './files'
import queue from './queue'
import swimLane from './swim-lane'
import settings from './settings'
import search from './search'
import vocabularies from './vocabularies'
export {
......@@ -25,5 +26,6 @@ export {
queue,
swimLane,
settings,
search,
vocabularies
}
const axios = require('axios')
const search = {
namespaced: true,
state: {},
actions: {
async query (context, { index, query, aggs }) {
const config = {
headers: {
Authorization: `${this.$router.app.$auth.tokenType} ${this.$router.app.$auth.token}`
}
}
let result = await axios.post(`${process.env.API_HOST}/search/${index}`, { query, aggs }, config)
return result.data
}
}
}
export default search
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment