Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community/: Add a webpage for Listing Issues #291

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
de15cb2
Sync Moban
KVGarg Aug 4, 2019
6e9765d
data/: Update Contributor model
KVGarg Jun 8, 2019
c6afccd
.coafile: Ignore openhub module
KVGarg Jun 10, 2019
ab5e860
tests/: Remove dependency of testusers'
Jun 25, 2019
dc36c9f
travis.yml: Install Python v3.6.3
KVGarg Jul 30, 2019
c81d98c
git.py: CI build pass
KVGarg Feb 11, 2019
7f2877a
Enhance the community website homepage
KVGarg Jun 7, 2019
8323939
ci_build/: Re-design build-logs webpage
KVGarg Jun 9, 2019
6bc955e
gci/: Redesign gci students web-page
KVGarg Jun 12, 2019
0746873
data/: Re-design the contributors webpage
KVGarg Jun 13, 2019
c2f5c96
meta-review/: Redesign the webpage
KVGarg Jun 14, 2019
686c2d3
gamification/: Redesign the webpage
KVGarg Jun 14, 2019
5158608
Add netlify-OAuth
KVGarg Jul 11, 2019
41c5e35
community/: Add a joining netlify form
KVGarg Jul 20, 2019
a012693
community/: Display contributor statistics
KVGarg Jul 28, 2019
e05a821
community/: Add a form for uploading google forms
KVGarg Jul 31, 2019
7274277
community/: Add a form for adding calendar events
KVGarg Jul 31, 2019
e94bc5c
community/: Add a form for applying as a mentor
KVGarg Jul 31, 2019
6048e0e
community/: Add a form for adding a gsoc student
KVGarg Jul 31, 2019
e9dd16a
community/: Add a request form to assign issue
KVGarg Aug 1, 2019
7714d9e
community/: Add a newcomer promotion request form
KVGarg Aug 1, 2019
bfbc9c1
community/: Add a feedback form
KVGarg Aug 1, 2019
577b609
Remove openhub and model apps
Jun 28, 2019
8daed65
openhub/: Use openhub_django pypi package
Jun 28, 2019
6fe3e7f
community/: Display org teams
KVGarg Aug 2, 2019
9922faf
community/: Add a webpage for Listing Issues
KVGarg Aug 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
community/: Add a webpage for Listing Issues
This commit adds a general view for listing
all the issue objects for any model which
stores issue related details. The details
which are compulsory needed are Hoster,
Repository name, Issue title, Number and
the URl of it. using this, the commit adds
a webpage for displaying all the inactive
issues.

Closes #288
  • Loading branch information
