cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/4.2 to a422324
Date Wed, 07 Aug 2013 23:04:25 GMT
Updated Branches:
  refs/heads/4.2 9f25b77bd -> a4223243c


CLOUDSTACK-4102: UI > User VM, System VM > remove "Change Service Offering" action since
it has been replaced with new action "Scale Up VM".


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a4223243
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a4223243
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a4223243

Branch: refs/heads/4.2
Commit: a4223243c52bdc7f8242868b45b682edcadcf877
Parents: 9f25b77
Author: Jessica Wang <jessicawang@apache.org>
Authored: Wed Aug 7 16:02:10 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Wed Aug 7 16:04:14 2013 -0700

----------------------------------------------------------------------
 ui/scripts/instances.js |   6 +-
 ui/scripts/system.js    | 268 +------------------------------------------
 2 files changed, 3 insertions(+), 271 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4223243/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index ed361c0..d3c333e 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1859,8 +1859,7 @@
             allowedActions.push("stop");
             allowedActions.push("restart");
             allowedActions.push("snapshot");
-            allowedActions.push("destroy");
-            allowedActions.push("changeService");
+            allowedActions.push("destroy");            
             allowedActions.push("reset");
             allowedActions.push("scaleUp");
 
@@ -1896,8 +1895,7 @@
             } else {
                 allowedActions.push("detachISO");
             }
-            allowedActions.push("resetPassword");
-            allowedActions.push("changeService");
+            allowedActions.push("resetPassword");            
             if (jsonObj.hypervisor == "BareMetal") {
                 allowedActions.push("createTemplate");
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4223243/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 68c281e..87fa463 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -3461,70 +3461,6 @@
                                                 }
                                             },
 
-                                            changeService: {
-                                                label: 'label.change.service.offering',
-                                                createForm: {
-                                                    title: 'label.change.service.offering',
-                                                    desc: '',
-                                                    fields: {
-                                                        serviceOfferingId: {
-                                                            label: 'label.compute.offering',
-                                                            select: function(args) {
-                                                                $.ajax({
-                                                                    url: createURL('listServiceOfferings'),
-                                                                    data: {
-                                                                        issystem: true,
-                                                                        systemvmtype: 'domainrouter'
-                                                                    },
-                                                                    success: function(json)
{
-                                                                        var serviceofferings
= json.listserviceofferingsresponse.serviceoffering;
-                                                                        var items = [];
-                                                                        $(serviceofferings).each(function()
{
-                                                                            if (this.id !=
args.context.routers[0].serviceofferingid) {
-                                                                                items.push({
-                                                                                    id: this.id,
-                                                                                    description:
this.name
-                                                                                }); //default
one (i.e. "System Offering For Software Router") doesn't have displaytext property. So, got
to use name property instead.
-                                                                            }
-                                                                        });
-                                                                        args.response.success({
-                                                                            data: items
-                                                                        });
-                                                                    }
-                                                                });
-                                                            }
-                                                        }
-                                                    }
-                                                },
-                                                messages: {
-                                                    notification: function(args) {
-                                                        return 'label.change.service.offering';
-                                                    }
-                                                },
-                                                action: function(args) {
-                                                    $.ajax({
-                                                        url: createURL("changeServiceForRouter&id="
+ args.context.routers[0].id + "&serviceofferingid=" + args.data.serviceOfferingId),
-                                                        dataType: "json",
-                                                        async: true,
-                                                        success: function(json) {
-                                                            var jsonObj = json.changeserviceforrouterresponse.domainrouter;
-                                                            args.response.success({
-                                                                data: jsonObj
-                                                            });
-                                                        },
-                                                        error: function(XMLHttpResponse)
{
-                                                            var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
-                                                            args.response.error(errorMsg);
-                                                        }
-                                                    });
-                                                },
-                                                notification: {
-                                                    poll: function(args) {
-                                                        args.complete();
-                                                    }
-                                                }
-                                            },
-
                                             'remove': {
                                                 label: 'label.destroy.router',
                                                 messages: {
@@ -6564,73 +6500,6 @@
                                                         }
                                                     },
 
