cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [13/16] git commit: updated refs/heads/master to b074fc7
Date Fri, 07 Aug 2015 21:10:27 GMT
Removed leading tabs from ui/scripts/*.js


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

Branch: refs/heads/master
Commit: 471a02d6a4d25ee78526ae7fc3994d7ffa9ab06c
Parents: 2bdbaf4
Author: Kevin Dierkx <contact@kevindierkx.com>
Authored: Fri Aug 7 11:58:13 2015 +0200
Committer: Kevin Dierkx <contact@kevindierkx.com>
Committed: Fri Aug 7 11:58:13 2015 +0200

----------------------------------------------------------------------
 ui/scripts/accounts.js                 |  106 +--
 ui/scripts/accountsWizard.js           |    6 +-
 ui/scripts/affinity.js                 |    2 +-
 ui/scripts/cloud.core.callbacks.js     |    6 +-
 ui/scripts/dashboard.js                |   32 +-
 ui/scripts/domains.js                  |   26 +-
 ui/scripts/globalSettings.js           |   60 +-
 ui/scripts/instanceWizard.js           |  302 ++++----
 ui/scripts/instances.js                |  372 ++++-----
 ui/scripts/network.js                  |  878 +++++++++++-----------
 ui/scripts/projects.js                 |   56 +-
 ui/scripts/regions.js                  |   16 +-
 ui/scripts/sharedFunctions.js          |  154 ++--
 ui/scripts/storage.js                  |  170 ++---
 ui/scripts/system.js                   | 1076 +++++++++++++--------------
 ui/scripts/templates.js                |  478 ++++++------
 ui/scripts/ui-custom/accountsWizard.js |  164 ++--
 ui/scripts/ui-custom/instanceWizard.js |   22 +-
 ui/scripts/ui-custom/regions.js        |    6 +-
 ui/scripts/ui-custom/zoneChart.js      |    2 +-
 ui/scripts/ui-custom/zoneWizard.js     |  166 ++---
 ui/scripts/ui/dialog.js                |   28 +-
 ui/scripts/ui/widgets/detailView.js    |   92 +--
 ui/scripts/ui/widgets/listView.js      |   38 +-
 ui/scripts/ui/widgets/multiEdit.js     |    2 +-
 ui/scripts/vpc.js                      |   44 +-
 ui/scripts/zoneWizard.js               |  284 +++----
 27 files changed, 2294 insertions(+), 2294 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/471a02d6/ui/scripts/accounts.js
----------------------------------------------------------------------
diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js
index f6fcc27..e48f3a1 100644
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@ -426,53 +426,53 @@
                                             //pop up API response in a dialog box since only updateResourceCount API returns resourcecount (listResourceLimits API does NOT return resourcecount)
                                             var msg = '';
                                             if (resourcecounts != null) {
-                                            	for (var i = 0; i < resourcecounts.length; i++) {
-                                            		switch (resourcecounts[i].resourcetype) {
-                                            		case '0':
-                                            			msg += 'Instance'; //vmLimit
-                                            			break;
-                                            		case '1':
-                                            			msg += 'Public IP'; //ipLimit
-                                            			break;
-                                            		case '2':
-                                            			msg += 'Volume'; //volumeLimit
-                                            			break;
-                                            		case '3':
-                                            		    msg += 'Snapshot'; //snapshotLimit
-                                            		    break;
-                                            		case '4':
-                                            			msg += 'Template'; //templateLimit
-                                            			break;
-                                            		case '5':
-                                            			continue; //resourcetype 5 is not in use. so, skip to next item.
-                                            			break;
-                                            		case '6':
-                                            			msg += 'Network'; //networkLimit
-                                            			break;
-                                            		case '7':
-                                            			msg += 'VPC'; //vpcLimit
-                                            			break;
-                                            		case '8':
-                                            			msg += 'CPU'; //cpuLimit
-                                            			break;
-                                            		case '9':
-                                            			msg += 'Memory'; //memoryLimit
-                                            			break;
-                                            		case '10':
-                                            			msg += 'Primary Storage'; //primaryStorageLimit
-                                            			break;
-                                            		case '11':
-                                            			msg += 'Secondary Storage'; //secondaryStorageLimit
-                                            			break;
-                                            		}
-
-                                            		msg += ' Count: ' + resourcecounts[i].resourcecount + ' <br> ';
-                                            	}
+                                                for (var i = 0; i < resourcecounts.length; i++) {
+                                                    switch (resourcecounts[i].resourcetype) {
+                                                    case '0':
+                                                        msg += 'Instance'; //vmLimit
+                                                        break;
+                                                    case '1':
+                                                        msg += 'Public IP'; //ipLimit
+                                                        break;
+                                                    case '2':
+                                                        msg += 'Volume'; //volumeLimit
+                                                        break;
+                                                    case '3':
+                                                        msg += 'Snapshot'; //snapshotLimit
+                                                        break;
+                                                    case '4':
+                                                        msg += 'Template'; //templateLimit
+                                                        break;
+                                                    case '5':
+                                                        continue; //resourcetype 5 is not in use. so, skip to next item.
+                                                        break;
+                                                    case '6':
+                                                        msg += 'Network'; //networkLimit
+                                                        break;
+                                                    case '7':
+                                                        msg += 'VPC'; //vpcLimit
+                                                        break;
+                                                    case '8':
+                                                        msg += 'CPU'; //cpuLimit
+                                                        break;
+                                                    case '9':
+                                                        msg += 'Memory'; //memoryLimit
+                                                        break;
+                                                    case '10':
+                                                        msg += 'Primary Storage'; //primaryStorageLimit
+                                                        break;
+                                                    case '11':
+                                                        msg += 'Secondary Storage'; //secondaryStorageLimit
+                                                        break;
+                                                    }
+
+                                                    msg += ' Count: ' + resourcecounts[i].resourcecount + ' <br> ';
+                                                }
                                             }
 
 
                                             cloudStack.dialog.notice({
-                                            	message: msg
+                                                message: msg
                                             });
 
                                             args.response.success();
@@ -655,11 +655,11 @@
                         },
 
                         tabFilter: function(args) {
-                        	var hiddenTabs = [];
-                        	if(!isAdmin()) {
-                        		hiddenTabs.push('settings');
-                        	}
-                        	return hiddenTabs;
+                            var hiddenTabs = [];
+                            if(!isAdmin()) {
+                                hiddenTabs.push('settings');
+                            }
+                            return hiddenTabs;
                         },
 
                         tabs: {
@@ -2001,11 +2001,11 @@
                 allowedActions.push("remove");
             }
         } else { //domain-admin, regular-user
-        	if (jsonObj.username == g_username) { //selected user is self
-        		allowedActions.push("changePassword");
+            if (jsonObj.username == g_username) { //selected user is self
+                allowedActions.push("changePassword");
                 allowedActions.push("generateKeys");
-        	} else if (isDomainAdmin()) { //if selected user is not self, and the current login is domain-admin
-        		allowedActions.push("edit");
+            } else if (isDomainAdmin()) { //if selected user is not self, and the current login is domain-admin
+                allowedActions.push("edit");
                 if (jsonObj.state == "enabled")
                     allowedActions.push("disable");
                 if (jsonObj.state == "disabled")
@@ -2017,7 +2017,7 @@
                 if (g_idpList) {
                     allowedActions.push("configureSamlAuthorization");
                 }
-        	}
+            }
         }
         return allowedActions;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/471a02d6/ui/scripts/accountsWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/accountsWizard.js b/ui/scripts/accountsWizard.js
index 2806bfb..633821e 100644
--- a/ui/scripts/accountsWizard.js
+++ b/ui/scripts/accountsWizard.js
@@ -213,7 +213,7 @@
                 if (md5Hashed) {
                     password = $.md5(password);
                 } else {
-                	password = todb(password);
+                    password = todb(password);
                 }
                 array1.push("&password=" + password);
             }
@@ -228,9 +228,9 @@
 
             var accountType = args.data.accounttype;
             if (accountType == "1") { //if "admin" is selected in account type dropdown
-            	if (rootDomainId == undefined || args.data.domainid != rootDomainId ) { //but current login has no visibility to root domain object, or the selected domain is not root domain
+                if (rootDomainId == undefined || args.data.domainid != rootDomainId ) { //but current login has no visibility to root domain object, or the selected domain is not root domain
                     accountType = "2"; // change accountType from root-domain("1") to domain-admin("2")
-            	}
+                }
             }
             array1.push("&accounttype=" + accountType);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/471a02d6/ui/scripts/affinity.js
----------------------------------------------------------------------
diff --git a/ui/scripts/affinity.js b/ui/scripts/affinity.js
index db8b79a..aecb4d6 100644
--- a/ui/scripts/affinity.js
+++ b/ui/scripts/affinity.js
@@ -195,7 +195,7 @@
                                 success: function(json) {
                                     var item = json.listaffinitygroupsresponse.affinitygroup[0];
                                     args.response.success({
-                                    	actionFilter: affinitygroupActionfilter,
+                                        actionFilter: affinitygroupActionfilter,
                                         data: item
                                     });
                                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/471a02d6/ui/scripts/cloud.core.callbacks.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloud.core.callbacks.js b/ui/scripts/cloud.core.callbacks.js
index 3ae6d09..9aad73a 100644
--- a/ui/scripts/cloud.core.callbacks.js
+++ b/ui/scripts/cloud.core.callbacks.js
@@ -39,9 +39,9 @@ function onLogoutCallback() {
 
     return true; // return true means the login page will show
     /*
-	window.location.replace("http://www.google.com"); //redirect to a different location
-  return false;	//return false means it will stay in the location window.location.replace() sets it to (i.e. "http://www.google.com")
-	*/
+    window.location.replace("http://www.google.com"); //redirect to a different location
+  return false;    //return false means it will stay in the location window.location.replace() sets it to (i.e. "http://www.google.com")
+    */
 }
 
 var g_loginResponse = null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/471a02d6/ui/scripts/dashboard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/dashboard.js b/ui/scripts/dashboard.js
