Passed
Push — v1 ( 052770...2288f4 )
by Andrew
35:50 queued 27:05
created

src/web/assets/src/js/errors-index.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 24
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 17
c 0
b 0
f 0
dl 0
loc 24
rs 10
mnd 0
bc 0
fnc 4
bpm 0
cpm 1
noi 3
1
import Vue from 'vue';
2
import VueEvents from 'vue-events';
3
import ErrorsIndexTable from '@/vue/tables/Errors/ErrorsIndexTable.vue';
4
import SampleRangePicker from '@/vue/common/SampleRangePicker.vue';
5
import ErrorsDetailAreaChart from '@/vue/charts/Errors/ErrorsDetailAreaChart.vue';
6
7
Vue.use(VueEvents);
8
// Create our vue instance
9
new Vue({
0 ignored issues
show
Coding Style introduced by
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Unused Code Best Practice introduced by
The object created with new Vue({IdentifierNode(...one)),false,false))))}) is not used but discarded. Consider invoking another function instead of a constructor if you are doing this purely for side effects.
Loading history...
10
    el: "#cp-nav-content",
11
    components: {
12
        ErrorsIndexTable,
13
        SampleRangePicker,
14
        ErrorsDetailAreaChart,
15
    },
16
    mounted() {
17
        this.$events.$on('refresh-table', eventData => this.onTableRefresh(eventData));
18
    },
19
    methods: {
20
        onTableRefresh(vuetable) {
21
            Vue.nextTick(() => vuetable.refresh());
22
        }
23
    },
24
});
0 ignored issues
show
Coding Style introduced by
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
25