Removed raven on front-end
This commit is contained in:
parent
5321cb4c46
commit
95e087b342
|
@ -58,15 +58,6 @@ class RavenDSN(types.StringPreference):
|
||||||
field_kwargs = {"required": False}
|
field_kwargs = {"required": False}
|
||||||
|
|
||||||
|
|
||||||
@global_preferences_registry.register
|
|
||||||
class RavenEnabled(types.BooleanPreference):
|
|
||||||
show_in_api = True
|
|
||||||
section = raven
|
|
||||||
name = "front_enabled"
|
|
||||||
default = False
|
|
||||||
verbose_name = "Report front-end errors with Raven"
|
|
||||||
|
|
||||||
|
|
||||||
@global_preferences_registry.register
|
@global_preferences_registry.register
|
||||||
class InstanceNodeinfoEnabled(types.BooleanPreference):
|
class InstanceNodeinfoEnabled(types.BooleanPreference):
|
||||||
show_in_api = False
|
show_in_api = False
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
"lodash": "^4.17.10",
|
"lodash": "^4.17.10",
|
||||||
"masonry-layout": "^4.2.2",
|
"masonry-layout": "^4.2.2",
|
||||||
"moment": "^2.22.2",
|
"moment": "^2.22.2",
|
||||||
"raven-js": "^3.26.4",
|
|
||||||
"semantic-ui-css": "^2.4.1",
|
"semantic-ui-css": "^2.4.1",
|
||||||
"showdown": "^1.8.6",
|
"showdown": "^1.8.6",
|
||||||
"vue": "^2.5.17",
|
"vue": "^2.5.17",
|
||||||
|
|
|
@ -43,10 +43,6 @@
|
||||||
:version="version"
|
:version="version"
|
||||||
@show:shortcuts-modal="showShortcutsModal = !showShortcutsModal"
|
@show:shortcuts-modal="showShortcutsModal = !showShortcutsModal"
|
||||||
></app-footer>
|
></app-footer>
|
||||||
<raven
|
|
||||||
v-if="$store.state.instance.settings.raven.front_enabled.value"
|
|
||||||
:dsn="$store.state.instance.settings.raven.front_dsn.value"
|
|
||||||
></raven>
|
|
||||||
<playlist-modal v-if="$store.state.auth.authenticated"></playlist-modal>
|
<playlist-modal v-if="$store.state.auth.authenticated"></playlist-modal>
|
||||||
<shortcuts-modal @update:show="showShortcutsModal = $event" :show="showShortcutsModal"></shortcuts-modal>
|
<shortcuts-modal @update:show="showShortcutsModal = $event" :show="showShortcutsModal"></shortcuts-modal>
|
||||||
<GlobalEvents @keydown.h.exact="showShortcutsModal = !showShortcutsModal"/>
|
<GlobalEvents @keydown.h.exact="showShortcutsModal = !showShortcutsModal"/>
|
||||||
|
@ -63,7 +59,6 @@ import GlobalEvents from '@/components/utils/global-events'
|
||||||
|
|
||||||
import Sidebar from '@/components/Sidebar'
|
import Sidebar from '@/components/Sidebar'
|
||||||
import AppFooter from '@/components/Footer'
|
import AppFooter from '@/components/Footer'
|
||||||
import Raven from '@/components/Raven'
|
|
||||||
import ServiceMessages from '@/components/ServiceMessages'
|
import ServiceMessages from '@/components/ServiceMessages'
|
||||||
|
|
||||||
import locales from './locales'
|
import locales from './locales'
|
||||||
|
@ -75,7 +70,6 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
Sidebar,
|
Sidebar,
|
||||||
AppFooter,
|
AppFooter,
|
||||||
Raven,
|
|
||||||
PlaylistModal,
|
PlaylistModal,
|
||||||
ShortcutsModal,
|
ShortcutsModal,
|
||||||
GlobalEvents,
|
GlobalEvents,
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="raven"></div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import Raven from 'raven-js'
|
|
||||||
import RavenVue from 'raven-js/plugins/vue'
|
|
||||||
import Vue from 'vue'
|
|
||||||
import logger from '@/logging'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props: ['dsn'],
|
|
||||||
created () {
|
|
||||||
Raven.uninstall()
|
|
||||||
this.setUp()
|
|
||||||
},
|
|
||||||
destroyed () {
|
|
||||||
Raven.uninstall()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
setUp () {
|
|
||||||
Raven.uninstall()
|
|
||||||
logger.default.info('Installing raven...')
|
|
||||||
Raven.config(this.dsn).addPlugin(RavenVue, Vue).install()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
dsn: function () {
|
|
||||||
this.setUp()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
||||||
<style scoped >
|
|
||||||
.raven {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -40,14 +40,6 @@ export default {
|
||||||
enabled: {
|
enabled: {
|
||||||
value: true
|
value: true
|
||||||
}
|
}
|
||||||
},
|
|
||||||
raven: {
|
|
||||||
front_enabled: {
|
|
||||||
value: false
|
|
||||||
},
|
|
||||||
front_dsn: {
|
|
||||||
value: null
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -142,11 +142,6 @@ export default {
|
||||||
"instance__nodeinfo_stats_enabled",
|
"instance__nodeinfo_stats_enabled",
|
||||||
"instance__nodeinfo_private"
|
"instance__nodeinfo_private"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
label: errorLabel,
|
|
||||||
id: "reporting",
|
|
||||||
settings: ["raven__front_enabled", "raven__front_dsn"]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,11 @@ describe('store/instance', () => {
|
||||||
|
|
||||||
describe('mutations', () => {
|
describe('mutations', () => {
|
||||||
it('settings', () => {
|
it('settings', () => {
|
||||||
const state = {settings: {raven: {front_dsn: {value: 'test'}}}}
|
const state = {settings: {users: {upload_quota: {value: 1}}}}
|
||||||
let settings = {raven: {front_enabled: {value: true}}}
|
let settings = {users: {registration_enabled: {value: true}}}
|
||||||
store.mutations.settings(state, settings)
|
store.mutations.settings(state, settings)
|
||||||
expect(state.settings).to.deep.equal({
|
expect(state.settings).to.deep.equal({
|
||||||
raven: {front_dsn: {value: 'test'}, front_enabled: {value: true}}
|
users: {upload_quota: {value: 1}, registration_enabled: {value: true}}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -32,13 +32,13 @@ describe('store/instance', () => {
|
||||||
status: 200,
|
status: 200,
|
||||||
response: [
|
response: [
|
||||||
{
|
{
|
||||||
section: 'raven',
|
section: 'users',
|
||||||
name: 'front_dsn',
|
name: 'upload_quota',
|
||||||
value: 'test'
|
value: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'raven',
|
section: 'users',
|
||||||
name: 'front_enabled',
|
name: 'registration_enabled',
|
||||||
value: false
|
value: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -50,15 +50,15 @@ describe('store/instance', () => {
|
||||||
{
|
{
|
||||||
type: 'settings',
|
type: 'settings',
|
||||||
payload: {
|
payload: {
|
||||||
raven: {
|
users: {
|
||||||
front_dsn: {
|
upload_quota: {
|
||||||
section: 'raven',
|
section: 'users',
|
||||||
name: 'front_dsn',
|
name: 'upload_quota',
|
||||||
value: 'test'
|
value: 1
|
||||||
},
|
},
|
||||||
front_enabled: {
|
registration_enabled: {
|
||||||
section: 'raven',
|
section: 'users',
|
||||||
name: 'front_enabled',
|
name: 'registration_enabled',
|
||||||
value: false
|
value: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue