{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/ems-file-service/pulls/comments/235297557","pull_request_review_id":177126003,"id":235297557,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTI5NzU1Nw==","diff_hunk":"@@ -128,3 +139,49 @@ function manifestLayerV2(data, hostname) {\n   }\n   return layer;\n }\n+\n+function manifestLayerV6(data, hostname, opts) {\n+  const fields = data.fieldMapping.map(fieldMap => ({\n+    type: fieldMap.type,\n+    id: fieldMap.name,\n+    label: { ...{ en: fieldMap.desc }, ...getFieldLabels(fieldMap.name, opts.fieldInfo) },\n+  }));\n+  const layer = {\n+    layer_id: data.name,\n+    created_at: data.createdAt,\n+    attribution: data.attribution,\n+    formats: data.emsFormats.map(format => {\n+      return {\n+        format: format.type,\n+        url: `https://${hostname}/files/${format.file}?elastic_tile_service_tos=agree`,\n+        legacy_default: format.default || false,\n+      };\n+    }),\n+    fields: fields,\n+    layer_name: data.humanReadableName,\n+  };\n+  return layer;\n+}\n+\n+function getDefaultFormat(emsFormats) {\n+  return emsFormats.filter(format => format.default);\n+}\n+\n+function getFieldLabels(fieldName, fieldInfo) {\n+  if (fieldName.startsWith('label_') && _.get(fieldInfo, 'name.i18n')) {\n+    const lang = fieldName.replace('label_', '');\n+    const labels = _.mapValues(fieldInfo.name.i18n, (label) => {\n+      return `${label} (${lang})`;\n+    });","path":"scripts/generate-manifest.js","position":120,"original_position":120,"commit_id":"18ec40144590d1202f7106046f700df646c4fb2f","original_commit_id":"18ec40144590d1202f7106046f700df646c4fb2f","user":{"login":"nyurik","id":1641515,"node_id":"MDQ6VXNlcjE2NDE1MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/1641515?v=4","gravatar_id":"","url":"https://api.github.com/users/nyurik","html_url":"https://github.com/nyurik","followers_url":"https://api.github.com/users/nyurik/followers","following_url":"https://api.github.com/users/nyurik/following{/other_user}","gists_url":"https://api.github.com/users/nyurik/gists{/gist_id}","starred_url":"https://api.github.com/users/nyurik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyurik/subscriptions","organizations_url":"https://api.github.com/users/nyurik/orgs","repos_url":"https://api.github.com/users/nyurik/repos","events_url":"https://api.github.com/users/nyurik/events{/privacy}","received_events_url":"https://api.github.com/users/nyurik/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n```","created_at":"2018-11-21T08:51:50Z","updated_at":"2018-11-21T08:54:28Z","html_url":"https://github.com/elastic/ems-file-service/pull/60#discussion_r235297557","pull_request_url":"https://api.github.com/repos/elastic/ems-file-service/pulls/60","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/elastic/ems-file-service/pulls/comments/235297557"},"html":{"href":"https://github.com/elastic/ems-file-service/pull/60#discussion_r235297557"},"pull_request":{"href":"https://api.github.com/repos/elastic/ems-file-service/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/ems-file-service/pulls/60","id":231282996,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMjgyOTk2","html_url":"https://github.com/elastic/ems-file-service/pull/60","diff_url":"https://github.com/elastic/ems-file-service/pull/60.diff","patch_url":"https://github.com/elastic/ems-file-service/pull/60.patch","issue_url":"https://api.github.com/repos/elastic/ems-file-service/issues/60","number":60,"state":"open","locked":false,"title":"EMS Version 6.6","user":{"login":"nickpeihl","id":1638483,"node_id":"MDQ6VXNlcjE2Mzg0ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/1638483?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpeihl","html_url":"https://github.com/nickpeihl","followers_url":"https://api.github.com/users/nickpeihl/followers","following_url":"https://api.github.com/users/nickpeihl/following{/other_user}","gists_url":"https://api.github.com/users/nickpeihl/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpeihl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpeihl/subscriptions","organizations_url":"https://api.github.com/users/nickpeihl/orgs","repos_url":"https://api.github.com/users/nickpeihl/repos","events_url":"https://api.github.com/users/nickpeihl/events{/privacy}","received_events_url":"https://api.github.com/users/nickpeihl/received_events","type":"User","site_admin":false},"body":"WIP - Please do not merge.\r\n\r\nEMS v6.6 adds localized layer names and field labels based on translations available in Wikidata. The vector manifest is changed based on discussions in #56.  \r\n\r\nTODO\r\n* [x] Update documentation\r\n* [x] Review changes needed to Kibana\r\n\r\n\r\nFixes #58 #48 ","created_at":"2018-11-15T17:53:58Z","updated_at":"2018-11-21T08:54:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fab1f62b7bd94fc5aa555efb2b9666f6bd3d97fd","assignee":null,"assignees":[],"requested_reviewers":[{"login":"thomasneirynck","id":1833023,"node_id":"MDQ6VXNlcjE4MzMwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1833023?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasneirynck","html_url":"https://github.com/thomasneirynck","followers_url":"https://api.github.com/users/thomasneirynck/followers","following_url":"https://api.github.com/users/thomasneirynck/following{/other_user}","gists_url":"https://api.github.com/users/thomasneirynck/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasneirynck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasneirynck/subscriptions","organizations_url":"https://api.github.com/users/thomasneirynck/orgs","repos_url":"https://api.github.com/users/thomasneirynck/repos","events_url":"https://api.github.com/users/thomasneirynck/events{/privacy}","received_events_url":"https://api.github.com/users/thomasneirynck/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/ems-file-service/pulls/60/commits","review_comments_url":"https://api.github.com/repos/elastic/ems-file-service/pulls/60/comments","review_comment_url":"https://api.github.com/repos/elastic/ems-file-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/ems-file-service/issues/60/comments","statuses_url":"https://api.github.com/repos/elastic/ems-file-service/statuses/18ec40144590d1202f7106046f700df646c4fb2f","head":{"label":"nickpeihl:6.x","ref":"6.x","sha":"18ec40144590d1202f7106046f700df646c4fb2f","user":{"login":"nickpeihl","id":1638483,"node_id":"MDQ6VXNlcjE2Mzg0ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/1638483?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpeihl","html_url":"https://github.com/nickpeihl","followers_url":"https://api.github.com/users/nickpeihl/followers","following_url":"https://api.github.com/users/nickpeihl/following{/other_user}","gists_url":"https://api.github.com/users/nickpeihl/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpeihl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpeihl/subscriptions","organizations_url":"https://api.github.com/users/nickpeihl/orgs","repos_url":"https://api.github.com/users/nickpeihl/repos","events_url":"https://api.github.com/users/nickpeihl/events{/privacy}","received_events_url":"https://api.github.com/users/nickpeihl/received_events","type":"User","site_admin":false},"repo":{"id":144884073,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ4ODQwNzM=","name":"ems-file-service","full_name":"nickpeihl/ems-file-service","private":false,"owner":{"login":"nickpeihl","id":1638483,"node_id":"MDQ6VXNlcjE2Mzg0ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/1638483?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpeihl","html_url":"https://github.com/nickpeihl","followers_url":"https://api.github.com/users/nickpeihl/followers","following_url":"https://api.github.com/users/nickpeihl/following{/other_user}","gists_url":"https://api.github.com/users/nickpeihl/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpeihl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpeihl/subscriptions","organizations_url":"https://api.github.com/users/nickpeihl/orgs","repos_url":"https://api.github.com/users/nickpeihl/repos","events_url":"https://api.github.com/users/nickpeihl/events{/privacy}","received_events_url":"https://api.github.com/users/nickpeihl/received_events","type":"User","site_admin":false},"html_url":"https://github.com/nickpeihl/ems-file-service","description":"Data sources for Elastic Map Service","fork":true,"url":"https://api.github.com/repos/nickpeihl/ems-file-service","forks_url":"https://api.github.com/repos/nickpeihl/ems-file-service/forks","keys_url":"https://api.github.com/repos/nickpeihl/ems-file-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nickpeihl/ems-file-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nickpeihl/ems-file-service/teams","hooks_url":"https://api.github.com/repos/nickpeihl/ems-file-service/hooks","issue_events_url":"https://api.github.com/repos/nickpeihl/ems-file-service/issues/events{/number}","events_url":"https://api.github.com/repos/nickpeihl/ems-file-service/events","assignees_url":"https://api.github.com/repos/nickpeihl/ems-file-service/assignees{/user}","branches_url":"https://api.github.com/repos/nickpeihl/ems-file-service/branches{/branch}","tags_url":"https://api.github.com/repos/nickpeihl/ems-file-service/tags","blobs_url":"https://api.github.com/repos/nickpeihl/ems-file-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nickpeihl/ems-file-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nickpeihl/ems-file-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/nickpeihl/ems-file-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nickpeihl/ems-file-service/statuses/{sha}","languages_url":"https://api.github.com/repos/nickpeihl/ems-file-service/languages","stargazers_url":"https://api.github.com/repos/nickpeihl/ems-file-service/stargazers","contributors_url":"https://api.github.com/repos/nickpeihl/ems-file-service/contributors","subscribers_url":"https://api.github.com/repos/nickpeihl/ems-file-service/subscribers","subscription_url":"https://api.github.com/repos/nickpeihl/ems-file-service/subscription","commits_url":"https://api.github.com/repos/nickpeihl/ems-file-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/nickpeihl/ems-file-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/nickpeihl/ems-file-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/nickpeihl/ems-file-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/nickpeihl/ems-file-service/contents/{+path}","compare_url":"https://api.github.com/repos/nickpeihl/ems-file-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nickpeihl/ems-file-service/merges","archive_url":"https://api.github.com/repos/nickpeihl/ems-file-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nickpeihl/ems-file-service/downloads","issues_url":"https://api.github.com/repos/nickpeihl/ems-file-service/issues{/number}","pulls_url":"https://api.github.com/repos/nickpeihl/ems-file-service/pulls{/number}","milestones_url":"https://api.github.com/repos/nickpeihl/ems-file-service/milestones{/number}","notifications_url":"https://api.github.com/repos/nickpeihl/ems-file-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nickpeihl/ems-file-service/labels{/name}","releases_url":"https://api.github.com/repos/nickpeihl/ems-file-service/releases{/id}","deployments_url":"https://api.github.com/repos/nickpeihl/ems-file-service/deployments","created_at":"2018-08-15T17:38:31Z","updated_at":"2018-10-30T21:54:15Z","pushed_at":"2018-11-20T23:27:59Z","git_url":"git://github.com/nickpeihl/ems-file-service.git","ssh_url":"git@github.com:nickpeihl/ems-file-service.git","clone_url":"https://github.com/nickpeihl/ems-file-service.git","svn_url":"https://github.com/nickpeihl/ems-file-service","homepage":null,"size":7463,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"b438141f98fca1a871710baee43a1ef9148028a1","user":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":124428619,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQ0Mjg2MTk=","name":"ems-file-service","full_name":"elastic/ems-file-service","private":false,"owner":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/elastic/ems-file-service","description":"Data sources for Elastic Map Service","fork":false,"url":"https://api.github.com/repos/elastic/ems-file-service","forks_url":"https://api.github.com/repos/elastic/ems-file-service/forks","keys_url":"https://api.github.com/repos/elastic/ems-file-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/ems-file-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/ems-file-service/teams","hooks_url":"https://api.github.com/repos/elastic/ems-file-service/hooks","issue_events_url":"https://api.github.com/repos/elastic/ems-file-service/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/ems-file-service/events","assignees_url":"https://api.github.com/repos/elastic/ems-file-service/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/ems-file-service/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/ems-file-service/tags","blobs_url":"https://api.github.com/repos/elastic/ems-file-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/ems-file-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/ems-file-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/ems-file-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/ems-file-service/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/ems-file-service/languages","stargazers_url":"https://api.github.com/repos/elastic/ems-file-service/stargazers","contributors_url":"https://api.github.com/repos/elastic/ems-file-service/contributors","subscribers_url":"https://api.github.com/repos/elastic/ems-file-service/subscribers","subscription_url":"https://api.github.com/repos/elastic/ems-file-service/subscription","commits_url":"https://api.github.com/repos/elastic/ems-file-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/ems-file-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/ems-file-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/ems-file-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/ems-file-service/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/ems-file-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/ems-file-service/merges","archive_url":"https://api.github.com/repos/elastic/ems-file-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/ems-file-service/downloads","issues_url":"https://api.github.com/repos/elastic/ems-file-service/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/ems-file-service/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/ems-file-service/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/ems-file-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/ems-file-service/labels{/name}","releases_url":"https://api.github.com/repos/elastic/ems-file-service/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/ems-file-service/deployments","created_at":"2018-03-08T17:58:18Z","updated_at":"2018-10-31T15:34:13Z","pushed_at":"2018-11-20T23:28:00Z","git_url":"git://github.com/elastic/ems-file-service.git","ssh_url":"git@github.com:elastic/ems-file-service.git","clone_url":"https://github.com/elastic/ems-file-service.git","svn_url":"https://github.com/elastic/ems-file-service","homepage":null,"size":5921,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":16,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/ems-file-service/pulls/60"},"html":{"href":"https://github.com/elastic/ems-file-service/pull/60"},"issue":{"href":"https://api.github.com/repos/elastic/ems-file-service/issues/60"},"comments":{"href":"https://api.github.com/repos/elastic/ems-file-service/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/ems-file-service/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/ems-file-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/ems-file-service/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/ems-file-service/statuses/18ec40144590d1202f7106046f700df646c4fb2f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nyurik"}}