-                                                    changeService: {
-                                                        label: 'label.change.service.offering',
-                                                        createForm: {
-                                                            title: 'label.change.service.offering',
-                                                            desc: '',
-                                                            fields: {
-                                                                serviceOfferingId: {
-                                                                    label: 'label.compute.offering',
-                                                                    select: function(args)
{
-                                                                        var apiCmd = "listServiceOfferings&issystem=true";
-                                                                        if (args.context.systemVMs[0].systemvmtype
== "secondarystoragevm")
-                                                                            apiCmd += "&systemvmtype=secondarystoragevm";
-                                                                        else if (args.context.systemVMs[0].systemvmtype
== "consoleproxy")
-                                                                            apiCmd += "&systemvmtype=consoleproxy";
-                                                                        $.ajax({
-                                                                            url: createURL(apiCmd),
-                                                                            dataType: "json",
-                                                                            async: true,
-                                                                            success: function(json)
{
-                                                                                var serviceofferings
= json.listserviceofferingsresponse.serviceoffering;
-                                                                                var items
= [];
-                                                                                $(serviceofferings).each(function()
{
-                                                                                    if (this.id
!= args.context.systemVMs[0].serviceofferingid) {
-                                                                                        items.push({
-                                                                                        
   id: this.id,
-                                                                                        
   description: this.displaytext
-                                                                                        });
-                                                                                    }
-                                                                                });
-                                                                                args.response.success({
-                                                                                    data:
items
-                                                                                });
-                                                                            }
-                                                                        });
-                                                                    }
-                                                                }
-                                                            }
-                                                        },
-                                                        messages: {
-                                                            notification: function(args)
{
-                                                                return 'label.change.service.offering';
-                                                            }
-                                                        },
-                                                        action: function(args) {
-                                                            $.ajax({
-                                                                url: createURL("changeServiceForSystemVm&id="
+ args.context.systemVMs[0].id + "&serviceofferingid=" + args.data.serviceOfferingId),
-                                                                dataType: "json",
-                                                                async: true,
-                                                                success: function(json) {
-                                                                    var jsonObj = json.changeserviceforsystemvmresponse.systemvm;
-                                                                    args.response.success({
-                                                                        data: jsonObj
-                                                                    });
-                                                                },
-                                                                error: function(XMLHttpResponse)
{
-                                                                    var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
-                                                                    args.response.error(errorMsg);
-                                                                }
-                                                            });
-                                                        },
-                                                        notification: {
-                                                            poll: function(args) {
-                                                                args.complete();
-                                                            }
-                                                        }
-                                                    },
-
                                                     remove: {
                                                         label: 'label.action.destroy.systemvm',
                                                         messages: {
@@ -7635,70 +7504,6 @@
                                 }
                             },
 
-                            changeService: {
-                                label: 'label.change.service.offering',
-                                createForm: {
-                                    title: 'label.change.service.offering',
-                                    desc: '',
-                                    fields: {
-                                        serviceOfferingId: {
-                                            label: 'label.compute.offering',
-                                            select: function(args) {
-                                                $.ajax({
-                                                    url: createURL('listServiceOfferings'),
-                                                    data: {
-                                                        issystem: true,
-                                                        systemvmtype: 'domainrouter'
-                                                    },
-                                                    success: function(json) {
-                                                        var serviceofferings = json.listserviceofferingsresponse.serviceoffering;
-                                                        var items = [];
-                                                        $(serviceofferings).each(function()
{
-                                                            if (this.id != args.context.routers[0].serviceofferingid)
{
-                                                                items.push({
-                                                                    id: this.id,
-                                                                    description: this.name
-                                                                }); //default one (i.e. "System
Offering For Software Router") doesn't have displaytext property. So, got to use name property
instead.
-                                                            }
-                                                        });
-                                                        args.response.success({
-                                                            data: items
-                                                        });
-                                                    }
-                                                });
-                                            }
-                                        }
-                                    }
-                                },
-                                messages: {
-                                    notification: function(args) {
-                                        return 'label.change.service.offering';
-                                    }
-                                },
-                                action: function(args) {
-                                    $.ajax({
-                                        url: createURL("changeServiceForRouter&id=" +
args.context.routers[0].id + "&serviceofferingid=" + args.data.serviceOfferingId),
-                                        dataType: "json",
-                                        async: true,
-                                        success: function(json) {
-                                            var jsonObj = json.changeserviceforrouterresponse.domainrouter;
-                                            args.response.success({
-                                                data: jsonObj
-                                            });
-                                        },
-                                        error: function(XMLHttpResponse) {
-                                            var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
-                                            args.response.error(errorMsg);
-                                        }
-                                    });
-                                },
-                                notification: {
-                                    poll: function(args) {
-                                        args.complete();
-                                    }
-                                }
-                            },
-
                             migrate: {
                                 label: 'label.action.migrate.router',
                                 createForm: {
@@ -8211,73 +8016,6 @@
                                 }
                             },
 
