removed some eslint file changes

pull/1097/head
smit95tpatel 2021-12-17 14:11:37 +05:30
parent 1aee4294c1
commit 9ebb8e717d
5 changed files with 337 additions and 510 deletions

1
.gitignore vendored
View File

@ -42,3 +42,4 @@ tmp
services.yml services.yml
statping.wiki statping.wiki
assets/ assets/
.vscode

View File

@ -1,56 +1,53 @@
<template> <template>
<div id="app"> <div id="app">
<router-view /> <router-view/>
<Footer v-if="$route.path !== '/setup'" /> <Footer v-if="$route.path !== '/setup'"/>
</div> </div>
</template> </template>
<script> <script>
const Footer = () => import(/* webpackChunkName: "index" */ './components/Index/Footer'); const Footer = () => import(/* webpackChunkName: "index" */ "./components/Index/Footer");
export default {
export default { name: 'app',
name: 'App',
components: { components: {
Footer Footer
}, },
data () { data() {
return { return {
loaded: false, loaded: false,
version: '', version: "",
}; }
}, },
computed: { computed: {
core () { core() {
return this.$store.getters.core; return this.$store.getters.core
} }
}, },
async beforeMount () { async beforeMount() {
await this.$store.dispatch('loadCore'); await this.$store.dispatch('loadCore')
this.$i18n.locale = this.core.language || "en";
this.$i18n.locale = this.core.language || 'en'; // this.$i18n.locale = "ru";
// this.$i18n.locale = "ru"; if (!this.core.setup) {
this.$router.push('/setup')
if (!this.core.setup) { }
this.$router.push('/setup'); if (this.$route.path !== '/setup') {
} if (this.$store.state.admin) {
if (this.$route.path !== '/setup') { await this.$store.dispatch('loadAdmin')
if (this.$store.state.admin) { } else {
await this.$store.dispatch('loadAdmin'); await this.$store.dispatch('loadRequired')
} else {
await this.$store.dispatch('loadRequired');
}
this.loaded = true;
} }
this.loaded = true
}
}, },
async mounted () { async mounted() {
if (this.$route.path !== '/setup') { if (this.$route.path !== '/setup') {
if (this.$store.state.admin) { if (this.$store.state.admin) {
this.logged_in = true; this.logged_in = true
// await this.$store.dispatch('loadAdmin') // await this.$store.dispatch('loadAdmin')
}
} }
}
} }
}; }
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -1,300 +1,198 @@
<template> <template>
<div> <div>
<div v-if="servicesList.length === 0"> <div v-if="servicesList.length === 0">
<div class="alert alert-dark d-block mt-3 mb-0"> <div class="alert alert-dark d-block mt-3 mb-0">
You currently don't have any services! You currently don't have any services!
</div> </div>
</div> </div>
<table <table v-else class="table">
v-else <thead>
class="table"
>
<thead>
<tr> <tr>
<th scope="col"> <th scope="col">{{$t('name')}}</th>
{{ $t('name') }} <th scope="col" class="d-none d-md-table-cell">{{$t('status')}}</th>
</th> <th scope="col" class="d-none d-md-table-cell">{{$t('visibility')}}</th>
<th <th scope="col" class="d-none d-md-table-cell">{{ $t('group') }}</th>
scope="col" <th scope="col" class="d-none d-md-table-cell" style="width: 130px">
class="d-none d-md-table-cell" {{$t('failures')}}
> <div class="btn-group float-right" role="group">
{{ $t('status') }} <a @click="list_timeframe='3h'" type="button" class="small" :class="{'text-success': list_timeframe==='3h', 'text-muted': list_timeframe!=='3h'}">3h</a>
</th> <a @click="list_timeframe='12h'" type="button" class="small" :class="{'text-success': list_timeframe==='12h', 'text-muted': list_timeframe!=='12h'}">12h</a>
<th <a @click="list_timeframe='24h'" type="button" class="small" :class="{'text-success': list_timeframe==='24h', 'text-muted': list_timeframe!=='24h'}">24h</a>
scope="col" <a @click="list_timeframe='7d'" type="button" class="small" :class="{'text-success': list_timeframe==='7d', 'text-muted': list_timeframe!=='7d'}">7d</a>
class="d-none d-md-table-cell" </div>
> </th>
{{ $t('visibility') }} <th scope="col"></th>
</th>
<th
scope="col"
class="d-none d-md-table-cell"
>
{{ $t('group') }}
</th>
<th
scope="col"
class="d-none d-md-table-cell"
style="width: 130px"
>
{{ $t('failures') }}
<div
class="btn-group float-right"
role="group"
>
<a
type="button"
class="small"
:class="{'text-success': list_timeframe==='3h', 'text-muted': list_timeframe!=='3h'}"
@click="list_timeframe='3h'"
>
3h
</a>
<a
type="button"
class="small"
:class="{'text-success': list_timeframe==='12h', 'text-muted': list_timeframe!=='12h'}"
@click="list_timeframe='12h'"
>
12h
</a>
<a
type="button"
class="small"
:class="{'text-success': list_timeframe==='24h', 'text-muted': list_timeframe!=='24h'}"
@click="list_timeframe='24h'"
>
24h
</a>
<a
type="button"
class="small"
:class="{'text-success': list_timeframe==='7d', 'text-muted': list_timeframe!=='7d'}"
@click="list_timeframe='7d'"
>
7d
</a>
</div>
</th>
<th scope="col" />
</tr> </tr>
</thead> </thead>
<Draggable <draggable id="services_list" tag="tbody" v-model="servicesList" handle=".drag_icon">
id="services_list" <tr v-for="(service, index) in servicesList" :key="service.id">
v-model="servicesList" <td>
tag="tbody" <span v-if="$store.state.admin" class="drag_icon d-none d-md-inline">
handle=".drag_icon" <font-awesome-icon icon="bars" class="mr-3"/>
> </span> {{service.name}}
<tr </td>
v-for="(service, index) in servicesList" <td class="d-none d-md-table-cell">
:key="service.id" <span class="badge text-uppercase" :class="{'badge-success': service.online, 'badge-danger': !service.online}">
> {{service.online ? $t('online') : $t('offline')}}
<td> </span>
<span </td>
v-if="$store.state.admin" <td class="d-none d-md-table-cell">
class="drag_icon d-none d-md-inline" <span class="badge text-uppercase" :class="{'badge-primary': service.public, 'badge-secondary': !service.public}">
> {{service.public ? $t('public') : $t('private')}}
<FontAwesomeIcon </span>
icon="bars" </td>
class="mr-3" <td class="d-none d-md-table-cell">
/> <div v-if="service.group_id !== 0">
</span> {{ service.name }} <span class="badge badge-secondary">{{serviceGroup(service)}}</span>
</td> </div>
<td class="d-none d-md-table-cell"> </td>
<span <td class="d-none d-md-table-cell">
class="badge text-uppercase" <ServiceSparkList :service="service" :timeframe="list_timeframe"/>
:class="{'badge-success': service.online, 'badge-danger': !service.online}" </td>
> <td class="text-right">
{{ service.online ? $t('online') : $t('offline') }} <div class="btn-group">
</span> <button :disabled="loading" v-if="$store.state.admin" @click.prevent="goto({path: `/dashboard/edit_service/${service.id}`, params: {service: service} })" class="btn btn-sm btn-outline-secondary">
</td> <font-awesome-icon icon="edit" />
<td class="d-none d-md-table-cell"> </button>
<span <button :disabled="loading" @click.prevent="goto({path: serviceLink(service), params: {service: service} })" class="btn btn-sm btn-outline-secondary">
class="badge text-uppercase" <font-awesome-icon icon="chart-area" />
:class="{'badge-primary': service.public, 'badge-secondary': !service.public}" </button>
> <button :disabled="loading" v-if="$store.state.admin" @click.prevent="deleteService(service)" class="btn btn-sm btn-danger">
{{ service.public ? $t('public') : $t('private') }} <font-awesome-icon v-if="!loading" icon="times" />
</span> <font-awesome-icon v-if="loading" icon="circle-notch" spin/>
</td> </button>
<td class="d-none d-md-table-cell"> </div>
<div v-if="service.group_id !== 0"> </td>
<span class="badge badge-secondary"> </tr>
{{ serviceGroup(service) }} </draggable>
</span>
</div>
</td>
<td class="d-none d-md-table-cell">
<ServiceSparkList
:service="service"
:timeframe="list_timeframe"
/>
</td>
<td class="text-right">
<div class="btn-group">
<button
v-if="$store.state.admin"
:disabled="loading"
class="btn btn-sm btn-outline-secondary"
@click.prevent="goto({path: `/dashboard/edit_service/${service.id}`, params: {service: service} })"
>
<FontAwesomeIcon icon="edit" />
</button>
<button
:disabled="loading"
class="btn btn-sm btn-outline-secondary"
@click.prevent="goto({path: serviceLink(service), params: {service: service} })"
>
<FontAwesomeIcon icon="chart-area" />
</button>
<button
v-if="$store.state.admin"
:disabled="loading"
class="btn btn-sm btn-danger"
@click.prevent="deleteService(service)"
>
<FontAwesomeIcon
v-if="!loading"
icon="times"
/>
<FontAwesomeIcon
v-if="loading"
icon="circle-notch"
spin
/>
</button>
</div>
</td>
</tr>
</Draggable>
</table> </table>
</div> </div>
</template> </template>
<script> <script>
import Api from '../../API'; import Api from "../../API";
import ServiceSparkList from '@/components/Service/ServiceSparkList'; import ServiceSparkList from "@/components/Service/ServiceSparkList";
import Modal from '@/components/Elements/Modal'; import Modal from "@/components/Elements/Modal";
const Draggable = () => import(/* webpackChunkName: "dashboard" */ 'vuedraggable'); const draggable = () => import(/* webpackChunkName: "dashboard" */ 'vuedraggable')
const ToggleSwitch = () => import(/* webpackChunkName: "dashboard" */ '../../forms/ToggleSwitch'); const ToggleSwitch = () => import(/* webpackChunkName: "dashboard" */ '../../forms/ToggleSwitch');
export default { export default {
name: 'ServicesList', name: 'ServicesList',
components: { components: {
Modal, Modal,
ServiceSparkList, ServiceSparkList,
ToggleSwitch, ToggleSwitch,
Draggable draggable
}, },
data () { data() {
return { return {
loading: false, loading: false,
list_timeframe: '12h', list_timeframe: "12h",
chartOpts: { chartOpts: {
chart: { chart: {
type: 'bar', type: 'bar',
height: 50, height: 50,
sparkline: { sparkline: {
enabled: true enabled: true
}, },
},
xaxis: {
type: 'numeric',
},
showPoint: false,
fullWidth:true,
chartPadding: {top: 0,right: 0,bottom: 0,left: 0},
stroke: {
curve: 'straight'
},
fill: {
opacity: 0.8,
},
yaxis: {
min: 0
},
plotOptions: {
bar: {
colors: {
ranges: [{
from: 0,
to: 1,
color: '#39c10a'
}, {
from: 2,
to: 90,
color: '#e01a1a'
}]
}, },
xaxis: { },
type: 'numeric', },
}, tooltip: {
showPoint: false, theme: false,
fullWidth:true, enabled: false,
chartPadding: { top: 0,right: 0,bottom: 0,left: 0 }, },
stroke: { title: {
curve: 'straight' enabled: false,
}, },
fill: { subtitle: {
opacity: 0.8, enabled: false,
},
yaxis: {
min: 0
},
plotOptions: {
bar: {
colors: {
ranges: [ {
from: 0,
to: 1,
color: '#39c10a'
}, {
from: 2,
to: 90,
color: '#e01a1a'
} ]
},
},
},
tooltip: {
theme: false,
enabled: false,
},
title: {
enabled: false,
},
subtitle: {
enabled: false,
}
} }
}; }
}, }
},
computed: { computed: {
servicesList: { servicesList: {
get () { get () {
return this.$store.getters.servicesInOrder; return this.$store.getters.servicesInOrder
}, },
set (value) { set (value) {
this.updateOrder(value); this.updateOrder(value)
} }
} }
}, },
methods: { methods: {
goto (to) { goto(to) {
this.$router.push(to); this.$router.push(to)
}, },
async updateOrder (value) { async updateOrder(value) {
const data = []; let data = [];
value.forEach((s, k) => { value.forEach((s, k) => {
data.push({ service: s.id, order: k + 1 }); data.push({ service: s.id, order: k + 1 })
}); });
await Api.services_reorder(data); await Api.services_reorder(data)
await this.update(); await this.update()
},
tester(s) {
console.log(s)
}, },
tester (s) { async delete(s) {
console.log(s); this.loading = true
await Api.service_delete(s.id)
await this.update()
this.loading = false
}, },
async delete (s) { async deleteService(s) {
this.loading = true;
await Api.service_delete(s.id);
await this.update();
this.loading = false;
},
async deleteService (s) {
const modal = { const modal = {
visible: true, visible: true,
title: 'Delete Service', title: "Delete Service",
body: `Are you sure you want to delete service ${s.name}? This will also delete all failures, checkins, and incidents for this service.`, body: `Are you sure you want to delete service ${s.name}? This will also delete all failures, checkins, and incidents for this service.`,
btnColor: 'btn-danger', btnColor: "btn-danger",
btnText: 'Delete Service', btnText: "Delete Service",
func: () => this.delete(s), func: () => this.delete(s),
};
this.$store.commit('setModal', modal);
},
serviceGroup (s) {
const group = this.$store.getters.groupById(s.group_id);
if (group) {
return group.name;
} }
return ''; this.$store.commit("setModal", modal)
}, },
async update () { serviceGroup(s) {
const services = await Api.services(); let group = this.$store.getters.groupById(s.group_id)
this.$store.commit('setServices', services); if (group) {
} return group.name
} }
}; return ""
},
async update() {
const services = await Api.services()
this.$store.commit('setServices', services)
}
}
}
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->

