You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2013/11/08 23:37:43 UTC

git commit: updated refs/heads/master to 7d2961a

Updated Branches:
  refs/heads/master f3d76dfa9 -> 7d2961a0f


CLOUDSTACK-999: hyper-V: UI > Infrastructure > Secondary Storages > listView, detailView > remove password from URL property.


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

Branch: refs/heads/master
Commit: 7d2961a0f3986270dfadf1774162c1bc7d625218
Parents: f3d76df
Author: Jessica Wang <je...@apache.org>
Authored: Fri Nov 8 14:37:22 2013 -0800
Committer: Jessica Wang <je...@apache.org>
Committed: Fri Nov 8 14:37:22 2013 -0800

----------------------------------------------------------------------
 ui/scripts/sharedFunctions.js |  9 +++++++++
 ui/scripts/system.js          | 26 ++++++++++----------------
 2 files changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7d2961a0/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index 66a7e3a..a4e4861 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -1190,6 +1190,15 @@ var addExtraPropertiesToUcsBladeObject = function(jsonObj) {
 	jsonObj.bladeid = array1[2];
 }
 
+var processPropertiesInImagestoreObject = function(jsonObj) {	
+	if (jsonObj.url != undefined) {
+		var url = jsonObj.url; //e.g. 'cifs://10.1.1.1/aaa/aaa2/aaa3?user=bbb&password=ccc&domain=ddd'
+		var passwordIndex = url.indexOf('&password='); //38
+		var domainIndex = url.indexOf('&domain=');    //51
+		jsonObj.url = url.substring(0, passwordIndex) + url.substring(domainIndex); //remove '&password=ccc' from jsonObj.url
+	}	
+}
+
 //find service object in network object
 
     function ipFindNetworkServiceByName(pName, networkObj) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7d2961a0/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 4df8718..664c8bc 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7254,8 +7254,14 @@
                                                         url: createURL('listImageStores' + searchByArgs),
                                                         data: data,
                                                         success: function(json) {
-                                                            args.response.success({
-                                                                data: json.listimagestoresresponse.imagestore
+                                                            var items = json.listimagestoresresponse.imagestore;                                                        	
+                                                            if (items != undefined) {
+                                                            	for (var i = 0; i < items.length; i++) {
+                                                            		processPropertiesInImagestoreObject(items[i]);
+                                                            	}
+                                                            }                                                            
+                                                        	args.response.success({
+                                                                data: items
                                                             });
                                                         },
                                                         error: function(json) {
@@ -7263,19 +7269,6 @@
                                                         }
                                                     });
                                                 }
-
-                                                /*
-                        ,
-                        detailView: {
-                          updateContext: function (args) {
-                            return {
-                              zones: [{}]
-                            };
-
-                          }
-                        }
-                        */
-
                                             }
                                         },
                                         cacheStorage: {
@@ -15678,7 +15671,8 @@
                                                 dataType: "json",
                                                 async: true,
                                                 success: function(json) {
-                                                    var item = json.listimagestoresresponse.imagestore[0];
+                                                    var item = json.listimagestoresresponse.imagestore[0];                                                    
+                                                    processPropertiesInImagestoreObject(item);                                                    
                                                     args.response.success({
                                                         actionFilter: secondarystorageActionfilter,
                                                         data: item