aboutsummaryrefslogtreecommitdiffstats
path: root/data/rhbzpage.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/rhbzpage.js')
-rw-r--r--data/rhbzpage.js369
1 files changed, 174 insertions, 195 deletions
diff --git a/data/rhbzpage.js b/data/rhbzpage.js
index 3cb21e6..d4d071a 100644
--- a/data/rhbzpage.js
+++ b/data/rhbzpage.js
@@ -2,159 +2,21 @@
// Released under the MIT/X11 license
// http://www.opensource.org/licenses/mit-license.php
"use strict";
-var util = require("util");
-var xrpc = require("xmlrpc");
-var apiUtils = require("api-utils");
-var self = require("self");
-var Color = require("color").Color;
-var BZPage = require("bzpage").BZPage;
-var Request = require("request").Request;
-var url = require("url");
-var timer = require("timer");
-var selection = require("selection");
-var tabs = require("tabs");
var NumberOfFrames = require("bzpage").NumberOfFrames;
var titleParsedAttachment = "Part of the thread where crash happened";
// ====================================================================================
// RHBugzillaPage object
-var RHBugzillaPage = function RHBugzillaPage(win, config) {
- // inheritance ... call superobject's constructor
- BZPage.call(this, win, config);
-
- // For identification of graphics card
- this.manuChipStrs = [ [ "ATI Radeon", "ATI", "1002" ],
- [ "ATI Mobility Radeon", "ATI", "1002" ],
- [ "Intel Corporation", "INTEL", "8086" ], [ "NVIDIA", "NV", "10de" ] ];
-
- // http://en.wikipedia.org/wiki/HSL_color_space
- // when only the value of S is changed
- // stupido!!! the string is value in hex for each color
- this.RHColor = new Color(158, 41, 43); // RGB 158, 41, 43; HSL 359, 1, 39
- this.FedoraColor = new Color(0, 40, 103); // RGB 0, 40, 103; HSL 359, 1, 39
- this.RawhideColor = new Color(0, 119, 0); // or "green", or RGB 0, 119, 0, or
- // HSL
- // 120, 0, 23
- this.RHITColor = new Color(102, 0, 102); // RGB 102, 0, 102; HSL 300, 0, 20
-
- this.RE = {
- Comment: new RegExp("^\\s*#"), // unsused
- BlankLine: new RegExp("^\\s*$"), // unused
- // new line
- // [ 65.631] (--) intel(0): Chipset: "845G"
- Chipset: new RegExp("^\\s*\\[?[ 0-9.]*\\]?\\s*\\(--\\) "+
- "([A-Za-z]+)\\([0-9]?\\): Chipset: (.*)$"),
- ATIgetID: new RegExp("^.*\\(ChipID = 0x([0-9a-fA-F]+)\\).*$"),
- Abrt: new RegExp("^\\s*\\[abrt\\]"),
- signalHandler: new RegExp("^\\s*#[0-9]*\\s*<signal handler called>"),
- frameNo: new RegExp("^\\s*#([0-9]*)\\s"),
- soughtLines: new RegExp("^\\s*(\\[[0-9 .]*\\])?\\s*(\\((EE|WW)\\)|.* [cC]hipsets?: )|\\s*Backtrace")
- };
- // END OF CONSTANTS
-
- var that = this;
- this.reqCounter = 0;
- this.signaturesCounter = 0;
- this.chipMagicInterestingLine = "";
-
- this.product = this.doc.getElementById("product").value;
-
- this.maintCCAddr = null;
- if (this.constantData.CCmaintainer) {
- this.maintCCAddr = util.filterByRegexp(this.constantData.CCmaintainer,
- this.getComponent());
- }
-
- var ITbutton = this.doc.getElementById("cf_issuetracker");
- this.its = ITbutton ? ITbutton.value.trim() : "";
-
- if (!this.constantData.ProfessionalProducts) {
- this.constantData.ProfessionalProducts =
- JSON.parse(self.data.load("professionalProducts.json"));
- }
-
- // getBadAttachments
- this.XorgLogAttList = [];
- this.XorgLogAttListIndex = 0;
- this.attachments = this.getAttachments();
- this.markBadAttachments(this.attachments);
-
- this.parsedAttachments = this.attachments.filter(function (att) {
- return (new RegExp(titleParsedAttachment).test(att[0]));
- });
-
- if (this.constantData.defaultAssignee) {
- this.setDefaultAssignee();
- }
-
- // Dig out backtrace protection against double-firing?
- this.btSnippet = "";
-
- var parseAbrtBacktraces = config.gJSONData.configData.parseAbrtBacktraces;
- if (parseAbrtBacktraces && this.RE.Abrt.test(this.title)) {
- this.pasteBacktraceInComments();
- }
-
- // 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]));
- });
- this.addCheckXorgLogLink();
-
- // TODO Get compiz bugs as well
- if (this.constantData.PCI_ID_Array &&
- (this.XorgLogAttList[0]) &&
- (this.maintCCAddr === "xgl-maint@redhat.com")) {
- // Add find chip magic button
- var whiteboard_string = this.doc.getElementById("status_whiteboard").value;
- if (!/card_/.test(whiteboard_string)) {
- this.fillInChipMagic();
- }
- }
-
- // Take care of signature for Fedora bugzappers
- if (config.gJSONData.configData.signature.length > 0) {
- var signatureFedoraString = config.gJSONData.configData.signature;
- this.doc.forms.namedItem("changeform").addEventListener("submit",
- function(aEvt) {
- if (that.signaturesCounter < 1) {
- that.addStuffToTextBox("comment", signatureFedoraString);
- that.signaturesCounter += 1;
- }
- }, false);
- }
-
- this.setBranding();
-
- // set default assignee on change of the component
- var compElement = this.doc.getElementById("component");
- if (compElement && (compElement.options)) {
- this.doc.getElementById("component").addEventListener("change",
- function() {
- that.changeAssignee("default");
- }, false);
- }
-
-}; // END OF RHBugzillaPage CONSTRUCTOR
-
-RHBugzillaPage.prototype.toString = function toString () {
- return ("[Object RHBugzillaPage]");
-};
-
-RHBugzillaPage.prototype = util.heir(BZPage);
-RHBugzillaPage.prototype.constructor = RHBugzillaPage;
-
/**
* Find default assignee based on the current component
*
* @return String what would be a default assignee if
* we haven't set it up.
*/
-RHBugzillaPage.prototype.getDefaultAssignee = function() {
+function getDefaultAssignee() {
return util.filterByRegexp(this.constantData.defaultAssignee,
this.getComponent()).toLowerCase();
-};
+}
/**
* Set default assignee
@@ -162,7 +24,7 @@ RHBugzillaPage.prototype.getDefaultAssignee = function() {
* @return none
* sets this.defaultAssignee property according to defaultAssignee list
*/
-RHBugzillaPage.prototype.setDefaultAssignee = function() {
+function setDefaultAssignee() {
this.defaultAssignee = this.getDefaultAssignee();
var defAss = this.defaultAssignee;
@@ -171,12 +33,12 @@ RHBugzillaPage.prototype.setDefaultAssignee = function() {
this.constantData.defaultAssigneeTrigger = true;
this.createNewButton("bz_assignee_edit_container",true,"rh-common","setDefaultAssignee");
}
-};
+}
/**
* Auxiliary function to compute more complicated resolution
*/
-RHBugzillaPage.prototype.closeSomeRelease = function() {
+function closeSomeRelease() {
// for RAWHIDE close as RAWHIDE,
// if active selection -> CURRENTRELEASE
// and put the release version to
@@ -198,12 +60,12 @@ RHBugzillaPage.prototype.closeSomeRelease = function() {
resolution = "NEXTRELEASE";
}
this.centralCommandDispatch("resolution", resolution);
-};
+}
/**
* Additional commands specific for this subclass, overriding superclass one.
*/
-RHBugzillaPage.prototype.centralCommandDispatch = function(cmdLabel, cmdParams) {
+function RHcentralCommandDispatch(cmdLabel, cmdParams) {
console.log("cmdLabel = " + cmdLabel + ", cmdParams = " + cmdParams);
switch (cmdLabel) {
// Set up our own commands
@@ -228,17 +90,17 @@ RHBugzillaPage.prototype.centralCommandDispatch = function(cmdLabel, cmdParams)
break;
// If we don't have it here, call superclass method
default:
- BZPage.prototype.centralCommandDispatch.call(this, cmdLabel, cmdParams);
+ centralCommandDispatch.call(this, cmdLabel, cmdParams);
break;
}
-};
+}
/**
*
* This has to stay in RHBugzillaPage because upstream doesn't have addAttachment
* XML-RPC call yet.
*/
-RHBugzillaPage.prototype.addAttachment = function addAttachment(data, callback, param) {
+function addAttachment(data, callback, param) {
var msg = new xrpc.XMLRPCMessage("bugzilla.addAttachment");
var that = this;
@@ -267,13 +129,13 @@ RHBugzillaPage.prototype.addAttachment = function addAttachment(data, callback,
contentType: "text/xml"
}).post();
this.reqCounter++;
-};
+}
/* === Bugzilla functions === */
/**
*
*/
-RHBugzillaPage.prototype.pasteBacktraceInComments = function() {
+function pasteBacktraceInComments() {
var that = this;
/*
@@ -340,7 +202,7 @@ RHBugzillaPage.prototype.pasteBacktraceInComments = function() {
that.addShowParsedBTLink(att);
}, that);
}
-};
+}
/**
* Open new window with the content of the attachment.
@@ -348,7 +210,7 @@ RHBugzillaPage.prototype.pasteBacktraceInComments = function() {
* @param id Number of the attachment id
* @return none
*/
-RHBugzillaPage.prototype.showAttachment = function showAttachment(id) {
+function showAttachment(id) {
var that = this;
Request({
url: "https://" + that.hostname + "/attachment.cgi?id=" + id,
@@ -364,23 +226,23 @@ RHBugzillaPage.prototype.showAttachment = function showAttachment(id) {
}
}
}).get();
-};
+}
/**
* add a link opening a window with the parsed backtrace
*
* @param att Attachment object
*/
-RHBugzillaPage.prototype.addShowParsedBTLink = function addShowParsedBTLink(att) {
+function addShowParsedBTLink(att) {
var elem = att[4].querySelector("td:last-of-type");
this.createDeadLink("showParsedBacktraceWindow-" + att[1], "showBT",
elem, this.showAttachment, att[1], true);
-};
+}
/**
* Unfinished ... see above
*/
-RHBugzillaPage.prototype.addNewAttachmentRow = function addNewAttachmentRow(origAtt,
+function addNewAttachmentRow(origAtt,
newAttId, newAttSize) {
var that = this;
var oldAddBTLink = this.doc.getElementById("attachBacktraceActivator");
@@ -420,7 +282,7 @@ RHBugzillaPage.prototype.addNewAttachmentRow = function addNewAttachmentRow(orig
this.showAttachment, newAttId, false);
origAtt[4].parentNode.insertBefore(newTRElem, origAtt[4].nextSibling);
-};
+}
/**
* Add a link to create a new attachment with a parsed backtrace
@@ -429,7 +291,7 @@ RHBugzillaPage.prototype.addNewAttachmentRow = function addNewAttachmentRow(orig
* @param snippet String with parsed backtrace
* @return none
*/
-RHBugzillaPage.prototype.addCheckShowLink = function addCheckShowLink(oldAtt, snippet) {
+function addCheckShowLink(oldAtt, snippet) {
var that = this;
var elem = oldAtt[4].querySelector("td:last-of-type");
this.createDeadLink("attachBacktraceActivator", "add parsed BT", elem, function(x) {
@@ -437,7 +299,7 @@ RHBugzillaPage.prototype.addCheckShowLink = function addCheckShowLink(oldAtt, sn
// addAttachment
that.addAttachment.call(that, snippet, this.addNewAttachmentRow, oldAtt);
}, [], true);
-};
+}
/**
* Make it sailent that the some attachments with bad MIME type are present
@@ -445,7 +307,7 @@ RHBugzillaPage.prototype.addCheckShowLink = function addCheckShowLink(oldAtt, sn
* @param atts Array of attachments subarrays
* @return none
*/
-RHBugzillaPage.prototype.markBadAttachments = function markBadAttachments(atts) {
+function markBadAttachments(atts) {
var that = this;
var badMIMEArray = [ "application/octet-stream", "text/x-log", "undefined" ];
if (!this.password) {
@@ -471,29 +333,29 @@ RHBugzillaPage.prototype.markBadAttachments = function markBadAttachments(atts)
this.addTextLink(x);
}, this);
}
-};
+}
/**
* Is this bug a RHEL bug?
*
* @return Boolean true if it is a RHEL bug
*/
-RHBugzillaPage.prototype.isEnterprise = function() {
+function isEnterprise() {
var prod = this.product;
var result = this.constantData.ProfessionalProducts.some(function(elem,idx,arr) {
return new RegExp(elem).test(prod);
});
return result;
-};
+}
/**
* Find out whether the bug is needed an attention of bugZappers
*
* @return Boolean whether the bug has been triaged or not
*/
-RHBugzillaPage.prototype.isTriaged = function() {
+function isTriaged() {
return this.hasKeyword("Triaged");
-};
+}
/**
* Set branding colours to easily distinguish between Fedora and RHEL bugs
@@ -503,7 +365,7 @@ RHBugzillaPage.prototype.isTriaged = function() {
* @param its String with the IsueTracker numbers
* @return none
*/
-RHBugzillaPage.prototype.setBranding = function() {
+function setBranding() {
var brandColor = {};
var TriagedColor = {};
@@ -567,14 +429,14 @@ RHBugzillaPage.prototype.setBranding = function() {
.getElementById("bz_component_edit_container"))) {
compElems.style.background = "red none";
}
-};
+}
/**
* Search simple query in the upstream bugzilla appropriate for the component
*
* @return none
*/
-RHBugzillaPage.prototype.queryUpstream = function() {
+function queryUpstream() {
var text = this.getSelectionOrClipboard();
if (text) {
var queryUpstreamBugsURLArray = this.constantData.queryUpstreamBug;
@@ -593,14 +455,14 @@ RHBugzillaPage.prototype.queryUpstream = function() {
}
});
}
-};
+}
/**
* Open a tab in the upstream bugzilla to create a new bug
*
* @return none
*/
-RHBugzillaPage.prototype.sendBugUpstream = function() {
+function sendBugUpstream() {
var that = this;
var urlStr = util.filterByRegexp(JSON.parse(self.data.load("newUpstreamBug.json")), this
.getComponent());
@@ -618,14 +480,14 @@ RHBugzillaPage.prototype.sendBugUpstream = function() {
tabs.activeTab = tab;
}
});
-};
+}
/**
* Add a link opening selected lines of Xorg.0.log
*
* @return none
*/
-RHBugzillaPage.prototype.addCheckXorgLogLink = function addCheckXorgLogLink() {
+function addCheckXorgLogLink() {
var that = this;
if (this.xorglogAnalysis) {
this.XorgLogAttList.forEach(function (row) {
@@ -635,7 +497,7 @@ RHBugzillaPage.prototype.addCheckXorgLogLink = function addCheckXorgLogLink() {
that.analyzeXorgLog, row[1], "br");
});
}
-};
+}
/**
* Given line to be parsed, find out which chipset it is and fill in the
@@ -645,7 +507,7 @@ RHBugzillaPage.prototype.addCheckXorgLogLink = function addCheckXorgLogLink() {
* @param driverStr String with the driver name
* @return None
*/
-RHBugzillaPage.prototype.fillInWhiteBoard = function(iLine, driverStr) {
+function fillInWhiteBoard(iLine, driverStr) {
var that = this;
function groupIDs(manStr, cardStrID) {
@@ -716,7 +578,7 @@ RHBugzillaPage.prototype.fillInWhiteBoard = function(iLine, driverStr) {
}
this.addStuffToTextBox("status_whiteboard", ("card_" + outStr).trim());
this.doc.getElementById("chipMagic_btn").style.display = "none";
-};
+}
/**
* Get attached Xorg.0.log, parse it and find the value of chip. Does not fill
@@ -725,7 +587,7 @@ RHBugzillaPage.prototype.fillInWhiteBoard = function(iLine, driverStr) {
*
* @return None
*/
-RHBugzillaPage.prototype.fillInChipMagic = function fillInChipMagic() {
+function fillInChipMagic() {
var that = this;
var XorgLogURL = "";
var XorgLogAttID = "";
@@ -765,9 +627,9 @@ RHBugzillaPage.prototype.fillInChipMagic = function fillInChipMagic() {
}
}).get();
this.XorgLogAttListIndex++;
-};
+}
-RHBugzillaPage.prototype.analyzeXorgLog = function analyzeXorgLog(attachID) {
+function analyzeXorgLog(attachID) {
var infoWin = this.win.open("", "Check att. " + attachID,
"width=640,height=640,status=no,location=no");
var doc = infoWin.document;
@@ -806,7 +668,7 @@ RHBugzillaPage.prototype.analyzeXorgLog = function analyzeXorgLog(attachID) {
// doc.body.style.cursor = oldCursor;
}
}).get();
-};
+}
/**
* Return string with the ID for the external_id SELECT for external bugzilla
@@ -814,7 +676,7 @@ RHBugzillaPage.prototype.analyzeXorgLog = function analyzeXorgLog(attachID) {
* @param URLhostname String hostname of the external bugzilla
* @return String with the string for the external_id SELECT
*/
-RHBugzillaPage.prototype.getBugzillaName = function getBugzillaName(URLhostname) {
+function getBugzillaName(URLhostname) {
var bugzillaID = "";
var bzLabelNames = JSON.parse(self.data.load("bugzillalabelNames.json"));
if (bzLabelNames[URLhostname]) {
@@ -823,7 +685,7 @@ RHBugzillaPage.prototype.getBugzillaName = function getBugzillaName(URLhostname)
bugzillaID = "";
}
return bugzillaID;
-};
+}
/**
* Callback function for the XMLRPC request
@@ -834,7 +696,7 @@ RHBugzillaPage.prototype.getBugzillaName = function getBugzillaName(URLhostname)
* + responseHeaders
* + responseText
*/
-RHBugzillaPage.prototype.XMLRPCcallback = function XMLRPCcallback() {
+function XMLRPCcallback() {
var that = this;
this.reqCounter--;
if (this.reqCounter <= 0) {
@@ -842,7 +704,7 @@ RHBugzillaPage.prototype.XMLRPCcallback = function XMLRPCcallback() {
that.win.location.reload(true);
}, 1000);
}
-};
+}
/**
* The worker function -- call XMLRPC to fix MIME type of the particular
@@ -866,7 +728,7 @@ RHBugzillaPage.prototype.XMLRPCcallback = function XMLRPCcallback() {
* this change };
*
*/
-RHBugzillaPage.prototype.fixAttachById = function fixAttachById(id, type, email) {
+function fixAttachById(id, type, email) {
if (type === undefined) {
type = "text/plain";
}
@@ -898,7 +760,7 @@ RHBugzillaPage.prototype.fixAttachById = function fixAttachById(id, type, email)
contentType: "text/xml"
}).post();
this.reqCounter++;
-};
+}
/**
* Add a link to the bad attachment for fixing it.
@@ -907,12 +769,12 @@ RHBugzillaPage.prototype.fixAttachById = function fixAttachById(id, type, email)
* <TR> DOM jQuery element with a bad attachment
* @return none
*/
-RHBugzillaPage.prototype.addTextLink = function addTextLink(row) {
+function addTextLink(row) {
var elemS = row[4].getElementsByTagName("td");
var elem = elemS[elemS.length - 1];
this.createDeadLink("addFix2TextLink", "text", elem,
this.fixAttachById, row[1], "br");
-};
+}
/**
* Add information about the upstream bug upstream, and closing it.
@@ -920,7 +782,7 @@ RHBugzillaPage.prototype.addTextLink = function addTextLink(row) {
* @param evt Event which called this handler
* @return none
*/
-RHBugzillaPage.prototype.addClosingUpstream = function() {
+function addClosingUpstream() {
var refs = this.doc.getElementById("external_bugs_table")
.getElementsByTagName("tr");
@@ -962,9 +824,9 @@ RHBugzillaPage.prototype.addClosingUpstream = function() {
} else {
console.log("No external bug specified among the External References!");
}
-};
+}
-RHBugzillaPage.prototype.markBugTriaged = function() {
+function markBugTriaged() {
// Now we lie completely, we just set keyword Triaged,
// this is not just plain ASSIGNED, but
// modified according to
@@ -982,12 +844,12 @@ RHBugzillaPage.prototype.markBugTriaged = function() {
this.selectOption("bug_status", "ASSIGNED");
}
this.addStuffToTextBox("keywords","Triaged");
-};
+}
/**
*
*/
-RHBugzillaPage.prototype.parseBacktrace = function(ret) {
+function parseBacktrace (ret) {
var splitArray = ret.split("\n");
var i = 0, ii = splitArray.length;
var outStr = "", curLine = "", numStr = "";
@@ -1017,7 +879,124 @@ RHBugzillaPage.prototype.parseBacktrace = function(ret) {
return outStr;
}
return "";
-};
+}
+
+function RHBugzillaPage(win, config) {
+ // inheritance ... call superobject's constructor
+ BZPage.call(this, win, config);
+
+ // For identification of graphics card
+ this.manuChipStrs = [ [ "ATI Radeon", "ATI", "1002" ],
+ [ "ATI Mobility Radeon", "ATI", "1002" ],
+ [ "Intel Corporation", "INTEL", "8086" ], [ "NVIDIA", "NV", "10de" ] ];
+
+ // http://en.wikipedia.org/wiki/HSL_color_space
+ // when only the value of S is changed
+ // stupido!!! the string is value in hex for each color
+ this.RHColor = new Color(158, 41, 43); // RGB 158, 41, 43; HSL 359, 1, 39
+ this.FedoraColor = new Color(0, 40, 103); // RGB 0, 40, 103; HSL 359, 1, 39
+ this.RawhideColor = new Color(0, 119, 0); // or "green", or RGB 0, 119, 0, or
+ // HSL
+ // 120, 0, 23
+ this.RHITColor = new Color(102, 0, 102); // RGB 102, 0, 102; HSL 300, 0, 20
+
+ this.RE = {
+ Comment: new RegExp("^\\s*#"), // unsused
+ BlankLine: new RegExp("^\\s*$"), // unused
+ // new line
+ // [ 65.631] (--) intel(0): Chipset: "845G"
+ Chipset: new RegExp("^\\s*\\[?[ 0-9.]*\\]?\\s*\\(--\\) "+
+ "([A-Za-z]+)\\([0-9]?\\): Chipset: (.*)$"),
+ ATIgetID: new RegExp("^.*\\(ChipID = 0x([0-9a-fA-F]+)\\).*$"),
+ Abrt: new RegExp("^\\s*\\[abrt\\]"),
+ signalHandler: new RegExp("^\\s*#[0-9]*\\s*<signal handler called>"),
+ frameNo: new RegExp("^\\s*#([0-9]*)\\s"),
+ soughtLines: new RegExp("^\\s*(\\[[0-9 .]*\\])?\\s*(\\((EE|WW)\\)|.* [cC]hipsets?: )|\\s*Backtrace")
+ };
+ // END OF CONSTANTS
+
+ var that = this;
+ this.reqCounter = 0;
+ this.signaturesCounter = 0;
+ this.chipMagicInterestingLine = "";
+
+ this.product = this.doc.getElementById("product").value;
+
+ this.maintCCAddr = null;
+ if (this.constantData.CCmaintainer) {
+ this.maintCCAddr = util.filterByRegexp(this.constantData.CCmaintainer,
+ this.getComponent());
+ }
+
+ var ITbutton = this.doc.getElementById("cf_issuetracker");
+ this.its = ITbutton ? ITbutton.value.trim() : "";
+
+ if (!this.constantData.ProfessionalProducts) {
+ this.constantData.ProfessionalProducts =
+ JSON.parse(self.data.load("professionalProducts.json"));
+ }
+
+ // getBadAttachments
+ this.XorgLogAttList = [];
+ this.XorgLogAttListIndex = 0;
+ this.attachments = this.getAttachments();
+ this.markBadAttachments(this.attachments);
+
+ this.parsedAttachments = this.attachments.filter(function (att) {
+ return (new RegExp(titleParsedAttachment).test(att[0]));
+ });
+
+ if (this.constantData.defaultAssignee) {
+ this.setDefaultAssignee();
+ }
+
+ // Dig out backtrace protection against double-firing?
+ this.btSnippet = "";
+
+ var parseAbrtBacktraces = config.gJSONData.configData.parseAbrtBacktraces;
+ if (parseAbrtBacktraces && this.RE.Abrt.test(this.title)) {
+ this.pasteBacktraceInComments();
+ }
+
+ // 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]));
+ });
+ this.addCheckXorgLogLink();
+
+ // TODO Get compiz bugs as well
+ if (this.constantData.PCI_ID_Array &&
+ (this.XorgLogAttList[0]) &&
+ (this.maintCCAddr === "xgl-maint@redhat.com")) {
+ // Add find chip magic button
+ var whiteboard_string = this.doc.getElementById("status_whiteboard").value;
+ if (!/card_/.test(whiteboard_string)) {
+ this.fillInChipMagic();
+ }
+ }
+
+ // Take care of signature for Fedora bugzappers
+ if (config.gJSONData.configData.signature.length > 0) {
+ var signatureFedoraString = config.gJSONData.configData.signature;
+ this.doc.forms.namedItem("changeform").addEventListener("submit",
+ function(aEvt) {
+ if (that.signaturesCounter < 1) {
+ that.addStuffToTextBox("comment", signatureFedoraString);
+ that.signaturesCounter += 1;
+ }
+ }, false);
+ }
+
+ this.setBranding();
+
+ // set default assignee on change of the component
+ var compElement = this.doc.getElementById("component");
+ if (compElement && (compElement.options)) {
+ this.doc.getElementById("component").addEventListener("change",
+ function() {
+ that.changeAssignee("default");
+ }, false);
+ }
-// exports.RHBugzillaPage = apiUtils.publicConstructor(RHBugzillaPage);
-exports.RHBugzillaPage = RHBugzillaPage;
+}