-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the neptune ui to have the sentry code
- Loading branch information
1 parent
e39b227
commit 77dcec0
Showing
3 changed files
with
12,705 additions
and
12,079 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,73 +11,87 @@ | |
// | ||
// * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
import Vue from 'vue' | ||
import App from './App.vue' | ||
import router from './router' | ||
import store from './store' | ||
import './plugins/base' | ||
import './plugins/chartist' | ||
import './plugins/vee-validate' | ||
import './plugins/vue-world-map' | ||
import vuetify from './plugins/vuetify' | ||
import i18n from './i18n' | ||
import VueSocketIO from 'vue-socket.io' | ||
import Vue from "vue"; | ||
import App from "./App.vue"; | ||
import router from "./router"; | ||
import store from "./store"; | ||
import "./plugins/base"; | ||
import "./plugins/chartist"; | ||
import "./plugins/vee-validate"; | ||
import "./plugins/vue-world-map"; | ||
import vuetify from "./plugins/vuetify"; | ||
import i18n from "./i18n"; | ||
import VueSocketIO from "vue-socket.io"; | ||
|
||
Vue.config.productionTip = false | ||
import * as Sentry from "@sentry/vue"; | ||
import { Integrations } from "@sentry/tracing"; | ||
|
||
Vue.use(new VueSocketIO({ | ||
debug: true, | ||
connection: "http://" + window.location.hostname + ':3000', | ||
// vuex: { | ||
// store, | ||
// actionPrefix: 'SOCKET_', | ||
// mutationPrefix: 'SOCKET_' | ||
// }, | ||
// options: { path: "/my-app/" } //Optional options | ||
})) | ||
Sentry.init({ | ||
Vue, | ||
dsn: | ||
"https://[email protected]/5633457", | ||
integrations: [new Integrations.BrowserTracing()], | ||
logErrors: true, | ||
// We recommend adjusting this value in production, or using tracesSampler | ||
// for finer control | ||
tracesSampleRate: 1.0 | ||
}); | ||
|
||
Vue.config.productionTip = false; | ||
|
||
Vue.use( | ||
new VueSocketIO({ | ||
debug: true, | ||
connection: "http://" + window.location.hostname + ":3000" | ||
// vuex: { | ||
// store, | ||
// actionPrefix: 'SOCKET_', | ||
// mutationPrefix: 'SOCKET_' | ||
// }, | ||
// options: { path: "/my-app/" } //Optional options | ||
}) | ||
); | ||
|
||
router.beforeEach((to, from, next) => { | ||
const authRequired = to.matched.some((route) => route.meta.requiresAuth) | ||
const loggedin = store.getters.isLoggedIn | ||
console.log("To:", to.path, "loggedin:",loggedin, "AuthReq:", authRequired) | ||
const authRequired = to.matched.some(route => route.meta.requiresAuth); | ||
const loggedin = store.getters.isLoggedIn; | ||
console.log("To:", to.path, "loggedin:", loggedin, "AuthReq:", authRequired); | ||
|
||
if (loggedin && to.path == ''){ | ||
console.log('Case -1') | ||
next('/dashboard') | ||
if (loggedin && to.path == "") { | ||
console.log("Case -1"); | ||
next("/dashboard"); | ||
} | ||
|
||
if (loggedin && authRequired) { | ||
console.log("Case 0") | ||
next() | ||
console.log("Case 0"); | ||
next(); | ||
} | ||
|
||
if (!loggedin && !authRequired) { | ||
console.log("Case 1") | ||
console.log("Case 1"); | ||
// if (to.path !== '/login') { | ||
// console.log("Case 2") | ||
// next('/login') | ||
// } else { | ||
// console.log("Case 3") | ||
next() | ||
// console.log("Case 3") | ||
next(); | ||
// } | ||
} else if (!loggedin && authRequired) { | ||
if (to.path !== '/login') { | ||
console.log("Case 4") | ||
next('/login') | ||
} else { | ||
console.log("Case 5") | ||
next() | ||
} | ||
} else if (!loggedin && authRequired) { | ||
if (to.path !== "/login") { | ||
console.log("Case 4"); | ||
next("/login"); | ||
} else { | ||
console.log("Case 5"); | ||
next(); | ||
} | ||
} | ||
next() | ||
}) | ||
next(); | ||
}); | ||
|
||
new Vue({ | ||
router, | ||
store, | ||
vuetify, | ||
i18n, | ||
render: h => h(App), | ||
}).$mount('#app') | ||
|
||
|
||
render: h => h(App) | ||
}).$mount("#app"); |
Oops, something went wrong.