Revision: 6ee35d015d62
Author: kousalyayesodha
Date: Sun Jul 1 21:45:20 2012
Log: Updated issue #134
http://code.google.com/p/hybridfox/source/detail?r=6ee35d015d62
Modified:
/src/chrome/content/ec2ui/client.js
/src/chrome/content/ec2ui/controller.js
/src/chrome/content/ec2ui/instances_tab_overlay.xul
/src/chrome/content/ec2ui/instancesview.js
/src/chrome/content/ec2ui/session.js
/src/chrome/locale/ec2ui/en-US/ec2ui.dtd
/src/chrome/locale/ec2ui/ja-JP/ec2ui.dtd
/src/chrome/locale/ec2ui/zh-CN/ec2ui.dtd
=======================================
--- /src/chrome/content/ec2ui/client.js Thu Jun 21 08:24:48 2012
+++ /src/chrome/content/ec2ui/client.js Sun Jul 1 21:45:20 2012
@@ -155,18 +155,24 @@
rsp = this.queryEC2Impl(action, params, objActions,
isSync, reqType, callback);
if (rsp.hasErrors) {
var msg =
ec2ui_utils.getMessageProperty("ec2ui.msg.client.dialog.queryEC2",
[action]);
- if (!this.errorDialog(
- msg,
- rsp.faultCode,
- rsp.requestId,
- rsp.faultString)) {
- break;
- }
+
+ 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;
} else {
break;
}
} catch (e) {
- alert
(ec2ui_utils.getMessageProperty("ec2ui.msg.client.alert.queryEC2", [action,
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, ''];
rsp = null;
break;
}
@@ -783,5 +789,5 @@
window.clearTimeout(timer);
timer = null;
return true;
- }
-}
+ }
+}
=======================================
--- /src/chrome/content/ec2ui/controller.js Thu Jun 21 08:24:48 2012
+++ /src/chrome/content/ec2ui/controller.js Sun Jul 1 21:45:20 2012
@@ -656,7 +656,9 @@
var groups = new Array();
var groupIds =
items.snapshotItem(i).getElementsByTagName("groupId");
for (var j = 0; j < groupIds.length; j++) {
- groups.push(groupIds[j].firstChild.nodeValue);
+ if(groupIds[j].firstChild!=null){
+ groups.push(groupIds[j].firstChild.nodeValue);
+ }
}
if (items.snapshotItem(i).nodeName){
var instancesSet =
items.snapshotItem(i).getElementsByTagName("instancesSet")[0];
=======================================
--- /src/chrome/content/ec2ui/instances_tab_overlay.xul Wed May 30 18:49:00
2012
+++ /src/chrome/content/ec2ui/instances_tab_overlay.xul Sun Jul 1 21:45:20
2012
@@ -102,6 +102,12 @@
<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 Thu Jun 28 23:32:53 2012
+++ /src/chrome/content/ec2ui/instancesview.js Sun Jul 1 21:45:20 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()){
+ if(ec2ui_session.isAmazonEndpointSelected() ||
ec2ui_session.isCloudstackEndpointSelected()){
document.getElementById("instances.context.bundle").disabled =
fDisabled;
document.getElementById("instances.context.getPassword").disabled =
fDisabled;
document.getElementById("instances.context.monitor").disabled
= disableMonitor;
=======================================
--- /src/chrome/content/ec2ui/session.js Thu Jun 21 08:24:48 2012
+++ /src/chrome/content/ec2ui/session.js Sun Jul 1 21:45:20 2012
@@ -52,10 +52,17 @@
this.initialized = true;
}
- this.loadEndpointMap();
- this.switchEndpoints();
- this.args = this.parseURL();
- this.processURLArguments();
+ //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();
+
},
parseURL : function () {
=======================================
--- /src/chrome/locale/ec2ui/en-US/ec2ui.dtd Sun Jun 3 22:10:08 2012
+++ /src/chrome/locale/ec2ui/en-US/ec2ui.dtd Sun Jul 1 21:45:20 2012
@@ -214,6 +214,8 @@
<!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/ja-JP/ec2ui.dtd Fri Feb 10 02:20:47 2012
+++ /src/chrome/locale/ec2ui/ja-JP/ec2ui.dtd Sun Jul 1 21:45:20 2012
@@ -213,6 +213,8 @@
<!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.dtd Wed Mar 28 23:38:05 2012
+++ /src/chrome/locale/ec2ui/zh-CN/ec2ui.dtd Sun Jul 1 21:45:20 2012
@@ -227,6 +227,9 @@
<!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 "删除所选密钥组">