aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rhbzpage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-06-09 21:53:42 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-06-09 21:53:42 +0200
commit9b41b8867d5eb3f78b6260e8ee719c81579102c9 (patch)
treef3b2ee664b4de1c563e5a03f1becc748bbad12a0 /lib/rhbzpage.js
parente6c92c1ff7c2b465afd6076beabb692d9c3e4825 (diff)
downloadbugzilla-triage-9b41b8867d5eb3f78b6260e8ee719c81579102c9.tar.gz
* clean up to make jslint happy (abandoned let and replaced with var)
* cleaned up couple of crashes and missing stuff
Diffstat (limited to 'lib/rhbzpage.js')
-rw-r--r--lib/rhbzpage.js218
1 files changed, 111 insertions, 107 deletions
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js
index 2370e72..f2e7c22 100644
--- a/lib/rhbzpage.js
+++ b/lib/rhbzpage.js
@@ -7,6 +7,8 @@ var util = require("util");
var xrpc = require("xmlrpc");
var xhr = require("xhr");
var clip = require("clipboard");
+var Color = require("color").Color;
+var BZPage = require("bzpage").BZPage;
// var TriagedDistro = 13;
// var NumberOfFrames = 7;
// var XMLRPCurl = "https://bugzilla.redhat.com/xmlrpc.cgi";
@@ -15,9 +17,9 @@ var clip = require("clipboard");
// ====================================================================================
// RHBugzillaPage object
-exports.RHBugzillaPage = function RHBugzillaPage(doc, config) {
+var RHBugzillaPage = exports.RHBugzillaPage = function RHBugzillaPage(doc, config) {
// For identification of graphics card
- const manuChipStrs = [ [ "ATI Radeon", "ATI", "1002" ],
+ var manuChipStrs = [ [ "ATI Radeon", "ATI", "1002" ],
[ "ATI Mobility Radeon", "ATI", "1002" ],
[ "Intel Corporation", "INTEL", "8086" ], [ "NVIDIA", "NV", "10de" ] ];
@@ -48,18 +50,22 @@ exports.RHBugzillaPage = function RHBugzillaPage(doc, config) {
// Prepare for query buttons
// FIXME getting null for commentArea sometimes
- let commentArea = doc.getElementById("comment_status_commit");
+ var commentArea = doc.getElementById("comment_status_commit");
if (commentArea) {
- let brElementPlacer = commentArea.getElementsByTagName("br")[0];
- brElementPlacer.setAttribute("id","brElementPlacer_location");
- brElementPlacer.parentNode.insertBefore(doc.createElement("br"),
- brElementPlacer);
+ var brElementPlacer = commentArea.getElementsByTagName("br");
+ console.log("brElementPlacer.length = " + brElementPlacer.length);
+ brElementPlacer = brElementPlacer[0];
+ if (brElementPlacer) {
+ brElementPlacer.setAttribute("id","brElementPlacer_location");
+ brElementPlacer.parentNode.insertBefore(doc.createElement("br"),
+ brElementPlacer);
+ }
}
// inheritance ... call superobject's constructor
BZPage.call(this,doc, config);
- let that = this;
+ var that = this;
this.reqCounter = 0;
this.signaturesCounter = 0;
this.chipMagicInterestingLine = "";
@@ -67,7 +73,7 @@ exports.RHBugzillaPage = function RHBugzillaPage(doc, config) {
this.login = this.getLogin();
this.password = this.getPassword();
- let ITbutton = this.doc.getElementById("cf_issuetracker");
+ var ITbutton = this.doc.getElementById("cf_issuetracker");
this.its = ITbutton ? ITbutton.value.trim() : "";
// set default assignee on change of the component
@@ -87,14 +93,14 @@ exports.RHBugzillaPage = function RHBugzillaPage(doc, config) {
// Dig out backtrace
this.btSnippet = "";
- let parseAbrtBacktraces = config.gJSONData.configData.parseAbrtBacktraces;
+ var parseAbrtBacktraces = config.gJSONData.configData.parseAbrtBacktraces;
if (parseAbrtBacktraces && this.RE.Abrt.test(this.title)) {
this.pasteBacktraceInComments();
}
// Take care of signature for Fedora bugzappers
if (config.gJSONData.configData.signature.length > 0) {
- let signatureFedoraString = config.gJSONData.configData.signature;
+ var signatureFedoraString = config.gJSONData.configData.signature;
this.doc.forms.namedItem("changeform").addEventListener("submit",
function() {
if (this.signaturesCounter < 1) {
@@ -112,12 +118,12 @@ exports.RHBugzillaPage = function RHBugzillaPage(doc, config) {
&& (config.PCI_ID_Array.length > 0))
&& this.maintCCAddr === "xgl-maint@redhat.com") {
// Add find chip magic button
- let whiteboard_string = this.doc.getElementById("status_whiteboard").value;
+ var whiteboard_string = this.doc.getElementById("status_whiteboard").value;
if (!/card_/.test(whiteboard_string)) {
this.fillInChipMagic();
}
}
-} // END OF RHBugzillaPage CONSTRUCTOR
+}; // END OF RHBugzillaPage CONSTRUCTOR
RHBugzillaPage.prototype = util.heir(BZPage);
RHBugzillaPage.prototype.constructor = RHBugzillaPage;
@@ -131,7 +137,7 @@ RHBugzillaPage.prototype.constructor = RHBugzillaPage;
RHBugzillaPage.prototype.getDefaultAssignee = function() {
return util.filterByRegexp(this.constantData.defaultAssignee,
this.component).toLowerCase();
-}
+};
/**
* Set default assignee
@@ -141,7 +147,7 @@ RHBugzillaPage.prototype.getDefaultAssignee = function() {
*/
RHBugzillaPage.prototype.setDefaultAssignee = function() {
this.defaultAssignee = this.getDefaultAssignee();
- let defAss = this.defaultAssignee;
+ var defAss = this.defaultAssignee;
// Add setting default assignee
if ((defAss.length > 0) && (defAss !== this.getOwner())) {
@@ -159,10 +165,10 @@ RHBugzillaPage.prototype.closeSomeRelease = function() {
// and put the release version to
// "Fixed in Version" textbox
// otherwise -> NEXTRELEASE
- let verNo = this.getVersion();
+ var verNo = this.getVersion();
this.selectOption("bug_status", "CLOSED");
- let text = "";
- let resolution = "";
+ var text = "";
+ var resolution = "";
if (jetpack.selection.text) {
text = jetpack.select.text.trim();
@@ -204,7 +210,7 @@ RHBugzillaPage.prototype.centralCommandDispatch = function(cmdLabel, cmdParams)
this.markBugTriaged();
break;
case "chipMagic":
- let splitArr = cmdParams.split("\t");
+ var splitArr = cmdParams.split("\t");
this.fillInWhiteBoard(splitArr[0], splitArr[1]);
break;
// If we don't have it here, call superclass method
@@ -228,19 +234,19 @@ 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']");
+ var notedLabel = this.doc.querySelector("label[for='newcc']");
while (notedLabel.firstChild) {
- let node = notedLabel.removeChild(notedLabel.firstChild);
+ var node = notedLabel.removeChild(notedLabel.firstChild);
notedLabel.parentNode.insertBefore(node, notedLabel);
}
notedLabel.parentNode.removeChild(notedLabel);
- let abrtQueryURL = "https://bugzilla.redhat.com/buglist.cgi?"
+ var abrtQueryURL = "https://bugzilla.redhat.com/buglist.cgi?"
+ "cmdtype=dorem&remaction=run&namedcmd=all%20NEW%20abrt%20crashes&sharer_id=74116";
- let mainTitle = this.doc
+ var mainTitle = this.doc
.getElementsByClassName("bz_alias_short_desc_container")[0];
- let abrtButton = this.doc.createElement("a");
+ var abrtButton = this.doc.createElement("a");
abrtButton.setAttribute("accesskey", "a");
abrtButton.setAttribute("href", abrtQueryURL);
abrtButton.textContent = "Abrt bugs";
@@ -252,7 +258,7 @@ RHBugzillaPage.prototype.pasteBacktraceInComments = function() {
if (!(this.isTriaged() || this.idContainsWord("status_whiteboard",
'btparsed'))) {
- let btAttachments = this.attachments
+ var btAttachments = this.attachments
.filter(function(att, idx, arr) {
return (/backtrace/.test(att[0]));
});
@@ -263,7 +269,7 @@ RHBugzillaPage.prototype.pasteBacktraceInComments = function() {
attURL = "https://bugzilla.redhat.com/attachment.cgi?id="
+ x[1];
if (!this.btSnippet) {
- let btRaw = util.loadText(attURL, function(ret) {
+ var btRaw = util.loadText(attURL, function(ret) {
this.btSnippet = this.parseBacktrace(ret);
if (this.btSnippet) {
this.addStuffToTextBox("comment", this.btSnippet);
@@ -280,14 +286,14 @@ RHBugzillaPage.prototype.pasteBacktraceInComments = function() {
*
*/
RHBugzillaPage.prototype.markBadAttachments = function() {
- let badMIMEArray = [ "application/octet-stream", "text/x-log", "undefined" ];
+ var badMIMEArray = [ "application/octet-stream", "text/x-log", "undefined" ];
- let badAttachments = this.attachments.filter(function(att, idx, arr) {
+ var badAttachments = this.attachments.filter(function(att, idx, arr) {
return (util.isInList(att[2], badMIMEArray));
});
if (badAttachments.length > 0) {
- let titleElement = this.doc
+ var titleElement = this.doc
.getElementsByClassName("bz_alias_short_desc_container")[0];
titleElement.style.backgroundColor = "olive";
titleElement.appendChild(this.createFixAllButton(badAttachments));
@@ -303,8 +309,8 @@ RHBugzillaPage.prototype.markBadAttachments = function() {
* @return Boolean true if it is a RHEL bug
*/
RHBugzillaPage.prototype.isEnterprise = function() {
- let prod = this.product;
- let result = this.ProfessionalProducts.some(function(elem,idx,arr) {
+ var prod = this.product;
+ var result = this.ProfessionalProducts.some(function(elem,idx,arr) {
return new RegExp(elem).test(prod);
});
return result;
@@ -333,8 +339,8 @@ RHBugzillaPage.prototype.isTriaged = function() {
* @return none
*/
RHBugzillaPage.prototype.setBranding = function() {
- let brandColor = {};
- let TriagedColor = {};
+ var brandColor = {};
+ var TriagedColor = {};
if (this.isEnterprise()) {
console.log("This is an enterprise bug.");
@@ -345,7 +351,7 @@ RHBugzillaPage.prototype.setBranding = function() {
}
} else if (new RegExp("Fedora").test(this.product)) {
console.log("This is NOT an enterprise bug.");
- if (this.version == 999) {
+ if (this.version === 999) {
brandColor = this.RawhideColor;
} else {
brandColor = this.FedoraColor;
@@ -361,11 +367,11 @@ RHBugzillaPage.prototype.setBranding = function() {
// Remove "Bug" from the title of the bug page, so we have more space with
// plenty of tabs
- let titleElem = this.doc.getElementsByTagName("title")[0];
+ var titleElem = this.doc.getElementsByTagName("title")[0];
titleElem.textContent = titleElem.textContent.slice(4);
- let bodyTitleParent = this.doc.getElementById("summary_alias_container").parentNode;
- let bodyTitleElem = bodyTitleParent.getElementsByTagName("b")[0];
+ var bodyTitleParent = this.doc.getElementById("summary_alias_container").parentNode;
+ var bodyTitleElem = bodyTitleParent.getElementsByTagName("b")[0];
bodyTitleElem.textContent = bodyTitleElem.textContent.slice(4);
// Make background-color of the body of bug salmon pink
@@ -384,7 +390,7 @@ RHBugzillaPage.prototype.setBranding = function() {
// we should make visible whether maintCCAddr is in CCList
if (util.isInList(this.maintCCAddr, this.CCList)) {
- let ccEditBoxElem = this.doc.getElementById("cc_edit_area_showhide");
+ var ccEditBoxElem = this.doc.getElementById("cc_edit_area_showhide");
// ccEditBoxElem.textContent = "*"+ccEditBoxElem.textContent;
ccEditBoxElem.style.color = "navy";
ccEditBoxElem.style.fontWeight = "bolder";
@@ -392,8 +398,8 @@ RHBugzillaPage.prototype.setBranding = function() {
}
// mark suspicious components
- let compElems;
- let suspiciousComponents = config.gJSONData.configData.suspiciousComponents;
+ var compElems;
+ var suspiciousComponents = config.gJSONData.configData.suspiciousComponents;
if (suspiciousComponents
&& util.isInList(this.component, suspiciousComponents)
&& (compElems = this.doc
@@ -411,16 +417,15 @@ RHBugzillaPage.prototype.setBranding = function() {
* @return None
*/
RHBugzillaPage.prototype.fillInWhiteBoard = function(iLine, driverStr) {
- let that = this;
+ var that = this;
function groupIDs(manStr, cardStrID) {
- let outStr = util.filterByRegexp(chipIDsGroupings, manStr + "," + cardStrID);
+ var outStr = util.filterByRegexp(chipIDsGroupings, manStr + "," + cardStrID);
if (outStr.length === 0) {
outStr = "UNGROUPED_" + manStr + "/" + cardStrID;
}
return outStr;
}
- ;
/**
* Given PCI IDs for manufacturer and card ID return chipset string
@@ -430,22 +435,21 @@ RHBugzillaPage.prototype.fillInWhiteBoard = function(iLine, driverStr) {
* @return Array with chip string and optinoal variants
*/
function checkChipStringFromID(manufacturerNo, cardNo) {
- let soughtID = (manufacturerNo + "," + cardNo).toUpperCase();
- let outList = config.PCI_ID_Array[soughtID];
+ var soughtID = (manufacturerNo + "," + cardNo).toUpperCase();
+ var outList = config.PCI_ID_Array[soughtID];
if (outList) {
return outList;
} else {
return "";
}
}
- ;
- let outStr = "";
- let cardIDStr = "";
- let cardIDArr = [];
+ var outStr = "";
+ var cardIDStr = "";
+ var cardIDArr = [];
chipSwitchboard: if (driverStr === "RADEON") {
- let cardID = iLine.replace(this.RE.ATIgetID, "$1");
+ var cardID = iLine.replace(this.RE.ATIgetID, "$1");
cardIDArr = checkChipStringFromID("1002", cardID);
if (cardIDArr.length > 0) {
cardIDStr = cardIDArr[0];
@@ -492,12 +496,12 @@ RHBugzillaPage.prototype.fillInWhiteBoard = function(iLine, driverStr) {
* @return None
*/
RHBugzillaPage.prototype.fillInChipMagic = function () {
- let that = this;
- let XorgLogURL = "";
- let XorgLogAttID = "";
- let XorgLogFound = false;
- let attURL = "", interestingLine = "";
- let interestingArray = [];
+ var that = this;
+ var XorgLogURL = "";
+ var XorgLogAttID = "";
+ var XorgLogFound = false;
+ var attURL = "", interestingLine = "";
+ var interestingArray = [];
// Find out Xorg.0.log attachment URL
@@ -515,7 +519,7 @@ RHBugzillaPage.prototype.fillInChipMagic = function () {
// parse Xorg.0.log
util.loadText(attURL, function(ret){
- let interestingLineArr = ret.split("\n").
+ var interestingLineArr = ret.split("\n").
filter(function (v,i,a) {
return that.RE.Chipset.test(v);
});
@@ -549,7 +553,7 @@ RHBugzillaPage.prototype.queryInNewTab = function(text, component, product) {
console.log("queryInNewTab / text = " + text);
console.log("queryInNewTab / component = " + component);
console.log("queryInNewTab / product = " + product);
- let url = "https://bugzilla.redhat.com/buglist.cgi?query_format=advanced";
+ var url = "https://bugzilla.redhat.com/buglist.cgi?query_format=advanced";
if (product) {
url += "&product=" + product.trim();
}
@@ -562,7 +566,7 @@ RHBugzillaPage.prototype.queryInNewTab = function(text, component, product) {
// for further investigative searches
if (text) {
text = encodeURIComponent(text.trim());
- let searchText = "&field1-0-0=longdesc&type1-0-0=substring&value1-0-0="
+ var searchText = "&field1-0-0=longdesc&type1-0-0=substring&value1-0-0="
+ text
+ "&field1-0-1=attach_data.thedata&type1-0-1=substring&value1-0-1="
+ text
@@ -588,7 +592,7 @@ RHBugzillaPage.prototype.queryInNewTab = function(text, component, product) {
* function this.queryInNewTab, and run it.
*/
RHBugzillaPage.prototype.queryForSelection = function() {
- let text = jetpack.selection.text;
+ var text = jetpack.selection.text;
console.log("selection = " + text);
if (!text) {
text = clip.get();
@@ -605,31 +609,31 @@ RHBugzillaPage.prototype.queryForSelection = function() {
*/
RHBugzillaPage.prototype.queryUpstream = function() {
console.log("Querying upstream!");
- let text = jetpack.selection.text;
+ var text = jetpack.selection.text;
console.log("Selection = |" + text + "|");
if (!text) {
text = clip.get();
}
if (text) {
- let text = encodeURIComponent(text.trim());
- let queryUpstreamBugsURLArray = this.constantData.queryUpstreamBug;
- let url = util.filterByRegexp(queryUpstreamBugsURLArray, this.component);
+ text = encodeURIComponent(text.trim());
+ var queryUpstreamBugsURLArray = this.constantData.queryUpstreamBug;
+ var url = util.filterByRegexp(queryUpstreamBugsURLArray, this.component);
jetpack.tabs.open(url + text);
}
-}
+};
/**
*
*/
RHBugzillaPage.prototype.sendBugUpstream = function() {
- let url = util.filterByRegexp(this.constantData.newUpstreamBug, this
+ var url = util.filterByRegexp(this.constantData.newUpstreamBug, this
.getOptionValue("component"));
- let ret = jetpack.tabs.open(url);
- let that = this;
+ var ret = jetpack.tabs.open(url);
+ var that = this;
jetpack.tabs.onReady(function() {
- let otherDoc = ret.contentDocument;
- let otherElems = otherDoc.forms.namedItem("Create").elements;
+ var otherDoc = ret.contentDocument;
+ var otherElems = otherDoc.forms.namedItem("Create").elements;
otherElems.namedItem("short_desc").value = that.doc
.getElementById("short_desc_nonedit_display").textContent
.trim();
@@ -647,8 +651,8 @@ RHBugzillaPage.prototype.sendBugUpstream = function() {
* element itself
*/
RHBugzillaPage.prototype.parseAttachmentLine = function(inElem) {
- let MIMEtype = "";
- let size = 0;
+ var MIMEtype = "";
+ var size = 0;
// Skip over obsolete attachments
if (inElem.getElementsByClassName("bz_obsolete").length > 0) {
@@ -656,17 +660,17 @@ RHBugzillaPage.prototype.parseAttachmentLine = function(inElem) {
}
// getting name of the attachment
- let attName = inElem.getElementsByTagName("b")[0].textContent.trim();
+ var attName = inElem.getElementsByTagName("b")[0].textContent.trim();
- let aHrefsArr = inElem.getElementsByTagName("a");
- let aHref = Array.filter(aHrefsArr, function(x) {
- return x.textContent.trim() == "Details";
+ var aHrefsArr = inElem.getElementsByTagName("a");
+ var aHref = Array.filter(aHrefsArr, function(x) {
+ return x.textContent.trim() === "Details";
})[0];
- let id = parseInt(aHref.getAttribute("href").replace(
+ var id = parseInt(aHref.getAttribute("href").replace(
/^.*attachment.cgi\?id=/, ""), 10);
// getting MIME type and size
- let stringArray = inElem.getElementsByClassName("bz_attach_extra_info")[0].textContent
+ var stringArray = inElem.getElementsByClassName("bz_attach_extra_info")[0].textContent
.replace(/[\n ()]+/g, " ").trim().split(", ");
size = parseInt(stringArray[0], 10);
MIMEtype = stringArray[1].split(" ")[0];
@@ -696,7 +700,7 @@ RHBugzillaPage.prototype.fixElement = function(elem, beforeText, accKey, afterTe
* @return String with the string for the external_id SELECT
*/
RHBugzillaPage.prototype.getBugzillaName = function(URLhostname) {
- let bugzillaID = "";
+ var bugzillaID = "";
if (this.constantData.bugzillalabelNames[URLhostname]) {
bugzillaID = this.constantData.bugzillalabelNames[URLhostname];
} else {
@@ -715,7 +719,7 @@ RHBugzillaPage.prototype.getBugzillaName = function(URLhostname) {
* + responseText
*/
RHBugzillaPage.prototype.fixingMIMECallBack = function(data, textStatus) {
- let that = this;
+ var that = this;
if (--this.reqCounter <= 0) {
setTimeout(function () {
that.doc.location.reload(true);
@@ -753,7 +757,7 @@ RHBugzillaPage.prototype.fixAttachById = function(id, type, email) {
email = false;
}
- let msg = new xrpc.XMLRPCMessage("bugzilla.updateAttachMimeType");
+ var msg = new xrpc.XMLRPCMessage("bugzilla.updateAttachMimeType");
msg.addParameter( {
'attach_id' : id,
'mime_type' : type,
@@ -762,14 +766,14 @@ RHBugzillaPage.prototype.fixAttachById = function(id, type, email) {
msg.addParameter(this.login);
msg.addParameter(this.password);
- let req = new XMLHttpRequest();
- let that = this;
+ var req = new XMLHttpRequest();
+ var that = this;
req.open("POST", XMLRPCurl, true);
req.overrideMimeType("text/xml");
req.setRequestHeader("Content-type", "text/xml");
req.onreadystatechange = function(aEvt) {
- if (req.readyState == 4) {
- if (req.status == 200) {
+ if (req.readyState === 4) {
+ if (req.status === 200) {
console.log("Fixing attachment MIME type success!");
that.fixingMIMECallBack();
} else {
@@ -791,8 +795,8 @@ RHBugzillaPage.prototype.createFixAllButton = function(list) {
if (!XMLRPCMessage) {
return;
}
- let that = this;
- let elem = this.doc.createElement("a");
+ var that = this;
+ var elem = this.doc.createElement("a");
elem.setAttribute("href", "");
elem.setAttribute("accesskey", "f");
elem.innerHTML = "<b>F</b>ix all";
@@ -812,9 +816,9 @@ RHBugzillaPage.prototype.createFixAllButton = function(list) {
* @return none
*/
RHBugzillaPage.prototype.addTextLink = function(row) {
- let that = this;
- let elemS = row[4].getElementsByTagName("td");
- let elem = elemS[elemS.length - 1];
+ var that = this;
+ var elemS = row[4].getElementsByTagName("td");
+ var elem = elemS[elemS.length - 1];
elem.innerHTML += "<br/><a href=''>Text</a>";
elem.addEventListener("click", function(x) {
that.fixAttachById(row[1], "text/plain");
@@ -828,24 +832,24 @@ RHBugzillaPage.prototype.addTextLink = function(row) {
* @return none
*/
RHBugzillaPage.prototype.addClosingUpstream = function() {
- let refs = this.doc.getElementById("external_bugs_table")
+ var refs = this.doc.getElementById("external_bugs_table")
.getElementsByTagName("tr");
// that's a bad id, if there is a one. :)
- let inputBox = this.doc.getElementById("inputbox");
- let externalBugID = 0;
- let wholeURL = "";
+ var inputBox = this.doc.getElementById("inputbox");
+ var externalBugID = 0;
+ var wholeURL = "";
// Fix missing ID on the external_id SELECT
this.doc.getElementsByName("external_id")[0].setAttribute("id",
"external_id");
if (inputBox.value.match(/^http.*/)) {
- let helpAElem = this.doc.createElement("a");
+ var helpAElem = this.doc.createElement("a");
wholeURL = inputBox.value;
helpAElem.setAttribute("href", wholeURL);
- let paramsArr = helpAElem.search.replace(/^\?/, '').split('&');
+ var paramsArr = helpAElem.search.replace(/^\?/, '').split('&');
// get convert URL parameters to an Object
- let params = {}, s = [];
+ var params = {}, s = [];
paramsArr.forEach(function(par, idx, arr) {
s = par.split('=');
params[s[0]] = s[1];
@@ -855,11 +859,11 @@ RHBugzillaPage.prototype.addClosingUpstream = function() {
inputBox.value = externalBugID;
}
// get host and bugzillaName
- let bugzillaName = this.getBugzillaName(helpAElem.hostname);
+ var bugzillaName = this.getBugzillaName(helpAElem.hostname);
this.selectOption("external_id", bugzillaName);
} else if (!isNaN(inputBox.value)) {
externalBugID = parseInt(inputBox.value, 10);
- let bugzillaHostname = this.doc.getElementById("external_id").value;
+ var bugzillaHostname = this.doc.getElementById("external_id").value;
wholeURL = bugzillaHostname+"show_bug.cgi?id="+externalBugID;
} else {
// no inputBox.value -- maybe there is an external bug from
@@ -872,7 +876,7 @@ RHBugzillaPage.prototype.addClosingUpstream = function() {
// It is not good to close bug as UPSTREAM, if there is no reference
// to the upstream bug.
if ((externalBugID > 0) || (refs.length > 2)) {
- let msgStr = this.commentStrings["sentUpstreamString"];
+ var msgStr = this.commentStrings.sentUpstreamString;
msgStr = msgStr.replace("§§§", wholeURL);
this.centralCommandDispatch("comment",msgStr);
this.centralCommandDispatch("status", "CLOSED");
@@ -895,22 +899,22 @@ RHBugzillaPage.prototype.markBugTriaged = function() {
// /fedora-meeting.2009-11-24-15.11.log.html
// for F13 and later, ASSIGNED is "add Triaged keyword" (as well)
// for <F13 it is "add both" (ASSIGNED status and Triaged keyword)
- let ver = this.getVersion();
- let assignee = this.getOwner();
+ var ver = this.getVersion();
+ var assignee = this.getOwner();
if ((!this.isEnterprise()) && (ver < TriagedDistro)) {
this.selectOption("bug_status", "ASSIGNED");
}
this.addStuffToTextBox("keywords","Triaged");
-}
+};
/**
*
*/
RHBugzillaPage.prototype.parseBacktrace = function(ret) {
- let splitArray = ret.split("\n");
- let i = 0, ii = splitArray.length;
- let outStr = "", curLine = "", numStr = "";
- let lineCounter = 0, endLineNo = 0;
+ var splitArray = ret.split("\n");
+ var i = 0, ii = splitArray.length;
+ var outStr = "", curLine = "", numStr = "";
+ var lineCounter = 0, endLineNo = 0;
while (i < ii) {
if (this.RE.signalHandler.test(splitArray[i])) {