aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/rhbzpage.js5
-rw-r--r--lib/util.js11
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js
index cb3f636..6ee4553 100644
--- a/lib/rhbzpage.js
+++ b/lib/rhbzpage.js
@@ -49,7 +49,7 @@ var RHBugzillaPage = function RHBugzillaPage(win, config) {
Abrt: new RegExp("^\\s*\\[abrt\\]"),
signalHandler: new RegExp("^\\s*#[0-9]*\\s*<signal handler called>"),
frameNo: new RegExp("^\\s*#([0-9]*)\\s"),
- soughtLines: new RegExp("^\\s*(\\[[0-9 .]*\\])?\\s*\\((EE|WW)\\)|\\s*Backtrace")
+ soughtLines: new RegExp("^\\s*(\\[[0-9 .]*\\])?\\s*(\\((EE|WW)\\)|.* [cC]hipsets?: )|\\s*Backtrace")
};
// END OF CONSTANTS
@@ -656,12 +656,13 @@ RHBugzillaPage.prototype.analyzeXorgLog = function analyzeXorgLog(attachID) {
filter(function(line) {
return (that.RE.soughtLines.test(line));
});
+ results.sort();
+ results = util.removeDuplicates(results);
// Remove headers
if (results.length >= 1) {
results.splice(0, 1);
}
if (results.length > 0) {
-
results.forEach(function(l) {
preElem.innerHTML += l + "\n";
});
diff --git a/lib/util.js b/lib/util.js
index 0b1a79e..88c3457 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -216,3 +216,14 @@ exports.getObjectKeys = function getObjectKeys(obj) {
}
return keys;
};
+
+exports.removeDuplicates = function removeDuplicates (arr) {
+ for (var i = 0; i < arr.length; i++) {
+ for (var j = i + 1; j < arr.length; j++) {
+ if (arr[i] == arr[j]) {
+ arr.splice (j, 1);
+ }
+ }
+ }
+ return arr;
+};