index 50dfb22..f2b5682 100644
--- a/ui/scripts/dashboard.js
+++ b/ui/scripts/dashboard.js
@@ -29,8 +29,8 @@
             dataProvider: function(args) {
                 var dataFns = {
                     instances: function(data) {
-                    	var totalInstanceCount = 0;
-                    	$.ajax({
+                        var totalInstanceCount = 0;
+                        $.ajax({
                             url: createURL("listVirtualMachines"),
                             data: {
                                 listAll: true,
@@ -39,14 +39,14 @@
                             },
                             async: false,
                             success: function(json) {
-                            	if (json.listvirtualmachinesresponse.count != undefined) {
-                            		totalInstanceCount = json.listvirtualmachinesresponse.count;
-                            	}
+                                if (json.listvirtualmachinesresponse.count != undefined) {
+                                    totalInstanceCount = json.listvirtualmachinesresponse.count;
+                                }
                             }
                         });
 
-                    	var RunningInstanceCount = 0;
-                    	$.ajax({
+                        var RunningInstanceCount = 0;
+                        $.ajax({
                             url: createURL("listVirtualMachines"),
                             data: {
                                 listAll: true,
@@ -56,14 +56,14 @@
                             },
                             async: false,
                             success: function(json) {
-                            	if (json.listvirtualmachinesresponse.count != undefined) {
-                            		RunningInstanceCount = json.listvirtualmachinesresponse.count;
-                            	}
+                                if (json.listvirtualmachinesresponse.count != undefined) {
+                                    RunningInstanceCount = json.listvirtualmachinesresponse.count;
+                                }
                             }
                         });
 
-                    	var stoppedInstanceCount = 0;
-                    	$.ajax({
+                        var stoppedInstanceCount = 0;
+                        $.ajax({
                             url: createURL("listVirtualMachines"),
                             data: {
                                 listAll: true,
@@ -73,9 +73,9 @@
                             },
                             async: false,
                             success: function(json) {
-                            	if (json.listvirtualmachinesresponse.count != undefined) {
-                            		stoppedInstanceCount = json.listvirtualmachinesresponse.count;
-                            	}
+                                if (json.listvirtualmachinesresponse.count != undefined) {
+                                    stoppedInstanceCount = json.listvirtualmachinesresponse.count;
+                                }
                             }
                         });
 
@@ -131,7 +131,7 @@
                                 $.ajax({
                                     url: createURL('listPublicIpAddresses'),
                                     data: {
-                                    	page: 1,
+                                        page: 1,
                                         pageSize: 1
                                     },
                                     success: function(json) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/471a02d6/ui/scripts/domains.js
----------------------------------------------------------------------
diff --git a/ui/scripts/domains.js b/ui/scripts/domains.js
index 08a53cd..f2b4073 100644
--- a/ui/scripts/domains.js
+++ b/ui/scripts/domains.js
@@ -21,7 +21,7 @@
 
         // Domain tree
         treeView: {
-		overflowScroll: true,
+        overflowScroll: true,
             // Details
             detailView: {
                 name: 'Domain details',
@@ -111,19 +111,19 @@
 
                             if (args.data.networkdomain != null) { //args.data.networkdomain == undefined means networkdomain field is not editable (when log in as normal user or domain admin)
                                 $.extend(data, {
-                                	networkdomain: args.data.networkdomain
+                                    networkdomain: args.data.networkdomain
                                 });
                             }
 
                             if('name' in data || 'networkdomain' in data)  {
-	                            $.ajax({
-	                                url: createURL("updateDomain"),
-	                                async: false,
-	                                data: data,
-	                                success: function(json) {
-	                                    domainObj = json.updatedomainresponse.domain;
-	                                }
-	                            });
+                                $.ajax({
+                                    url: createURL("updateDomain"),
+                                    async: false,
+                                    data: data,
+                                    success: function(json) {
+                                        domainObj = json.updatedomainresponse.domain;
+                                    }
+                                });
                             }
 
                             if (args.data.vmLimit != null) {
@@ -653,9 +653,9 @@
                 allowedActions.push("delete");
             }
         } else if (isDomainAdmin()) {
-        	if (args.context.domains[0].id != g_domainid) {
-        		allowedActions.push("edit"); //merge updateResourceLimit into edit
-        	}
+            if (args.context.domains[0].id != g_domainid) {
+                allowedActions.push("edit"); //merge updateResourceLimit into edit
+            }
         }
         allowedActions.push("updateResourceCount");
         return allowedActions;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/471a02d6/ui/scripts/globalSettings.js
----------------------------------------------------------------------
diff --git a/ui/scripts/globalSettings.js b/ui/scripts/globalSettings.js
index 680b0fa..eba8e68 100644
--- a/ui/scripts/globalSettings.js
+++ b/ui/scripts/globalSettings.js
@@ -242,9 +242,9 @@
                     id: 'baremetalRct',
                     label: 'label.baremetal.rack.configuration',
                     fields: {
-                    	id: {
-                    		label: 'label.id'
-                    	},
+                        id: {
+                            label: 'label.id'
+                        },
                         url: {
                             label: 'label.url'
                         }
@@ -254,11 +254,11 @@
                         listViewDataProvider(args, data);
 
                         $.ajax({
-                        	url: createURL("listBaremetalRct"),
-                        	data: data,
-                        	success: function(json) {
-                        		args.response.success({ data: json.listbaremetalrctresponse.baremetalrct });
-                        	}
+                            url: createURL("listBaremetalRct"),
+                            data: data,
+                            success: function(json) {
+                                args.response.success({ data: json.listbaremetalrctresponse.baremetalrct });
+                            }
                         });
                     },
                     actions: {
@@ -282,13 +282,13 @@
                             },
                             action: function(args) {
                                 $.ajax({
-                                	url: createURL("addBaremetalRct"),
-                                	data: {
-                                		baremetalrcturl: args.data.url
-                                	},
-                                	success: function(json) {
-                                		var jid = json.addbaremetalrctresponse.jobid
-                                		args.response.success({
+                                    url: createURL("addBaremetalRct"),
+                                    data: {
+                                        baremetalrcturl: args.data.url
+                                    },
+                                    success: function(json) {
+                                        var jid = json.addbaremetalrctresponse.jobid
+                                        args.response.success({
                                             _custom: {
                                                 jobId: jid,
                                                 getUpdatedItem: function(json) {
@@ -296,7 +296,7 @@
                                                 }
                                             }
                                         });
-                                	}
+                                    }
                                 });
                             },
                             notification: {
@@ -306,9 +306,9 @@
                     },
 
                     detailView: {
-                    	name: "details",
-                    	actions: {
-                    		remove: {
+                        name: "details",
+                        actions: {
+                            remove: {
                                 label: 'label.delete.baremetal.rack.configuration',
                                 messages: {
                                     confirm: function(args) {
@@ -326,7 +326,7 @@
                                         url: createURL('deleteBaremetalRct'),
                                         data: data,
                                         success: function(json) {
-                                        	var jid = json.deletebaremetalrctresponse.jobid;
+                                            var jid = json.deletebaremetalrctresponse.jobid;
                                             args.response.success({
                                                 _custom: {
                                                     jobId: jid
@@ -339,14 +339,14 @@
                                     poll: pollAsyncJobResult
                                 }
                             }
-                    	},
-                    	tabs: {
+                        },
+                        tabs: {
                             details: {
                                 title: 'label.details',
                                 fields: [{
-                                	id: {
-                                		label: 'label.id'
-                                	},
+                                    id: {
+                                        label: 'label.id'
+                                    },
                                     url: {
                                         label: 'label.url'
                                     }
@@ -356,11 +356,11 @@
                                         id: args.context.baremetalRct[0].id
                                     };
                                     $.ajax({
-                                    	url: createURL("listBaremetalRct"),
-                                    	data: data,
-                                    	success: function(json) {
-                                    		args.response.success({ data: json.listbaremetalrctresponse.baremetalrct[0] });
-                                    	}
+                                        url: createURL("listBaremetalRct"),
+                                        data: data,
+                                        success: function(json) {
+                                            args.response.success({ data: json.listbaremetalrctresponse.baremetalrct[0] });
+                                        }
                                     });
                                 }
                             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/471a02d6/ui/scripts/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js
index 877658a..1401ace 100644
--- a/ui/scripts/instanceWizard.js
+++ b/ui/scripts/instanceWizard.js
@@ -191,9 +191,9 @@
                         async: false,
                         success: function(json) {
                             if (json.listtemplatesresponse.template == null) {
-                            	sharedTemplateObjs = null;
+                                sharedTemplateObjs = null;
                             } else {
-                            	sharedTemplateObjs = $.grep(json.listtemplatesresponse.template, function(item, index) {
+                                sharedTemplateObjs = $.grep(json.listtemplatesresponse.template, function(item, index) {
                                     if ($.inArray(item.hypervisor, hypervisorArray) > -1)
                                         return true;
                                 });
@@ -243,9 +243,9 @@
                         async: false,
                         success: function(json) {
                             if (json.listisosresponse.iso == null) {
-                            	sharedIsoObjs = null;
+                                sharedIsoObjs = null;
                             } else {
-                            	sharedIsoObjs = json.listisosresponse.iso;
+                                sharedIsoObjs = json.listisosresponse.iso;
                             }
                         }
                     });
@@ -286,7 +286,7 @@
                         if (selectedTemplateOrIso == 'select-template') {
                             return false; //show Root Disk Size field
                         } else { //selectedTemplateOrIso == 'select-iso'
-                        	return true;  //hide Root Disk Size field
+                            return true;  //hide Root Disk Size field
                         }
                     }
                 });
@@ -294,7 +294,7 @@
 
             // Step 3: Service offering
             function(args) {
-            	selectedTemplateObj = null; //reset
+                selectedTemplateObj = null; //reset
                 if (args.currentData["select-template"] == "select-template") {
                     if (featuredTemplateObjs != null && featuredTemplateObjs.length > 0) {
                         for (var i = 0; i < featuredTemplateObjs.length; i++) {
@@ -350,28 +350,28 @@
                 // get serviceOfferingObjs
                 $(window).removeData("cloudStack.module.instanceWizard.serviceOfferingObjs");
                 $(window).trigger("cloudStack.module.instanceWizard.serviceOffering.dataProvider", {
-                	context: args.context,
-                	currentData: args.currentData
+                    context: args.context,
+                    currentData: args.currentData
                 });
                 if ($(window).data("cloudStack.module.instanceWizard.serviceOfferingObjs") == undefined) {
-	                $.ajax({
-	                    url: createURL("listServiceOfferings&issystem=false"),
-	                    dataType: "json",
-	                    async: false,
-	                    success: function(json) {
-	                        serviceOfferingObjs = json.listserviceofferingsresponse.serviceoffering;
-	                    }
-	                });
+                    $.ajax({
+                        url: createURL("listServiceOfferings&issystem=false"),
+                        dataType: "json",
+                        async: false,
+                        success: function(json) {
+                            serviceOfferingObjs = json.listserviceofferingsresponse.serviceoffering;
+                        }
+                    });
                 } else {
-                	serviceOfferingObjs = $(window).data("cloudStack.module.instanceWizard.serviceOfferingObjs");
+                    serviceOfferingObjs = $(window).data("cloudStack.module.instanceWizard.serviceOfferingObjs");
                 }
 
 
                 args.response.success({
                     canShowCustomIops: canShowCustomIopsForServiceOffering,
                     customFlag: 'iscustomized',
-                	//customFlag: 'offerha', //for testing only
-                	customIopsFlag: 'iscustomizediops',
+                    //customFlag: 'offerha', //for testing only
+                    customIopsFlag: 'iscustomizediops',
                     data: {
                         serviceOfferings: serviceOfferingObjs
                     }
@@ -411,16 +411,16 @@
                         };
 
                         if(selectedZoneObj.domainid != null && selectedZoneObj.affinitygroupid != null) {
-                        	var defaultAffinityGroup;
-                        	if(affinitygroups != null) {
-                        		for(var i = 0; i < affinitygroups.length; i++) {
-                        			if(affinitygroups[i].id == selectedZoneObj.affinitygroupid) {
-                        				defaultAffinityGroup = affinitygroups[i];
-                        				break;
-                        			}
-                        		}
-                        	}
-                        	$.extend(data, {
+                            var defaultAffinityGroup;
+                            if(affinitygroups != null) {
+                                for(var i = 0; i < affinitygroups.length; i++) {
+                                    if(affinitygroups[i].id == selectedZoneObj.affinitygroupid) {
+                                        defaultAffinityGroup = affinitygroups[i];
+                                        break;
+                                    }
+                                }
+                            }
+                            $.extend(data, {
                                 selectedObj: defaultAffinityGroup,
                                 selectedObjNonEditable: true
                             });
@@ -612,14 +612,14 @@
                     // get networkObjsToPopulate
                     $(window).removeData("cloudStack.module.instanceWizard.networkObjs");
                     $(window).trigger("cloudStack.module.instanceWizard.network.dataProvider", {
-                    	context: args.context,
-                    	currentData: args.currentData,
-                    	networkObjsToPopulate: networkObjsToPopulate
+                        context: args.context,
+                        currentData: args.currentData,
+                        networkObjsToPopulate: networkObjsToPopulate
                     });
                     if ($(window).data("cloudStack.module.instanceWizard.networkObjs") == undefined) {
-    	                //do nothing
+                        //do nothing
                     } else {
-                    	networkObjsToPopulate = $(window).data("cloudStack.module.instanceWizard.networkObjs"); //override networkObjsToPopulate
+                        networkObjsToPopulate = $(window).data("cloudStack.module.instanceWizard.networkObjs"); //override networkObjsToPopulate
                     }
 
 
@@ -639,7 +639,7 @@
                             networkOfferingObjs = json.listnetworkofferingsresponse.networkoffering;
                         }
                     });
-                    //get network offerings (end)	***
+                    //get network offerings (end)    ***
 
                     $networkStepContainer.removeClass('repeat next-use-security-groups');
 
@@ -731,86 +731,86 @@
 
             //step 1 : select zone
             $.extend(deployVmData, {
-            	zoneid : args.data.zoneid
+                zoneid : args.data.zoneid
             });
 
             //step 2: select template
             $.extend(deployVmData, {
-            	templateid : args.data.templateid
+                templateid : args.data.templateid
             });
 
             $.extend(deployVmData, {
-            	hypervisor : selectedHypervisor
+                hypervisor : selectedHypervisor
             });
 
             if (args.$wizard.find('input[name=rootDiskSize]').parent().css('display') != 'none')  {
-            	if (args.$wizard.find('input[name=rootDiskSize]').val().length > 0) {
-            		$.extend(deployVmData, {
-            			rootdisksize : args.$wizard.find('input[name=rootDiskSize]').val()
-            		});
-            	}
+                if (args.$wizard.find('input[name=rootDiskSize]').val().length > 0) {
+                    $.extend(deployVmData, {
+                        rootdisksize : args.$wizard.find('input[name=rootDiskSize]').val()
+                    });
+                }
             }
 
             //step 3: select service offering
             $.extend(deployVmData, {
-            	serviceofferingid : args.data.serviceofferingid
+                serviceofferingid : args.data.serviceofferingid
             });
 
             if (args.$wizard.find('input[name=compute-cpu-cores]').parent().parent().css('display') != 'none') {
-	            if (args.$wizard.find('input[name=compute-cpu-cores]').val().length > 0)  {
-	            	$.extend(deployVmData, {
-	            	    'details[0].cpuNumber' : args.$wizard.find('input[name=compute-cpu-cores]').val()
-	            	});
-	            }
-	            if (args.$wizard.find('input[name=compute-cpu]').val().length > 0)  {
-	            	$.extend(deployVmData, {
-	            	    'details[0].cpuSpeed' : args.$wizard.find('input[name=compute-cpu]').val()
-	            	});
-	            }
-	            if (args.$wizard.find('input[name=compute-memory]').val().length > 0)  {
-	            	$.extend(deployVmData, {
-	            	    'details[0].memory' : args.$wizard.find('input[name=compute-memory]').val()
-	            	});
-	            }
+                if (args.$wizard.find('input[name=compute-cpu-cores]').val().length > 0)  {
+                    $.extend(deployVmData, {
+                        'details[0].cpuNumber' : args.$wizard.find('input[name=compute-cpu-cores]').val()
+                    });
+                }
+                if (args.$wizard.find('input[name=compute-cpu]').val().length > 0)  {
+                    $.extend(deployVmData, {
+                        'details[0].cpuSpeed' : args.$wizard.find('input[name=compute-cpu]').val()
+                    });
+                }
+                if (args.$wizard.find('input[name=compute-memory]').val().length > 0)  {
+                    $.extend(deployVmData, {
+                        'details[0].memory' : args.$wizard.find('input[name=compute-memory]').val()
+                    });
+                }
             }
 
             if (args.$wizard.find('input[name=disk-min-iops]').parent().parent().css('display') != 'none') {
-	            if (args.$wizard.find('input[name=disk-min-iops]').val().length > 0) {
-	            	$.extend(deployVmData, {
-	            	    'details[0].minIops' : args.$wizard.find('input[name=disk-min-iops]').val()
-	            	});
-	            }
-	            if (args.$wizard.find('input[name=disk-max-iops]').val().length > 0) {
-	            	$.extend(deployVmData, {
-	            	    'details[0].maxIops' : args.$wizard.find('input[name=disk-max-iops]').val()
-	            	});
-	            }
+                if (args.$wizard.find('input[name=disk-min-iops]').val().length > 0) {
+                    $.extend(deployVmData, {
+                        'details[0].minIops' : args.$wizard.find('input[name=disk-min-iops]').val()
+                    });
+                }
+                if (args.$wizard.find('input[name=disk-max-iops]').val().length > 0) {
+                    $.extend(deployVmData, {
+                        'details[0].maxIops' : args.$wizard.find('input[name=disk-max-iops]').val()
+                    });
+                }
             }
 
             //step 4: select disk offering
             if (args.data.diskofferingid != null && args.data.diskofferingid != "0") {
-            	$.extend(deployVmData, {
-            		diskofferingid : args.data.diskofferingid
-            	});
+                $.extend(deployVmData, {
+                    diskofferingid : args.data.diskofferingid
+                });
 
                 if (selectedDiskOfferingObj.iscustomized == true) {
-                	$.extend(deployVmData, {
-                		size : args.data.size
-                	});
+                    $.extend(deployVmData, {
+                        size : args.data.size
+                    });
                 }
 
                 if (selectedDiskOfferingObj.iscustomizediops == true) {
-	                if (args.$wizard.find('input[name=disk-min-iops-do]').val().length > 0) {
-	            	    $.extend(deployVmData, {
-	            	        'details[0].minIopsDo' : args.$wizard.find('input[name=disk-min-iops-do]').val()
-	            	    });
-	                }
-
-	                if (args.$wizard.find('input[name=disk-max-iops-do]').val().length > 0) {
-	            	    $.extend(deployVmData, {
-	            	        'details[0].maxIopsDo' : args.$wizard.find('input[name=disk-max-iops-do]').val()
-	            	    });
-	                }
+                    if (args.$wizard.find('input[name=disk-min-iops-do]').val().length > 0) {
+                        $.extend(deployVmData, {
+                            'details[0].minIopsDo' : args.$wizard.find('input[name=disk-min-iops-do]').val()
+                        });
+                    }
+
+                    if (args.$wizard.find('input[name=disk-max-iops-do]').val().length > 0) {
+                        $.extend(deployVmData, {
+                            'details[0].maxIopsDo' : args.$wizard.find('input[name=disk-max-iops-do]').val()
+                        });
+                    }
                 }
             }
 
@@ -826,9 +826,9 @@
             }
 
             if (checkedAffinityGroupIdArray.length > 0) {
-            	$.extend(deployVmData, {
-            		affinitygroupids : checkedAffinityGroupIdArray.join(",")
-            	});
+                $.extend(deployVmData, {
+                    affinitygroupids : checkedAffinityGroupIdArray.join(",")
+                });
             }
 
             //step 6: select network
@@ -882,47 +882,47 @@
 
 
                 if (defaultNetworkId == null) {
-                	cloudStack.dialog.notice({
+                    cloudStack.dialog.notice({
                         message: "Please select a default network in Network step."
                     });
-                	return;
+                    return;
                 }
 
                 if (checkedNetworkIdArray.length > 0) {
                     for (var i = 0; i < checkedNetworkIdArray.length; i++) {
-                    	if (checkedNetworkIdArray[i] == defaultNetworkId) {
-                    		array2.unshift(defaultNetworkId);
-
-                    		var ipToNetwork = {
-                    			networkid: defaultNetworkId
-                    		};
-                    		if (args.data["new-network"] == "create-new-network") {
-                    			if (args.data['new-network-ip'] != null && args.data['new-network-ip'].length > 0) {
-                    				$.extend(ipToNetwork, {
-                    					ip: args.data['new-network-ip']
-                    				});
-                    			}
-                    		} else {
-                    			if (args.data["my-network-ips"][i] != null && args.data["my-network-ips"][i].length > 0) {
-                    				$.extend(ipToNetwork, {
-                    					ip: args.data["my-network-ips"][i]
-                    				});
-                    			}
-                    		}
-                    		array3.unshift(ipToNetwork);
-
-                    	} else {
+                        if (checkedNetworkIdArray[i] == defaultNetworkId) {
+                            array2.unshift(defaultNetworkId);
+
+                            var ipToNetwork = {
+                                networkid: defaultNetworkId
+                            };
+                            if (args.data["new-network"] == "create-new-network") {
+                                if (args.data['new-network-ip'] != null && args.data['new-network-ip'].length > 0) {
+                                    $.extend(ipToNetwork, {
+                                        ip: args.data['new-network-ip']
+                                    });
+                                }
+                            } else {
+                                if (args.data["my-network-ips"][i] != null && args.data["my-network-ips"][i].length > 0) {
+                                    $.extend(ipToNetwork, {
+                                        ip: args.data["my-network-ips"][i]
+                                    });
+                                }
+                            }
+                            array3.unshift(ipToNetwork);
+
+                        } else {
                             array2.push(checkedNetworkIdArray[i]);
 
                             var ipToNetwork = {
-                        		networkid: checkedNetworkIdArray[i]
-                        	};
-                        	if (args.data["my-network-ips"][i] != null && args.data["my-network-ips"][i].length > 0) {
-                        		$.extend(ipToNetwork, {
-                					ip: args.data["my-network-ips"][i]
-                				});
-                        	}
-                        	array3.push(ipToNetwork);
+                                networkid: checkedNetworkIdArray[i]
+                            };
+                            if (args.data["my-network-ips"][i] != null && args.data["my-network-ips"][i].length > 0) {
+                                $.extend(ipToNetwork, {
+                                    ip: args.data["my-network-ips"][i]
+                                });
+                            }
+                            array3.push(ipToNetwork);
                         }
                     }
                 }
@@ -930,10 +930,10 @@
                 //deployVmData.push("&networkIds=" + array2.join(","));  //ipToNetworkMap can't be specified along with networkIds or ipAddress
 
                 for (var k = 0; k < array3.length; k++) {
-                	deployVmData["iptonetworklist[" + k + "].networkid"] = array3[k].networkid;
-                	if (array3[k].ip != undefined && array3[k].ip.length > 0) {
-                		deployVmData["iptonetworklist[" + k + "].ip"] = array3[k].ip;
-                	}
+                    deployVmData["iptonetworklist[" + k + "].networkid"] = array3[k].networkid;
+                    if (array3[k].ip != undefined && array3[k].ip.length > 0) {
+                        deployVmData["iptonetworklist[" + k + "].ip"] = array3[k].ip;
+                    }
                 }
 
             } else if (step6ContainerType == 'select-security-group') {
@@ -948,9 +948,9 @@
                 }
 
                 if (checkedSecurityGroupIdArray.length > 0) {
-                	$.extend(deployVmData, {
-                		securitygroupids : checkedSecurityGroupIdArray.join(",")
-                	});
+                    $.extend(deployVmData, {
+                        securitygroupids : checkedSecurityGroupIdArray.join(",")
+                    });
                 }
 
                 if (selectedZoneObj.networktype == "Advanced" && selectedZoneObj.securitygroupsenabled == true) { // Advanced SG-enabled zone
@@ -982,27 +982,27 @@
                     }
 
                     $.extend(deployVmData, {
-                    	networkids : array2.join(",")
+                        networkids : array2.join(",")
                     });
                 }
             } else if (step6ContainerType == 'nothing-to-select') {
                 if ("vpc" in args.context) { //from VPC tier
                     deployVmData["iptonetworklist[0].networkid"] = args.context.networks[0].id;
-                	if (args.data["vpc-specify-ip"] != undefined && args.data["vpc-specify-ip"].length > 0) {
-                		deployVmData["iptonetworklist[0].ip"] = args.data["vpc-specify-ip"];
-                	}
+                    if (args.data["vpc-specify-ip"] != undefined && args.data["vpc-specify-ip"].length > 0) {
+                        deployVmData["iptonetworklist[0].ip"] = args.data["vpc-specify-ip"];
+                    }
 
                     $.extend(deployVmData, {
-                    	domainid : args.context.vpc[0].domainid
+                        domainid : args.context.vpc[0].domainid
                     });
                     if (args.context.vpc[0].account != null) {
-                    	$.extend(deployVmData, {
-                    		account : args.context.vpc[0].account
-                    	});
+                        $.extend(deployVmData, {
+                            account : args.context.vpc[0].account
+                        });
                     } else if (args.context.vpc[0].projectid != null) {
-                    	$.extend(deployVmData, {
-                    		projectid : args.context.vpc[0].projectid
-                    	});
+                        $.extend(deployVmData, {
+                            projectid : args.context.vpc[0].projectid
+                        });
                     }
                 }
             }
@@ -1016,26 +1016,26 @@
 
             var displayname = args.data.displayname;
             if (displayname != null && displayname.length > 0) {
-            	$.extend(deployVmData, {
-            		displayname : displayname
-            	});
-            	$.extend(deployVmData, {
-            		name : displayname
-            	});
+                $.extend(deployVmData, {
+                    displayname : displayname
+                });
+                $.extend(deployVmData, {
+                    name : displayname
+                });
             }
 
             var group = args.data.groupname;
             if (group != null && group.length > 0) {
-            	$.extend(deployVmData, {
-            		group : group
-            	});
+                $.extend(deployVmData, {
+                    group : group
+                });
             }
 
             var keyboard = args.data.keyboardLanguage;
             if (keyboard != null && keyboard.length > 0) {  //when blank option (default option) is selected => args.data.keyboardLanguage == ""
-            	$.extend(deployVmData, {
-            		keyboard : keyboard
-            	});
+                $.extend(deployVmData, {
+                    keyboard : keyboard
+                });
             }
 
             if (g_hostid != null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/471a02d6/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 9afb787..1347422 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -601,10 +601,10 @@
                                 return 'label.action.reboot.instance';
                             },
                             complete: function(args) {
-                            	if (args.password != null && args.password.length > 0)
+                                if (args.password != null && args.password.length > 0)
                                     return 'Password has been reset to ' + args.password;
-                            	else
-                            		return null;
+                                else
+                                    return null;
                             }
                         },
                         notification: {
@@ -618,16 +618,16 @@
                         createForm: {
                             title: 'label.action.destroy.instance',
                             desc: 'label.action.destroy.instance',
-			    isWarning: true,
+                isWarning: true,
                             preFilter: function(args) {
-                            	if (isAdmin() || isDomainAdmin()) {
-                            		args.$form.find('.form-item[rel=expunge]').css('display', 'inline-block');
-                            	} else {
-                            		args.$form.find('.form-item[rel=expunge]').hide();
-                            	}
+                                if (isAdmin() || isDomainAdmin()) {
+                                    args.$form.find('.form-item[rel=expunge]').css('display', 'inline-block');
+                                } else {
+                                    args.$form.find('.form-item[rel=expunge]').hide();
+                                }
                             },
                             fields: {
-                            	expunge: {
+                                expunge: {
                                     label: 'label.expunge',
                                     isBoolean: true,
                                     isChecked: false
@@ -640,14 +640,14 @@
                             }
                         },
                         action: function(args) {
-                        	var data = {
-                        		id: args.context.instances[0].id
-                        	};
-                        	if (args.data.expunge == 'on') {
-                        		$.extend(data, {
-                        			expunge: true
-                        		});
-                        	}
+                            var data = {
+                                id: args.context.instances[0].id
+                            };
+                            if (args.data.expunge == 'on') {
+                                $.extend(data, {
+                                    expunge: true
+                                });
+                            }
                             $.ajax({
                                 url: createURL('destroyVirtualMachine'),
                                 data: data,
@@ -657,10 +657,10 @@
                                         _custom: {
                                             jobId: jid,
                                             getUpdatedItem: function(json) {
-                                            	if ('virtualmachine' in json.queryasyncjobresultresponse.jobresult) //destroy without expunge
+                                                if ('virtualmachine' in json.queryasyncjobresultresponse.jobresult) //destroy without expunge
                                                     return json.queryasyncjobresultresponse.jobresult.virtualmachine;
-                                            	else //destroy with expunge
-                                            		return { 'toRemove': true };
+                                                else //destroy with expunge
+                                                    return { 'toRemove': true };
                                             },
                                             getActionFilter: function() {
                                                 return vmActionfilter;
@@ -753,10 +753,10 @@
                                 return 'label.reinstall.vm';
                             },
                             complete: function(args) {
-                            	if (args.password != null && args.password.length > 0)
+                                if (args.password != null && args.password.length > 0)
                                     return _l('label.password.reset.confirm') + args.password;
-                            	else
-                            		return null;
+                                else
+                                    return null;
                             }
                         },
 
@@ -766,8 +766,8 @@
                                 dataType: "json",
                                 async: true,
                                 success: function(json) {
-                                	var jid = json.restorevmresponse.jobid;
-                                	args.response.success({
+                                    var jid = json.restorevmresponse.jobid;
+                                    args.response.success({
                                         _custom: {
                                             jobId: jid,
                                             getUpdatedItem: function(json) {
@@ -955,17 +955,17 @@
 
                             //***** addResourceDetail *****
                             //XenServer only (starts here)
-			                if(args.$detailView.find('form').find('div .detail-group').find('.xenserverToolsVersion61plus').length > 0) {
-			                	$.ajax({
-			                		url: createURL('addResourceDetail'),
-			                		data: {
-			                			resourceType: 'uservm',
-			                			resourceId: args.context.instances[0].id,
-			                			'details[0].key': 'hypervisortoolsversion',
-			                			'details[0].value': (args.data.xenserverToolsVersion61plus == "on") ? 'xenserver61' : 'xenserver56'
-			                		},
-			                		success: function(json) {
-			                			 var jobId = json.addResourceDetailresponse.jobid;
+                            if(args.$detailView.find('form').find('div .detail-group').find('.xenserverToolsVersion61plus').length > 0) {
+                                $.ajax({
+                                    url: createURL('addResourceDetail'),
+                                    data: {
+                                        resourceType: 'uservm',
+                                        resourceId: args.context.instances[0].id,
+                                        'details[0].key': 'hypervisortoolsversion',
+                                        'details[0].value': (args.data.xenserverToolsVersion61plus == "on") ? 'xenserver61' : 'xenserver56'
+                                    },
+                                    success: function(json) {
+                                         var jobId = json.addResourceDetailresponse.jobid;
                                          var addResourceDetailIntervalID = setInterval(function() {
                                              $.ajax({
                                                  url: createURL("queryAsyncJobResult&jobid=" + jobId),
@@ -979,9 +979,9 @@
                                                          clearInterval(addResourceDetailIntervalID);
 
                                                          if (result.jobstatus == 1) {
-                                                        	 //do nothing
+                                                             //do nothing
                                                          } else if (result.jobstatus == 2) {
-                                                        	 cloudStack.dialog.notice({
+                                                             cloudStack.dialog.notice({
                                                                  message: _s(result.jobresult.errortext)
                                                              });
                                                          }
@@ -994,10 +994,10 @@
                                                  }
                                              });
                                          }, g_queryAsyncJobResultInterval);
-			                		}
-			                	});
-						    }
-					        //XenServer only (ends here)
+                                    }
+                                });
+                            }
+                            //XenServer only (ends here)
 
                         }
                     },
@@ -1015,9 +1015,9 @@
                                         $.ajax({
                                             url: createURL("listIsos"),
                                             data: {
-                                            	isofilter: 'featured',
-                                            	isReady: true,
-                                            	zoneid: args.context.instances[0].zoneid
+                                                isofilter: 'featured',
+                                                isReady: true,
+                                                zoneid: args.context.instances[0].zoneid
                                             },
                                             async: false,
                                             success: function(json) {
@@ -1034,9 +1034,9 @@
                                         $.ajax({
                                             url: createURL("listIsos"),
                                             data: {
-                                            	isofilter: 'community',
-                                            	isReady: true,
-                                            	zoneid: args.context.instances[0].zoneid
+                                                isofilter: 'community',
+                                                isReady: true,
+                                                zoneid: args.context.instances[0].zoneid
                                             },
                                             async: false,
                                             success: function(json) {
@@ -1055,9 +1055,9 @@
                                         $.ajax({
                                             url: createURL("listIsos"),
                                             data: {
-                                            	isofilter: 'selfexecutable',
-                                            	isReady: true,
-                                            	zoneid: args.context.instances[0].zoneid
+                                                isofilter: 'selfexecutable',
+                                                isReady: true,
+                                                zoneid: args.context.instances[0].zoneid
                                             },
                                             async: false,
                                             success: function(json) {
@@ -1234,17 +1234,17 @@
                                 osTypeId: {
                                     label: 'label.os.type',
                                     select: function(args) {
-                                    	if (ostypeObjs == undefined) {
-	                                        $.ajax({
-	                                            url: createURL("listOsTypes"),
-	                                            dataType: "json",
-	                                            async: false,
-	                                            success: function(json) {
-	                                            	ostypeObjs = json.listostypesresponse.ostype;
-	                                            }
-	                                        });
-                                    	}
-                                    	var items = [];
+                                        if (ostypeObjs == undefined) {
+                                            $.ajax({
+                                                url: createURL("listOsTypes"),
+                                                dataType: "json",
+                                                async: false,
+                                                success: function(json) {
+                                                    ostypeObjs = json.listostypesresponse.ostype;
+                                                }
+                                            });
+                                        }
+                                        var items = [];
                                         $(ostypeObjs).each(function() {
                                             items.push({
                                                 id: this.id,
@@ -1493,32 +1493,32 @@
                         createForm: {
                             title: 'label.change.service.offering',
                             desc: function(args) {
-                            	var description = '';
-                            	var vmObj = args.jsonObj;
-                            	if (vmObj.state == 'Running' && vmObj.hypervisor == 'VMware') {
-                            		description = 'message.read.admin.guide.scaling.up';
-                            	}
+                                var description = '';
+                                var vmObj = args.jsonObj;
+                                if (vmObj.state == 'Running' && vmObj.hypervisor == 'VMware') {
+                                    description = 'message.read.admin.guide.scaling.up';
+                                }
                                 return description;
                             },
                             fields: {
-                            	serviceofferingid: {
+                                serviceofferingid: {
                                     label: 'label.compute.offering',
                                     select: function(args) {
-                                    	var serviceofferingObjs;
+                                        var serviceofferingObjs;
                                         $.ajax({
                                             url: createURL("listServiceOfferings&VirtualMachineId=" + args.context.instances[0].id),
                                             dataType: "json",
                                             async: true,
                                             success: function(json) {
-                                            	serviceofferingObjs = json.listserviceofferingsresponse.serviceoffering;
+                                                serviceofferingObjs = json.listserviceofferingsresponse.serviceoffering;
                                                 var items = [];
                                                 if (serviceofferingObjs != null) {
-                                                	for (var i = 0; i < serviceofferingObjs.length; i++) {
-                                                		items.push({
+                                                    for (var i = 0; i < serviceofferingObjs.length; i++) {
+                                                        items.push({
                                                             id: serviceofferingObjs[i].id,
                                                             description: serviceofferingObjs[i].name
                                                         });
-                                                	}
+                                                    }
                                                 }
                                                 args.response.success({
                                                     data: items
@@ -1527,7 +1527,7 @@
                                         });
 
                                         args.$select.change(function(){
-                                        	var $form = $(this).closest('form');
+                                            var $form = $(this).closest('form');
 
                                             var serviceofferingid = $(this).val();
                                             if (serviceofferingid == null || serviceofferingid.length == 0)
@@ -1536,30 +1536,30 @@
                                             var items = [];
                                             var selectedServiceofferingObj;
                                             if (serviceofferingObjs != null) {
-                                            	for (var i = 0; i < serviceofferingObjs.length; i++) {
-                                            		if (serviceofferingObjs[i].id == serviceofferingid) {
-                                            			selectedServiceofferingObj = serviceofferingObjs[i];
-                                            			break;
-                                            		}
-                                            	}
+                                                for (var i = 0; i < serviceofferingObjs.length; i++) {
+                                                    if (serviceofferingObjs[i].id == serviceofferingid) {
+                                                        selectedServiceofferingObj = serviceofferingObjs[i];
+                                                        break;
+                                                    }
+                                                }
                                             }
                                             if (selectedServiceofferingObj == undefined)
-                                            	return;
+                                                return;
 
                                             if (selectedServiceofferingObj.iscustomized == true) {
-                                            	$form.find('.form-item[rel=cpuSpeed]').css('display', 'inline-block');
-                                            	$form.find('.form-item[rel=cpuNumber]').css('display', 'inline-block');
-                                            	$form.find('.form-item[rel=memory]').css('display', 'inline-block');
+                                                $form.find('.form-item[rel=cpuSpeed]').css('display', 'inline-block');
+                                                $form.find('.form-item[rel=cpuNumber]').css('display', 'inline-block');
+                                                $form.find('.form-item[rel=memory]').css('display', 'inline-block');
                                             } else {
-                                            	$form.find('.form-item[rel=cpuSpeed]').hide();
-                                            	$form.find('.form-item[rel=cpuNumber]').hide();
-                                            	$form.find('.form-item[rel=memory]').hide();
+                                                $form.find('.form-item[rel=cpuSpeed]').hide();
+                                                $form.find('.form-item[rel=cpuNumber]').hide();
+                                                $form.find('.form-item[rel=memory]').hide();
                                             }
                                         });
                                     }
                                 },
                                 cpuSpeed: {
-                                	label: 'label.cpu.mhz',
+                                    label: 'label.cpu.mhz',
                                     validation: {
                                         required: true,
                                         number: true
@@ -1567,7 +1567,7 @@
                                     isHidden: true
                                 },
                                 cpuNumber: {
-                                	label: 'label.num.cpu.cores',
+                                    label: 'label.num.cpu.cores',
                                     validation: {
                                         required: true,
                                         number: true
@@ -1575,7 +1575,7 @@
                                     isHidden: true
                                 },
                                 memory: {
-                                	label: 'label.memory.mb',
+                                    label: 'label.memory.mb',
                                     validation: {
                                         required: true,
                                         number: true
@@ -1586,24 +1586,24 @@
                         },
 
                         action: function(args) {
-                        	var data = {
-                        		id: args.context.instances[0].id,
-                        		serviceofferingid: args.data.serviceofferingid
-                        	};
+                            var data = {
+                                id: args.context.instances[0].id,
+                                serviceofferingid: args.data.serviceofferingid
+                            };
 
-                        	if (args.$form.find('.form-item[rel=cpuSpeed]').is(':visible')) {
+                            if (args.$form.find('.form-item[rel=cpuSpeed]').is(':visible')) {
                                 $.extend(data, {
-                                	'details[0].cpuSpeed': args.data.cpuSpeed
+                                    'details[0].cpuSpeed': args.data.cpuSpeed
                                 });
                             }
-                        	if (args.$form.find('.form-item[rel=cpuNumber]').is(':visible')) {
+                            if (args.$form.find('.form-item[rel=cpuNumber]').is(':visible')) {
                                 $.extend(data, {
-                                	'details[0].cpuNumber': args.data.cpuNumber
+                                    'details[0].cpuNumber': args.data.cpuNumber
                                 });
                             }
-                        	if (args.$form.find('.form-item[rel=memory]').is(':visible')) {
+                            if (args.$form.find('.form-item[rel=memory]').is(':visible')) {
                                 $.extend(data, {
-                                	'details[0].memory': args.data.memory
+                                    'details[0].memory': args.data.memory
                                 });
                             }
 
@@ -1738,45 +1738,45 @@
                         createForm: {
                             title: 'label.assign.instance.another',
                             fields: {
-                            	domainid: {
-                				    label: 'label.domain',
-                				    validation: {
+                                domainid: {
+                                    label: 'label.domain',
+                                    validation: {
                                         required: true
                                     },
-                				    select: function(args) {
-                				    	$.ajax({
-            				                url: createURL('listDomains'),
-            				                data: {
-            				                    listAll: true,
-            				                    details: 'min'
-            				                },
-            				                success: function(json) {
-            				                    var array1 = [];
-            				                    var domains = json.listdomainsresponse.domain;
-            				                    if (domains != null && domains.length > 0) {
-            				                        for (var i = 0; i < domains.length; i++) {
-            				                            array1.push({
-            				                                id: domains[i].id,
-            				                                description: domains[i].path
-            				                            });
-            				                        }
-            				                    }
+                                    select: function(args) {
+                                        $.ajax({
+                                            url: createURL('listDomains'),
+                                            data: {
+                                                listAll: true,
+                                                details: 'min'
+                                            },
+                                            success: function(json) {
+                                                var array1 = [];
+                                                var domains = json.listdomainsresponse.domain;
+                                                if (domains != null && domains.length > 0) {
+                                                    for (var i = 0; i < domains.length; i++) {
+                                                        array1.push({
+                                                            id: domains[i].id,
+                                                            description: domains[i].path
+                                                        });
+                                                    }
+                                                }
                                                             array1.sort(function(a, b) {
                                                                 return a.description.localeCompare(b.description);
                                                             });
-            				                    args.response.success({
-            				                        data: array1
-            				                    });
-            				                }
-            				            });
-                				    }
-                				},
-                				account: {
-                				    label: 'label.account',
-                				    validation: {
+                                                args.response.success({
+                                                    data: array1
+                                                });
+                                            }
+                                        });
+                                    }
+                                },
+                                account: {
+                                    label: 'label.account',
+                                    validation: {
                                         required: true
                                     }
-                				}
+                                }
                             }
                         },
                         action: function(args) {
@@ -1837,32 +1837,32 @@
                             }
 
                             if ('instances' in args.context && args.context.instances[0].hypervisor != 'XenServer') {
-                          	    hiddenFields.push('xenserverToolsVersion61plus');
+                                  hiddenFields.push('xenserverToolsVersion61plus');
                             }
 
                             if ('instances' in args.context && args.context.instances[0].guestosid != undefined) {
-                            	if (ostypeObjs == undefined) {
-	                            	$.ajax({
-	                                    url: createURL("listOsTypes"),
-	                                    dataType: "json",
-	                                    async: false,
-	                                    success: function(json) {
-	                                    	ostypeObjs = json.listostypesresponse.ostype;
-	                                    }
-	                                });
-                            	}
-                            	if (ostypeObjs != undefined) {
-                            		var ostypeName;
-                            		for (var i = 0; i < ostypeObjs.length; i++) {
-                            			if (ostypeObjs[i].id == args.context.instances[0].guestosid) {
-                            				ostypeName = ostypeObjs[i].description;
-                            				break;
-                            			}
-                            		}
-                            		if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) {
-                            			hiddenFields.push('xenserverToolsVersion61plus');
-                            		}
-                            	}
+                                if (ostypeObjs == undefined) {
+                                    $.ajax({
+                                        url: createURL("listOsTypes"),
+                                        dataType: "json",
+                                        async: false,
+                                        success: function(json) {
+                                            ostypeObjs = json.listostypesresponse.ostype;
+                                        }
+                                    });
+                                }
+                                if (ostypeObjs != undefined) {
+                                    var ostypeName;
+                                    for (var i = 0; i < ostypeObjs.length; i++) {
+                                        if (ostypeObjs[i].id == args.context.instances[0].guestosid) {
+                                            ostypeName = ostypeObjs[i].description;
+                                            break;
+                                        }
+                                    }
+                                    if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) {
+                                        hiddenFields.push('xenserverToolsVersion61plus');
+                                    }
+                                }
                             }
 
                             if (!args.context.instances[0].publicip) {
@@ -1922,14 +1922,14 @@
                                 isEditable: true,
                                 select: function(args) {
                                     if (ostypeObjs == undefined) {
-	                                	$.ajax({
-	                                        url: createURL("listOsTypes"),
-	                                        dataType: "json",
-	                                        async: false,
-	                                        success: function(json) {
-	                                        	ostypeObjs = json.listostypesresponse.ostype;
-	                                        }
-	                                    });
+                                        $.ajax({
+                                            url: createURL("listOsTypes"),
+                                            dataType: "json",
+                                            async: false,
+                                            success: function(json) {
+                                                ostypeObjs = json.listostypesresponse.ostype;
+                                            }
+                                        });
                                     }
                                     var items = [];
                                     $(ostypeObjs).each(function() {
@@ -1961,14 +1961,14 @@
                             },
 
                             /*
-								isoid: {
+                                isoid: {
                   label: 'label.attached.iso',
                   isEditable: false,
                   converter: function(isoid) {
                     return cloudStack.converters.toBooleanText(isoid != null);
                   }
                 },
-								*/
+                                */
                             isoname: {
                                 label: 'label.attached.iso'
                             },
@@ -1977,13 +1977,13 @@
                                 label: 'label.compute.offering'
                             },
                             cpunumber: {
-                            	label: 'label.num.cpu.cores'
+                                label: 'label.num.cpu.cores'
                             },
                             cpuspeed: {
-                            	label: 'label.cpu.mhz'
+                                label: 'label.cpu.mhz'
                             },
                             memory: {
-                            	label: 'label.memory.mb'
+                                label: 'label.memory.mb'
                             },
                             vgpu: {
                                 label: 'label.vgpu'
@@ -2062,8 +2062,8 @@
                                     }
 
                                     $(window).trigger('cloudStack.module.sharedFunctions.addExtraProperties', {
-                                    	obj: jsonObj,
-                                    	objType: "UserVM"
+                                        obj: jsonObj,
+                                        objType: "UserVM"
                                     });
 
                                     args.response.success({
@@ -2099,19 +2099,19 @@
                                         networkid: {
                                             label: 'label.network',
                                             select: function(args) {
-                                            	var data1 = {
-                                            		zoneid: args.context.instances[0].zoneid
-                                            	};
-                                            	if (isAdmin()) {
-                                            		$.extend(data1, {
-                                            			listAll: true
-                                            		});
-                                            	} else {
-                                            		$.extend(data1, {
-                                            			account: args.context.instances[0].account,
+                                                var data1 = {
+                                                    zoneid: args.context.instances[0].zoneid
+                                                };
+                                                if (isAdmin()) {
+                                                    $.extend(data1, {
+                                                        listAll: true
+                                                    });
+                                                } else {
+                                                    $.extend(data1, {
+                                                        account: args.context.instances[0].account,
                                                         domainid: args.context.instances[0].domainid
-                                            		});
-                                            	}
+                                                    });
+                                                }
                                                 $.ajax({
                                                     url: createURL('listNetworks'),
                                                     data: data1,
@@ -2444,7 +2444,7 @@
             allowedActions.push("restart");
 
             if ((jsonObj.hypervisor != 'KVM' || g_kvmsnapshotenabled == true)
-            		&& (jsonObj.hypervisor != 'LXC')) {
+                    && (jsonObj.hypervisor != 'LXC')) {
                 allowedActions.push("snapshot");
             }
 
@@ -2453,7 +2453,7 @@
 
             //when userVm is running, scaleUp is not supported for KVM, LXC
             if (jsonObj.hypervisor != 'KVM' && jsonObj.hypervisor != 'LXC') {
-            	allowedActions.push("scaleUp");
+                allowedActions.push("scaleUp");
             }
 
             if (isAdmin())
@@ -2478,7 +2478,7 @@
             allowedActions.push("reinstall");
 
             if ((jsonObj.hypervisor != 'KVM' || g_kvmsnapshotenabled == true)
-            		&& (jsonObj.hypervisor != 'LXC')) {
+                    && (jsonObj.hypervisor != 'LXC')) {
                 allowedActions.push("snapshot");
             }
 


Mime
View raw message