Skip to content

Commit

Permalink
adjust user metadata. datacite/lupo#425
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Mar 24, 2020
1 parent 6eef98f commit 9a3b7c1
Show file tree
Hide file tree
Showing 7 changed files with 241 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default Model.extend({
meta: attr(),

name: attr('string'),
givenNames: attr('string'),
givenName: attr('string'),
familyName: attr('string'),
createdAt: attr('date'),
updatedAt: attr('date'),
Expand Down
4 changes: 2 additions & 2 deletions app/templates/components/user-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<h5>ORCID</h5>
<a href="{{user.orcid}}">{{user.orcid}}</a>

{{#if user.givenNames}}
{{#if user.givenName}}
<h5>Given Name</h5>
{{user.givenNames}}
{{user.givenName}}
{{/if}}

{{#if user.familyName}}
Expand Down
4 changes: 2 additions & 2 deletions app/templates/components/user-show.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<h5>ORCID ID</h5>
<a href="{{model.orcid}}">{{model.orcid}}</a>

{{#if model.givenNames}}
{{#if model.givenName}}
<h5>Given Name</h5>
{{model.givenNames}}
{{model.givenName}}
{{/if}}

{{#if model.familyName}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,65 @@
"ssl": -1,
"wait": 83
}
},
{
"_id": "e2831a55060530a68b1087aa3e2cd861",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"name": "accept",
"value": "application/vnd.api+json"
},
{
"name": "content-type",
"value": "text/plain;charset=utf-8"
}
],
"headersSize": 147,
"httpVersion": "HTTP/1.1",
"method": "GET",
"queryString": [],
"url": "https://api.test.datacite.org/repositories/datacite.test"
},
"response": {
"bodySize": 659,
"content": {
"mimeType": "application/json; charset=utf-8",
"size": 659,
"text": "{\"data\":{\"id\":\"datacite.test\",\"type\":\"repositories\",\"attributes\":{\"name\":\"DataCite Test Repository\",\"symbol\":\"DATACITE.TEST\",\"re3data\":null,\"opendoar\":null,\"year\":2017,\"systemEmail\":\"[email protected]\",\"alternateName\":null,\"description\":null,\"clientType\":\"repository\",\"repositoryType\":[],\"language\":[],\"certificate\":[],\"domains\":\"*\",\"issn\":{},\"url\":null,\"created\":\"2017-07-13T15:15:33.000Z\",\"updated\":\"2020-03-19T09:34:22.000Z\",\"isActive\":true,\"hasPassword\":true,\"serviceContact\":{}},\"relationships\":{\"provider\":{\"data\":{\"id\":\"datacite\",\"type\":\"providers\"}},\"prefixes\":{\"data\":[{\"id\":\"10.80225\",\"type\":\"prefixes\"}]}}},\"meta\":{\"doiCount\":3,\"prefixCount\":1}}"
},
"cookies": [],
"headers": [
{
"name": "cache-control",
"value": "max-age=0, private, must-revalidate"
},
{
"name": "content-type",
"value": "application/json; charset=utf-8"
}
],
"headersSize": 101,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2020-03-24T10:23:19.469Z",
"time": 242,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 242
}
}
],
"pages": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,65 @@
"ssl": -1,
"wait": 75
}
},
{
"_id": "e2831a55060530a68b1087aa3e2cd861",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"name": "accept",
"value": "application/vnd.api+json"
},
{
"name": "content-type",
"value": "text/plain;charset=utf-8"
}
],
"headersSize": 147,
"httpVersion": "HTTP/1.1",
"method": "GET",
"queryString": [],
"url": "https://api.test.datacite.org/repositories/datacite.test"
},
"response": {
"bodySize": 659,
"content": {
"mimeType": "application/json; charset=utf-8",
"size": 659,
"text": "{\"data\":{\"id\":\"datacite.test\",\"type\":\"repositories\",\"attributes\":{\"name\":\"DataCite Test Repository\",\"symbol\":\"DATACITE.TEST\",\"re3data\":null,\"opendoar\":null,\"year\":2017,\"systemEmail\":\"[email protected]\",\"alternateName\":null,\"description\":null,\"clientType\":\"repository\",\"repositoryType\":[],\"language\":[],\"certificate\":[],\"domains\":\"*\",\"issn\":{},\"url\":null,\"created\":\"2017-07-13T15:15:33.000Z\",\"updated\":\"2020-03-19T09:34:22.000Z\",\"isActive\":true,\"hasPassword\":true,\"serviceContact\":{}},\"relationships\":{\"provider\":{\"data\":{\"id\":\"datacite\",\"type\":\"providers\"}},\"prefixes\":{\"data\":[{\"id\":\"10.80225\",\"type\":\"prefixes\"}]}}},\"meta\":{\"doiCount\":3,\"prefixCount\":1}}"
},
"cookies": [],
"headers": [
{
"name": "cache-control",
"value": "max-age=0, private, must-revalidate"
},
{
"name": "content-type",
"value": "application/json; charset=utf-8"
}
],
"headersSize": 101,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2020-03-24T10:24:07.759Z",
"time": 134,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 134
}
}
],
"pages": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,65 @@
"ssl": -1,
"wait": 96
}
},
{
"_id": "3b3ffb184cb145e8c1fa693f3e340e86",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"name": "accept",
"value": "application/vnd.api+json"
},
{
"name": "content-type",
"value": "text/plain;charset=utf-8"
}
],
"headersSize": 151,
"httpVersion": "HTTP/1.1",
"method": "GET",
"queryString": [],
"url": "https://api.test.datacite.org/repositories/datacite.datacite"
},
"response": {
"bodySize": 885,
"content": {
"mimeType": "application/json; charset=utf-8",
"size": 885,
"text": "{\"data\":{\"id\":\"datacite.datacite\",\"type\":\"repositories\",\"attributes\":{\"name\":\"DataCite Repository\",\"symbol\":\"DATACITE.DATACITE\",\"re3data\":null,\"opendoar\":null,\"year\":2011,\"systemEmail\":\"[email protected]\",\"alternateName\":null,\"description\":null,\"clientType\":\"periodical\",\"repositoryType\":[],\"language\":[\"en\",\"fr\"],\"certificate\":[],\"domains\":\"datacite.org\",\"issn\":{\"issnl\":null,\"print\":\"1545-7885\",\"electronic\":\"1544-9173\"},\"url\":null,\"created\":\"2011-12-07T13:43:39.000Z\",\"updated\":\"2019-08-24T06:22:34.000Z\",\"isActive\":true,\"hasPassword\":true,\"serviceContact\":{\"email\":\"[email protected]\",\"givenName\":\"Martin\",\"familyName\":\"Fenner\"}},\"relationships\":{\"provider\":{\"data\":{\"id\":\"datacite\",\"type\":\"providers\"}},\"prefixes\":{\"data\":[{\"id\":\"10.5438\",\"type\":\"prefixes\"},{\"id\":\"10.70002\",\"type\":\"prefixes\"},{\"id\":\"10.70001\",\"type\":\"prefixes\"}]}}},\"meta\":{\"doiCount\":189,\"prefixCount\":3}}"
},
"cookies": [],
"headers": [
{
"name": "cache-control",
"value": "max-age=0, private, must-revalidate"
},
{
"name": "content-type",
"value": "application/json; charset=utf-8"
}
],
"headersSize": 101,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2020-03-24T10:24:46.783Z",
"time": 113,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 113
}
}
],
"pages": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,65 @@
"ssl": -1,
"wait": 84
}
},
{
"_id": "e2831a55060530a68b1087aa3e2cd861",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"name": "accept",
"value": "application/vnd.api+json"
},
{
"name": "content-type",
"value": "text/plain;charset=utf-8"
}
],
"headersSize": 147,
"httpVersion": "HTTP/1.1",
"method": "GET",
"queryString": [],
"url": "https://api.test.datacite.org/repositories/datacite.test"
},
"response": {
"bodySize": 659,
"content": {
"mimeType": "application/json; charset=utf-8",
"size": 659,
"text": "{\"data\":{\"id\":\"datacite.test\",\"type\":\"repositories\",\"attributes\":{\"name\":\"DataCite Test Repository\",\"symbol\":\"DATACITE.TEST\",\"re3data\":null,\"opendoar\":null,\"year\":2017,\"systemEmail\":\"[email protected]\",\"alternateName\":null,\"description\":null,\"clientType\":\"repository\",\"repositoryType\":[],\"language\":[],\"certificate\":[],\"domains\":\"*\",\"issn\":{},\"url\":null,\"created\":\"2017-07-13T15:15:33.000Z\",\"updated\":\"2020-03-19T09:34:22.000Z\",\"isActive\":true,\"hasPassword\":true,\"serviceContact\":{}},\"relationships\":{\"provider\":{\"data\":{\"id\":\"datacite\",\"type\":\"providers\"}},\"prefixes\":{\"data\":[{\"id\":\"10.80225\",\"type\":\"prefixes\"}]}}},\"meta\":{\"doiCount\":3,\"prefixCount\":1}}"
},
"cookies": [],
"headers": [
{
"name": "cache-control",
"value": "max-age=0, private, must-revalidate"
},
{
"name": "content-type",
"value": "application/json; charset=utf-8"
}
],
"headersSize": 101,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2020-03-24T10:25:51.496Z",
"time": 92,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 92
}
}
],
"pages": [],
Expand Down

0 comments on commit 9a3b7c1

Please sign in to comment.