Commit 47425d64 authored by Anton's avatar Anton

Clean up logging statements, change console.log to console.debug

parent 04060efb
Pipeline #30184 passed with stage
in 1 minute and 21 seconds
......@@ -9,10 +9,7 @@
<script>
export default {
name: 'App',
mounted () {
console.log(window.TRANSCODER_HOST)
}
name: 'App'
}
</script>
......
Subproject commit 2b2493e2316c1c2a6999262bf04f0822ee71c7e2
Subproject commit 428e5776054b76c39c54895485cac104196101df
......@@ -94,7 +94,7 @@
this.$emit('hide')
},
addUser () {
console.debug('add user to acl', this.user)
console.debug('Add user to acl', this.user)
}
}
}
......
......@@ -191,12 +191,12 @@
}
}
else if (key === 'escape') {
console.debug('esc')
console.debug('onKeyDown: escape')
this.blurInput()
this.reset()
}
else if (key === 'backspace') {
console.log('bs', this.annotationText)
console.debug('onKeyDown: backspace', this.annotationText)
if (this.annotationText !== undefined) {
if (this.annotationText.length === 1) {
this.blurInput()
......@@ -241,7 +241,7 @@
}
this.reset()
this.$emit('annotation', annotation)
console.debug('emit annotation', annotation)
console.debug('AnnotationField: createAnnotation', annotation)
}
}
}
......
......@@ -31,9 +31,9 @@
this.pollTimeout = undefined
const jobIds = this.$store.state.conversions.jobIds
for (let jobId of jobIds) {
console.debug('checking conversion job...', jobId)
console.debug('Checking conversion job...', jobId)
const job = await this.$store.dispatch('conversions/get', jobId)
console.debug('job status', jobId, job)
console.debug('Job status', jobId, job)
if (job.failed) {
this.$store.commit('conversions/removeJobId', jobId)
this.$store.commit('conversions/removeJobDetail', jobId)
......@@ -73,11 +73,11 @@
},
target
}
console.debug('create annotation with payload', payload)
console.debug('Create annotation with payload', payload)
const annotation = await this.$store.dispatch('annotations/post', payload)
console.debug('created annotation', annotation)
console.debug('Created annotation', annotation)
if (detail.isPublic) {
console.debug('make annotation public')
console.debug('Make annotation public', annotation.id)
await this.$store.dispatch('acl/set', {id: annotation.id, role: 'public', permissions: ['get']})
}
this.$store.commit('conversions/removeJobDetail', jobId)
......
......@@ -29,9 +29,9 @@
this.pollTimeout = undefined
const jobIds = this.$store.state.timecodes.jobIds
for (let jobId of jobIds) {
console.debug('checking timecode extraction job...', jobId)
console.debug('Checking timecode extraction job...', jobId)
const job = await this.$store.dispatch('timecodes/get', jobId)
console.debug('job status', jobId, job)
console.debug('Job status', jobId, job)
if (job.failed) {
this.$store.commit('timecodes/removeJobId', jobId)
this.$store.commit('timecodes/removeJobDetail', jobId)
......
......@@ -5,9 +5,6 @@ export const EventHub = new Vue({
data: {
currentKeyPressed: null
},
mounted () {
console.log('event hub mounted')
},
methods: {
keyIsPressed (key) {
return this.currentKeyPressed === key
......
......@@ -286,7 +286,9 @@
}
},
onMarkerContextAction (action) {
if (this.isSelected) console.log(action)
if (this.isSelected) {
console.debug('GraphMarker: onMarkerContextAction', action)
}
},
onContext (event) {
event.preventDefault()
......
......@@ -409,7 +409,7 @@
return DateTime.fromMillis(this.media.target.selector._valueMillis)
},
setupScreen () {
console.log(this.dimensions.details, 'details dimen')
console.debug('SwimLane: setupScreen', this.dimensions.details)
let selectedA = this.selectedAnnotation
if (selectedA) {
let ms = this.millisTotalToTimeline(DateTime.fromISO(selectedA.target.selector.value).toMillis())
......
......@@ -279,19 +279,12 @@
this.loadedVocabularies.push(vocab[k])
}
}
// console.log(this.activeVocabularies)
},
*/
async setVocabularyVisibility (vocabs) {
this.activeVocabularies = []
for (let i = 0; i < vocabs.length; i++) {
let vocab = await this.$store.dispatch('vocabularies/get', vocabs[i].id)
/*
console.log(this.checkedVocabularies)
console.log(vocabs[i])
console.log(this.checkedVocabularies.includes(vocabs[i]))
console.log('----------')
*/
if (this.checkedVocabularies.includes(vocabs[i])) {
this.activeVocabularies.push({label: vocabs[i].label, items: vocab})
}
......@@ -344,13 +337,13 @@
},
onKeyPress (event) {
const key = event.key.toLowerCase().replace(/\s/g, '')
console.debug('Vocabulary: onKeyPress', key)
if (this.isSetShortcut) {
// FIXME: delete does not get captured
if (key === 'delete' && this.newShortcut.length) this.newShortcut.pop()
else if (this.keyBlacklist.indexOf(key) === -1) this.newShortcut.push(key)
}
else if (key === 'arrowdown') {
console.debug('arrowdown')
// TODO: cycle through selected vocabulary values
}
else if (key === '#') {
......
......@@ -111,7 +111,7 @@
this.$emit('select-session', { session, index })
},
sessionHover (hoverVal) {
console.debug('hover', hoverVal)
console.debug('Diagram: sessionHover', hoverVal)
this.hoverVal = hoverVal
if (this.hoverVal && this.hoverVal.start) this.barTooltip.visibility = true
else { this.barTooltip.visibility = false }
......
......@@ -106,7 +106,6 @@
this.setSessionTime(val)
},
checkVideoVisibility (videoStart, videoEnd, sessionStart, sessionEnd) {
// console.log(videoStart, videoEnd, sessionStart, sessionEnd)
if ((videoStart <= sessionStart && videoEnd >= sessionEnd) || (videoStart >= sessionStart && videoEnd <= sessionEnd) || (videoStart > sessionStart && videoStart < sessionEnd && videoEnd > sessionEnd)) return true
else return false
},
......@@ -140,11 +139,9 @@
this.fixDiagram = bounds.top < 50 && (bounds.height + bounds.top) >= window.innerHeight
},
setSessionTime (seconds) {
console.debug('set session time', seconds, this.player, this.sessionTime)
if (this.player) {
const time = SessionHelpers.sessionToAnnotationTime(seconds, this.video.annotation, this.session)
this.player.currentTime(time)
console.log('new time', time)
}
else this.sessionTime = seconds
},
......
......@@ -147,8 +147,8 @@
},
methods: {
// changeSessionTimeDown () {
// // console.log('changeSessionTime fired')
// // console.log('--> ' + event.clientY)
// // console.debug('changeSessionTime fired')
// // console.debug('--> ' + event.clientY)
// this.setSessionTime(event.clientY)
// },
setSessionTime (val) {
......
Subproject commit c58bd7467534c53def7041d96c6da0433f92137e
Subproject commit 8d8904c927212cc74232825244c9a7289eac7b47
......@@ -16,7 +16,6 @@ class ACLHelpers {
}
static async updateACL (context) {
console.debug('setting acl...', context.acl)
if (this.acl.public) {
await this.setACL('acl/set', { role: 'public', id: context.timeline.id, permissions: ['get'] }, context.acl.recursive)
}
......
......@@ -83,7 +83,6 @@
},
async updateACL () {
this.$q.loading.show()
console.debug('setting acl...', this.acl, this.resourceName)
if (this.acl.public) {
await this.setACL('acl/set', { role: 'public', id: this.resourceName, permissions: ['get'] }, this.acl.recursive)
}
......
......@@ -352,14 +352,12 @@
}
},
onAnnotation (annotation) {
console.debug('received annotation...', annotation)
if (annotation) this.createAnnotation(annotation)
},
async createAnnotation (annotation = {}) {
try {
const target = this.timeline.getInterval(annotation.target.selector.value['date-time:t'])
const payload = ObjectUtil.merge(annotation, { target })
console.debug('create annotation', target, payload)
const result = await this.$store.dispatch('annotations/post', payload)
if (result.body.type === 'VocabularyEntry' && !result.body.value) {
const entry = await this.$vocabularies.getEntry(result.body.source.id)
......
......@@ -109,7 +109,6 @@
const millis = DateTime.fromISO(selector, { setZone: true }).toMillis() -
DateTime.fromISO(this.video.target.selector.value, { setZone: true }).toMillis()
*/
console.log('VIDEO', this.video)
const millis = selector -
DateTime.fromMillis(this.video.target.selector._valueMillis, { setZone: true })
const targetMillis = millis * 0.001
......@@ -117,7 +116,6 @@
},
async getVideo () {
this.video = await this.$store.dispatch('annotations/get', this.$route.params.id)
console.log('video', this.video)
this.timeline = await this.$store.dispatch('maps/get', parseURI(this.video.target.id).uuid)
if (this.video) {
this.metadata = await this.$store.dispatch('metadata/get', this.video)
......
......@@ -151,11 +151,6 @@
isMobile: 'globalSettings/getIsMobile'
})
},
watch: {
refIndex () {
// console.log(this.refMedia[this.refIndex])
}
},
methods: {
handlerRefMediaTitle () {
if (this.$q.platform.is.mobile) {
......@@ -249,7 +244,7 @@
}
await this.$store.dispatch('annotations/patch', [_this.media._uuid, update])
.then(() => {
// console.log(
// console.debug(
// 'sync updated',
// _this.refVidMarkerSelector.toMillis(),
// _this.vidMarkerSelector.toMillis(),
......
......@@ -94,7 +94,6 @@
await this.createAnnotation(payload)
},
async onAnnotation (annotation) {
console.debug('received annotation...', annotation)
if (annotation) await this.createAnnotation(annotation)
},
async createAnnotation (annotation = {}) {
......
......@@ -71,7 +71,7 @@
// Object.assign(v.meta, meta.data)
// mediaMeta.push(v)
// }
// catch (e) { console.log(e) }
// catch (e) { console.error(e) }
// }
// return mediaMeta
// }
......@@ -187,10 +187,10 @@
if (video) session.media.push(video)
}
// console.log(sessions.length, session.annotations.length, session.media.length)
// console.debug(sessions.length, session.annotations.length, session.media.length)
}
this.grouped = {sessions, media}
// console.log(annotations, this.grouped)
// console.debug(annotations, this.grouped)
*/
},
methods: {
......@@ -215,7 +215,6 @@
let lastRef, session
for (let annotation of annotations) {
const ref = annotation.target.selector._valueMillis
if (lastRef) console.debug('dist', ref - lastRef, maxDist)
if (!lastRef || ref - lastRef >= maxDist) {
session = storeSession(sessions, session)
session.start = annotation.target.selector._valueMillis
......@@ -244,7 +243,6 @@
lastRef = ref
}
storeSession(sessions, session)
console.debug('generated session data', sessions)
return sessions
},
selectSession (data) {
......
......@@ -107,7 +107,6 @@
children.push({label: '', header: 'add'})
this.trees.push([{newChild: '', _uuid: this.vocabularies[i]._uuid, label: this.vocabularies[i].title, children: children}])
}
// console.log(this.trees)
},
methods: {
addTerm (val, i) {
......@@ -129,16 +128,14 @@
this.newVocabulary = ''
},
defineShortcut (val, i) {
console.log(val, i)
console.debug('defineShortcut', val, i)
},
editTerm (val, i) {
console.log(val, i, this.editTermNewValue)
console.debug('editTerm', val, i, this.editTermNewValue)
let target = this.trees[i][0].children
let editIndex = target.map(function (item) { return item.id }).indexOf(val)
// console.log(editIndex, target[editIndex])
target[editIndex].label = this.editTermNewValue
target[editIndex].shortcut = this.editTermShortcut
console.log(target[editIndex])
this.editTermId = ''
this.editTermNewValue = ''
this.editTermShortcut = ''
......@@ -150,13 +147,12 @@
.toUpperCase()
},
handlerDelete (val) {
console.log(val)
this.cancelButton()
this.deleteTermId = val.id
},
handlerEdit (val, focus) {
// let targetFocus = 'input' + focus
console.log(val, focus)
console.debug('handlerEdit', val, focus)
this.cancelButton()
this.editTermId = val.id
this.editTermNewValue = val.label
......
export default ({ Vue }) => {
Vue.directive('intersection-observer', {
// bind: function (el) {
bind: function (el, binding, vnode) {
console.log('binding', binding.expression)
console.debug('intersection-observer: binding', binding.expression)
const options = {
// root: null,
threshold: '0'
......@@ -16,19 +15,12 @@ export default ({ Vue }) => {
el.dataset.left = 'xxx'
// vnode.context.$emit('onIntersectionChanged')
vnode.context.$emit('onIntersectionChanged')
console.log(vnode)
console.log(binding.expression)
console.log('=======')
// console.log(entry)
// console.log(el.dataset)
// console.log('########')
console.debug('intersection-observer', vnode)
console.debug('intersection-observer', binding.expression)
console.debug('intersection-observer', '=======')
}
else {
el.dataset.left = entry.boundingClientRect.left
// console.log(entry)
// console.log(el.dataset)
// console.log('--------')
}
})
}
......
......@@ -73,7 +73,7 @@ const metadata = {
// }
// }
//
// console.log('annotation', payload, annotation)
// console.debug('annotation', payload, annotation)
//
// const metadata = await getMetaData(annotation, async query => {
// const results = await context.dispatch('annotations/find', query, { root: true })
......@@ -85,7 +85,7 @@ const metadata = {
// ffprobePath: getGlobal('FFPROBE_PATH')
// })
//
// console.log('metadata', metadata)
// console.debug('metadata', metadata)
//
// const titleQuery = {
// 'target.id': typeof payload === 'string' ? `${BASE_URI}/annotations/${payload}` : annotation.id,
......@@ -98,7 +98,7 @@ const metadata = {
// if (metadata.title) metadata.originalTitle = metadata.title
// metadata.title = titleResult.items[0].body.value
// }
// console.log('final md', metadata)
// console.debug('final md', metadata)
// return metadata
// },
async getLocal (context, payload) {
......@@ -121,7 +121,6 @@ const metadata = {
if (metadata.title) metadata.originalTitle = metadata.title
metadata.title = titleResult.items[0].body.value
}
console.debug('metadata', metadata)
return metadata
}
}
......
......@@ -36,7 +36,6 @@ const metadata = {
)
})
if (result) {
console.log('result', result)
metadata = result
context.commit('setCache', [payload.body.source.id, metadata])
}
......
......@@ -58,13 +58,13 @@ const tags = {
value: tag
}
}, {root: true})
console.debug('added tag', tag)
console.debug('Tags: set', tag)
}
}
for (let tag of originalTags) {
if (tags.indexOf(tag.body.value) === -1) {
await context.dispatch('annotations/delete', tag._uuid, {root: true})
console.debug('removed tag', tag.body.value)
console.debug('Tags: remove', tag.body.value)
}
}
......
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