{"action":"created","comment":{"url":"https://api.github.com/repos/aodn/aodn-portal/pulls/comments/26172128","id":26172128,"diff_hunk":"@@ -101,28 +101,51 @@ Portal.filter.BaseFilterPanel = Ext.extend(Ext.Panel, {\n \n Portal.filter.BaseFilterPanel.newFilterPanelFor = function(cfg) {\n \n-    var newFilterPanel;\n+    var type = cfg.filter.getType().toLowerCase();\n \n-    if (cfg.filter.getType() === \"String\") {\n-        newFilterPanel = new Portal.filter.ComboFilterPanel(cfg);\n+    // Todo - DN: Remove when loading filters from DBis removed\n+    // Portal types --> GeoServer types (temporary)\n+    if (type == \"daterange\") {\n+        type = 'datetime'\n     }\n-    else if (cfg.filter.getType() == \"Date\") {\n-        newFilterPanel = new Portal.filter.DateFilterPanel(cfg);\n+    else if (type === \"boundingbox\") {\n+        type = 'geometrypropertytype'\n     }\n-    else if (cfg.filter.getType() == \"DateRange\") {\n-        newFilterPanel = new Portal.filter.DateFilterPanel(cfg);\n+    else if (type === \"number\") {","path":"web-app/js/portal/filter/BaseFilterPanel.js","position":21,"original_position":21,"commit_id":"91c4b6859eaa37c258e08bed46853d903a0cb0ba","original_commit_id":"91c4b6859eaa37c258e08bed46853d903a0cb0ba","user":{"login":"dnahodil","id":2774917,"avatar_url":"https://avatars.githubusercontent.com/u/2774917?v=3","gravatar_id":"","url":"https://api.github.com/users/dnahodil","html_url":"https://github.com/dnahodil","followers_url":"https://api.github.com/users/dnahodil/followers","following_url":"https://api.github.com/users/dnahodil/following{/other_user}","gists_url":"https://api.github.com/users/dnahodil/gists{/gist_id}","starred_url":"https://api.github.com/users/dnahodil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnahodil/subscriptions","organizations_url":"https://api.github.com/users/dnahodil/orgs","repos_url":"https://api.github.com/users/dnahodil/repos","events_url":"https://api.github.com/users/dnahodil/events{/privacy}","received_events_url":"https://api.github.com/users/dnahodil/received_events","type":"User","site_admin":false},"body":"Yeah, because of line 104 we'll always have a String. It's definitely something to be wary of, though, particularly with numerical comparisons. Another tip is to start strict and loosen it up if necessary. That's essentially what we're doing by using `===`.","created_at":"2015-03-10T22:15:42Z","updated_at":"2015-03-10T22:15:42Z","html_url":"https://github.com/aodn/aodn-portal/pull/1617#discussion_r26172128","pull_request_url":"https://api.github.com/repos/aodn/aodn-portal/pulls/1617","_links":{"self":{"href":"https://api.github.com/repos/aodn/aodn-portal/pulls/comments/26172128"},"html":{"href":"https://github.com/aodn/aodn-portal/pull/1617#discussion_r26172128"},"pull_request":{"href":"https://api.github.com/repos/aodn/aodn-portal/pulls/1617"}}},"pull_request":{"url":"https://api.github.com/repos/aodn/aodn-portal/pulls/1617","id":30822628,"html_url":"https://github.com/aodn/aodn-portal/pull/1617","diff_url":"https://github.com/aodn/aodn-portal/pull/1617.diff","patch_url":"https://github.com/aodn/aodn-portal/pull/1617.patch","issue_url":"https://api.github.com/repos/aodn/aodn-portal/issues/1617","number":1617,"state":"open","locked":false,"title":"New filter type mapping","user":{"login":"dnahodil","id":2774917,"avatar_url":"https://avatars.githubusercontent.com/u/2774917?v=3","gravatar_id":"","url":"https://api.github.com/users/dnahodil","html_url":"https://github.com/dnahodil","followers_url":"https://api.github.com/users/dnahodil/followers","following_url":"https://api.github.com/users/dnahodil/following{/other_user}","gists_url":"https://api.github.com/users/dnahodil/gists{/gist_id}","starred_url":"https://api.github.com/users/dnahodil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnahodil/subscriptions","organizations_url":"https://api.github.com/users/dnahodil/orgs","repos_url":"https://api.github.com/users/dnahodil/repos","events_url":"https://api.github.com/users/dnahodil/events{/privacy}","received_events_url":"https://api.github.com/users/dnahodil/received_events","type":"User","site_admin":false},"body":"This change moves the choice of the correct UI component for a given GeoServer type to the client side. As it is it should be backwards compatible with the WFS scanner and server-side types which are used currently but which will disappear soon.","created_at":"2015-03-10T04:50:25Z","updated_at":"2015-03-10T22:15:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a35cd0ab446e7880671426134c7f5f35b7f37b8a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aodn/aodn-portal/pulls/1617/commits","review_comments_url":"https://api.github.com/repos/aodn/aodn-portal/pulls/1617/comments","review_comment_url":"https://api.github.com/repos/aodn/aodn-portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aodn/aodn-portal/issues/1617/comments","statuses_url":"https://api.github.com/repos/aodn/aodn-portal/statuses/91c4b6859eaa37c258e08bed46853d903a0cb0ba","head":{"label":"aodn:new_filter_type_mapping","ref":"new_filter_type_mapping","sha":"91c4b6859eaa37c258e08bed46853d903a0cb0ba","user":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"repo":{"id":6806252,"name":"aodn-portal","full_name":"aodn/aodn-portal","owner":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aodn/aodn-portal","description":"AODN Open Geospatial Portal","fork":false,"url":"https://api.github.com/repos/aodn/aodn-portal","forks_url":"https://api.github.com/repos/aodn/aodn-portal/forks","keys_url":"https://api.github.com/repos/aodn/aodn-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aodn/aodn-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aodn/aodn-portal/teams","hooks_url":"https://api.github.com/repos/aodn/aodn-portal/hooks","issue_events_url":"https://api.github.com/repos/aodn/aodn-portal/issues/events{/number}","events_url":"https://api.github.com/repos/aodn/aodn-portal/events","assignees_url":"https://api.github.com/repos/aodn/aodn-portal/assignees{/user}","branches_url":"https://api.github.com/repos/aodn/aodn-portal/branches{/branch}","tags_url":"https://api.github.com/repos/aodn/aodn-portal/tags","blobs_url":"https://api.github.com/repos/aodn/aodn-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aodn/aodn-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aodn/aodn-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/aodn/aodn-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aodn/aodn-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/aodn/aodn-portal/languages","stargazers_url":"https://api.github.com/repos/aodn/aodn-portal/stargazers","contributors_url":"https://api.github.com/repos/aodn/aodn-portal/contributors","subscribers_url":"https://api.github.com/repos/aodn/aodn-portal/subscribers","subscription_url":"https://api.github.com/repos/aodn/aodn-portal/subscription","commits_url":"https://api.github.com/repos/aodn/aodn-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/aodn/aodn-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/aodn/aodn-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/aodn/aodn-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/aodn/aodn-portal/contents/{+path}","compare_url":"https://api.github.com/repos/aodn/aodn-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aodn/aodn-portal/merges","archive_url":"https://api.github.com/repos/aodn/aodn-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aodn/aodn-portal/downloads","issues_url":"https://api.github.com/repos/aodn/aodn-portal/issues{/number}","pulls_url":"https://api.github.com/repos/aodn/aodn-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/aodn/aodn-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/aodn/aodn-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aodn/aodn-portal/labels{/name}","releases_url":"https://api.github.com/repos/aodn/aodn-portal/releases{/id}","created_at":"2012-11-22T01:42:50Z","updated_at":"2015-03-05T23:04:15Z","pushed_at":"2015-03-10T06:05:54Z","git_url":"git://github.com/aodn/aodn-portal.git","ssh_url":"git@github.com:aodn/aodn-portal.git","clone_url":"https://github.com/aodn/aodn-portal.git","svn_url":"https://github.com/aodn/aodn-portal","homepage":"","size":67944,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":79,"forks":11,"open_issues":79,"watchers":3,"default_branch":"master"}},"base":{"label":"aodn:filters_from_geoserver","ref":"filters_from_geoserver","sha":"7c5c885aaab5aa88cd9274450aaa918c57ed02b3","user":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"repo":{"id":6806252,"name":"aodn-portal","full_name":"aodn/aodn-portal","owner":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aodn/aodn-portal","description":"AODN Open Geospatial Portal","fork":false,"url":"https://api.github.com/repos/aodn/aodn-portal","forks_url":"https://api.github.com/repos/aodn/aodn-portal/forks","keys_url":"https://api.github.com/repos/aodn/aodn-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aodn/aodn-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aodn/aodn-portal/teams","hooks_url":"https://api.github.com/repos/aodn/aodn-portal/hooks","issue_events_url":"https://api.github.com/repos/aodn/aodn-portal/issues/events{/number}","events_url":"https://api.github.com/repos/aodn/aodn-portal/events","assignees_url":"https://api.github.com/repos/aodn/aodn-portal/assignees{/user}","branches_url":"https://api.github.com/repos/aodn/aodn-portal/branches{/branch}","tags_url":"https://api.github.com/repos/aodn/aodn-portal/tags","blobs_url":"https://api.github.com/repos/aodn/aodn-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aodn/aodn-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aodn/aodn-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/aodn/aodn-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aodn/aodn-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/aodn/aodn-portal/languages","stargazers_url":"https://api.github.com/repos/aodn/aodn-portal/stargazers","contributors_url":"https://api.github.com/repos/aodn/aodn-portal/contributors","subscribers_url":"https://api.github.com/repos/aodn/aodn-portal/subscribers","subscription_url":"https://api.github.com/repos/aodn/aodn-portal/subscription","commits_url":"https://api.github.com/repos/aodn/aodn-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/aodn/aodn-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/aodn/aodn-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/aodn/aodn-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/aodn/aodn-portal/contents/{+path}","compare_url":"https://api.github.com/repos/aodn/aodn-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aodn/aodn-portal/merges","archive_url":"https://api.github.com/repos/aodn/aodn-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aodn/aodn-portal/downloads","issues_url":"https://api.github.com/repos/aodn/aodn-portal/issues{/number}","pulls_url":"https://api.github.com/repos/aodn/aodn-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/aodn/aodn-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/aodn/aodn-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aodn/aodn-portal/labels{/name}","releases_url":"https://api.github.com/repos/aodn/aodn-portal/releases{/id}","created_at":"2012-11-22T01:42:50Z","updated_at":"2015-03-05T23:04:15Z","pushed_at":"2015-03-10T06:05:54Z","git_url":"git://github.com/aodn/aodn-portal.git","ssh_url":"git@github.com:aodn/aodn-portal.git","clone_url":"https://github.com/aodn/aodn-portal.git","svn_url":"https://github.com/aodn/aodn-portal","homepage":"","size":67944,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":79,"forks":11,"open_issues":79,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aodn/aodn-portal/pulls/1617"},"html":{"href":"https://github.com/aodn/aodn-portal/pull/1617"},"issue":{"href":"https://api.github.com/repos/aodn/aodn-portal/issues/1617"},"comments":{"href":"https://api.github.com/repos/aodn/aodn-portal/issues/1617/comments"},"review_comments":{"href":"https://api.github.com/repos/aodn/aodn-portal/pulls/1617/comments"},"review_comment":{"href":"https://api.github.com/repos/aodn/aodn-portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aodn/aodn-portal/pulls/1617/commits"},"statuses":{"href":"https://api.github.com/repos/aodn/aodn-portal/statuses/91c4b6859eaa37c258e08bed46853d903a0cb0ba"}}}}