-                            changeService: {
-                                label: 'label.change.service.offering',
-                                createForm: {
-                                    title: 'label.change.service.offering',
-                                    desc: '',
-                                    fields: {
-                                        serviceOfferingId: {
-                                            label: 'label.compute.offering',
-                                            select: function(args) {
-                                                var apiCmd = "listServiceOfferings&issystem=true";
-                                                if (args.context.systemVMs[0].systemvmtype
== "secondarystoragevm")
-                                                    apiCmd += "&systemvmtype=secondarystoragevm";
-                                                else if (args.context.systemVMs[0].systemvmtype
== "consoleproxy")
-                                                    apiCmd += "&systemvmtype=consoleproxy";
-                                                $.ajax({
-                                                    url: createURL(apiCmd),
-                                                    dataType: "json",
-                                                    async: true,
-                                                    success: function(json) {
-                                                        var serviceofferings = json.listserviceofferingsresponse.serviceoffering;
-                                                        var items = [];
-                                                        $(serviceofferings).each(function()
{
-                                                            if (this.id != args.context.systemVMs[0].serviceofferingid)
{
-                                                                items.push({
-                                                                    id: this.id,
-                                                                    description: this.displaytext
-                                                                });
-                                                            }
-                                                        });
-                                                        args.response.success({
-                                                            data: items
-                                                        });
-                                                    }
-                                                });
-                                            }
-                                        }
-                                    }
-                                },
-                                messages: {
-                                    notification: function(args) {
-                                        return 'label.change.service.offering';
-                                    }
-                                },
-                                action: function(args) {
-                                    $.ajax({
-                                        url: createURL("changeServiceForSystemVm&id="
+ args.context.systemVMs[0].id + "&serviceofferingid=" + args.data.serviceOfferingId),
-                                        dataType: "json",
-                                        async: true,
-                                        success: function(json) {
-                                            var jsonObj = json.changeserviceforsystemvmresponse.systemvm;
-                                            args.response.success({
-                                                data: jsonObj
-                                            });
-                                        },
-                                        error: function(XMLHttpResponse) {
-                                            var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
-                                            args.response.error(errorMsg);
-                                        }
-                                    });
-                                },
-                                notification: {
-                                    poll: function(args) {
-                                        args.complete();
-                                    }
-                                }
-                            },
-
                             remove: {
                                 label: 'label.action.destroy.systemvm',
                                 messages: {
@@ -16374,9 +16112,6 @@
             allowedActions.push("start");
             allowedActions.push("scaleUp");
             allowedActions.push("remove");
-
-            if (jsonObj.vpcid != null)
-                allowedActions.push("changeService");
         }
         return allowedActions;
     }
@@ -16411,8 +16146,7 @@
                 allowedActions.push("migrate");
         } else if (jsonObj.state == 'Stopped') {
             allowedActions.push("start");
-            allowedActions.push("scaleUp");
-            allowedActions.push("changeService");
+            allowedActions.push("scaleUp");            
             allowedActions.push("remove");
         } else if (jsonObj.state == 'Error') {
             allowedActions.push("remove");


Mime
View raw message