diff options
author | Matthias Held <ilovemilk@wusa.io> | 2018-09-13 20:20:02 +0300 |
---|---|---|
committer | Matthias Held <ilovemilk@wusa.io> | 2018-09-13 20:20:02 +0300 |
commit | 900e31eecdfba9a7bfdaaf0349e293098e149834 (patch) | |
tree | b4b09d4f3b56c4d9eb054c342177dc34d54ec4b9 /js | |
parent | 4a1cff97b588e6047168f6d91de92cc6a0d9534f (diff) |
Simplify sequence analysis result color coding
Signed-off-by: Matthias Held <matthias.held@uni-konstanz.de>
Diffstat (limited to 'js')
-rw-r--r-- | js/filelist.js | 4 | ||||
-rw-r--r-- | js/scan.js | 4 | ||||
-rw-r--r-- | js/utils.js | 10 |
3 files changed, 8 insertions, 10 deletions
diff --git a/js/filelist.js b/js/filelist.js index 6d45741..c04ad14 100644 --- a/js/filelist.js +++ b/js/filelist.js @@ -88,8 +88,8 @@ } $.getJSON(self.getColorModeUrl, function(schema) { if (schema.colorMode == 1) { - Utils.colors = {red: 'color-blind-red', orange: 'color-blind-orange', yellow: 'color-blind-yellow', green: 'color-blind-green'}; - Utils.colorsText = {red: 'color-blind-red-text', orange: 'color-blind-orange', yellow: 'color-blind-yellow-text', green: 'color-blind-green-text'}; + Utils.colors = {red: 'color-blind-red', yellow: 'color-blind-yellow', green: 'color-blind-green'}; + Utils.colorsText = {red: 'color-blind-red-text', yellow: 'color-blind-yellow-text', green: 'color-blind-green-text'}; } $.getJSON(self.url, function(data) { $('#section-loading').remove(); @@ -208,8 +208,8 @@ var count = 0; $.getJSON(self.getColorModeUrl, function(schema) { if (schema.colorMode == 1) { - Utils.colors = {red: 'color-blind-red', orange: 'color-blind-orange', yellow: 'color-blind-yellow', green: 'color-blind-green'}; - Utils.colorsText = {red: 'color-blind-red-text', orange: 'color-blind-orange', yellow: 'color-blind-yellow-text', green: 'color-blind-green-text'}; + Utils.colors = {red: 'color-blind-red', yellow: 'color-blind-yellow', green: 'color-blind-green'}; + Utils.colorsText = {red: 'color-blind-red-text', yellow: 'color-blind-yellow-text', green: 'color-blind-green-text'}; } $.each(self.sequencesToScan, function(index, sequence) { $.ajax({ diff --git a/js/utils.js b/js/utils.js index 18afda9..5820eba 100644 --- a/js/utils.js +++ b/js/utils.js @@ -32,8 +32,8 @@ * @memberof OCA.RansomwareDetection */ Utils.prototype = { - colors: {red: 'red', orange: 'orange', yellow: 'yellow', green: 'green'}, - colorsText: {red: 'red-text', orange: 'orange-text', yellow: 'yellow-text', green: 'green-text'}, + colors: {red: 'red', yellow: 'yellow', green: 'green'}, + colorsText: {red: 'red-text', yellow: 'yellow-text', green: 'green-text'}, /** * Creates a new row in the table. @@ -211,11 +211,9 @@ */ _createTableSkeleton: function(sequence, suspicionScore) { var color = this.colors.green; - if (suspicionScore >= 6) { + if (suspicionScore > 4) { color = this.colors.red; - } else if (suspicionScore >= 5) { - color = this.colors.orange; - } else if (suspicionScore >= 3) { + } else if (suspicionScore > 2) { color = this.colors.yellow; } var table = |