feat: bring bs5 branch up to date with changes on main (#3644)

* chore: bring docker dev init script up to date with bs5 branch (#3611)

* ci: only run codeql on schedule

* feat: shorten long agenda filter button labels (#3602)

Sessions with long names lead to poor rendering of the agenda filter buttons
on the 'customize the agenda view' page. This truncates those labels at 3 words.

* docs: Remove stale and incomplete information from the README (#3612)

* docs: Suggest cloning a fork rather than ietf-tools repo (#3614)

* docs: update README

* chore: add issue templates

* chore: update issue templates config

* chore: remove duplicate security issue link

* docs: point feature requests to discussions

* chore: add bug report form

* chore: remove bug report issue template

* chore: fix bug report form

* fix: point the api index page into Github instead of trac/svn

* chore: remove os + version + log fields from bug report form

* fix: point to GitHub for bug reports (#3625)

* fix: point to GitHub for bug reports

* fix: point report bug link to template chooser

* fix: point report bug link to template chooser (2)

Co-authored-by: Nicolas Giard <github@ngpixel.com>

* fix: remove stale explanation of status reports (#3628)

* fix: adjust about page to reflect move to GitHub. Normalize information level on page. (#3629)

* fix: remove anchor tag with empty href (#3630)

* fix: use same github issue URL on 500 error page as elsewhere (#3631)

* chore: update report-a-bug.yml form

* ci: fix __init__.py version quotes

* chore: bring docker-compose to root level (#3642) (#3643)

Authored-by: Nicolas Giard <github@ngpixel.com>

Co-authored-by: Nicolas Giard <github@ngpixel.com>
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
Co-authored-by: Jim Fenton <fenton@bluepopcorn.net>
This commit is contained in:
Jennifer Richards 2022-03-15 10:29:33 -03:00 committed by GitHub
parent 90b28957bb
commit 515dbedbc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 109 additions and 228 deletions

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Help / Questions
url: https://github.com/ietf-tools/datatracker/discussions/categories/help-questions
about: Need help? Have a question on setting up the project or its usage?
- name: New Feature / Enhancement Request
url: https://github.com/ietf-tools/datatracker/discussions/categories/ideas
about: Submit ideas for new features or improvements.

34
.github/ISSUE_TEMPLATE/report-a-bug.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: Report a Bug
description: Something isn't right? File a bug report
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browser(s) are you seeing the problem on?
multiple: true
options:
- Chrome / Edge
- Firefox
- Safari
- Not Applicable
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/ietf-tools/.github/blob/main/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow the IETF's Code of Conduct
required: true

View file

@ -3,8 +3,8 @@ name: CodeQL Analysis
on:
# push:
# branches: [ main ]
pull_request:
branches: [ main ]
# pull_request:
# branches: [ main ]
schedule:
- cron: '23 1 * * 1'

108
README.md
View file

@ -18,13 +18,8 @@
- [Changelog](https://github.com/ietf-tools/datatracker/blob/main/CHANGELOG.md)
- [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Git Cloning Tips](#git-cloning-tips)
- [Code Tree Overview](#code-tree-overview)
- [Adding a New Web Page](#adding-a-new-web-page)
- [Testing your work](#testing-your-work)
- [Docker Dev Environment](docker/README.md)
- [Continuous Integration](#continuous-integration)
- [Docker Dev Environment](docker/README.md)
- [Database & Assets](#database--assets)
- [Old Datatracker Branches](https://github.com/ietf-tools/old-datatracker-branches/branches/all)
- [Bootstrap 5 Upgrade](#bootstrap-5-upgrade)
@ -39,112 +34,31 @@ This project is following the standard **Git Feature Workflow** development mode
You can submit bug reports, enhancement and new feature requests in the [discussions](https://github.com/ietf-tools/datatracker/discussions) area. Accepted tickets will be converted to issues.
#### Prerequisites
- Python 3.6
- Django 2.x
- Node.js 16.x
- MariaDB 10
> See the [Docker Dev Environment](docker/README.md) section for a preconfigured docker environment.
#### Git Cloning Tips
Because of the extensive history of this project, cloning the datatracker project locally can take a long time / disk space. You can speed up the cloning process by limiting the history depth, for example:
As outlined in the [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md) guide, you will first want to create a fork of the datatracker project in your personal GitHub account before cloning it.
Because of the extensive history of this project, cloning the datatracker project locally can take a long time / disk space. You can speed up the cloning process by limiting the history depth, for example *(replace `USERNAME` with your GitHub username)*:
- To fetch only up to the 10 latest commits:
```sh
git clone --depth=10 https://github.com/ietf-tools/datatracker.git
git clone --depth=10 https://github.com/USERNAME/datatracker.git
```
- To fetch only up to a specific date:
```sh
git clone --shallow-since=DATE https://github.com/ietf-tools/datatracker.git
git clone --shallow-since=DATE https://github.com/USERNAME/datatracker.git
```
#### Code Tree Overview
#### Overview of the datatracker models
The `ietf/templates/` directory contains Django templates used to generate web pages for the datatracker, mailing list, wgcharter and other things.
A beginning of a [walkthrough of the datatracker models](https://notes.ietf.org/iab-aid-datatracker-database-overview) was prepared for the IAB AID workshop.
Most of the other `ietf` sub-directories, such as `meeting`, contain the python/Django model and view information that go with the related templates. In these directories, the key files are:
| File | Description |
|--|--|
| urls.py | binds a URL to a view, possibly selecting some data from the model. |
| models.py | has the data models for the tool area. |
| views.py | has the views for this tool area, and is where views are bound to the template. |
#### Adding a New Web Page
To add a new page to the tools, first explore the `models.py` to see if the model you need already exists. Within `models.py` are classes such as:
```python
class IETFWG(models.Model):
ACTIVE = 1
group_acronym = models.ForeignKey(Acronym, primary_key=True, unique=True, editable=False)
group_type = models.ForeignKey(WGType)
proposed_date = models.DateField(null=True, blank=True)
start_date = models.DateField(null=True, blank=True)
dormant_date = models.DateField(null=True, blank=True)
...
```
In this example, the `IETFWG` class can be used to reference various fields of the database including `group_type`. Of note here is that `group_acronym` is the `Acronym` model so fields in that model can be accessed (e.g., `group_acronym.name`).
Next, add a template for the new page in the proper sub-directory of the `ietf/templates` directory. For a simple page that iterates over one type of object, the key part of the template will look something like this:
```html
{% for wg in object_list %}
<tr>
<td><a href="{{ wg.email_archive }}">{{ wg }}</a></td>
<td>{{ wg.group_acronym.name }}</td>
</tr>
{% endfor %}
```
In this case, we're expecting `object_list` to be passed to the template from the view and expecting it to contain objects with the `IETFWG` model.
Then add a view for the template to `views.py`. A simple view might look like:
```python
def list_wgwebmail(request):
wgs = IETFWG.objects.all();
return render_to_response('mailinglists/wgwebmail_list.html', {'object_list': wgs})
```
The selects the IETFWG objects from the database and renders the template with them in object_list. The model you're using has to be explicitly imported at the top of views.py in the imports statement.
Finally, add a URL to display the view to `urls.py`. For this example, the reference to `list_wgwebmail` view is called:
```python
urlpatterns += patterns('',
...
(r'^wg/$', views.list_wgwebmail),
)
```
#### Testing your work
Assuming you have the database settings configured already, you can run the server locally with:
```sh
$ ietf/manage.py runserver localhost:<port>
```
where `<port>` is arbitrary. Then connect your web browser to `localhost:<port>` and provide the URL to see your work.
When you believe you are ready to commit your work, you should run the test suite to make sure that no tests break. You do this by running
```sh
$ ietf/manage.py test --settings=settings_sqlitetest
```
### Docker Dev Environment
#### Docker Dev Environment
In order to simplify and reduce the time required for setup, a preconfigured docker environment is available.
Read the [Docker Dev Environment](docker/README.md) guide to get started.
### Continuous Integration
*TODO*
### Database & Assets
Nightly database dumps of the datatracker are available at
@ -152,10 +66,6 @@ https://www.ietf.org/lib/dt/sprint/ietf_utf8.sql.gz
> Note that this link is provided as reference only. To update the database in your dev environment to the latest version, you should instead run the `docker/cleandb` script!
Additional data files used by the datatracker (e.g. instance drafts, charters, rfcs, agendas, minutes, etc.) are available at
https://www.ietf.org/standards/ids/internet-draft-mirror-sites/
> A script is available at `docker/scripts/app-rsync-extras.sh` to automatically fetch these resources via rsync.
---

View file

@ -10,7 +10,7 @@ from ietf.utils.urls import url
urlpatterns = [
url(r'^$', views.release),
url(r'^(?P<version>[0-9.]+.*)/$', views.release),
url(r'^about/?$', TemplateView.as_view(template_name='release/about.html')),
url(r'^about/?$', TemplateView.as_view(template_name='release/about.html'), name='releaseabout'),
url(r'^stats/?$', views.stats),
]

View file

@ -1,4 +1,4 @@
{# Copyright The IETF Trust 2007, All Rights Reserved #}
{# Copyright The IETF Trust 2007-2022, All Rights Reserved #}
{% extends "base.html" %}
{% load static %}
{% block title %}500 Internal Server Error{% endblock %}
@ -18,9 +18,9 @@
</p>
<p class="mb-0">
A failure report with details about what happened has been sent to the
server administrators. It would be helpful if you would file a bug
report with additional information at the
<a href="https://trac.ietf.org/trac/ietfdb/newticket">IETF database issue tracker</a>, too.
server administrators. It would be helpful if you would create an issue
providing additional information at
<a href="https://github.com/ietf-tools/datatracker/issues/new/choose">GitHub</a>, too.
</p>
</div>
{% endblock %}

View file

@ -19,26 +19,10 @@
to generate an API which mirrors the Django ORM (Object Relational Mapping)
for the database. Each Django model class maps down to the SQL database
tables and up to the API. The Django models classes are defined in the
<code>models.py</code> files of the datatracker:
models.py files of the datatracker. Browse the <a href="https://github.com/ietf-tools/datatracker">code tree</a>
for the models file in each app (such as <a href="https://github.com/ietf-tools/datatracker/blob/main/ietf/doc/models.py">ietf/doc/models.py</a>,
<a href="https://github.com/ietf-tools/datatracker/blob/main/ietf/group/models.py">ietf/group/models.py</a>, &hellip;).
</p>
<ul>
<li>
<a href="http://svn.ietf.org/svn/tools/ietfdb/trunk/ietf/doc/models.py">
https://svn.ietf.org/svn/tools/ietfdb/trunk/ietf/doc/models.py
</a>
</li>
<li>
<a href="http://svn.ietf.org/svn/tools/ietfdb/trunk/ietf/group/models.py">
https://svn.ietf.org/svn/tools/ietfdb/trunk/ietf/group/models.py
</a>
</li>
<li>
<a href="http://svn.ietf.org/svn/tools/ietfdb/trunk/ietf/iesg/models.py">
http://svn.ietf.org/svn/tools/ietfdb/trunk/ietf/iesg/models.py
</a>
</li>
<li>&hellip;</li>
</ul>
<p>
The API top endpoint is at
<a href="https://datatracker.ietf.org/api/v1/">https://datatracker.ietf.org/api/v1/</a>.
@ -53,8 +37,8 @@
<a href="https://datatracker.ietf.org/api/v1/group/group/">https://datatracker.ietf.org/api/v1/group/group/</a>
</li>
<li>
<a href="https://trac.ietf.org/trac/ietfdb/browser/trunk/ietf/group/models.py">
https://trac.ietf.org/trac/ietfdb/browser/trunk/ietf/group/models.py
<a href="https://github.com/ietf-tools/datatracker/blob/main/ietf/group/models.py">
ietf/group/models.py
</a>
</li>
</ul>

View file

@ -1,4 +1,4 @@
{# Copyright The IETF Trust 2015-2021, All Rights Reserved #}
{# Copyright The IETF Trust 2015-2022, All Rights Reserved #}
<!doctype html>
{% load ietf_filters static %}
{% load origin %}
@ -78,14 +78,14 @@
<a href="https://www.ietf.org/privacy-statement/" class="p-3">Privacy&nbsp;Statement</a>
<div class="small text-muted p-3">
{% if version_num %}
<a href="/release/about">About</a>
IETF Datatracker
<a href="/release/{{ version_num }}/">Version {{ version_num }}</a>
{{ revision_date }}
<a href="/release/about">About</a>
<a href="https://github.com/ietf-tools/datatracker/">IETF Datatracker<a>
<a href="/release/{{ version_num }}/">Version {{ version_num }}</a>
{{ revision_date }}
{% endif %}
Report a bug:
<a href="https://trac.ietf.org/trac/ietfdb/newticket">
Tracker
<a href="https://github.com/ietf-tools/datatracker/issues/new/choose">
GitHub
<i class="bi bi-bug"></i>
</a>
{% if bugreport_email %}
@ -152,4 +152,4 @@
});
</script>
</body>
</html>
</html>

View file

@ -1,4 +1,4 @@
{# Copyright The IETF Trust 2015-2019, All Rights Reserved #}
{# Copyright The IETF Trust 2015-2022, All Rights Reserved #}
{% load origin %}
{% origin %}
{% load ietf_filters managed_groups wg_menu active_groups_menu group_filters cache %}
@ -408,7 +408,7 @@
{% endif %}
<li>
<a class="dropdown-item {% if flavor != 'top' %}text-wrap link-primary{% endif %}"
href="https://trac.ietf.org/trac/ietfdb/newticket">
href="https://github.com/ietf-tools/datatracker/issues/new/choose">
<i class="bi bi-bug">
</i>
Report a bug

View file

@ -65,9 +65,9 @@ Optional parameters:
data-filter-item="{{ group.keyword }}">
<small>
{% if group.is_bof %}
<i>{{ group.label }}</i>
<i>{{ group.label|truncatewords:"3" }}</i>
{% else %}
{{ group.label }}
{{ group.label|truncatewords:"3" }}
{% endif %}
</small>
</button>

View file

@ -1,4 +1,4 @@
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{# Copyright The IETF Trust 2015-2022, All Rights Reserved #}
{% extends "base.html" %}
{% load origin %}
{% block title %}About the Datatracker{% endblock %}
@ -13,38 +13,22 @@
<a href="https://www.ietf.org/">www.ietf.org</a>.
</p>
<p>
All the Datatracker code is publicly available from the
<a href="https://svn.ietf.org/svn/tools/ietfdb">IETF tools SVN repository</a>.
Bug tickets and wiki notes are available from the
<a href="https://trac.ietf.org/trac/ietfdb">Issue Tracker</a>,
and
there are also
<a href="/release">release notes</a>
available since version 2.00.
The Datatracker is an open-source project, using <a href="https://github.com/ietf-tools/datatracker">GitHub</a>.
</p>
<p>
There are <a href="{% url 'releaseabout' %}">release notes</a> available since version 2.00.
</p>
<p>
Below you'll find a brief history of the datatracker development, in terms of the big
moments. For the nitty-gritty week-to-week code changes, please check the release
notes or the commit log.
</p>
<h2>Version 6.x Work</h2>
<p>
Between the release of 6.0.0 in April 2015 and the
<a href="/release/">latest release</a>
there has been numerous releases (75, as of 11 Feb 2017) which has extended the
functionality of the datatracker substantially. The
<a href="/release/#release-list">release list</a>
gives more information.
</p>
<h2>Version 6.0.0: Facelift using Bootstrap</h2>
<h2>Version 7.0.0: Django 2</h2>
<h2>Version 6.0.0: Facelift using Bootstrap3</h2>
<p>
During more than a year, from July 2013 to late 2014, <i>Lars Eggert</i> worked intensively
on a major facelift to the datatracker, porting the GUI to Bootstrap. The work
took
<a href="https://trac.ietf.org/trac/ietfdb/log/personal/lars?rev=8652&amp;stop_rev=5871&amp;limit=500">
287 separate commits
</a>,
and comprised changes to 1016 different files.
took 287 separate commits, and comprised changes to 1016 different files.
</p>
<p>
This work has turned the IETF Datatracker website into a responsive website which
@ -56,24 +40,15 @@
and continues to use the
<a href="https://www.djangoproject.org/">Django</a>
framework which the datatracker has been build on since
<a href="/release/2.00/">
version
2.00
</a>.
<a href="/release/2.00/">version 2.00</a>.
It also uses icons from
<a href="https://fontawesome.com/">FontAwesome</a>,
and functions from
<a href="https://django-bootstrap3.readthedocs.org/">django-bootstrap3</a>.
</p>
<p>
Additional
<a href="https://trac.ietf.org/trac/ietfdb/log/branch/iola?rev=9116&amp;stop_rev=8520&amp;limit=200">
page conversion work
</a>
has been done by <i>Ole Laursen</i>, with
<a href="https://trac.ietf.org/trac/ietfdb/log/personal/henrik/facelift-r9116">
final style tweaks, bug-fixes and adaptations
</a>
Additional page conversion work was performed by <i>Ole Laursen</i>, with
final style tweaks, bug-fixes and adaptations
by <i>Henrik Levkowetz</i>, giving it a distinct
<a href="https://www.colourlovers.com/palette/3702908/Key_West_Sunset">colour palette</a>
(with the addition of complementing green and red colours for success and error indications),
@ -90,49 +65,21 @@
<a href="https://en.wikipedia.org/wiki/Font#Optical_size">optical size</a>
font to go with PT Sans, it works well for headers when paired with PT Serif.)
</p>
<h2>Version 5.x Work</h2>
<h2>Version 5.0.0: Shim Removal</h2>
<p>
Between the release of 5.0.0 in January 2014 and the last release in the 5.x series in
April 2015, there were 42 releases containing bug fixes and features. Worth mentioning
were 4 code sprint releases, added support for the secretariat's agenda scheduling work,
the addition of pages for
<a href="/rg/">Research Groups</a>
and
<a href="/group/edu">Teams</a>,
a
<a href="/api/v1/?format=json">JSON interface</a>
to the
database for tool builders, improved
<a href="/ipr/">
IPR support
</a>,
a move to Django 1.7,
and many
<a href="https://trac.ietf.org/trac/ietfdb/wiki/Testing?version=13">
improvements in testing support
</a>.
At this point, the views and templates were completely adapted to the new models introduced at 4.0.0
</p>
<h2>
Version 5.0.0: Shim Removal
</h2>
<div class="alert alert-info my-3">
To be written.
</div>
<h2>
Version 4.00: New Database Schema
</h2>
<div class="alert alert-info my-3">
To be written.
</div>
<h2>
Version 3.00: Django Port of the IESG Datatracker Pages
</h2>
<div class="alert alert-info my-3">
To be written.
</div>
<h2>
Version 2.00: Django Port of the Public Datatracker Pages
</h2>
<h2>Version 4.00: New Database Schema</h2>
<p>
This release was a complete redesign of the underlying Django models. It introduced a set
of facades, referred to as a "Shim Layer", which allowed the refactor to focus only on the
models, leaving the views and templates for later adaptation.
</p>
<h2>Version 3.00: Django Port of the IESG Datatracker Pages</h2>
<p>
This release added the IESG only portions of the previous IESG tracker to the public Datatracker.
</p>
<h2>Version 2.00: Django Port of the Public Datatracker Pages</h2>
<p>
This release was a complete re-write of the CGI/Perl-based IESG datatracker
in Python, using the Django framework. It comprised about 8000 lines of
@ -145,19 +92,17 @@
to get all public pages ported and released. The release was deployed
in the early hours of 28 June 2007, and nobody noticed the change :-))
</p>
<h2>
Version 1.0: Initial Perl/MySQL database and web-pages
</h2>
<h2>Version 1.0: Initial Perl/MySQL database and web-pages</h2>
<p>
The first version of the idtracker was commissioned by the IESG under <i>Harald
Alvestrand</i> in 2001, and the IESG started using it at the beginning of 2002. It was
written by <i>Michael Lee</i> in Perl, with direct SQL statements. It provided a
major improvement in visibility of the progress of drafts by the IESG.
The first
<a href="https://www.ietf.org/proceedings/55/slides/plenary-6/plenary-6.ppt">
Alvestrand</i> in 2001, and the IESG started using it at the beginning of 2002. It was
written by <i>Michael Lee</i> in Perl, with direct SQL statements. It provided a
major improvement in visibility of the progress of drafts by the IESG.
The first
<a href="https://www.ietf.org/proceedings/55/slides/plenary-6/plenary-6.ppt">
public presentation
</a>
of it and its capabilities was made 2002-11-20
in Atlanta by Thomas Narten.
</p>
</a>
of it and its capabilities was made 2002-11-20
in Atlanta by Thomas Narten.
</p>
{% endblock %}