diff options
author | Matěj Cepl <mcepl@redhat.com> | 2010-07-28 01:12:28 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2010-07-28 13:29:56 +0200 |
commit | 0117e9f48d5753482bde1a254eb6419f1267d044 (patch) | |
tree | acaef8843f6dc0d8e41407ec7b9969bca0577fec /lib/rhbzpage.js | |
parent | 14e4616e83a33116603c2ae22a2428e068191e91 (diff) | |
download | bugzilla-triage-0117e9f48d5753482bde1a254eb6419f1267d044.tar.gz |
work on analyzeXorgLog
- unsuccessful attempt to change Firefox's cursor
- don't do anything when network error happens
Diffstat (limited to 'lib/rhbzpage.js')
-rw-r--r-- | lib/rhbzpage.js | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js index 81c63fe..5f4f12c 100644 --- a/lib/rhbzpage.js +++ b/lib/rhbzpage.js @@ -660,6 +660,8 @@ RHBugzillaPage.prototype.analyzeXorgLog = function analyzeXorgLog(attachID) { "width=640,height=640,status=no,location=no"); var doc = infoWin.document; doc.body.innerHTML = "<pre id='textPre'></pre>"; + // TODO var oldCursor = doc.body.style.cursor; + // doc.body.style.cursor = "wait"; var preElem = doc.getElementById("textPre"); attURL = "https://bugzilla.redhat.com/attachment.cgi?id=" + attachID; @@ -667,17 +669,20 @@ RHBugzillaPage.prototype.analyzeXorgLog = function analyzeXorgLog(attachID) { Request({ url: attURL, onComplete: function() { - var results = this.response.text.split("\n"). - filter(function(line) { - return (that.RE.soughtLines.test(line)); - }); - if (results.length > 0) { - results.forEach(function(l) { - preElem.innerHTML += l + "\n"; - }); - } else { - preElem.innerHTML += "No matching lines found!"; - } + if (this.response.status == 200) { + var results = this.response.text.split("\n"). + filter(function(line) { + return (that.RE.soughtLines.test(line)); + }); + if (results.length > 0) { + results.forEach(function(l) { + preElem.innerHTML += l + "\n"; + }); + } else { + preElem.innerHTML += "No matching lines found!"; + } + } + // doc.body.style.cursor = oldCursor; } }).get(); }; |