{"action":"created","comment":{"url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/comments/54733626","id":54733626,"diff_hunk":"@@ -297,31 +297,42 @@ define([\n             }\n         };\n         self.link = function() {\n-            var diskNames = [];\n+            var diskNames = [], nodeDisks = {};\n+            $.each(self.registeredNodes(), function(index, node) {\n+                nodeDisks[node.nodeID()] = {\n+                    node: node,\n+                    disks: node.disks(),\n+                    names: node.diskNames(),\n+                    changed: false\n+                };\n+            });\n             $.each(self.disks(), function (index, disk) {\n                 diskNames.push(disk.name());\n                 if (disk.node === undefined) {\n-                    $.each(self.registeredNodes(), function(jndex, node) {\n-                        if (disk.nodeID() === node.nodeID()) {\n-                            disk.node = node;\n-                            node.disks.push(disk);\n-                            node.disks.sort(function (a, b) {\n-                                return a.name() < b.name() ? -1 : 1;\n-                            });\n+                    $.each(nodeDisks, function(nodeID, nodeInfo) {\n+                        if (disk.nodeID() === nodeID && !nodeInfo.names.contains(disk.name())) {\n+                            disk.node = nodeInfo.node;\n+                            nodeInfo.disks.push(disk);","path":"webapps/frontend/app/viewmodels/site/backend-alba-detail.js","position":27,"original_position":27,"commit_id":"c42db9251912b61468f90abaf9c651aeabb5e7dd","original_commit_id":"c42db9251912b61468f90abaf9c651aeabb5e7dd","user":{"login":"khenderick","id":1453214,"avatar_url":"https://avatars.githubusercontent.com/u/1453214?v=3","gravatar_id":"","url":"https://api.github.com/users/khenderick","html_url":"https://github.com/khenderick","followers_url":"https://api.github.com/users/khenderick/followers","following_url":"https://api.github.com/users/khenderick/following{/other_user}","gists_url":"https://api.github.com/users/khenderick/gists{/gist_id}","starred_url":"https://api.github.com/users/khenderick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khenderick/subscriptions","organizations_url":"https://api.github.com/users/khenderick/orgs","repos_url":"https://api.github.com/users/khenderick/repos","events_url":"https://api.github.com/users/khenderick/events{/privacy}","received_events_url":"https://api.github.com/users/khenderick/received_events","type":"User","site_admin":false},"body":"It shouldn't be a problem if there are no duplicate disks (which won't be the case since their name is primary key, and they are loaded at line 301), but it's nicer anyway.","created_at":"2016-03-02T14:58:48Z","updated_at":"2016-03-02T14:58:48Z","html_url":"https://github.com/openvstorage/framework-alba-plugin/pull/111#discussion_r54733626","pull_request_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/comments/54733626"},"html":{"href":"https://github.com/openvstorage/framework-alba-plugin/pull/111#discussion_r54733626"},"pull_request":{"href":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/111","id":61407039,"html_url":"https://github.com/openvstorage/framework-alba-plugin/pull/111","diff_url":"https://github.com/openvstorage/framework-alba-plugin/pull/111.diff","patch_url":"https://github.com/openvstorage/framework-alba-plugin/pull/111.patch","issue_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/issues/111","number":111,"state":"open","locked":false,"title":"OVS-4309 - Reworked client side code to be less cpu/memory intensive","user":{"login":"khenderick","id":1453214,"avatar_url":"https://avatars.githubusercontent.com/u/1453214?v=3","gravatar_id":"","url":"https://api.github.com/users/khenderick","html_url":"https://github.com/khenderick","followers_url":"https://api.github.com/users/khenderick/followers","following_url":"https://api.github.com/users/khenderick/following{/other_user}","gists_url":"https://api.github.com/users/khenderick/gists{/gist_id}","starred_url":"https://api.github.com/users/khenderick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khenderick/subscriptions","organizations_url":"https://api.github.com/users/khenderick/orgs","repos_url":"https://api.github.com/users/khenderick/repos","events_url":"https://api.github.com/users/khenderick/events{/privacy}","received_events_url":"https://api.github.com/users/khenderick/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-02T14:24:41Z","updated_at":"2016-03-02T14:58:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8985f11efd497bef1fe06d015d1fb8f67e33b9e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/111/commits","review_comments_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/111/comments","review_comment_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/issues/111/comments","statuses_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/statuses/c42db9251912b61468f90abaf9c651aeabb5e7dd","head":{"label":"openvstorage:ovs-4309-render-optimizations","ref":"ovs-4309-render-optimizations","sha":"c42db9251912b61468f90abaf9c651aeabb5e7dd","user":{"login":"openvstorage","id":12763393,"avatar_url":"https://avatars.githubusercontent.com/u/12763393?v=3","gravatar_id":"","url":"https://api.github.com/users/openvstorage","html_url":"https://github.com/openvstorage","followers_url":"https://api.github.com/users/openvstorage/followers","following_url":"https://api.github.com/users/openvstorage/following{/other_user}","gists_url":"https://api.github.com/users/openvstorage/gists{/gist_id}","starred_url":"https://api.github.com/users/openvstorage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openvstorage/subscriptions","organizations_url":"https://api.github.com/users/openvstorage/orgs","repos_url":"https://api.github.com/users/openvstorage/repos","events_url":"https://api.github.com/users/openvstorage/events{/privacy}","received_events_url":"https://api.github.com/users/openvstorage/received_events","type":"Organization","site_admin":false},"repo":{"id":39820044,"name":"framework-alba-plugin","full_name":"openvstorage/framework-alba-plugin","owner":{"login":"openvstorage","id":12763393,"avatar_url":"https://avatars.githubusercontent.com/u/12763393?v=3","gravatar_id":"","url":"https://api.github.com/users/openvstorage","html_url":"https://github.com/openvstorage","followers_url":"https://api.github.com/users/openvstorage/followers","following_url":"https://api.github.com/users/openvstorage/following{/other_user}","gists_url":"https://api.github.com/users/openvstorage/gists{/gist_id}","starred_url":"https://api.github.com/users/openvstorage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openvstorage/subscriptions","organizations_url":"https://api.github.com/users/openvstorage/orgs","repos_url":"https://api.github.com/users/openvstorage/repos","events_url":"https://api.github.com/users/openvstorage/events{/privacy}","received_events_url":"https://api.github.com/users/openvstorage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openvstorage/framework-alba-plugin","description":null,"fork":false,"url":"https://api.github.com/repos/openvstorage/framework-alba-plugin","forks_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/forks","keys_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/teams","hooks_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/hooks","issue_events_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/events","assignees_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/tags","blobs_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/languages","stargazers_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/stargazers","contributors_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/contributors","subscribers_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/subscribers","subscription_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/subscription","commits_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/merges","archive_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/downloads","issues_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/labels{/name}","releases_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/deployments","created_at":"2015-07-28T07:40:52Z","updated_at":"2016-01-11T14:14:00Z","pushed_at":"2016-03-02T14:27:40Z","git_url":"git://github.com/openvstorage/framework-alba-plugin.git","ssh_url":"git@github.com:openvstorage/framework-alba-plugin.git","clone_url":"https://github.com/openvstorage/framework-alba-plugin.git","svn_url":"https://github.com/openvstorage/framework-alba-plugin","homepage":null,"size":653,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"openvstorage:master","ref":"master","sha":"0077590ab6909c0dd698c86632bc02d8f3979949","user":{"login":"openvstorage","id":12763393,"avatar_url":"https://avatars.githubusercontent.com/u/12763393?v=3","gravatar_id":"","url":"https://api.github.com/users/openvstorage","html_url":"https://github.com/openvstorage","followers_url":"https://api.github.com/users/openvstorage/followers","following_url":"https://api.github.com/users/openvstorage/following{/other_user}","gists_url":"https://api.github.com/users/openvstorage/gists{/gist_id}","starred_url":"https://api.github.com/users/openvstorage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openvstorage/subscriptions","organizations_url":"https://api.github.com/users/openvstorage/orgs","repos_url":"https://api.github.com/users/openvstorage/repos","events_url":"https://api.github.com/users/openvstorage/events{/privacy}","received_events_url":"https://api.github.com/users/openvstorage/received_events","type":"Organization","site_admin":false},"repo":{"id":39820044,"name":"framework-alba-plugin","full_name":"openvstorage/framework-alba-plugin","owner":{"login":"openvstorage","id":12763393,"avatar_url":"https://avatars.githubusercontent.com/u/12763393?v=3","gravatar_id":"","url":"https://api.github.com/users/openvstorage","html_url":"https://github.com/openvstorage","followers_url":"https://api.github.com/users/openvstorage/followers","following_url":"https://api.github.com/users/openvstorage/following{/other_user}","gists_url":"https://api.github.com/users/openvstorage/gists{/gist_id}","starred_url":"https://api.github.com/users/openvstorage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openvstorage/subscriptions","organizations_url":"https://api.github.com/users/openvstorage/orgs","repos_url":"https://api.github.com/users/openvstorage/repos","events_url":"https://api.github.com/users/openvstorage/events{/privacy}","received_events_url":"https://api.github.com/users/openvstorage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openvstorage/framework-alba-plugin","description":null,"fork":false,"url":"https://api.github.com/repos/openvstorage/framework-alba-plugin","forks_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/forks","keys_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/teams","hooks_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/hooks","issue_events_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/events","assignees_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/tags","blobs_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/languages","stargazers_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/stargazers","contributors_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/contributors","subscribers_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/subscribers","subscription_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/subscription","commits_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/merges","archive_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/downloads","issues_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/labels{/name}","releases_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/openvstorage/framework-alba-plugin/deployments","created_at":"2015-07-28T07:40:52Z","updated_at":"2016-01-11T14:14:00Z","pushed_at":"2016-03-02T14:27:40Z","git_url":"git://github.com/openvstorage/framework-alba-plugin.git","ssh_url":"git@github.com:openvstorage/framework-alba-plugin.git","clone_url":"https://github.com/openvstorage/framework-alba-plugin.git","svn_url":"https://github.com/openvstorage/framework-alba-plugin","homepage":null,"size":653,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/111"},"html":{"href":"https://github.com/openvstorage/framework-alba-plugin/pull/111"},"issue":{"href":"https://api.github.com/repos/openvstorage/framework-alba-plugin/issues/111"},"comments":{"href":"https://api.github.com/repos/openvstorage/framework-alba-plugin/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openvstorage/framework-alba-plugin/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/openvstorage/framework-alba-plugin/statuses/c42db9251912b61468f90abaf9c651aeabb5e7dd"}}}}