35
35
document.getElementById("ec2ui.volumes.view").view = ec2ui_VolumeTreeView;
36
36
document.getElementById("ec2ui.snapshots.view").view = ec2ui_SnapshotTreeView;
37
37
document.getElementById("ec2ui.bundleTasks.view").view = ec2ui_BundleTasksTreeView;
38
document.getElementById("ec2ui.offerings.view").view = ec2ui_LeaseOfferingsTreeView;
39
document.getElementById("ec2ui.rsvdInst.view").view = ec2ui_ReservedInstancesTreeView;
41
// Enable about:blank to work if noscript is installed
39
42
if("@maone.net/noscript-service;1" in Components.classes) {
40
43
(Components.classes ["@maone.net/noscript-service;1"].getService().wrappedJSObject).setJSEnabled("about:blank", true);
44
47
this.loadCredentials();
45
48
this.switchCredentials();
46
49
this.loadAllTags();
47
this.controller.describeImages();
49
51
this.initialized = true;
52
54
this.loadEndpointMap();
53
55
this.switchEndpoints();
56
this.args = this.parseURL();
57
this.processURLArguments();
60
parseURL : function () {
61
var a = window.location.href.split("?");
62
if (a[1]) a = a[1].split("&");
64
for (var i = 0; i < a.length; ++i) {
65
var parts = a[i].split("=");
66
o[parts[0]] = parts[1];
71
processURLArguments : function () {
72
// At this moment, we only act on the ami argument
74
var amiToLaunch = this.args.ami;
75
var tabBox = document.getElementById("ec2ui.primary.tabs");
77
amiToLaunch.match(regExs["ami"])) {
79
if (tabBox.selectedIndex != 1) {
80
tabBox.selectedIndex = 1;
83
this.showBusyCursor(true);
85
// this is a synchronous call, meaning
86
// an ami launch was requested
87
ec2ui_AMIsTreeView.selectByImageId(amiToLaunch);
88
this.showBusyCursor(false);
89
ec2ui_AMIsTreeView.launchNewInstances();
91
// Since this is an async call, and the UI has
92
// not switched over to the Images Tab,
93
if (tabBox.selectedIndex != 1) {
94
this.controller.describeImages(fSync);
96
this.showBusyCursor(false);
56
100
addTabToRefreshList : function (tab) {
114
158
case "Availability Zones":
115
159
eval("ec2ui_AvailZoneTreeView." + toCall);
161
case "Reserved Instances":
162
eval("ec2ui_LeaseOfferingsTreeView." + toCall);
163
eval("ec2ui_ReservedInstancesTreeView." + toCall);
118
166
log ("This is an invalid tab: " + tabs.selectedItem.label);