View File

@ -1,196 +1,127 @@
<template> <template>
<div> <div>
<form <form @submit.prevent="login" autocomplete="on">
autocomplete="on" <div class="form-group row">
@submit.prevent="login" <label for="username" class="col-4 col-form-label">{{$t('username')}}</label>
> <div class="col-8">
<div class="form-group row"> <input @keyup="checkForm" @change="checkForm" type="text" v-model="username" autocomplete="username" name="username" class="form-control" id="username" placeholder="admin" autocorrect="off" autocapitalize="none">
<label </div>
for="username"
class="col-4 col-form-label"
>
{{ $t('username') }}
</label>
<div class="col-8">
<input
id="username"
v-model="username"
type="text"
autocomplete="username"
name="username"
class="form-control"
placeholder="admin"
autocorrect="off"
autocapitalize="none"
@keyup="checkForm"
@change="checkForm"
>
</div> </div>
</div> <div class="form-group row">
<div class="form-group row"> <label for="password" class="col-4 col-form-label">{{$t('password')}}</label>
<label <div class="col-8">
for="password" <input @keyup="checkForm" @change="checkForm" type="password" v-model="password" autocomplete="current-password" name="password" class="form-control" id="password" placeholder="************">
class="col-4 col-form-label" </div>
>
{{ $t('password') }}
</label>
<div class="col-8">
<input
id="password"
v-model="password"
type="password"
autocomplete="current-password"
name="password"
class="form-control"
placeholder="************"
@keyup="checkForm"
@change="checkForm"
>
</div> </div>
</div> <div class="form-group row">
<div class="form-group row"> <div class="col-sm-12">
<div class="col-sm-12"> <div v-if="error" class="alert alert-danger" role="alert">
<div {{$t('wrong_login')}}
v-if="error" </div>
class="alert alert-danger" <button @click.prevent="login" type="submit" class="btn btn-block btn-primary" :disabled="disabled || loading">
role="alert" <font-awesome-icon v-if="loading" icon="circle-notch" class="mr-2" spin/>{{loading ? $t('loading') : $t('sign_in')}}
> </button>
{{ $t('wrong_login') }} </div>
</div>
<button
type="submit"
class="btn btn-block btn-primary"
:disabled="disabled || loading"
@click.prevent="login"
>
<FontAwesomeIcon
v-if="loading"
icon="circle-notch"
class="mr-2"
spin
/>{{ loading ? $t('loading') : $t('sign_in') }}
</button>
</div> </div>
</div>
</form> </form>
<a <a v-if="oauth && oauth.gh_client_id" @click.prevent="GHlogin" href="#" class="mt-4 btn btn-block btn-outline-dark">
v-if="oauth && oauth.gh_client_id" <font-awesome-icon :icon="['fab', 'github']" /> Login with Github
href="#" </a>
class="mt-4 btn btn-block btn-outline-dark"
@click.prevent="GHlogin"
>
<FontAwesomeIcon :icon="['fab', 'github']" /> Login with Github
</a>
<a <a v-if="oauth && oauth.slack_client_id" @click.prevent="Slacklogin" href="#" class="btn btn-block btn-outline-dark">
v-if="oauth && oauth.slack_client_id" <font-awesome-icon :icon="['fab', 'slack']" /> Login with Slack
href="#" </a>
class="btn btn-block btn-outline-dark"
@click.prevent="Slacklogin"
>
<FontAwesomeIcon :icon="['fab', 'slack']" /> Login with Slack
</a>
<a <a v-if="oauth && oauth.google_client_id" @click.prevent="Googlelogin" href="#" class="btn btn-block btn-outline-dark">
v-if="oauth && oauth.google_client_id" <font-awesome-icon :icon="['fab', 'google']" /> Login with Google
href="#" </a>
class="btn btn-block btn-outline-dark"
@click.prevent="Googlelogin"
>
<FontAwesomeIcon :icon="['fab', 'google']" /> Login with Google
</a>
<a <a v-if="oauth && oauth.custom_client_id" @click.prevent="Customlogin" href="#" class="btn btn-block btn-outline-dark">
v-if="oauth && oauth.custom_client_id" <font-awesome-icon :icon="['fas', 'address-card']" /> Login with {{oauth.custom_name}}
href="#" </a>
class="btn btn-block btn-outline-dark"
@click.prevent="Customlogin" </div>
>
<FontAwesomeIcon :icon="['fas', 'address-card']" /> Login with {{ oauth.custom_name }}
</a>
</div>
</template> </template>
<script> <script>
import Api from '../API'; import Api from "../API";
export default {
export default { name: 'FormLogin',
name: 'FormLogin', computed: {
data () { core() {
return { return this.$store.getters.core
username: '', },
password: '', oauth() {
return this.$store.getters.oauth
}
},
data() {
return {
username: "",
password: "",
auth: {}, auth: {},
loading: false, loading: false,
error: false, error: false,
disabled: true, disabled: true,
google_scope: 'https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email', google_scope: "https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email",
slack_scope: 'identity.email,identity.basic' slack_scope: "identity.email,identity.basic"
}; }
}, },
computed: { mounted() {
core () { this.$cookies.remove("statping_auth")
return this.$store.getters.core;
},
oauth () {
return this.$store.getters.oauth;
}
},
mounted () {
this.$cookies.remove('statping_auth');
}, },
methods: { methods: {
checkForm () { checkForm() {
if (!this.username || !this.password) { if (!this.username || !this.password) {
this.disabled = true; this.disabled = true
} else { } else {
this.disabled = false; this.disabled = false
} }
}, },
async login () { async login() {
this.loading = true; this.loading = true
this.error = false; this.error = false
const auth = await Api.login(this.username, this.password); const auth = await Api.login(this.username, this.password)
if (auth.error) { if (auth.error) {
this.error = true; this.error = true
} else if (auth.token) { } else if (auth.token) {
this.$cookies.set('statping_auth', auth.token); this.$cookies.set("statping_auth", auth.token)
await this.$store.dispatch('loadAdmin'); await this.$store.dispatch('loadAdmin')
this.$store.commit('setAdmin', auth.admin); this.$store.commit('setAdmin', auth.admin)
this.$store.commit('setLoggedIn', true); this.$store.commit('setLoggedIn', true)
this.$router.push('/dashboard'); this.$router.push('/dashboard')
} }
this.loading = false; this.loading = false
}, },
encode (val) { encode(val) {
return encodeURI(val); return encodeURI(val)
}, },
custom_scopes () { custom_scopes() {
const scopes = []; let scopes = []
if (this.oauth.custom_open_id) { if (this.oauth.custom_open_id) {
scopes.push('openid'); scopes.push("openid")
}
scopes.push(this.oauth.custom_scopes.split(','));
if (scopes.length !== 0) {
return '&scopes='+scopes.join(',');
}
return '';
},
GHlogin () {
window.location = `https://github.com/login/oauth/authorize?client_id=${this.oauth.gh_client_id}&redirect_uri=${this.encode(this.core.domain+'/oauth/github')}&scope=read:user,read:org`;
},
Slacklogin () {
window.location = `https://slack.com/oauth/authorize?client_id=${this.oauth.slack_client_id}&redirect_uri=${this.encode(this.core.domain+'/oauth/slack')}&scope=identity.basic`;
},
Googlelogin () {
window.location = `https://accounts.google.com/signin/oauth?client_id=${this.oauth.google_client_id}&redirect_uri=${this.encode(this.core.domain+'/oauth/google')}&response_type=code&scope=https://www.googleapis.com/auth/userinfo.profile+https://www.googleapis.com/auth/userinfo.email`;
},
Customlogin () {
window.location = `${this.oauth.custom_endpoint_auth}?client_id=${this.oauth.custom_client_id}&redirect_uri=${this.encode(this.core.domain+'/oauth/custom')}&response_type=code${this.custom_scopes()}`;
} }
} scopes.push(this.oauth.custom_scopes.split(","))
}; if (scopes.length !== 0) {
return "&scopes="+scopes.join(",")
}
return ""
},
GHlogin() {
window.location = `https://github.com/login/oauth/authorize?client_id=${this.oauth.gh_client_id}&redirect_uri=${this.encode(this.core.domain+"/oauth/github")}&scope=read:user,read:org`
},
Slacklogin() {
window.location = `https://slack.com/oauth/authorize?client_id=${this.oauth.slack_client_id}&redirect_uri=${this.encode(this.core.domain+"/oauth/slack")}&scope=identity.basic`
},
Googlelogin() {
window.location = `https://accounts.google.com/signin/oauth?client_id=${this.oauth.google_client_id}&redirect_uri=${this.encode(this.core.domain+"/oauth/google")}&response_type=code&scope=https://www.googleapis.com/auth/userinfo.profile+https://www.googleapis.com/auth/userinfo.email`
},
Customlogin() {
window.location = `${this.oauth.custom_endpoint_auth}?client_id=${this.oauth.custom_client_id}&redirect_uri=${this.encode(this.core.domain+"/oauth/custom")}&response_type=code${this.custom_scopes()}`
}
}
}
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->

