diff options
author | Matěj Cepl <mcepl@redhat.com> | 2010-07-17 09:04:48 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2010-07-17 09:13:52 +0200 |
commit | 34ae7055a0f01306be67dc00030af93190deca55 (patch) | |
tree | bec978682872324e92aa7ffdcdcab32e99113a49 /lib/rhbzpage.js | |
parent | 90ae10b0d1181cedb1c31a20e2194a59896223fd (diff) | |
download | bugzilla-triage-34ae7055a0f01306be67dc00030af93190deca55.tar.gz |
Make XMLRPC service independent of a bugzilla instance.
- activates password dialog only for bugzillas which actually need it
- XML-RPC URL is stored in data/XMLRPCdata.json
Fixes #23
Diffstat (limited to 'lib/rhbzpage.js')
-rw-r--r-- | lib/rhbzpage.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js index 44b3265..1e6f52d 100644 --- a/lib/rhbzpage.js +++ b/lib/rhbzpage.js @@ -60,7 +60,7 @@ var RHBugzillaPage = function RHBugzillaPage(win, config) { frameNo: new RegExp("^\\s*#([0-9]*)\\s") }; - this.XMLRPCurl = "https://bugzilla.redhat.com/xmlrpc.cgi"; + this.constantData.XMLRPCData = JSON.parse(self.data.load("XMLRPCdata.json")); // END OF CONSTANTS var that = this; @@ -69,11 +69,15 @@ var RHBugzillaPage = function RHBugzillaPage(win, config) { this.chipMagicInterestingLine = ""; this.login = this.getLogin(); - this.password = this.getPassword(this.login); var ITbutton = this.doc.getElementById("cf_issuetracker"); this.its = ITbutton ? ITbutton.value.trim() : ""; + // XML-RPC password + if (this.hostname in this.constantData.XMLRPCData) { + this.password = this.getPassword(this.login); + } + // getBadAttachments this.XorgLogAttList = []; this.XorgLogAttListIndex = 0; @@ -785,7 +789,7 @@ RHBugzillaPage.prototype.fixAttachById = function(id, type, email) { // docs/en/html/api/extensions/compat_xmlrpc/code/webservice.html // test on https://bugzilla.redhat.com/show_bug.cgi?id=485145 Request({ - url: this.XMLRPCurl, + url: this.constantData.XMLRPCData[this.hostname], onComplete: function() { that.fixingMIMECallBack.call(that); }, |