Passed
Push — master ( 384857...16dbaf )
by Matt
08:13 queued 03:06
created

assets/adminimageupload.js   A

Complexity

Total Complexity 3
Complexity/F 3

Size

Lines of Code 19
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 12
c 0
b 0
f 0
dl 0
loc 19
rs 10
wmc 3
mnd 2
bc 2
fnc 1
bpm 2
cpm 3
noi 1
1
import 'dropzone/dist/dropzone.css';
2
3
import { Dropzone } from "dropzone";
4
5
let myDropzone = new Dropzone("form.dropzone");
0 ignored issues
show
Unused Code introduced by
The variable myDropzone seems to be never used. Consider removing it.
Loading history...
6
7
const $ = require('jquery');
8
9
$(function() {
10
    var percentage = parseFloat($('span.diskusagepercent').text());
11
    var bar = $('div.bar');
12
    if (percentage > 70) {
13
        bar.addClass('warn');
14
    }
15
    if (percentage > 90) {
16
        bar.addClass('critical');
17
    }
18
    bar.width(percentage + '%');
19
});
20
21