aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rhbzpage.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rhbzpage.js')
-rw-r--r--lib/rhbzpage.js54
1 files changed, 42 insertions, 12 deletions
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js
index 6fa16ea..ddee250 100644
--- a/lib/rhbzpage.js
+++ b/lib/rhbzpage.js
@@ -69,6 +69,8 @@ var RHBugzillaPage = function RHBugzillaPage(win, config) {
this.chipMagicInterestingLine = "";
this.login = this.getLogin();
+ this.maintCCAddr = util.filterByRegexp(this.constantData.CCmaintainer,
+ this.component);
var ITbutton = this.doc.getElementById("cf_issuetracker");
this.its = ITbutton ? ITbutton.value.trim() : "";
@@ -111,9 +113,8 @@ var RHBugzillaPage = function RHBugzillaPage(win, config) {
this.checkComments();
// TODO Get compiz bugs as well
- if ((config.gJSONData.configData.PCIIDsURL
- && (config.PCI_ID_Array.length > 0))
- && this.maintCCAddr === "xgl-maint@redhat.com") {
+ if (config.PCI_ID_Array &&
+ (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)) {
@@ -219,6 +220,7 @@ RHBugzillaPage.prototype.centralCommandDispatch = function(cmdLabel, cmdParams)
this.markBugTriaged();
break;
case "chipMagic":
+ // it's true, not array ??? FIXME
var splitArr = cmdParams.split("\t");
this.fillInWhiteBoard(splitArr[0], splitArr[1]);
break;
@@ -404,7 +406,7 @@ RHBugzillaPage.prototype.setBranding = function() {
}
// we should make visible whether maintCCAddr is in CCList
- if (util.isInList(this.maintCCAddr, this.CCList)) {
+ if (util.isInList(this.doc.getElementById("assigned_to").value, this.CCList)) {
var ccEditBoxElem = this.doc.getElementById("cc_edit_area_showhide");
// ccEditBoxElem.textContent = "*"+ccEditBoxElem.textContent;
ccEditBoxElem.style.color = "navy";
@@ -527,6 +529,19 @@ RHBugzillaPage.prototype.fillInChipMagic = function () {
return;
}
+ // FIXME add this.XorgLogAttList.forEach(addCheckButton) when configured so
+ // in this.config
+ if (this.xorglogAnalysis) {
+ this.XorgLogAttList.forEach(function (row) {
+ var elemS = row[4].getElementsByTagName("td");
+ var elem = elemS[elemS.length - 1];
+ elem.innerHTML += "<br/><a href='#'>cX</a>";
+ elem.addEventListener("click", function(x) {
+ that.analyzeXorgLog(row[1]);
+ }, false);
+ }, this);
+ };
+
XorgLogAttID = this.XorgLogAttList[this.XorgLogAttListIndex][1];
attURL = "https://bugzilla.redhat.com/attachment.cgi?id="+XorgLogAttID;
@@ -619,7 +634,6 @@ RHBugzillaPage.prototype.queryForSelection = function() {
* Search simple query in the upstream bugzilla appropriate for the component.
*/
RHBugzillaPage.prototype.queryUpstream = function() {
- console.log("Querying upstream!");
var text = this.getSelectionOrClipboard();
if (text) {
text = encodeURIComponent(text.trim());
@@ -627,10 +641,6 @@ RHBugzillaPage.prototype.queryUpstream = function() {
var urlBase = util.filterByRegexp(queryUpstreamBugsURLArray, this.component);
tabs.open({
url: urlBase + text,
- inBackground: true,
- onOpen: function (t) {
- t.activate();
- }
});
}
};
@@ -695,6 +705,29 @@ RHBugzillaPage.prototype.parseAttachmentLine = function(inElem) {
return [ attName, id, MIMEtype, size, inElem ];
};
+RHBugzillaPage.prototype.analyzeXorgLog = function analyzeXorgLog(attachID) {
+ var infoWin = this.win.open("", "Check att. " + attachID,
+ "width=512,height=640,status=no,location=no");
+ var doc = infoWin.document;
+ doc.body.innerHTML = "<pre id='textPre'></pre>";
+ var preElem = doc.getElementById("textPre");
+ var soughtLinesRE = /^\s*(\[[0-9 .]*\])?\s*\((EE|WW)\)|\s*Backtrace"/;
+
+ attURL = "https://bugzilla.redhat.com/attachment.cgi?id=" + attachID;
+ var that = this;
+ Request({
+ url: attURL,
+ onComplete: function() {
+ var logArr = this.response.text.split("\n");
+ logArr.forEach(function (line) {
+ if (soughtLinesRE.test(line)) {
+ preElem.innerHTML += line+"\n";
+ }
+ });
+ }
+ }).get();
+};
+
/**
* Return string with the ID for the external_id SELECT for external bugzilla
*
@@ -791,9 +824,6 @@ RHBugzillaPage.prototype.fixAttachById = function(id, type, email) {
* @return button fixing all bad Attachments
*/
RHBugzillaPage.prototype.createFixAllButton = function(list) {
- if (!xrpc.XMLRPCMessage) {
- return;
- }
var that = this;
var elem = this.doc.createElement("a");
elem.setAttribute("href", "");