KVGarg committed Aug 6, 2019
commit 9922faf86742ab52f8b1407e3b281ee56b3aed9e
1 change: 0 additions & 1 deletion .moban.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package_module: community
packages:
- community
- activity
- inactive_issues
- data
- gci
- gsoc
Expand Down
1 change: 0 additions & 1 deletion .nocover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ nocover_file_globs:
- ci_build/*.py
- meta_review/handler.py
# Optional coverage. Once off scripts.
- inactive_issues/inactive_issues_scraper.py
- unassigned_issues/unassigned_issues_scraper.py
# The following rules can remain here
# django db
Expand Down
9 changes: 4 additions & 5 deletions community/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@

from community.views import (
HomePageView, JoinCommunityView,
OrganizationTeams
OrganizationTeams, InactiveIssuesList
)
from gci.views import GCIStudentsList
from gci.feeds import LatestTasksFeed as gci_tasks_rss
from ci_build.view_log import BuildLogsView
from data.views import ContributorsListView
from gamification.views import GamificationResults
from meta_review.views import ContributorsMetaReview
from inactive_issues.inactive_issues_scraper import inactive_issues_json
from unassigned_issues.unassigned_issues_scraper import (
unassigned_issues_activity_json,
)
Expand Down Expand Up @@ -79,10 +78,10 @@ def get_index():
distill_file='meta-review/index.html',
),
distill_url(
r'static/inactive-issues.json', inactive_issues_json,
name='inactive_issues_json',
r'inactive-issues/', InactiveIssuesList.as_view(),
name='inactive-issues',
distill_func=get_index,
distill_file='static/inactive-issues.json',
distill_file='inactive-issues/index.html',
),
distill_url(
r'static/unassigned-issues.json', unassigned_issues_activity_json,
Expand Down
15 changes: 14 additions & 1 deletion community/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
NewcomerPromotion,
Feedback
)
from data.models import Team
from data.models import Team, InactiveIssue
from gamification.models import Participant as GamificationParticipant
from meta_review.models import Participant as MetaReviewer

Expand Down Expand Up @@ -221,3 +221,16 @@ def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context = get_header_and_footer(context)
return context


class InactiveIssuesList(ListView):

template_name = 'issues.html'
model = InactiveIssue
ordering = 'hoster'

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context = get_header_and_footer(context)
context['page_name'] = 'Inactive Issues List'
return context
24 changes: 24 additions & 0 deletions data/migrations/0009_inactiveissue.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 2.1.7 on 2019-08-02 11:39

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('data', '0008_auto_20190802_0745'),
]

operations = [
migrations.CreateModel(
name='InactiveIssue',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('hoster', models.CharField(max_length=30)),
('title', models.CharField(max_length=500)),
('repository', models.CharField(max_length=100)),
('number', models.SmallIntegerField()),
('url', models.URLField()),
],
),
]
8 changes: 8 additions & 0 deletions data/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,11 @@ def get_closes_issues_object(self):
issue_object = issue_number.get_issue()
issues_object_list.append(issue_object)
return issues_object_list


class InactiveIssue(models.Model):
hoster = models.CharField(max_length=30)
title = models.CharField(max_length=500)
repository = models.CharField(max_length=100)
number = models.SmallIntegerField()
url = models.URLField()
67 changes: 0 additions & 67 deletions inactive_issues/inactive_issues_scraper.py

This file was deleted.

3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ DJANGO_SETTINGS_MODULE = community.settings
testpaths =
community
activity
inactive_issues
data
gci
gsoc
Expand Down Expand Up @@ -63,7 +62,6 @@ plugins =
source =
community
activity
inactive_issues
data
gci
gsoc
Expand All @@ -80,7 +78,6 @@ omit =
gsoc/*.py
ci_build/*.py
meta_review/handler.py
inactive_issues/inactive_issues_scraper.py
unassigned_issues/unassigned_issues_scraper.py
*/migrations/*.py
*/management/commands/*.py
Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<li><a href="{% url 'community-data' %}">Contributors Information</a></li>
<li><a href="#">Mentors</a></li>
<li><a href="{% url 'community-gci' %}">Google Code-in Students</a></li>
<li><a href="{% url 'inactive_issues_json' %}" title="List of all the issues on organization's main repository on which assignee has not shown any activity for more than 2 months.">Inactive issues</a></li>
<li><a href="{% url 'inactive-issues' %}" title="List of all the issues on organization's main repository on which assignee has not shown any activity for more than 2 months.">Inactive issues</a></li>
<li><a href="{% url 'unassigned_issues_activity_json' %}" title="List of all the issues on organization main repository on which someone has opened a pull request without getting assigned to it.">Unassigned issues activity</a></li>
<li><a href="{% url 'ci_build' %}">Project CI Build</a></li>
{% if isTravis %}
Expand Down
48 changes: 48 additions & 0 deletions templates/issues.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% extends 'base.html' %}
{% load staticfiles %}

{% block main-content %}
<div class="web-page-details apply-flex center-content">
<h3 style="padding-right: 15px">~</h3>
<h3 class="page-name">
{{ page_name }}
</h3>
<h3 style="padding-left: 15px">~</h3>
</div>
<div class="issues-list" style="margin: auto; width: 60%; min-width: 350px;
padding-bottom: 30px;">
{% if object_list.count > 0 %}
<table class="highlight centered">
<thead>
<tr class="custom-green-color-font">
<th>
<h5>Hoster</h5>
</th>
<th>
<h5>Title</h5>
</th>
<th>
<h5>Issue</h5>
</th>
</tr>
</thead>
<tbody>
{% for issue in object_list %}
<tr>
<td>{{ issue.hoster }}</td>
<td>{{ issue.title }}</td>
<td class="bold-text">
<a href="{{ issue.url }}">{{ issue.repository }}#{{ issue.number }}</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h5 class="empty-list apply-flex center-content" style="min-height: 124px">
No Issues Found! <i class="fa fa-smile-o"></i>
</h5>
{% endif %}
</div>

{% endblock %}