aboutsummaryrefslogtreecommitdiffstats
path: root/data/rhlib/rhbzpage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-05-13 12:20:05 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:53:47 +0200
commit83fd7fd92e5b21a177bc16cc7318792cf63a343b (patch)
tree20f3e5a59eb9ce32a9b9973d7131e7135bd94999 /data/rhlib/rhbzpage.js
parent5b837d6739a12a516203fa0505ca562839463a79 (diff)
downloadbugzilla-triage-83fd7fd92e5b21a177bc16cc7318792cf63a343b.tar.gz
Really Eclipseize formatting.
Diffstat (limited to 'data/rhlib/rhbzpage.js')
-rw-r--r--data/rhlib/rhbzpage.js142
1 files changed, 71 insertions, 71 deletions
diff --git a/data/rhlib/rhbzpage.js b/data/rhlib/rhbzpage.js
index bab9947..48a5758 100644
--- a/data/rhlib/rhbzpage.js
+++ b/data/rhlib/rhbzpage.js
@@ -3,8 +3,8 @@
// For identification of graphics card
var manuChipStrs = [ [ "ATI Radeon", "ATI", "1002" ],
- [ "ATI Mobility Radeon", "ATI", "1002" ],
- [ "Intel Corporation", "INTEL", "8086" ], [ "NVIDIA", "NV", "10de" ] ];
+ [ "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
@@ -12,44 +12,44 @@ var manuChipStrs = [ [ "ATI Radeon", "ATI", "1002" ],
var RHColor = new Color(158, 41, 43); // RGB 158, 41, 43; HSL 359, 1, 39
var FedoraColor = new Color(0, 40, 103); // RGB 0, 40, 103; HSL 359, 1, 39
var RawhideColor = new Color(0, 119, 0); // or "green", or RGB 0, 119, 0, or
- // HSL
+// HSL
// 120, 0, 23
var RHITColor = new Color(102, 0, 102); // RGB 102, 0, 102; HSL 300, 0, 20
// [ 126.386] (--) NOUVEAU(0): Chipset: "NVIDIA NVaf"
var logAnalyzeLogic = {
- "AnalyzeInterestingLine": {
- /*
- * [ 126.378] (--) PCI:*(0:4:0:0) 10de:08a0:106b:00c2 rev 162, Mem @
- * 0xd2000000/16777216, \ 0xc0000000/268435456, 0xd0000000/33554432, I/O @
- * 0x00001000/128, BIOS @ 0x????????/131072
- */
- re: [
- "^(\\[[ .0-9]+\\])?\\s*\\(--\\) PCI:\\*\\([0-9:]+\\)\\s*" +
- "([0-9a-f:]+).*$",
- "^\\s*\\[?[ 0-9.]*\\]?\\s*\\(--\\) "+
- "([A-Za-z]+)\\([0-9]?\\): Chipset: (.*)$",
- ],
- func: chipsetMagic
- },
- /*
- * [ 126.385] (WW) Falling back to old probe method for vesa [ 126.385] (WW)
- * Falling back to old probe method for fbdev [ 126.386] (--) NOUVEAU(0):
- * Chipset: "NVIDIA NVaf" Backtrace: [ 33.158] Kernel command line: ro
- * root=LABEL=root rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8
- * SYSFONT=latarcyrheb-sun16 KEYTABLE=us drm.debug=0x04
- *
- */
- "AnalyzeXorgLogBacktrace": {
- re: "^\\s*(\\[[0-9 .]*\\])?\\s*(\\((EE|WW)\\)|.* [cC]hipset:.*)|\\s*(Backtrace|Kernel command line)",
- func: analyzeXorg
- }
+ "AnalyzeInterestingLine": {
+ /*
+ * [ 126.378] (--) PCI:*(0:4:0:0) 10de:08a0:106b:00c2 rev 162, Mem @
+ * 0xd2000000/16777216, \ 0xc0000000/268435456, 0xd0000000/33554432, I/O @
+ * 0x00001000/128, BIOS @ 0x????????/131072
+ */
+ re: [
+ "^(\\[[ .0-9]+\\])?\\s*\\(--\\) PCI:\\*\\([0-9:]+\\)\\s*" +
+ "([0-9a-f:]+).*$",
+ "^\\s*\\[?[ 0-9.]*\\]?\\s*\\(--\\) "+
+ "([A-Za-z]+)\\([0-9]?\\): Chipset: (.*)$",
+ ],
+ func: chipsetMagic
+ },
+ /*
+ * [ 126.385] (WW) Falling back to old probe method for vesa [ 126.385] (WW)
+ * Falling back to old probe method for fbdev [ 126.386] (--) NOUVEAU(0):
+ * Chipset: "NVIDIA NVaf" Backtrace: [ 33.158] Kernel command line: ro
+ * root=LABEL=root rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8
+ * SYSFONT=latarcyrheb-sun16 KEYTABLE=us drm.debug=0x04
+ *
+ */
+ "AnalyzeXorgLogBacktrace": {
+ re: "^\\s*(\\[[0-9 .]*\\])?\\s*(\\((EE|WW)\\)|.* [cC]hipset:.*)|\\s*(Backtrace|Kernel command line)",
+ func: analyzeXorg
+ }
};
var ProfessionalProducts = [
- "Red Hat Enterprise Linux",
- "Red Hat Enterprise MRG"
-];
+ "Red Hat Enterprise Linux",
+ "Red Hat Enterprise MRG"
+ ];
// END OF CONSTANTS
@@ -77,7 +77,7 @@ function RHOnMessageHandler(msg) {
break;
default:
console.error("Error: unknown RPC call " + msg.toSource());
- break;
+ break;
}
}
@@ -133,10 +133,10 @@ function RHcentralCommandDispatch(cmdLabel, cmdParams) {
case "chipMagic":
fillInWhiteBoard(cmdParams);
break;
- // If we don't have it here, call superclass method
+ // If we don't have it here, call superclass method
default:
console.error("Unknown command:\n" + cmdLabel + "\nparameters:\n" + cmdParams);
- break;
+ break;
}
}
@@ -144,7 +144,7 @@ function RHcentralCommandDispatch(cmdLabel, cmdParams) {
/**
* Make it sailent that the some attachments with bad MIME type are present
- *
+ *
* @param atts
* Array of attachments subarrays
* @return none
@@ -162,7 +162,7 @@ function markBadAttachments(atts) {
if (badAttachments.length > 0) {
var titleElement = document.
- getElementsByClassName("bz_alias_short_desc_container")[0];
+ getElementsByClassName("bz_alias_short_desc_container")[0];
titleElement.style.backgroundColor = "olive";
createDeadLink("fixAllButton", "Fix all", titleElement, function() {
@@ -178,7 +178,7 @@ function markBadAttachments(atts) {
/**
* Open a tab in the upstream bugzilla to create a new bug
- *
+ *
* @return none
*/
function sendBugUpstream() {
@@ -190,14 +190,14 @@ function sendBugUpstream() {
self.postMessage(new Message("OpenBugUpstream", {
url: urlStr,
subject: document.getElementById("short_desc_nonedit_display").
- textContent.trim(),
+ textContent.trim(),
comment: collectComments()
}));
}
/**
* Add a link opening selected lines of Xorg.0.log
- *
+ *
* @return none
*/
function addCheckXorgLogLink(attList) {
@@ -214,14 +214,14 @@ function addCheckXorgLogLink(attList) {
/**
* Given line to be parsed, find out which chipset it is and fill in the
* whiteboard
- *
+ *
* @param PCIidArrObj
* object with two fields id Array manufacturer-ID and product-ID (PCI
* IDs) chipsetLine whole line containing PCI ID.
* @param driverStr
* String with the driver name
* @return None
- *
+ *
*/
function fillInWhiteBoard(cardName) {
console.myDebug("fillInWhiteBoard: cardName = " + cardName);
@@ -235,7 +235,7 @@ function fillInWhiteBoard(cardName) {
* Get attached Xorg.0.log, parse it and find the value of chip. Does not fill
* the whiteboard itself, just adds button to do so,paramList so that slow
* XMLHttpRequest is done in advance.
- *
+ *
* @param log
* array of XorgLogAttList
* @return None
@@ -246,7 +246,7 @@ function fillInChipMagic(XlogID) {
/**
* Creates a button to change summary by adding a graphic chip label
- *
+ *
* @param Array
* with matching results of re.exec()
*/
@@ -263,12 +263,12 @@ function chipsetMagic (interestingLineArr) {
// add to the button
if (interestingLineArr.length > 1) {
var PCIid = (interestingPCIID[0] + "," + interestingPCIID[1]).
- toUpperCase();
+ toUpperCase();
// Nvidia driver provides good code in the Chipset line
if (interestingPCIID[0].toLowerCase() == "10de") {
cardStr = interestingLineArr[1][2].
- replace(/\s*nvidia\s*/ig,"").
- replace('"','','g');
+ replace(/\s*nvidia\s*/ig,"").
+ replace('"','','g');
} else {
try {
cardStr = constantData.chipNames[PCIid][0];
@@ -307,17 +307,17 @@ function analyzeXorg(results) {
innerString += lRE.input + "<br>\n";
});
innerString += "----------<br>\n" +
- results.length + " interesting lines found.";
+ results.length + " interesting lines found.";
}
else {
innerString += "No matching lines found!";
}
self.postMessage(new Message("OpenStringInPanel",
- '<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">' +
- "<html><head><title>Xorg.0.log analysis</title></head><body><pre>\n" +
- innerString.trim() +
- "\n</pre></body></html>"));
+ '<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">' +
+ "<html><head><title>Xorg.0.log analysis</title></head><body><pre>\n" +
+ innerString.trim() +
+ "\n</pre></body></html>"));
}
function analyzeXorgLog(attachID, backMsg) {
@@ -345,29 +345,29 @@ function findInterestingLine(wholeLog, backMsg) {
var results = [];
wholeLog.split("\n").
- forEach(function(line) {
- REarr.forEach(function (re, reIdx) {
- if (re.test(line)) {
- console.myDebug("Found match on line:\n" + line);
- console.myDebug("Result: " + re.exec(line).toSource());
- results.push(re.exec(line));
- }
- });
+ forEach(function(line) {
+ REarr.forEach(function (re, reIdx) {
+ if (re.test(line)) {
+ console.myDebug("Found match on line:\n" + line);
+ console.myDebug("Result: " + re.exec(line).toSource());
+ results.push(re.exec(line));
+ }
});
+ });
console.myDebug("results = " + results.toSource());
logAnalyzeLogic[backMsg].func(results);
}
/**
* Add information about the upstream bug upstream, and closing it.
- *
+ *
* @param evt
* Event which called this handler
* @return none
*/
function addClosingUpstream() {
var refs = document.getElementById("external_bugs_table")
- .getElementsByTagName("tr");
+ .getElementsByTagName("tr");
// that's a bad id, if there is a one. :)
var inputBox = document.getElementById("inputbox");
@@ -375,8 +375,8 @@ function addClosingUpstream() {
var wholeURL = "";
// Fix missing ID on the external_id SELECT
- document.getElementsByName("external_id")[0].setAttribute("id",
- "external_id");
+ document.getElementsByName("external_id")[0].setAttribute("id",
+ "external_id");
if (inputBox.value.match(/^http.*/)) {
externalBugID = getBugNoFromURL(inputBox.value);
@@ -412,7 +412,7 @@ function addClosingUpstream() {
}
/**
- *
+ *
*/
function parseBacktrace (ret) {
var signalHandler = new RegExp("^\\s*#[0-9]*\\s*<signal handler called>");
@@ -463,8 +463,8 @@ function RHBZinit(attachments) {
markBadAttachments(attachments);
var parsedAttachments = attachments.filter(function (att) {
- return (new RegExp(titleParsedAttachment).test(att[0]));
- });
+ return (new RegExp(titleParsedAttachment).test(att[0]));
+ });
if (constantData.defaultAssignee) {
setDefaultAssignee();
@@ -472,7 +472,7 @@ function RHBZinit(attachments) {
if (constantData.xorgBugsCategories) {
var XBZlist = filterByRegexp(constantData.
- xorgBugsCategories, getComponent());
+ xorgBugsCategories, getComponent());
if (XBZlist) {
makeBugCategoriesList(XBZlist);
}
@@ -504,7 +504,7 @@ function RHBZinit(attachments) {
// Uncheck "set default assignee" when the assignee is changed by other means
document.getElementById("assigned_to").addEventListener("change",
- function() {
- changeAssignee(null);
- }, false);
+ function() {
+ changeAssignee(null);
+ }, false);
}