Skip to content

Commit

Permalink
community/: Display contributor statistics
Browse files Browse the repository at this point in the history
Show the contributor statistics in the form of
charts. The charts will be shown for issues,
commits, reviews and for merge requests. And,
an overall chart, which will display stats
repository wise. Apart from all these charts,
the type of issues the contrib has worked on
will be shown, with the count of issues the
user is working on and the last updated datetime
the user data was updated. All this will be shown,
only if there is some statistics, otherwise the
popup option willn't be shown.

Closes coala#268
  • Loading branch information
KVGarg committed Aug 5, 2019
1 parent dae9c66 commit b3413fe
Show file tree
Hide file tree
Showing 5 changed files with 899 additions and 1 deletion.
43 changes: 43 additions & 0 deletions data/migrations/0007_auto_20190802_2015.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Generated by Django 2.1.7 on 2019-08-02 20:15

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('data', '0006_auto_20190801_1752'),
]

operations = [
migrations.AddField(
model_name='contributor',
name='is_gci_participant',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='contributor',
name='oauth_completed',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='contributor',
name='statistics',
field=models.TextField(default=None, null=True),
),
migrations.AddField(
model_name='contributor',
name='type_of_issues_worked_on',
field=models.TextField(default=None, null=True),
),
migrations.AddField(
model_name='contributor',
name='updated_at',
field=models.TextField(default=None, null=True),
),
migrations.AddField(
model_name='contributor',
name='working_on_issues_count',
field=models.TextField(default=None, null=True),
),
]
6 changes: 6 additions & 0 deletions data/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ class Contributor(models.Model):
issues_opened = models.IntegerField(default=None, null=True)
location = models.TextField(default=None, null=True)
teams = models.ManyToManyField(Team, related_name='contributors')
statistics = models.TextField(default=None, null=True)
type_of_issues_worked_on = models.TextField(default=None, null=True)
is_gci_participant = models.BooleanField(default=False)
working_on_issues_count = models.TextField(default=None, null=True)
updated_at = models.TextField(default=None, null=True)
oauth_completed = models.BooleanField(default=False)

def __str__(self):
return self.login
Expand Down
55 changes: 55 additions & 0 deletions static/css/contributors.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
min-width: 300px;
}

.repository-canvas {
position: relative;
margin: auto;
width: 60vw;
height: 70vh;
}

.search-results {
width: 100%;
background-color: transparent;
Expand All @@ -62,3 +69,51 @@
border-color: darkgray;
border-style: solid;
}

.some-important-information, .issues-labels,
.github-issue-labels, .issues-count, .user-updated-datetime,
.gitlab-issue-labels{
padding: 0 10px;
}

.stats-canvas {
position: relative;
margin: auto;
width: 35vw;
height: 50vh;
}

.user-statistics {
display: none;
position: fixed;
top: 15%;
left: 10%;
width: 80%;
height: 70vh;
background-color: white;
z-index: 1002;
overflow: auto;
border-radius: 10px;
box-shadow: 0 0 25px 2px black;
}

.user-statistics-option {
position: absolute;
float: right;
margin-left: 180px;
margin-top: 10px;
background: black;
color: white;
font-size: 1.5rem;
border-radius: 50px;
width: 20px;
text-align: center;
cursor: pointer;
}

@media only screen and (max-width: 600px) {
.stats-canvas {
width: 50vw;
height: 50vh;
}
}
Loading

0 comments on commit b3413fe

Please sign in to comment.