View File

@ -1,19 +1,19 @@
import Vue from 'vue'; import Vue from 'vue'
import VueRouter from 'vue-router'; import VueRouter from 'vue-router'
import VueApexCharts from 'vue-apexcharts'; import VueApexCharts from 'vue-apexcharts'
import VueObserveVisibility from 'vue-observe-visibility'; import VueObserveVisibility from 'vue-observe-visibility'
import VueClipboard from 'vue-clipboard2'; import VueClipboard from 'vue-clipboard2'
import VueCookies from 'vue-cookies'; import VueCookies from 'vue-cookies'
import VueI18n from 'vue-i18n'; import VueI18n from 'vue-i18n'
import router from './routes'; import router from './routes'
import './mixin'; import "./mixin"
import './icons'; import "./icons"
import store from './store'; import store from './store'
import language from './languages'; import language from './languages'
const App = () => import(/* webpackChunkName: "index" */ '@/App.vue'); const App = () => import(/* webpackChunkName: "index" */ '@/App.vue')
Vue.component('apexchart', VueApexCharts); Vue.component('apexchart', VueApexCharts)
Vue.use(VueClipboard); Vue.use(VueClipboard);
Vue.use(VueRouter); Vue.use(VueRouter);
@ -22,19 +22,19 @@ Vue.use(VueCookies);
Vue.use(VueI18n); Vue.use(VueI18n);
const i18n = new VueI18n({ const i18n = new VueI18n({
fallbackLocale: 'en', fallbackLocale: "en",
messages: language messages: language
}); });
Vue.$cookies.config('3d'); Vue.$cookies.config('3d')
Vue.config.productionTip = process.env.NODE_ENV !== 'production'; Vue.config.productionTip = process.env.NODE_ENV !== 'production'
Vue.config.devtools = process.env.NODE_ENV !== 'production'; Vue.config.devtools = process.env.NODE_ENV !== 'production'
Vue.config.performance = process.env.NODE_ENV !== 'production'; Vue.config.performance = process.env.NODE_ENV !== 'production'
new Vue({ new Vue({
router, router,
store, store,
i18n, i18n,
render: h => h(App), render: h => h(App),
}).$mount('#app'); }).$mount('#app')