{"action":"created","comment":{"url":"https://api.github.com/repos/mytardis/mytardis/pulls/comments/44246961","id":44246961,"diff_hunk":"@@ -1,265 +1,313 @@\n-  // Capitalises the first letter (adapted from http://codepen.io/WinterJoey/pen/sfFaK)\n-  app.filter('capitalise', function() {\n-      return function(input, all) {\n-        return (!!input) ? input.replace(/([^\\W_]+[^\\s-]*) */g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}) : '';\n-      }\n-  });\n+// Capitalises the first letter (adapted from http://codepen.io/WinterJoey/pen/sfFaK)\n+app.filter('capitalise', function () {\n+    return function (input, all) {\n+        return (!!input) ? input.replace(/([^\\W_]+[^\\s-]*) */g, function (txt) {\n+            return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();\n+        }) : '';\n+    }\n+});\n \n-  // Filter to produce nice file size formatting (adapted from https://gist.github.com/yrezgui/5653591)\n-  app.filter('filesize', function () {\n+// Filter to produce nice file size formatting (adapted from https://gist.github.com/yrezgui/5653591)\n+app.filter('filesize', function () {\n     var units = [\n-      'bytes',\n-      'KB',\n-      'MB',\n-      'GB',\n-      'TB',\n-      'PB'\n+        'bytes',\n+        'KB',\n+        'MB',\n+        'GB',\n+        'TB',\n+        'PB'\n     ];\n \n-    return function( bytes, precision ) {\n-      if ( isNaN( parseFloat( bytes )) || ! isFinite( bytes ) ) {\n-        return '?';\n-      }\n+    return function (bytes, precision) {\n+        if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) {\n+            return '?';\n+        }\n \n-      var unit = 0;\n+        var unit = 0;\n \n-      while ( bytes >= 1024 ) {\n-        bytes /= 1024;\n-        unit ++;\n-      }\n+        while (bytes >= 1024) {\n+            bytes /= 1024;\n+            unit++;\n+        }\n \n-      return bytes.toFixed( + precision ) + ' ' + units[ unit ];\n+        return bytes.toFixed(+precision) + ' ' + units[unit];\n     };\n-  });\n+});\n+\n \n+app.controller('FacilityCtrl', function ($scope, $resource, $interval, $log) {\n \n-  app.controller('FacilityCtrl', function($scope, $http, $interval, $log, $filter) {\n+    var countRes = $resource('/facility/fetch_data/:facility_id/count/');\n+    var datasetDetailRes = $resource('/facility/fetch_datafiles/:dataset_id/',\n+        {}, {\n+            'get': {method: 'GET', isArray: true}\n+        });\n+    var facilityListRes = $resource('/facility/fetch_facilities_list/', {}, {\n+        'get': {method: 'GET', isArray: true}\n+    });\n+    var facilityDataRes = $resource('/facility/fetch_data/:facility_id/:start_index/:end_index/', {\n+        start_index: 0,","path":"tardis/tardis_portal/static/js/facility_view.js","position":75,"original_position":75,"commit_id":"b90b5408610c5e2519f93ddc6562c675ebcd48f5","original_commit_id":"b90b5408610c5e2519f93ddc6562c675ebcd48f5","user":{"login":"grischa","id":468227,"avatar_url":"https://avatars.githubusercontent.com/u/468227?v=3","gravatar_id":"","url":"https://api.github.com/users/grischa","html_url":"https://github.com/grischa","followers_url":"https://api.github.com/users/grischa/followers","following_url":"https://api.github.com/users/grischa/following{/other_user}","gists_url":"https://api.github.com/users/grischa/gists{/gist_id}","starred_url":"https://api.github.com/users/grischa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grischa/subscriptions","organizations_url":"https://api.github.com/users/grischa/orgs","repos_url":"https://api.github.com/users/grischa/repos","events_url":"https://api.github.com/users/grischa/events{/privacy}","received_events_url":"https://api.github.com/users/grischa/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/versioned/images/favicon.png) Issue found: [Identifier 'start_index' is not in camel case.](https://www.codacy.com/app/mytardis/mytardis/file/1288071727/issues/source?bid=2125231&fileBranchId=2946418#l49)","created_at":"2015-11-09T07:31:42Z","updated_at":"2015-11-09T07:31:42Z","html_url":"https://github.com/mytardis/mytardis/pull/554#discussion_r44246961","pull_request_url":"https://api.github.com/repos/mytardis/mytardis/pulls/554","_links":{"self":{"href":"https://api.github.com/repos/mytardis/mytardis/pulls/comments/44246961"},"html":{"href":"https://github.com/mytardis/mytardis/pull/554#discussion_r44246961"},"pull_request":{"href":"https://api.github.com/repos/mytardis/mytardis/pulls/554"}}},"pull_request":{"url":"https://api.github.com/repos/mytardis/mytardis/pulls/554","id":50088988,"html_url":"https://github.com/mytardis/mytardis/pull/554","diff_url":"https://github.com/mytardis/mytardis/pull/554.diff","patch_url":"https://github.com/mytardis/mytardis/pull/554.patch","issue_url":"https://api.github.com/repos/mytardis/mytardis/issues/554","number":554,"state":"open","locked":false,"title":"Facility view revamp","user":{"login":"jasonrig","id":6635497,"avatar_url":"https://avatars.githubusercontent.com/u/6635497?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonrig","html_url":"https://github.com/jasonrig","followers_url":"https://api.github.com/users/jasonrig/followers","following_url":"https://api.github.com/users/jasonrig/following{/other_user}","gists_url":"https://api.github.com/users/jasonrig/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonrig/subscriptions","organizations_url":"https://api.github.com/users/jasonrig/orgs","repos_url":"https://api.github.com/users/jasonrig/repos","events_url":"https://api.github.com/users/jasonrig/events{/privacy}","received_events_url":"https://api.github.com/users/jasonrig/received_events","type":"User","site_admin":false},"body":"Improved load speed with only experiment/dataset listings loaded initially and datafile listings loaded on-demand.\r\n\"Load more\" button only loads the next set of datasets, rather than reloading the whole list.\r\n\r\n(pycharm made a lot of html/js formatting adjustments)","created_at":"2015-11-09T06:30:21Z","updated_at":"2015-11-09T07:31:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3fd38ecd173f5e1bd4e99db012eceaf7e6ab48e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mytardis/mytardis/pulls/554/commits","review_comments_url":"https://api.github.com/repos/mytardis/mytardis/pulls/554/comments","review_comment_url":"https://api.github.com/repos/mytardis/mytardis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mytardis/mytardis/issues/554/comments","statuses_url":"https://api.github.com/repos/mytardis/mytardis/statuses/b90b5408610c5e2519f93ddc6562c675ebcd48f5","head":{"label":"jasonrig:facility-view-revamp","ref":"facility-view-revamp","sha":"b90b5408610c5e2519f93ddc6562c675ebcd48f5","user":{"login":"jasonrig","id":6635497,"avatar_url":"https://avatars.githubusercontent.com/u/6635497?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonrig","html_url":"https://github.com/jasonrig","followers_url":"https://api.github.com/users/jasonrig/followers","following_url":"https://api.github.com/users/jasonrig/following{/other_user}","gists_url":"https://api.github.com/users/jasonrig/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonrig/subscriptions","organizations_url":"https://api.github.com/users/jasonrig/orgs","repos_url":"https://api.github.com/users/jasonrig/repos","events_url":"https://api.github.com/users/jasonrig/events{/privacy}","received_events_url":"https://api.github.com/users/jasonrig/received_events","type":"User","site_admin":false},"repo":{"id":23612634,"name":"mytardis","full_name":"jasonrig/mytardis","owner":{"login":"jasonrig","id":6635497,"avatar_url":"https://avatars.githubusercontent.com/u/6635497?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonrig","html_url":"https://github.com/jasonrig","followers_url":"https://api.github.com/users/jasonrig/followers","following_url":"https://api.github.com/users/jasonrig/following{/other_user}","gists_url":"https://api.github.com/users/jasonrig/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonrig/subscriptions","organizations_url":"https://api.github.com/users/jasonrig/orgs","repos_url":"https://api.github.com/users/jasonrig/repos","events_url":"https://api.github.com/users/jasonrig/events{/privacy}","received_events_url":"https://api.github.com/users/jasonrig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasonrig/mytardis","description":"MyTardis - a data management system for private lab/facility data","fork":true,"url":"https://api.github.com/repos/jasonrig/mytardis","forks_url":"https://api.github.com/repos/jasonrig/mytardis/forks","keys_url":"https://api.github.com/repos/jasonrig/mytardis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasonrig/mytardis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasonrig/mytardis/teams","hooks_url":"https://api.github.com/repos/jasonrig/mytardis/hooks","issue_events_url":"https://api.github.com/repos/jasonrig/mytardis/issues/events{/number}","events_url":"https://api.github.com/repos/jasonrig/mytardis/events","assignees_url":"https://api.github.com/repos/jasonrig/mytardis/assignees{/user}","branches_url":"https://api.github.com/repos/jasonrig/mytardis/branches{/branch}","tags_url":"https://api.github.com/repos/jasonrig/mytardis/tags","blobs_url":"https://api.github.com/repos/jasonrig/mytardis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasonrig/mytardis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasonrig/mytardis/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasonrig/mytardis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasonrig/mytardis/statuses/{sha}","languages_url":"https://api.github.com/repos/jasonrig/mytardis/languages","stargazers_url":"https://api.github.com/repos/jasonrig/mytardis/stargazers","contributors_url":"https://api.github.com/repos/jasonrig/mytardis/contributors","subscribers_url":"https://api.github.com/repos/jasonrig/mytardis/subscribers","subscription_url":"https://api.github.com/repos/jasonrig/mytardis/subscription","commits_url":"https://api.github.com/repos/jasonrig/mytardis/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasonrig/mytardis/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasonrig/mytardis/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasonrig/mytardis/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasonrig/mytardis/contents/{+path}","compare_url":"https://api.github.com/repos/jasonrig/mytardis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasonrig/mytardis/merges","archive_url":"https://api.github.com/repos/jasonrig/mytardis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasonrig/mytardis/downloads","issues_url":"https://api.github.com/repos/jasonrig/mytardis/issues{/number}","pulls_url":"https://api.github.com/repos/jasonrig/mytardis/pulls{/number}","milestones_url":"https://api.github.com/repos/jasonrig/mytardis/milestones{/number}","notifications_url":"https://api.github.com/repos/jasonrig/mytardis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasonrig/mytardis/labels{/name}","releases_url":"https://api.github.com/repos/jasonrig/mytardis/releases{/id}","created_at":"2014-09-03T08:32:24Z","updated_at":"2015-04-20T02:49:41Z","pushed_at":"2015-11-09T06:30:09Z","git_url":"git://github.com/jasonrig/mytardis.git","ssh_url":"git@github.com:jasonrig/mytardis.git","clone_url":"https://github.com/jasonrig/mytardis.git","svn_url":"https://github.com/jasonrig/mytardis","homepage":"http://mytardis.github.com","size":25619,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"mytardis:develop","ref":"develop","sha":"68236e3d25c89c5970bb55d0148a06d08a652dc9","user":{"login":"mytardis","id":1234844,"avatar_url":"https://avatars.githubusercontent.com/u/1234844?v=3","gravatar_id":"","url":"https://api.github.com/users/mytardis","html_url":"https://github.com/mytardis","followers_url":"https://api.github.com/users/mytardis/followers","following_url":"https://api.github.com/users/mytardis/following{/other_user}","gists_url":"https://api.github.com/users/mytardis/gists{/gist_id}","starred_url":"https://api.github.com/users/mytardis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mytardis/subscriptions","organizations_url":"https://api.github.com/users/mytardis/orgs","repos_url":"https://api.github.com/users/mytardis/repos","events_url":"https://api.github.com/users/mytardis/events{/privacy}","received_events_url":"https://api.github.com/users/mytardis/received_events","type":"Organization","site_admin":false},"repo":{"id":2824643,"name":"mytardis","full_name":"mytardis/mytardis","owner":{"login":"mytardis","id":1234844,"avatar_url":"https://avatars.githubusercontent.com/u/1234844?v=3","gravatar_id":"","url":"https://api.github.com/users/mytardis","html_url":"https://github.com/mytardis","followers_url":"https://api.github.com/users/mytardis/followers","following_url":"https://api.github.com/users/mytardis/following{/other_user}","gists_url":"https://api.github.com/users/mytardis/gists{/gist_id}","starred_url":"https://api.github.com/users/mytardis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mytardis/subscriptions","organizations_url":"https://api.github.com/users/mytardis/orgs","repos_url":"https://api.github.com/users/mytardis/repos","events_url":"https://api.github.com/users/mytardis/events{/privacy}","received_events_url":"https://api.github.com/users/mytardis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mytardis/mytardis","description":"MyTardis - a data management system for private lab/facility data","fork":false,"url":"https://api.github.com/repos/mytardis/mytardis","forks_url":"https://api.github.com/repos/mytardis/mytardis/forks","keys_url":"https://api.github.com/repos/mytardis/mytardis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mytardis/mytardis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mytardis/mytardis/teams","hooks_url":"https://api.github.com/repos/mytardis/mytardis/hooks","issue_events_url":"https://api.github.com/repos/mytardis/mytardis/issues/events{/number}","events_url":"https://api.github.com/repos/mytardis/mytardis/events","assignees_url":"https://api.github.com/repos/mytardis/mytardis/assignees{/user}","branches_url":"https://api.github.com/repos/mytardis/mytardis/branches{/branch}","tags_url":"https://api.github.com/repos/mytardis/mytardis/tags","blobs_url":"https://api.github.com/repos/mytardis/mytardis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mytardis/mytardis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mytardis/mytardis/git/refs{/sha}","trees_url":"https://api.github.com/repos/mytardis/mytardis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mytardis/mytardis/statuses/{sha}","languages_url":"https://api.github.com/repos/mytardis/mytardis/languages","stargazers_url":"https://api.github.com/repos/mytardis/mytardis/stargazers","contributors_url":"https://api.github.com/repos/mytardis/mytardis/contributors","subscribers_url":"https://api.github.com/repos/mytardis/mytardis/subscribers","subscription_url":"https://api.github.com/repos/mytardis/mytardis/subscription","commits_url":"https://api.github.com/repos/mytardis/mytardis/commits{/sha}","git_commits_url":"https://api.github.com/repos/mytardis/mytardis/git/commits{/sha}","comments_url":"https://api.github.com/repos/mytardis/mytardis/comments{/number}","issue_comment_url":"https://api.github.com/repos/mytardis/mytardis/issues/comments{/number}","contents_url":"https://api.github.com/repos/mytardis/mytardis/contents/{+path}","compare_url":"https://api.github.com/repos/mytardis/mytardis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mytardis/mytardis/merges","archive_url":"https://api.github.com/repos/mytardis/mytardis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mytardis/mytardis/downloads","issues_url":"https://api.github.com/repos/mytardis/mytardis/issues{/number}","pulls_url":"https://api.github.com/repos/mytardis/mytardis/pulls{/number}","milestones_url":"https://api.github.com/repos/mytardis/mytardis/milestones{/number}","notifications_url":"https://api.github.com/repos/mytardis/mytardis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mytardis/mytardis/labels{/name}","releases_url":"https://api.github.com/repos/mytardis/mytardis/releases{/id}","created_at":"2011-11-22T01:48:28Z","updated_at":"2015-11-05T08:30:24Z","pushed_at":"2015-11-09T06:30:21Z","git_url":"git://github.com/mytardis/mytardis.git","ssh_url":"git@github.com:mytardis/mytardis.git","clone_url":"https://github.com/mytardis/mytardis.git","svn_url":"https://github.com/mytardis/mytardis","homepage":"http://mytardis.org","size":27725,"stargazers_count":37,"watchers_count":37,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":82,"forks":42,"open_issues":82,"watchers":37,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mytardis/mytardis/pulls/554"},"html":{"href":"https://github.com/mytardis/mytardis/pull/554"},"issue":{"href":"https://api.github.com/repos/mytardis/mytardis/issues/554"},"comments":{"href":"https://api.github.com/repos/mytardis/mytardis/issues/554/comments"},"review_comments":{"href":"https://api.github.com/repos/mytardis/mytardis/pulls/554/comments"},"review_comment":{"href":"https://api.github.com/repos/mytardis/mytardis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mytardis/mytardis/pulls/554/commits"},"statuses":{"href":"https://api.github.com/repos/mytardis/mytardis/statuses/b90b5408610c5e2519f93ddc6562c675ebcd48f5"}}}}