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

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

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 30
Function Count 4

Duplication

Duplicated Lines 30
Ratio 100 %

Importance

Changes 0
Metric Value
wmc 4
eloc 23
c 0
b 0
f 0
dl 30
loc 30
rs 10
mnd 0
bc 0
fnc 4
bpm 0
cpm 1
noi 3

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1 View Code Duplication
import Vue from 'vue';
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2
import VueEvents from 'vue-events';
3
import ErrorsDetailAreaChart from '@/vue/charts/Errors/ErrorsDetailAreaChart.vue';
4
import ErrorsDetailTable from '@/vue/tables/Errors/ErrorsDetailTable.vue';
5
import RadialBarChart from '@/vue/charts/common/RadialBarChart.vue';
6
import SimpleBarChart from '@/vue/charts/common/SimpleBarChart.vue';
7
import SampleRangePicker from '@/vue/common/SampleRangePicker.vue';
8
import SamplePaneFooter from '@/vue/common/SamplePaneFooter.vue';
9
10
Vue.use(VueEvents);
11
// Create our vue instance
12
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...
13
    el: "#cp-nav-content",
14
    components: {
15
        ErrorsDetailAreaChart,
16
        ErrorsDetailTable,
17
        RadialBarChart,
18
        SimpleBarChart,
19
        SampleRangePicker,
20
        SamplePaneFooter,
21
    },
22
    mounted() {
23
        this.$events.$on('refresh-table', eventData => this.onTableRefresh(eventData));
24
    },
25
    methods: {
26
        onTableRefresh(vuetable) {
27
            Vue.nextTick(() => vuetable.refresh());
28
        }
29
    },
30
});
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...
31