aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-05-17 17:03:04 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-05-17 17:03:04 +0200
commit76d95acc16354964068bcf0c5bdb0d3264e83fc1 (patch)
treef2b82e4c3c9cdcfc08d471c5decc8f9269b568e8
parent34d9b467395b2e66db5ad960c16810b4541ed20b (diff)
downloadbugzilla-triage-76d95acc16354964068bcf0c5bdb0d3264e83fc1.tar.gz
Move pasteBacktraceInComments to RHBugzillaPage
-rw-r--r--bugzillaBugTriage.js112
1 files changed, 56 insertions, 56 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js
index ded744d..f19a40e 100644
--- a/bugzillaBugTriage.js
+++ b/bugzillaBugTriage.js
@@ -1295,62 +1295,6 @@ BZPage.prototype.getCCList = function() {
return outCCList;
};
-/**
- *
- */
-BZPage.prototype.pasteBacktraceInComments = function() {
- // FIXME This paragraph looks suspicous ... what is it?
- // Does it belong to this function?
- let notedLabel = this.doc.querySelector("label[for='newcc']");
- while (notedLabel.firstChild) {
- let node = notedLabel.removeChild(notedLabel.firstChild);
- notedLabel.parentNode.insertBefore(node, notedLabel);
- }
- notedLabel.parentNode.removeChild(notedLabel);
-
- let abrtQueryURL = "https://bugzilla.redhat.com/buglist.cgi?"
- + "cmdtype=dorem&remaction=run&namedcmd=all%20NEW%20abrt%20crashes&sharer_id=74116";
-
- let mainTitle = this.doc
- .getElementsByClassName("bz_alias_short_desc_container")[0];
- let abrtButton = this.doc.createElement("a");
- abrtButton.setAttribute("accesskey", "a");
- abrtButton.setAttribute("href", abrtQueryURL);
- abrtButton.textContent = "Abrt bugs";
- mainTitle.appendChild(abrtButton);
-
- if (this.idContainsWord("cf_devel_whiteboard", 'btparsed')) {
- this.addStuffToTextBox('status_whiteboard', 'btparsed');
- }
-
- if (!(this.isTriaged() || this.idContainsWord("status_whiteboard",
- 'btparsed'))) {
- let btAttachments = this.attachments
- .filter(function(att, idx, arr) {
- return (/backtrace/.test(att[0]));
- });
- // TODO we need to go through all backtrace attachments, but
- // just the first one will do for now, we would need to do async
- // parsing
- btAttachments.forEach(function(x) {
- attURL = "https://bugzilla.redhat.com/attachment.cgi?id="
- + x[1];
- console.log("attURL = " + attURL);
- console.log("btSnippet = " + this.btSnippet);
- if (!this.btSnippet) {
- let btRaw = hlpr.loadText(attURL, function(ret) {
- this.btSnippet = this.parseBacktrace(ret);
- if (this.btSnippet) {
- this.addStuffToTextBox("comment", this.btSnippet);
- this.addStuffToTextBox("status_whiteboard",
- "btparsed");
- }
- }, this);
- }
- }, this);
- }
-};
-
// ====================================================================================
// MozillaBugzilla object
@@ -1720,6 +1664,62 @@ RHBugzillaPage.prototype.ProfessionalProducts = [
/**
*
*/
+RHBugzillaPage.prototype.pasteBacktraceInComments = function() {
+ // FIXME This paragraph looks suspicous ... what is it?
+ // Does it belong to this function?
+ let notedLabel = this.doc.querySelector("label[for='newcc']");
+ while (notedLabel.firstChild) {
+ let node = notedLabel.removeChild(notedLabel.firstChild);
+ notedLabel.parentNode.insertBefore(node, notedLabel);
+ }
+ notedLabel.parentNode.removeChild(notedLabel);
+
+ let abrtQueryURL = "https://bugzilla.redhat.com/buglist.cgi?"
+ + "cmdtype=dorem&remaction=run&namedcmd=all%20NEW%20abrt%20crashes&sharer_id=74116";
+
+ let mainTitle = this.doc
+ .getElementsByClassName("bz_alias_short_desc_container")[0];
+ let abrtButton = this.doc.createElement("a");
+ abrtButton.setAttribute("accesskey", "a");
+ abrtButton.setAttribute("href", abrtQueryURL);
+ abrtButton.textContent = "Abrt bugs";
+ mainTitle.appendChild(abrtButton);
+
+ if (this.idContainsWord("cf_devel_whiteboard", 'btparsed')) {
+ this.addStuffToTextBox('status_whiteboard', 'btparsed');
+ }
+
+ if (!(this.isTriaged() || this.idContainsWord("status_whiteboard",
+ 'btparsed'))) {
+ let btAttachments = this.attachments
+ .filter(function(att, idx, arr) {
+ return (/backtrace/.test(att[0]));
+ });
+ // TODO we need to go through all backtrace attachments, but
+ // just the first one will do for now, we would need to do async
+ // parsing
+ btAttachments.forEach(function(x) {
+ attURL = "https://bugzilla.redhat.com/attachment.cgi?id="
+ + x[1];
+ console.log("attURL = " + attURL);
+ console.log("btSnippet = " + this.btSnippet);
+ if (!this.btSnippet) {
+ let btRaw = hlpr.loadText(attURL, function(ret) {
+ this.btSnippet = this.parseBacktrace(ret);
+ if (this.btSnippet) {
+ this.addStuffToTextBox("comment", this.btSnippet);
+ this.addStuffToTextBox("status_whiteboard",
+ "btparsed");
+ }
+ }, this);
+ }
+ }, this);
+ }
+};
+
+/**
+ *
+ */
RHBugzillaPage.prototype.markBadAttachments = function() {
let badMIMEArray = [ "application/octet-stream", "text/x-log", "undefined" ];