aboutsummaryrefslogtreecommitdiffstats
path: root/bugzillaBugTriage.js
diff options
context:
space:
mode:
Diffstat (limited to 'bugzillaBugTriage.js')
-rw-r--r--bugzillaBugTriage.js108
1 files changed, 53 insertions, 55 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js
index cfc3025..8c39590 100644
--- a/bugzillaBugTriage.js
+++ b/bugzillaBugTriage.js
@@ -63,9 +63,8 @@ var msgStrs = {};
var CommentRe = new RegExp("^\\s*#");
var BlankLineRe = new RegExp("^\\s*$");
// nová řádka
-// [ 65.631] (--) intel(0): Chipset: "845G"
-var ChipsetRE = new RegExp(
- "^\\s*\\[?[ 0-9.]*\\]?\\s*\\(--\\) ([A-Za-z]+)\\([0-9]?\\): Chipset: (.*)$");
+// [ 65.631] (--) intel(0): Chipset: "845G"
+var ChipsetRE = new RegExp("^\\s*\\[?[ 0-9.]*\\]?\\s*\\(--\\) ([A-Za-z]+)\\([0-9]?\\): Chipset: (.*)$");
var ATIgetIDRE = new RegExp("^.*\\(ChipID = 0x([0-9a-fA-F]+)\\).*$");
var AbrtRE = new RegExp("^\\s*\\[abrt\\]");
var signalHandlerRE = new RegExp("^\\s*#[0-9]*\\s*<signal handler called>");
@@ -1265,58 +1264,57 @@ BzPage.prototype.addNewButton = function(originalLocation, newId, newLabel,
*
* @return None
*/
-BzPage.prototype.fillInChipMagic = function() {
- var XorgLogURL = "";
- var XorgLogAttID = "";
- var XorgLogFound = false;
- var attURL = "", interestingLine = "";
- var interestingArray = [];
-
- // Find out Xorg.0.log attachment URL
- this.XorgLogAttList = this.attachments
- .filter(function(value, index, array) {
- // Xorg.0.log must be text, otherwise we cannot parse it
- return (/[xX].*log/.test(value[0]) && /text/.test(value[2]));
- });
- if (this.XorgLogAttList.length === 0) {
- return;
- }
-
- XorgLogAttID = this.XorgLogAttList[this.XorgLogAttListIndex][1];
- attURL = "https://bugzilla.redhat.com/attachment.cgi?id=" + XorgLogAttID;
- that = this;
-
- var req = new XMLHttpRequest();
- req.open("GET", attURL, true);
- req.onreadystatechange = function(aEvt) {
- if (req.readyState == 4) {
- if (req.status == 200) {
- var ret = req.responseText;
- var interestingLineArr = ret.split("\n").filter(
- function(v, i, a) {
- return ChipsetRE.test(v);
- });
- console.log("interestingLineArr = "
- + interestingLineArr.toSource());
- if (interestingLineArr.length > 0) {
- interestingArray = ChipsetRE.exec(interestingLineArr[0]);
- interestingLine = interestingArray[2].replace(/[\s"]+/g,
- " ").trim();
- var whiteboardInput = that.dok
- .getElementById("status_whiteboard");
- that.addNewButton(whiteboardInput, "chipmagic", "Fill In",
- "", "CHIPMAGIC", interestingLine + "\t"
- + interestingArray[1].toUpperCase(), false,
- true);
- }
- } else {
- throw "Getting attachment " + attURL + "failed!";
- }
- }
- };
- req.send("");
-
- this.XorgLogAttListIndex++;
+BzPage.prototype.fillInChipMagic = function () {
+ var XorgLogURL = "";
+ var XorgLogAttID = "";
+ var XorgLogFound = false;
+ var attURL = "", interestingLine = "";
+ var interestingArray = [];
+
+
+ // Find out Xorg.0.log attachment URL
+ this.XorgLogAttList = this.attachments.filter(function (value, index, array) {
+ // Xorg.0.log must be text, otherwise we cannot parse it
+ return (/[xX].*log/.test(value[0]) && /text/.test(value[2]));
+ });
+ if (this.XorgLogAttList.length === 0) {
+ return;
+ }
+
+ XorgLogAttID = this.XorgLogAttList[this.XorgLogAttListIndex][1];
+ attURL = "https://bugzilla.redhat.com/attachment.cgi?id="+XorgLogAttID;
+ that = this;
+
+ var req = new XMLHttpRequest();
+ req.open("GET",attURL,true);
+ req.onreadystatechange = function (aEvt) {
+ if (req.readyState == 4) {
+ if (req.status == 200) {
+ var ret = req.responseText;
+ var interestingLineArr = ret.split("\n").
+ filter(function (v,i,a) {
+ return ChipsetRE.test(v);
+ });
+ console.log("interestingLineArr = " + interestingLineArr.toSource());
+ if (interestingLineArr.length >0) {
+ interestingArray = ChipsetRE.exec(interestingLineArr[0]);
+ interestingLine = interestingArray[2].
+ replace(/[\s"]+/g," ").trim();
+ var whiteboardInput = that.dok.
+ getElementById("status_whiteboard");
+ that.addNewButton(whiteboardInput,"chipmagic","Fill In",
+ "","CHIPMAGIC",
+ interestingLine+"\t"+interestingArray[1].toUpperCase(),
+ false,true);
+ }
+ } else {
+ throw "Getting attachment " + attURL + "failed!";
+ }
+ }
+ };
+ req.send("");
+
+ this.XorgLogAttListIndex++;
};
/**