~vcs-imports/elasticfox/trunk

« back to all changes in this revision

Viewing changes to src/chrome/content/ec2ui/newimagedialog.js

  • Committer: jhatax
  • Date: 2009-03-21 04:24:40 UTC
  • Revision ID: vcs-imports@canonical.com-20090321042440-9efsr19bbxomq3dp
This update to Elasticfox contains the following changes:

1. Tagging for AMIs and Elastic IPs
2. Fix for Register Image from the Images tab
3. Snapshot inherits tag of Volume it was created from
4. An instance in the EU can be bundled into a bucket and registered in the US and vice-versa
5. Better checks when specifying a bucket for bundling or manifest path for registering
6. An EBS volume cannot be attached to a Windows instance that is not "Ready to Use"
7. Elasticfox now supports Firefox Versions 2.0 through 3.5.*
8. The AMI Migration dialog is non-modal so that the user can continue using Elasticfox
while the migration occurs in the background

Please report any issues via sourceforge or the AWS page for Elasticfox.


M    src/install.rdf
M    src/ec2ui.rdf
M    src/install.js
M    src/chrome/content/ec2ui/eipdetaildialog.js
M    src/chrome/content/ec2ui/newattachmentdialog.js
M    src/chrome/content/ec2ui/controller.js
M    src/chrome/content/ec2ui/volumesview.js
M    src/chrome/content/ec2ui/utils.js
M    src/chrome/content/ec2ui/eipview.js
M    src/chrome/content/ec2ui/bundletasksview.js
M    src/chrome/content/ec2ui/client.js
M    src/chrome/content/ec2ui/instancesview.js
M    src/chrome/content/ec2ui/baseimagesview.js
M    src/chrome/content/ec2ui/dialog_new_volume.xul
M    src/chrome/content/ec2ui/eip_tab_overlay.xul
M    src/chrome/content/ec2ui/preferences.js
M    src/chrome/content/ec2ui/newimagedialog.js
M    src/chrome/content/ec2ui/dialog_ami_details.xul
M    src/chrome/content/ec2ui/dialog_eip_details.xul
M    src/chrome/content/ec2ui/newvolumedialog.js
M    src/chrome/content/ec2ui/amidetaildialog.js
M    src/chrome/content/ec2ui/volumedetaildialog.js
M    src/chrome/content/ec2ui/bundleInstanceDialog.js
M    src/chrome/content/ec2ui/session.js
M    src/chrome/content/ec2ui/amisview.js
M    src/chrome/content/ec2ui/model.js

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
var ec2_ImageRegistrar = {
2
 
        ec2ui_session : null,
3
 
        retVal : null,
4
 
 
5
 
        getTextBox : function() {
6
 
                return document.getElementById("ec2ui.newimage.manifest");
7
 
        },
8
 
 
9
 
        registerImage : function() {
10
 
                if (!this.validateManifest()) return false;
11
 
                this.retVal.manifestPath = this.getTextBox().value;
12
 
                this.retVal.ok = true;
13
 
                return true;
14
 
        },
15
 
 
16
 
        validateManifest : function() {
17
 
                var textbox = this.getTextBox();
18
 
                if (textbox.value == "") {
19
 
                        alert("Please provide a path to an image manifest file");
20
 
                        textbox.select();
21
 
                        return false;
22
 
                }
23
 
                var oldextre = new RegExp("\\.manifest$");
24
 
                var newextre = new RegExp("\\.manifest\\.xml$");
25
 
                if (textbox.value.match(oldextre) == null && textbox.value.match(newextre) == null) {
26
 
                        alert("Manifest files should end in .manifest or .manifest.xml");
27
 
                        textbox.select();
28
 
                        return false;
29
 
                }
30
 
                var httppre = new RegExp("^http", "i");
31
 
                if (textbox.value.match(httppre) != null) {
32
 
                        alert("Just specify the bucket and manifest path name, not the entire S3 URL.");
33
 
                        textbox.select();
34
 
                        return false;
35
 
                }
36
 
                return true;
37
 
        },
38
 
 
39
 
        init : function() {
40
 
                this.ec2ui_session = window.arguments[0];
41
 
                this.retVal = window.arguments[1];
42
 
        }
 
2
    ec2ui_session : null,
 
3
    retVal : null,
 
4
 
 
5
    getTextBox : function() {
 
6
        return document.getElementById("ec2ui.newimage.manifest");
 
7
    },
 
8
 
 
9
    registerImage : function() {
 
10
        if (!this.validateManifest()) return false;
 
11
        this.retVal.manifestPath = this.getTextBox().value;
 
12
        this.retVal.ok = true;
 
13
        return true;
 
14
    },
 
15
 
 
16
    validateManifest : function() {
 
17
        var textbox = this.getTextBox();
 
18
        var value = textbox.value;
 
19
        if (value == "") {
 
20
            alert("Please provide a path to an image manifest file");
 
21
            textbox.select();
 
22
            return false;
 
23
        }
 
24
        var oldextre = new RegExp("\\.manifest$");
 
25
        var newextre = new RegExp("\\.manifest\\.xml$");
 
26
        if (value.match(oldextre) == null &&
 
27
            value.match(newextre) == null) {
 
28
            alert("Manifest files should end in .manifest or .manifest.xml");
 
29
            textbox.select();
 
30
            return false;
 
31
        }
 
32
        var s3bucket = value.split('/')[0];
 
33
        if (s3bucket.match(new RegExp("[A-Z]"))) {
 
34
            alert("The S3 bucket must be all lower case");
 
35
            textbox.select();
 
36
            return false;
 
37
        }
 
38
        var httppre = new RegExp("^http", "i");
 
39
        if (value.match(httppre) != null) {
 
40
            alert("Just specify the bucket and manifest path name, not the entire S3 URL.");
 
41
            textbox.select();
 
42
            return false;
 
43
        }
 
44
        return true;
 
45
    },
 
46
 
 
47
    init : function() {
 
48
        this.ec2ui_session = window.arguments[0];
 
49
        this.retVal = window.arguments[1];
 
50
    }
43
51
}