Remove gravatar_email field and use first email in profile instead

Also use larger image for user profile and include link to
related documentation.

Change-Id: Ib81f6ecf03f1d00cff307b97aae53538c57d4dc6
Signed-off-by: Andrii Ostapenko <aostapenko@stackalytics.io>
This commit is contained in:
Andrii Ostapenko 2021-03-27 21:24:11 -05:00
parent 35bb90e8fd
commit 3e3eccc4c3
No known key found for this signature in database
GPG Key ID: F3E83668DBB223B3
4 changed files with 6 additions and 9 deletions

View File

@ -3530,10 +3530,9 @@
"end_date": null
}
],
"gravatar_email": "anost1986@gmail.com",
"user_name": "Andrii Ostapenko",
"emails": ["aostapenko@mirantis.com", "andrey_ostapenko@symantec.com", "ao129q@att.com",
"andrii.ostapenko@att.com", "anost1986@gmail.com", "aostapenko@stackalytics.io"]
"emails": ["anost1986@gmail.com", "aostapenko@mirantis.com", "andrey_ostapenko@symantec.com",
"ao129q@att.com", "andrii.ostapenko@att.com", "aostapenko@stackalytics.io"]
},
{
"github_id": "aoxn",

View File

@ -7,7 +7,7 @@
dataType: "json",
success: function (data) {
var user = data["user"];
extendWithGravatar(user, 64);
extendWithGravatar(user, 192);
$("#user_profile_template").tmpl(data["user"]).appendTo("#user_profile_container");
}
});
@ -22,8 +22,8 @@
<script id="user_profile_template" type="text/x-jquery-tmpl">
{% raw %}
<div>
<div style="float: left;"><img src="${gravatar}"></div>
<div style="margin-left: 90px;">
<div style="float: left;"><a href="https://wiki.openstack.org/wiki/Stackalytics#Avatars"><img src="${gravatar}"></a></div>
<div style="margin-left: 218px;">
<h2>${user_name}</h2>
<div>Company: <a href="{%html company_link.uri %}">{%html company_link.title %}</a>
[<span style="font-style: italic;"><a

View File

@ -193,6 +193,7 @@ def _update_project_list(default_data):
def _store_users(runtime_storage_inst, users):
for user in users:
user['gravatar_email'] = user['emails'][0]
stored_user = user_processor.load_user(runtime_storage_inst,
user_id=user['user_id'])
updated_user = user_processor.update_user_profile(stored_user, user)

View File

@ -36,9 +36,6 @@ default_data = {
"user_name": {
"type": "string"
},
"gravatar_email": {
"type": "string"
},
"emails": {
"type": "array",
"items": {