aboutsummaryrefslogtreecommitdiffstats
path: root/data/rhlib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-09-01 00:00:58 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-09-01 09:17:18 +0200
commitb6b75faa9ef841396731398a2882e869df5b8ae7 (patch)
treef7ece86109980c8104aa2f8ccffb8503bcb6384f /data/rhlib
parent2ed5e245736860323819a93336b28d3b39176f17 (diff)
downloadbugzilla-triage-b6b75faa9ef841396731398a2882e869df5b8ae7.tar.gz
Removing GetURL and some overcomplicated parts.
Diffstat (limited to 'data/rhlib')
-rw-r--r--data/rhlib/rhbzpage.js61
1 files changed, 26 insertions, 35 deletions
diff --git a/data/rhlib/rhbzpage.js b/data/rhlib/rhbzpage.js
index 34bf906..944b9a6 100644
--- a/data/rhlib/rhbzpage.js
+++ b/data/rhlib/rhbzpage.js
@@ -77,11 +77,6 @@ function RHOnMessageHandler(msg, nextHandlerList) {
case "FixAttachmentMIMECallback":
XMLRPCcallback();
break;
- case "AnalyzeInterestingLine":
- case "AnalyzeXorgLogBacktrace":
- case "AnalyzeDmesgErrors":
- findInterestingLine(msg.data, msg.cmd);
- break;
case "queryUpstream":
queryUpstreamCallback(msg.data, constantData.queryUpstreamBug);
break;
@@ -208,7 +203,6 @@ function sendBugUpstream(thgs) {
*
*/
function fillInWhiteBoard(cardName) {
- console.myDebug("fillInWhiteBoard: cardName = " + cardName);
clickMouse("editme_action");
var titleElem = document.getElementById('short_desc');
titleElem.value = '[' + cardName + ']\u00A0' + titleElem.value;
@@ -216,19 +210,6 @@ function fillInWhiteBoard(cardName) {
}
/**
- * Get attached Xorg.0.log, parse it and find the value of chip. Does not fill
- * the whiteboard itself, just adds button to do so,paramList so that slow
- * XMLHttpRequest is done in advance.
- *
- * @param log
- * array of XorgLogAttList
- * @return None
- */
-function fillInChipMagic(XlogID) {
- analyzeXorgLog(XlogID, "AnalyzeInterestingLine");
-}
-
-/**
* Creates a button to change summary by adding a graphic chip label
*
* @param Array
@@ -247,7 +228,6 @@ function chipsetMagic (interestingLineArr) {
if (interestingPCIID.length > 1) {
var PCIid = (interestingPCIID[0] + ":" + interestingPCIID[1]).
toUpperCase();
- console.myDebug("PCIid = " + PCIid);
// Nvidia driver provides good code in the Chipset line
if (interestingPCIID[0].toLowerCase() == "10de") {
cardStr = interestingLineArr[1][2].
@@ -304,13 +284,6 @@ function displayResultsInPanel(results) {
"\n</pre></body></html>"));
}
-function analyzeXorgLog(attachID, backMsg) {
- self.postMessage(new Message("GetURL", {
- url: "https://" + window.location.hostname + "/attachment.cgi?id=" + attachID,
- backMessage: backMsg
- }));
-}
-
function findInterestingLine(wholeLog, backMsg) {
var REstr = logAnalyzeLogic[backMsg].re;
var REarr = [];
@@ -322,26 +295,44 @@ 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);
}
+
+/**
+ * Get attached Xorg.0.log, parse it and find the value of chip. Does not fill
+ * the whiteboard itself, just adds button to do so,paramList so that slow
+ * XMLHttpRequest is done in advance.
+ *
+ * @param log
+ * array of XorgLogAttList
+ * @return None
+ */
+function analyzeXorgLog(attachID, backMsg) {
+ var req = new XMLHttpRequest();
+ req.open("GET", "/attachment.cgi?id=" + attachID, true);
+ req.onreadystatechange = function (aEvt) {
+ if (req.readyState == 4) {
+ if(req.status == 200) {
+ findInterestingLine(req.responseText, backMsg);
+ }
+ else
+ console.error('Error', req.statusText);
+ }
+ };
+ req.send(null);
+}
+
/**
* Add an external bug reference from the input box
*
@@ -397,7 +388,7 @@ function addClosingUpstream() {
var newBugURL = addExternalBug();
if (!newBugURL) {
- console.myDebug("No external bug specified among the External References!");
+ console.warning("No external bug specified among the External References!");
return null;
}