aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/rhbzpage.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/lib/rhbzpage.js')
-rw-r--r--data/lib/rhbzpage.js45
1 files changed, 41 insertions, 4 deletions
diff --git a/data/lib/rhbzpage.js b/data/lib/rhbzpage.js
index 8831b24..3cffbb9 100644
--- a/data/lib/rhbzpage.js
+++ b/data/lib/rhbzpage.js
@@ -1,6 +1,9 @@
// Released under the MIT/X11 license
// http://www.opensource.org/licenses/mit-license.php
+// Are we debugging?
+var debugFlag = false;
+
// For identification of graphics card
var manuChipStrs = [ [ "ATI Radeon", "ATI", "1002" ],
[ "ATI Mobility Radeon", "ATI", "1002" ],
@@ -131,6 +134,7 @@ function RHcentralCommandDispatch(cmdLabel, cmdParams) {
markBugTriaged();
break;
case "chipMagic":
+ console.myDebug("cmdParams = " + cmdParams.toSource());
fillInWhiteBoard(cmdParams);
break;
// If we don't have it here, call superclass method
@@ -149,7 +153,7 @@ function RHcentralCommandDispatch(cmdLabel, cmdParams) {
function markBadAttachments(atts) {
var badMIMEArray = [ "application/octet-stream", "text/x-log", "undefined" ];
if (!constantData.passwordState.passAvailable) {
- console.log("markBadAttachments : No password, no XML-RPC calls; sorry");
+ console.myDebug("markBadAttachments : No password, no XML-RPC calls; sorry");
return null;
}
@@ -214,9 +218,10 @@ function addCheckXorgLogLink(attList) {
*
* @param PCIidArrObj object with two fields
* id Array manufacturer-ID and product-ID (PCI IDs)
- * chipsetLine RE
+ * chipsetLine whole line containing PCI ID.
* @param driverStr String with the driver name
* @return None
+ *
*/
function fillInWhiteBoard(PCIidArrObj) {
var outStr = "";
@@ -225,7 +230,13 @@ function fillInWhiteBoard(PCIidArrObj) {
var cardName = "";
var PCIid = (PCIidArrObj.id[0] + "," + PCIidArrObj.id[1]).toUpperCase();
+ console.myDebug("PCIidArrObj = " + PCIidArrObj.toSource());
+ console.myDebug("PCIid = " + PCIid);
+
+ // Nvidia driver provides good code in the
if (PCIidArrObj.id[0].toLowerCase() == "10de") {
+ // The following is wrong ... chipsetLine is String, not an array
+ console.myDebug("fillInWhiteBoard: chipsetLine = " + PCIidArrObj.chipsetLine);
cardName = PCIidArrObj.chipsetLine[2].replace(/\s*nvidia\s*/ig,"").
replace('"','','g');
}
@@ -242,6 +253,7 @@ function fillInWhiteBoard(PCIidArrObj) {
}
}
+ console.myDebug("fillInWhiteBoard: cardName = " + cardName);
clickMouse("editme_action");
var titleElem = document.getElementById('short_desc');
titleElem.value = '[' + cardName + ']\u00A0' + titleElem.value;
@@ -260,17 +272,34 @@ function fillInChipMagic(XlogID) {
analyzeXorgLog(XlogID, "AnalyzeInterestingLine");
}
+/**
+ * Creates a button to change summary by adding a graphic chip label
+ *
+ * @param Array with matching results of re.exec()
+ */
function chipsetMagic (interestingLineArr) {
// parse Xorg.0.log
+ var chipsetLine = "";
+ console.myDebug("interestingLineArr = " + interestingLineArr.toSource());
+ console.myDebug("interestingLineArr[1] = " + interestingLineArr[1]);
if (interestingLineArr.length >0) {
var interestingArray = interestingLineArr[0];
if (interestingArray.length > 1) {
var interestingPCIID = interestingArray[2].trim().split(":");
+ // If we have Chipset line, we should parse it as well and
+ // add to the button
+ if (interestingLineArr.length > 1) {
+ chipsetLine = interestingLineArr[1];
+ console.myDebug("chipsetLine = " + chipsetLine.toSource());
+ } else {
+ chipsetLine = null;
+ console.myDebug("chipsetLine = " + chipsetLine);
+ }
createNewButton("short_desc_nonedit_display", false, {
"name": "Fill In",
"chipMagic": {
"id": interestingPCIID,
- "chipsetLine": interestingLineArr[1]
+ "chipsetLine": chipsetLine
},
});
}
@@ -319,15 +348,23 @@ function findInterestingLine(wholeLog, backMsg) {
return new RegExp(reone);
});
}
+ console.myDebug("Current REs:");
+ REarr.forEach(function (re) {
+ console.myDebug("re: " + re.source);
+ });
+
var results = [];
wholeLog.split("\n").
forEach(function(line) {
REarr.forEach(function (re, reIdx) {
if (re.test(line)) {
+ console.myDebug("Found match on line:\n" + line);
+ console.myDebug("Result: " + re.exec(line).toSource());
results.push(re.exec(line));
}
});
});
+ console.myDebug("results = " + results.toSource());
logAnalyzeLogic[backMsg].func(results);
}
@@ -379,7 +416,7 @@ function addClosingUpstream() {
centralCommandDispatch("resolution", "UPSTREAM");
}
else {
- console.log("No external bug specified among the External References!");
+ console.myDebug("No external bug specified among the External References!");
}
}