Revision: 3f0afc6d2203
Author: anandchitravelu
Date: Wed Jul 4 20:34:15 2012
Log: Removing "Cloud Stack" support from default branch
http://code.google.com/p/hybridfox/source/detail?r=3f0afc6d2203
Modified:
/src/chrome/content/ec2ui/baseimagesview.js
/src/chrome/content/ec2ui/client.js
/src/chrome/content/ec2ui/controller.js
/src/chrome/content/ec2ui/dialog_about.xul
/src/chrome/content/ec2ui/dialog_manage_endpoints.xul
/src/chrome/content/ec2ui/endpoint_manager.js
/src/chrome/content/ec2ui/instances_tab_overlay.xul
/src/chrome/content/ec2ui/instancesview.js
/src/chrome/content/ec2ui/session.js
/src/chrome/content/ec2ui/snapshotsview.js
/src/chrome/content/ec2ui/volumesview.js
/src/chrome/locale/ec2ui/en-US/ec2ui.dtd
/src/chrome/locale/ec2ui/en-US/ec2ui.properties
/src/chrome/locale/ec2ui/ja-JP/ec2ui.dtd
/src/chrome/locale/ec2ui/ja-JP/ec2ui.properties
/src/chrome/locale/ec2ui/zh-CN/ec2ui.dtd
/src/chrome/locale/ec2ui/zh-CN/ec2ui.properties
=======================================
--- /src/chrome/content/ec2ui/baseimagesview.js Thu Jun 21 08:24:48 2012
+++ /src/chrome/content/ec2ui/baseimagesview.js Wed Jul 4 20:34:15 2012
@@ -119,7 +119,7 @@
refresh : function() {
ec2ui_session.showBusyCursor(true);
- ec2ui_session.controller.describeImages(true, this.displayImages);
+ ec2ui_session.controller.describeImages(true);
ec2ui_session.showBusyCursor(false);
},
@@ -163,37 +163,21 @@
},
displayImages : function (imageList) {
- /*
- temp workaround to issue:
- callback function is correctly passed,
- but we get a treeBox undefined,
- because is invoked from controller.js without
- baseimageview.js context
- preventing information to be correctly refreshed.
- //TODO see how to pass callbacks and object, so that
- can be invoked on desired context
- */
- imageList = ec2ui_session.model.images;
- /*End of workaround*/
if (imageList == null) {
imageList = [];
}
- //Add a check to avoid getting alerts due to undefined object called from
another context
- if(this.treeBox !== undefined){
- if(this.imageList!=null){
- this.treeBox.rowCountChanged(0, -this.imageList.length);
- }
- this.imageList = imageList;
- this.treeBox.rowCountChanged(0, this.imageList.length);
- this.sort();
-
- // reselect old selection
- if (this.selectedImageId) {
- this.selectByImageId(this.selectedImageId);
- } else {
- this.selection.clearSelection();
- }
- }
+
+ this.treeBox.rowCountChanged(0, -this.imageList.length);
+ this.imageList = imageList;
+ this.treeBox.rowCountChanged(0, this.imageList.length);
+ this.sort();
+
+ // reselect old selection
+ if (this.selectedImageId) {
+ this.selectByImageId(this.selectedImageId);
+ } else {
+ this.selection.clearSelection();
+ }
},
tag : function(event) {
=======================================
--- /src/chrome/content/ec2ui/client.js Sun Jul 1 21:45:20 2012
+++ /src/chrome/content/ec2ui/client.js Wed Jul 4 20:34:15 2012
@@ -149,30 +149,23 @@
}
var rsp = null;
-
while(true) {
try {
rsp = this.queryEC2Impl(action, params, objActions,
isSync, reqType, callback);
if (rsp.hasErrors) {
var msg =
ec2ui_utils.getMessageProperty("ec2ui.msg.client.dialog.queryEC2",
[action]);
-
- var image = null;
- var win =
Components.classes['@
mozilla.org/embedcomp/window-watcher;1'].
- getService(Components.interfaces.nsIWindowWatcher).
-
openWindow(null, 'chrome://global/content/alerts/alert.xul',
- '_blank', 'chrome,titlebar=no,popup=yes,timeout=20',
null);
- win.arguments = [image, msg, rsp.faultCode+" "+rsp.faultString,
false, ''];
- break;
+ if (!this.errorDialog(
+ msg,
+ rsp.faultCode,
+ rsp.requestId,
+ rsp.faultString)) {
+ break;
+ }
} else {
break;
}
} catch (e) {
- var image = null;
- var win =
Components.classes['@
mozilla.org/embedcomp/window-watcher;1'].
-
getService(Components.interfaces.nsIWindowWatcher).
-
openWindow(null, 'chrome://global/content/alerts/alert.xul',
- '_blank', 'chrome,titlebar=no,popup=yes,timeout=20',
null);
- win.arguments = [image, "Exception: ",
ec2ui_utils.getMessageProperty("ec2ui.msg.client.alert.queryEC2", [action,
e]), false, ''];
+ alert
(ec2ui_utils.getMessageProperty("ec2ui.msg.client.alert.queryEC2", [action,
e]));
rsp = null;
break;
}
@@ -278,16 +271,8 @@
var sigValues = new Array();
sigValues.push(new Array("Action", action));
sigValues.push(new Array("AWSAccessKeyId", this.accessCode));
-
- var signatureVersion="1";
- var apiVersion=this.API_VERSION;
- if(ec2ui_session.isCloudstackEndpointSelected()){
- signatureVersion="2";
- apiVersion="2010-11-15";
- sigValues.push(new Array("SignatureMethod","HmacSHA1"));
- }
- sigValues.push(new Array("SignatureVersion",signatureVersion));
- sigValues.push(new Array("Version",apiVersion));
+ sigValues.push(new Array("SignatureVersion","1"));
+ sigValues.push(new Array("Version",this.API_VERSION));
sigValues.push(new Array("Timestamp",formattedTime));
// Mix in the additional parameters. params must be an Array of
tuples as for sigValues above
@@ -311,22 +296,6 @@
log("StrSig ["+strSig+"]");
log("Params ["+queryParams+"]");
- var endsWith = function(string, end){
- var lastIndex = string.lastIndexOf(end);
- return (lastIndex != -1) && (lastIndex + end.length ==
string.length);
- }
-
- if(ec2ui_session.isCloudstackEndpointSelected()){
- //Currently CS is getting queryStrings as null and checks signature with
this params!
- var uri = parseUri(this.serviceURL);
- var host = uri.host+":"+uri.port;
- var path = uri.path;
- if(!endsWith(path, "/")){
- path = path+"/";
- }
- strSig = "POST\n"+host+"\n"+path+"\n";
- }
-
var sig = b64_hmac_sha1(this.secretKey, strSig);
log("Sig ["+sig+"]");
@@ -710,7 +679,6 @@
},
processXMLHTTPResponse : function(xmlhttp, reqType, isSync, timerKey,
objActions, callback) {
-
if (isSync) {
log("Sync Response = " + xmlhttp.status
+ "("+xmlhttp.readyState+"): " + xmlhttp.responseText);
@@ -789,5 +757,5 @@
window.clearTimeout(timer);
timer = null;
return true;
- }
-}
+ }
+}
=======================================
--- /src/chrome/content/ec2ui/controller.js Sun Jul 1 21:45:20 2012
+++ /src/chrome/content/ec2ui/controller.js Wed Jul 4 20:34:15 2012
@@ -125,18 +125,13 @@
onCompleteDescribeVolumes : function (objResponse) {
var xmlDoc = objResponse.xmlDoc;
- var list = new Array();
-
- var xpath = "/ec2:DescribeVolumesResponse/ec2:volumeSet/ec2:item";
- if(ec2ui_session.isCloudstackEndpointSelected()){
- xpath = xpath.replace(/ec2\:/g,"");
- }
- var items = xmlDoc.evaluate(xpath,
+
+ var list = new Array();
+ var items =
xmlDoc.evaluate("/ec2:DescribeVolumesResponse/ec2:volumeSet/ec2:item",
xmlDoc,
this.getNsResolver(),
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
null);
-
for(var i=0 ; i < items.snapshotLength; i++) {
var id = getNodeValueByName(items.snapshotItem(i), "volumeId");
var size = getNodeValueByName(items.snapshotItem(i), "size");
@@ -182,6 +177,7 @@
}
}
// Make sure there is an attachment
+
list.push(new Volume(id, size, snapshotId, zone, status,
createTime, instanceId, device, attachStatus, attachTime || "",taglist));
}
@@ -200,12 +196,7 @@
var xmlDoc = objResponse.xmlDoc;
var list = new Array();
-
- var xpath = "/ec2:DescribeSnapshotsResponse/ec2:snapshotSet/ec2:item";
- if(ec2ui_session.isCloudstackEndpointSelected()){
- xpath = xpath.replace(/ec2\:/g,"");
- }
- var items = xmlDoc.evaluate(xpath,
+ var items =
xmlDoc.evaluate("/ec2:DescribeSnapshotsResponse/ec2:snapshotSet/ec2:item",
xmlDoc,
this.getNsResolver(),
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
@@ -237,7 +228,6 @@
this.addResourceTags(list,
ec2ui_session.model.resourceMap.snapshots, "id");
ec2ui_model.updateSnapshots(list);
-
if (objResponse.callback)
objResponse.callback(list);
},
@@ -249,11 +239,7 @@
onCompleteDescribeImage: function (objResponse) {
var xmlDoc = objResponse.xmlDoc;
- var xpath = "/ec2:DescribeImagesResponse/ec2:imagesSet/ec2:item";
- if(ec2ui_session.isCloudstackEndpointSelected()){
- xpath = xpath.replace(/ec2\:/g,"");
- }
- var items = xmlDoc.evaluate(xpath,
+ var items =
xmlDoc.evaluate("/ec2:DescribeImagesResponse/ec2:imagesSet/ec2:item",
xmlDoc,
this.getNsResolver(),
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
@@ -290,11 +276,7 @@
var list = new Array();
var img = null;
- var xpath = "/ec2:DescribeImagesResponse/ec2:imagesSet/ec2:item";
- if(ec2ui_session.isCloudstackEndpointSelected()){
- xpath = xpath.replace(/ec2\:/g,"");
- }
- var items = xmlDoc.evaluate(xpath,
+ var items =
xmlDoc.evaluate("/ec2:DescribeImagesResponse/ec2:imagesSet/ec2:item",
xmlDoc,
this.getNsResolver(),
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
@@ -326,7 +308,6 @@
}
this.addResourceTags(list, ec2ui_session.model.resourceMap.images, "id");
ec2ui_model.updateImages(list);
-
if (objResponse.callback)
objResponse.callback(list);
},
@@ -340,12 +321,7 @@
var list = new Array();
var img = null;
-
- var xpath
= "/ec2:DescribeReservedInstancesOfferingsResponse/ec2:reservedInstancesOfferingsSet/ec2:item";
- if(ec2ui_session.isCloudstackEndpointSelected()){
- xpath = xpath.replace(/ec2\:/g,"");
- }
- var items = xmlDoc.evaluate(xpath,
+ var items =
xmlDoc.evaluate("/ec2:DescribeReservedInstancesOfferingsResponse/ec2:reservedInstancesOfferingsSet/ec2:item",
xmlDoc,
this.getNsResolver(),
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
@@ -656,9 +632,7 @@
var groups = new Array();
var groupIds =
items.snapshotItem(i).getElementsByTagName("groupId");
for (var j = 0; j < groupIds.length; j++) {
- if(groupIds[j].firstChild!=null){
- groups.push(groupIds[j].firstChild.nodeValue);
- }
+ groups.push(groupIds[j].firstChild.nodeValue);
}
if (items.snapshotItem(i).nodeName){
var instancesSet =
items.snapshotItem(i).getElementsByTagName("instancesSet")[0];
@@ -843,16 +817,11 @@
var xmlDoc = objResponse.xmlDoc;
var list = new Array();
- var xpath = "/ec2:DescribeInstancesResponse/ec2:reservationSet/ec2:item";
- if(ec2ui_session.isCloudstackEndpointSelected()){
- xpath = xpath.replace(/ec2\:/g,"");
- }
- var items = xmlDoc.evaluate(xpath,
+ var items =
xmlDoc.evaluate("/ec2:DescribeInstancesResponse/ec2:reservationSet/ec2:item",
xmlDoc,
this.getNsResolver(),
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
null);
-
for(var i=0 ; i < items.snapshotLength; i++) {
var resId =
getNodeValueByName(items.snapshotItem(i), "reservationId");
var ownerId =
getNodeValueByName(items.snapshotItem(i), "ownerId");
@@ -1471,11 +1440,7 @@
var xmlDoc = objResponse.xmlDoc;
var list = new Array();
- var xpath
= "/ec2:DescribeSecurityGroupsResponse/ec2:securityGroupInfo/ec2:item";
- if(ec2ui_session.isCloudstackEndpointSelected()){
- xpath = xpath.replace(/ec2\:/g,"");
- }
- var items = xmlDoc.evaluate(xpath,
+ var items =
xmlDoc.evaluate("/ec2:DescribeSecurityGroupsResponse/ec2:securityGroupInfo/ec2:item",
xmlDoc,
this.getNsResolver(),
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
@@ -1748,13 +1713,9 @@
onCompleteDescribeRegions : function (objResponse) {
var xmlDoc = objResponse.xmlDoc;
- if(ec2ui_session.isAmazonEndpointSelected()||
ec2ui_session.isCloudstackEndpointSelected()){
-
- var xpath = "/ec2:DescribeRegionsResponse/ec2:regionInfo/ec2:item";
- if(ec2ui_session.isCloudstackEndpointSelected()){
- xpath = xpath.replace(/ec2\:/g,"");
- }
- var items = xmlDoc.evaluate(xpath,
+ if(ec2ui_session.isAmazonEndpointSelected())
+ {
+ var items =
xmlDoc.evaluate("/ec2:DescribeRegionsResponse/ec2:regionInfo/ec2:item",
xmlDoc,
this.getNsResolver(),
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
=======================================
--- /src/chrome/content/ec2ui/dialog_about.xul Thu Jun 21 21:14:26 2012
+++ /src/chrome/content/ec2ui/dialog_about.xul Wed Jul 4 20:34:15 2012
@@ -5,7 +5,7 @@
<dialog id="ec2ui.dialog.about"
xmlns="
http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="
http://www.w3.org/1999/xhtml"
buttons="accept" ondialogaccept="return true;" onload="init();"
- title="&ec2ui.dialog.title.about;" height="400px;" width="550px;">
+ title="&ec2ui.dialog.title.about;">
<script type="application/x-javascript"
src="chrome://ec2ui/content/utils.js" />
<script type="application/x-javascript">
@@ -18,9 +18,6 @@
try {
document.getElementById("ec2ui.about.hybridfox").innerHTML =
ec2ui_utils.getMessageProperty("ec2ui.msg.about.description.hybridfox");
- document.getElementById("ec2ui.sypportscloud.hybridfox").innerHTML =
ec2ui_utils.getMessageProperty("ec2ui.msg.supportscloud.description.hybridfox");
-
document.getElementById("ec2ui.sypportslangauges.hybridfox").innerHTML =
ec2ui_utils.getMessageProperty("ec2ui.msg.sypportslangauges.description.hybridfox");
- document.getElementById("ec2ui.contributers.hybridfox").innerHTML =
ec2ui_utils.getMessageProperty("ec2ui.msg.contributers.description.hybridfox");
var iconsProvideLink =
document.getElementById("ec2ui.iconsProvide.link").innerHTML;
document.getElementById("ec2ui.about.iconsProvide").innerHTML =
ec2ui_utils.getMessageProperty("ec2ui.msg.about.description.iconsProvide",
[iconsProvideLink]);
var licenseLink =
document.getElementById("ec2ui.license.link").innerHTML;
@@ -30,26 +27,16 @@
}
</script>
- <vbox flex="1" style="overflow:auto;">
+ <vbox flex="1">
<groupbox>
<description class="header">Hybridfox version __VERSION__ build
__BUILD__ (EC2 API <html:span
id="ec2ui.apiversion">API-VERSION</html:span>)</description>
- <description>
- <html:p id="ec2ui.about.hybridfox"></html:p>
- <html:p id="ec2ui.sypportscloud.hybridfox"></html:p>
- <html:p id="ec2ui.sypportslangauges.hybridfox"></html:p>
- <html:p><html:a target="_blank" href=""
onclick="openURL('
http://code.google.com/p/hybridfox/'); return false"
style="color: blue; text-decoration:
underline">
code.google.com/p/hybridfox</html:a></html:p>
- <html:p><html:a target="_blank" href=""
onclick="openURL('
http://labs.csscorp.com/'); return false" style="color:
blue; text-decoration: underline">CSS Labs, CSS Corp Pvt
Ltd</html:a></html:p>
- </description>
- <description class="header">Contributers</description>
- <description>
- <html:p id="ec2ui.contributers.hybridfox"></html:p>
- </description>
+ <description><html:p id="ec2ui.about.hybridfox">Hybridfox is a
Firefox extension for interacting with Amazon's EC2 and Eucalyptus web
service.</html:p></description>
+ <description><html:p><html:a target="_blank" href=""
onclick="openURL('
http://code.google.com/p/hybridfox/'); return false"
style="color: blue; text-decoration:
underline">
code.google.com/p/hybridfox</html:a></html:p></description>
+ <description><html:p><html:a target="_blank" href=""
onclick="openURL('
http://labs.csscorp.com/'); return false" style="color:
blue; text-decoration: underline">CSS Labs, CSS Corp Pvt
Ltd</html:a></html:p></description>
</groupbox>
<vbox>
- <description>
- <html:p id="ec2ui.about.iconsProvide">Icons were provided by
<html:span id="ec2ui.iconsProvide.link"><html:a target="_blank" href=""
onclick="openURL('
http://www.mouserunner.com/'); return false"
style="color: blue; text-decoration: underline">Ken
Saunders</html:a></html:span>. </html:p>
- <html:p id="ec2ui.about.license">Hybridfox is licensed under the
<html:span id="ec2ui.license.link"><html:a target="_blank" href=""
onclick="openURL('
http://www.apache.org/licenses/'); return false"
style="color: blue; text-decoration: underline">Apache
2.0</html:a></html:span> license.</html:p>
- </description>
+ <description><html:span id="ec2ui.about.iconsProvide">Icons were
provided by <html:span id="ec2ui.iconsProvide.link"><html:a target="_blank"
href="" onclick="openURL('
http://www.mouserunner.com/'); return false"
style="color: blue; text-decoration: underline">Ken
Saunders</html:a></html:span>. </html:span></description>
+ <description><html:span id="ec2ui.about.license">Hybridfox is
licensed under the <html:span id="ec2ui.license.link"><html:a
target="_blank" href=""
onclick="openURL('
http://www.apache.org/licenses/'); return false"
style="color: blue; text-decoration: underline">Apache
2.0</html:a></html:span> license.</html:span></description>
</vbox>
</vbox>
</dialog>
=======================================
--- /src/chrome/content/ec2ui/dialog_manage_endpoints.xul Thu Jun 21
08:24:48 2012
+++ /src/chrome/content/ec2ui/dialog_manage_endpoints.xul Wed Jul 4
20:34:15 2012
@@ -51,7 +51,6 @@
<menuitem id="ec2ui.endpoints.type.euca" label="Eucalyptus"
value="euca"/>
<menuitem d="ec2ui.endpoints.type.nova" label="Openstack" value="nova"/>
<menuitem id="ec2ui.endpoints.type.nebula" label="OpenNebula"
value="nebula"/>
- <menuitem id="ec2ui.endpoints.type.cloudstack" label="CloudStack"
value="cloudstack"/>
</menupopup>
</menulist>
</row>
=======================================
--- /src/chrome/content/ec2ui/endpoint_manager.js Thu Jun 21 08:24:48 2012
+++ /src/chrome/content/ec2ui/endpoint_manager.js Wed Jul 4 20:34:15 2012
@@ -58,12 +58,6 @@
else if(sel.type == ("nova")){
document.getElementById("ec2ui.endpoints.type").selectedIndex = 2;
}
- else if(sel.type == ("nebula")){
-
document.getElementById("ec2ui.endpoints.type").selectedIndex = 3;
- }
- else if(sel.type == ("cloudstack")){
-
document.getElementById("ec2ui.endpoints.type").selectedIndex = 4;
- }
document.getElementById("ec2ui.endpoints.url").value = sel.url;
}
}
=======================================
--- /src/chrome/content/ec2ui/instances_tab_overlay.xul Sun Jul 1 21:45:20
2012
+++ /src/chrome/content/ec2ui/instances_tab_overlay.xul Wed Jul 4 20:34:15
2012
@@ -102,12 +102,6 @@
<toolbarbutton image="images/refresh.png"
oncommand="ec2ui_InstancesTreeView.refresh()"
tooltiptext="&ec2ui.refresh.tip;" />
- <toolbarbutton image="images/stop.png"
style="-moz-box-pack:center;"
- oncommand="ec2ui_InstancesTreeView.stopInstance();"
- tooltiptext="&ec2ui.instances.stop.tip;" />
- <toolbarbutton image="images/start.png"
style="-moz-box-pack:center;"
- oncommand="ec2ui_InstancesTreeView.startInstance();"
- tooltiptext="&ec2ui.instances.start.tip;" />
<toolbarbutton image="images/reboot.png"
style="-moz-box-pack:center;"
oncommand="ec2ui_InstancesTreeView.rebootInstance();"
tooltiptext="&ec2ui.instances.reboot.tip;" />
=======================================
--- /src/chrome/content/ec2ui/instancesview.js Sun Jul 1 21:45:20 2012
+++ /src/chrome/content/ec2ui/instancesview.js Wed Jul 4 20:34:15 2012
@@ -859,7 +859,7 @@
},
refresh : function() {
- this.selectionChanged();
+ this.selectionChanged();
ec2ui_session.showBusyCursor(true);
ec2ui_session.controller.describeInstances();
ec2ui_session.controller.describeInstanceStatus();
@@ -892,7 +892,7 @@
// If this is not a Windows Instance, Disable the following
// context menu items.
- if(ec2ui_session.isAmazonEndpointSelected() ||
ec2ui_session.isCloudstackEndpointSelected()){
+ if(ec2ui_session.isAmazonEndpointSelected()){
document.getElementById("instances.context.bundle").disabled =
fDisabled;
document.getElementById("instances.context.getPassword").disabled =
fDisabled;
document.getElementById("instances.context.monitor").disabled
= disableMonitor;
@@ -906,22 +906,7 @@
document.getElementById("instances.context.showTerminationProtection").disabled
= true;
document.getElementById("instances.context.changeTerminationProtection").disabled
= true;
}
- } else if(ec2ui_session.isEucalyptusEndpointSelected() ||
ec2ui_session.isOpenstackEndpointSelected()){
- document.getElementById("instances.context.bundle").disabled =
fDisabled;
-
document.getElementById("instances.context.getPassword").disabled =
fDisabled;
- document.getElementById("instances.context.monitor").disabled
= true;
-
document.getElementById("instances.context.unmonitor").disabled = true;
- document.getElementById("instances.context.start").disabled =
disableStart;
- document.getElementById("instances.context.stop").disabled =
disableStop;
-
document.getElementById("instances.context.forceStop").disabled =
disableStop;
-
document.getElementById("instances.context.showTerminationProtection").disabled
= true;
-
document.getElementById("instances.context.changeTerminationProtection").disabled
= true;
-
document.getElementById("instances.context.createtag").disabled = true;
-
document.getElementById("instances.context.deletetag").disabled = true;
- if(rootdevicetype){
- document.getElementById("instances.context.stop").disabled
= true;
-
document.getElementById("instances.context.forceStop").disabled = true;
- }
+
} else {
document.getElementById("instances.context.monitor").disabled
= true;
document.getElementById("instances.context.unmonitor").disabled = true;
=======================================
--- /src/chrome/content/ec2ui/session.js Sun Jul 1 21:45:20 2012
+++ /src/chrome/content/ec2ui/session.js Wed Jul 4 20:34:15 2012
@@ -25,6 +25,7 @@
this.client = ec2_httpclient;
ec2ui_prefs.init();
this.preferences = ec2ui_prefs;
+
document.getElementById("ec2ui.images.view").view =
ec2ui_AMIsTreeView;
document.getElementById("ec2ui.keypairs.view").view =
ec2ui_KeypairTreeView;
document.getElementById("ec2ui.instances.view").view =
ec2ui_InstancesTreeView;
@@ -38,31 +39,27 @@
document.getElementById("ec2ui.bundleTasks.view").view =
ec2ui_BundleTasksTreeView;
document.getElementById("ec2ui.offerings.view").view =
ec2ui_LeaseOfferingsTreeView;
document.getElementById("ec2ui.rsvdInst.view").view =
ec2ui_ReservedInstancesTreeView;
- document.getElementById("ec2ui.loadbalancer.view").view =
ec2ui_LoadbalancerTreeView;
- document.getElementById("ec2ui.instancehealth.view").view =
ec2ui_InstanceHealthTreeView;
- document.getElementById("ec2ui.servercertificate.view").view =
ec2ui_ServerCertificateTreeView;
+ document.getElementById("ec2ui.loadbalancer.view").view =
ec2ui_LoadbalancerTreeView;
+ document.getElementById("ec2ui.instancehealth.view").view =
ec2ui_InstanceHealthTreeView;
+ document.getElementById("ec2ui.servercertificate.view").view =
ec2ui_ServerCertificateTreeView;
+
// Enable about:blank to work if noscript is installed
if("@
maone.net/noscript-service;1" in Components.classes) {
(Components.classes
["@
maone.net/noscript-service;1"].getService().wrappedJSObject).setJSEnabled("about:blank",
true);
}
+
this.loadAccountIdMap();
this.loadCredentials();
this.switchCredentials();
this.loadAllTags();
+
this.initialized = true;
}
- //Catch potential exceptions that may prevent proper loading
- //Introduced since an exception was rised due to inexistent variables in
context for callback function
- try{
- this.loadEndpointMap();
- this.switchEndpoints();
- this.args = this.parseURL();
- this.processURLArguments();
- }catch(err){}
- //populate current tab
- this.tabSelectionChanged();
-
+ this.loadEndpointMap();
+ this.switchEndpoints();
+ this.args = this.parseURL();
+ this.processURLArguments();
},
parseURL : function () {
@@ -143,8 +140,10 @@
eval("ec2ui_InstancesTreeView." + toCall);
break;
case 'ec2ui.tabs.images':
- //refresh information on Images Tab
- eval("ec2ui_AMIsTreeView."+toCall);
+ this.showBusyCursor(true);
+ this.model.getSecurityGroups();
+ this.model.getImages();
+ this.showBusyCursor(false);
break;
case "ec2ui.tabs.keypairs":
eval("ec2ui_KeypairTreeView." + toCall);
@@ -157,7 +156,7 @@
break;
case "ec2ui.tabs.volumes":
eval("ec2ui_VolumeTreeView." + toCall);
- if(this.isOpenstackEndpointSelected()||
this.isCloudstackEndpointSelected()){
+ if(this.isOpenstackEndpointSelected()){
eval("ec2ui_SnapshotTreeView." + toCall);
}
break;
@@ -254,24 +253,11 @@
// Since we are switching creds, ensure that
// all the views are redrawn
- //Add a catch clause so that invalidation errors do not prevent
correct initialization
- try{
- this.model.invalidate();
- }catch(err){}
+ this.model.invalidate();
+
// Set the active tab to the last tab we were viewing
document.getElementById("ec2ui.tabs").selectedIndex =
ec2ui_prefs.getCurrentTab();
- var elbtab = document.getElementById("ec2ui.tabs.loadbalancer");
- var reservedtab = document.getElementById("ec2ui.tabs.leases");
- var bundletab = document.getElementById("ec2ui.tabs.bundleTasks");
- if(this.isAmazonEndpointSelected()){
- elbtab.setAttribute("hidden", false);
- reservedtab.setAttribute("hidden", false);
- bundletab.setAttribute("hidden", false);
- }else{
- elbtab.setAttribute("hidden", true);
- reservedtab.setAttribute("hidden", true);
- bundletab.setAttribute("hidden", true);
- }
+
// The current tab's view needs to either
// be invalidated or refreshed
this.tabSelectionChanged();
@@ -475,18 +461,7 @@
// Set the active tab to the last tab we were viewing
document.getElementById("ec2ui.tabs").selectedIndex =
ec2ui_prefs.getCurrentTab();
- var elbtab = document.getElementById("ec2ui.tabs.loadbalancer");
- var reservedtab = document.getElementById("ec2ui.tabs.leases");
- var bundletab = document.getElementById("ec2ui.tabs.bundleTasks");
- if(this.isAmazonEndpointSelected()){
- elbtab.setAttribute("hidden", false);
- reservedtab.setAttribute("hidden", false);
- bundletab.setAttribute("hidden", false);
- }else{
- elbtab.setAttribute("hidden", true);
- reservedtab.setAttribute("hidden", true);
- bundletab.setAttribute("hidden", true);
- }
+
// The current tab's view needs to either
// be invalidated or refreshed
this.tabSelectionChanged();
@@ -607,14 +582,6 @@
}
return false;
},
-
- isCloudstackEndpointSelected: function () {
- var activeEndpointType = this.getActiveEndpoint().type;
- if (activeEndpointType.search(/cloudstack/)!=-1) { //if active
endpoint type ends with "cloudstack"
- return true;
- }
- return false;
- },
deleteEC2Tag : function(resource){
var retVal = {ok:null};
=======================================
--- /src/chrome/content/ec2ui/snapshotsview.js Thu Jun 21 08:24:48 2012
+++ /src/chrome/content/ec2ui/snapshotsview.js Wed Jul 4 20:34:15 2012
@@ -95,6 +95,8 @@
},
displayImages : function (imageList) {
+ BaseImagesView.displayImages.call(this, imageList);
+
if (ec2ui_prefs.isRefreshOnChangeEnabled()) {
// Determine if there are any pending operations
if (this.pendingUpdates()) {
@@ -106,37 +108,6 @@
} else {
this.stopRefreshTimer("ec2ui_SnapshotTreeView");
}
-
- /*
- Here we display all snapshots data to be shown.
- Put this for cloudstack, since works for sure,
- but I think, it can be propagated to the rest.
- */
- if(ec2ui_session.isCloudstackEndpointSelected()){
- /*
- this is a quickfix for data not being propagated
- see displayImage at baseimageviews.js for details
- */
- imageList = ec2ui_model.snapshots;
- /*end of quickfix*/
-
- if(this.imageList!=null){
- this.treeBox.rowCountChanged(0, -this.imageList.length);
- }
- this.imageList = imageList;
- this.treeBox.rowCountChanged(0, this.imageList.length);
- this.sort();
-
- // reselect old selection
- if (this.selectedImageId) {
- this.selectByImageId(this.selectedImageId);
- } else {
- this.selection.clearSelection();
- }
- }else{
- BaseImagesView.displayImages.call(this, imageList);
- }
-
},
pendingUpdates : function() {
=======================================
--- /src/chrome/content/ec2ui/volumesview.js Thu Jun 21 08:24:48 2012
+++ /src/chrome/content/ec2ui/volumesview.js Wed Jul 4 20:34:15 2012
@@ -30,7 +30,7 @@
refresh : function() {
ec2ui_session.showBusyCursor(true);
- ec2ui_session.controller.describeVolumes(this.displayImages);
+ ec2ui_session.controller.describeVolumes();
ec2ui_session.showBusyCursor(false);
},
@@ -55,50 +55,19 @@
},
displayImages : function (imageList) {
- //quickfix see diplayImages at baseimageview.js for detailed description
- imageList = ec2ui_session.model.getVolumes();
- //end of fix
-
- /*
- If this function is invoked as callback, we have a different context,
- and fails to execute. Check if function exists until we fix contexts...
- //TODO
- */
- if(typeof this.pendingUpdates == 'function'){
- if (ec2ui_prefs.isRefreshOnChangeEnabled()) {
- // Determine if there are any pending operations
- if (this.pendingUpdates()) {
- this.startRefreshTimer("",
- this.refresh);
- } else {
- this.stopRefreshTimer("ec2ui_VolumeTreeView");
- }
- } else {
- this.stopRefreshTimer("ec2ui_VolumeTreeView");
- }
- }
- /*
- Here we display all volumes data to be shown.
- Put this for cloudstack, since works for sure,
- but I think, it can be propagated to the rest.
- */
-
if(ec2ui_session.isCloudstackEndpointSelected()&&this.treeBox!==undefined){
- if(this.imageList!=null){
- this.treeBox.rowCountChanged(0,
-this.imageList.length);
- }
- this.imageList = imageList;
- this.treeBox.rowCountChanged(0, this.imageList.length);
- this.sort();
-
- // reselect old selection
- if (this.selectedImageId) {
- this.selectByImageId(this.selectedImageId);
- } else {
- this.selection.clearSelection();
- }
- }else{
- BaseImagesView.displayImages.call(this, imageList);
- }
+ if (ec2ui_prefs.isRefreshOnChangeEnabled()) {
+ // Determine if there are any pending operations
+ if (this.pendingUpdates()) {
+ this.startRefreshTimer("",
+ this.refresh);
+ } else {
+ this.stopRefreshTimer("ec2ui_VolumeTreeView");
+ }
+ } else {
+ this.stopRefreshTimer("ec2ui_VolumeTreeView");
+ }
+
+ BaseImagesView.displayImages.call(this, imageList);
},
viewDetails : function(event) {
=======================================
--- /src/chrome/locale/ec2ui/en-US/ec2ui.dtd Sun Jul 1 21:45:20 2012
+++ /src/chrome/locale/ec2ui/en-US/ec2ui.dtd Wed Jul 4 20:34:15 2012
@@ -214,8 +214,6 @@
<!ENTITY ec2ui.instances.powerdown.tip "Terminate Selected Instances">
<!ENTITY ec2ui.instances.console.tip "Show Console Output">
<!ENTITY ec2ui.instances.connect.tip "Connect To Instance">
-<!ENTITY ec2ui.instances.stop.tip "Stop Selected Instance">
-<!ENTITY ec2ui.instances.start.tip "Start Selected Instance">
<!ENTITY ec2ui.keypairs.create.tip "Create a new keypair">
<!ENTITY ec2ui.keypairs.delete.tip "Delete selected keypair">
=======================================
--- /src/chrome/locale/ec2ui/en-US/ec2ui.properties Thu Jun 21 21:14:26 2012
+++ /src/chrome/locale/ec2ui/en-US/ec2ui.properties Wed Jul 4 20:34:15 2012
@@ -139,10 +139,7 @@
ec2ui.msg.volumesview.confirm.detachVolume = Detach volume %S?
ec2ui.msg.volumesview.confirm.forceDetachVolume = Force detach volume %S?
-ec2ui.msg.about.description.hybridfox = Hybridfox is a Firefox addon that
attempts to get the best of popular public and private Cloud Computing
environments.
-ec2ui.msg.supportscloud.description.hybridfox = Currently it supports
Amazon AWS, Eucalyptus, OpenStack, OpenNebula, CloudStack and HP cloud
environments.
-ec2ui.msg.sypportslangauges.description.hybridfox = Currently localized in
Japanese and Chinese languages with the help of community support.
-ec2ui.msg.contributers.description.hybridfox = Andrey Kurdumov, David
Kavanagh, Ryo Watanabe, Punkboyee, Jose Martin
+ec2ui.msg.about.description.hybridfox = Hybridfox is a Firefox extension
for interacting with Amazon's EC2 and Eucalyptus web service.
ec2ui.msg.about.description.iconsProvide = Icons were provided by %S.
ec2ui.msg.about.description.license = Hybridfox is licensed under the %S
license.
=======================================
--- /src/chrome/locale/ec2ui/ja-JP/ec2ui.dtd Sun Jul 1 21:45:20 2012
+++ /src/chrome/locale/ec2ui/ja-JP/ec2ui.dtd Wed Jul 4 20:34:15 2012
@@ -213,8 +213,6 @@
<!ENTITY ec2ui.instances.powerdown.tip "選択したインスタンスを停止">
<!ENTITY ec2ui.instances.console.tip "コンソール出力を表示">
<!ENTITY ec2ui.instances.connect.tip "インスタンスに接続">
-<!ENTITY ec2ui.instances.stop.tip "一時停止">
-<!ENTITY ec2ui.instances.start.tip "開始">
<!ENTITY ec2ui.keypairs.create.tip "新しいキー・ペアを作成">
<!ENTITY ec2ui.keypairs.delete.tip "選択したキー・ペアを削除">
=======================================
--- /src/chrome/locale/ec2ui/ja-JP/ec2ui.properties Thu Jun 21 21:14:26 2012
+++ /src/chrome/locale/ec2ui/ja-JP/ec2ui.properties Wed Jul 4 20:34:15 2012
@@ -139,10 +139,7 @@
ec2ui.msg.volumesview.confirm.detachVolume = EBSボリューム %S を取り外しま
すか?
ec2ui.msg.volumesview.confirm.forceDetachVolume = EBSボリューム %S を強制的
に取り外しますか?
-ec2ui.msg.about.description.hybridfox = Hybridfoxは、人気の公共および民間ク
ラウド·コンピューティング環境の最良を取得しようとFirefoxのアドオンです。
-ec2ui.msg.supportscloud.description.hybridfox = 現在のところは、Amazon
AWS、ユーカリ、OpenStack、OpenNebula、CloudStackとHP、クラウド環境をサポート
しています。
-ec2ui.msg.sypportslangauges.description.hybridfox = 現在、コミュニティサ
ポートの助けを借りて、日本語と中国語の言語でローカライズされた。
-ec2ui.msg.contributers.description.hybridfox = Andrey Kurdumov, David
Kavanagh, Ryo Watanabe, Punkboyee, Jose Martin
+ec2ui.msg.about.description.hybridfox = Hybridfox はWebブラウザから Amazon
EC2 や Eucalyptus ウェブサービスを利用できる Firefox の拡張機能(アドオン
)です
ec2ui.msg.about.description.iconsProvide = アイコン提供 %S.
ec2ui.msg.about.description.license = Hybridfox は %S ライセンスのもとで公
開されています
=======================================
--- /src/chrome/locale/ec2ui/zh-CN/ec2ui.dtd Sun Jul 1 21:45:20 2012
+++ /src/chrome/locale/ec2ui/zh-CN/ec2ui.dtd Wed Jul 4 20:34:15 2012
@@ -227,9 +227,6 @@
<!ENTITY ec2ui.instances.powerdown.tip "终止所选实例">
<!ENTITY ec2ui.instances.console.tip "显示后台输出">
<!ENTITY ec2ui.instances.connect.tip "连接到实例">
-<!ENTITY ec2ui.instances.stop.tip "暂停">
-<!ENTITY ec2ui.instances.start.tip "启动">
-
<!ENTITY ec2ui.keypairs.create.tip "新建密钥组">
<!ENTITY ec2ui.keypairs.delete.tip "删除所选密钥组">
=======================================
--- /src/chrome/locale/ec2ui/zh-CN/ec2ui.properties Thu Jun 21 21:14:26 2012
+++ /src/chrome/locale/ec2ui/zh-CN/ec2ui.properties Wed Jul 4 20:34:15 2012
@@ -139,10 +139,7 @@
ec2ui.msg.volumesview.confirm.detachVolume = 确定卸载 EBS 卷吗?
ec2ui.msg.volumesview.confirm.forceDetachVolume = 是否强制卸载 EBS 卷?
-ec2ui.msg.about.description.hybridfox = hybridfox是一个Firefox插件,试图得
到最佳流行的公共和私有云计算环境。
-ec2ui.msg.supportscloud.description.hybridfox = 目前,它支持亚马逊AWS,桉
树,OpenStack里,OpenNebula,CloudStack和惠普云环境。
-ec2ui.msg.sypportslangauges.description.hybridfox = 目前在日本和中国的语言
与社会的支持帮助本地化。
-ec2ui.msg.contributers.description.hybridfox = Andrey Kurdumov, David
Kavanagh, Ryo Watanabe, Punkboyee, Jose Martin
+ec2ui.msg.about.description.hybridfox = Hybridfox 是 Amazon 的 EC2 和
Eucalyptus 云平台的 Web Service 图形管理窗口.
ec2ui.msg.about.description.iconsProvide = 图标由 %S 提供. 中文版由 田保强
(punkboyee(at)
foxmail.com) 翻译
ec2ui.msg.about.description.license = Hybridfox 是由 %S 许可授权的开源免费
插件.