diff --git a/frontend/src/api.js b/frontend/src/api.js index 06286a5..c485fcc 100644 --- a/frontend/src/api.js +++ b/frontend/src/api.js @@ -40,9 +40,9 @@ export const getEvent = (options) => { }) } -export const getChannelNames = () => { +export const getDefaultChannelNames = () => { return axios({ - url: '/api/channel' + url: '/api/channel/default' }) } @@ -54,14 +54,15 @@ export const saveImage = (id, imageData) => { }) } -export const createIssue = (templateInfo, issue, attachments) => { +export const createIssue = (templateInfo, issue, attachments, snapshots) => { return axios({ url: API_PREFIX + '/issue', method: 'POST', data: { template: templateInfo, issue, - attachments + attachments, + snapshots } }) } diff --git a/frontend/src/components/event/ChannelColumn.vue b/frontend/src/components/event/ChannelColumn.vue index f8467f2..8251667 100644 --- a/frontend/src/components/event/ChannelColumn.vue +++ b/frontend/src/components/event/ChannelColumn.vue @@ -24,6 +24,8 @@ export default { return '#0fccbf' } else if (this.channel === 'notice') { return '#ff9900' + } else if (this.channel === 'snapshot') { + return '#52A7F9' } else { return '#808695' } diff --git a/frontend/src/components/event/EventInspector.vue b/frontend/src/components/event/EventInspector.vue index 9c7a524..997ba76 100644 --- a/frontend/src/components/event/EventInspector.vue +++ b/frontend/src/components/event/EventInspector.vue @@ -172,6 +172,9 @@ export default { message: eventObj.message }) } + if (eventObj.snapshot) { + this.$bus.$emit('addSnapshot', eventObj) + } if (eventObj.attachments) { this.$bus.$emit('addAttachments', eventObj.attachments) } diff --git a/frontend/src/components/form/AttachmentItem.vue b/frontend/src/components/form/AttachmentItem.vue index ebcb94d..7b15349 100644 --- a/frontend/src/components/form/AttachmentItem.vue +++ b/frontend/src/components/form/AttachmentItem.vue @@ -1,7 +1,7 @@