From 515dbedbc918d9c15c732a9a5f8db7157f49b746 Mon Sep 17 00:00:00 2001
From: Jennifer Richards
Date: Tue, 15 Mar 2022 10:29:33 -0300
Subject: [PATCH] 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
* 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
Co-authored-by: Nicolas Giard
Co-authored-by: Robert Sparks
Co-authored-by: Jim Fenton
---
.github/ISSUE_TEMPLATE/config.yml | 8 ++
.github/ISSUE_TEMPLATE/report-a-bug.yml | 34 ++++++
.github/workflows/codeql-analysis.yml | 4 +-
README.md | 108 ++-----------------
ietf/release/urls.py | 2 +-
ietf/templates/500.html | 8 +-
ietf/templates/api/index.html | 26 +----
ietf/templates/base.html | 16 +--
ietf/templates/base/menu.html | 4 +-
ietf/templates/meeting/agenda_filter.html | 4 +-
ietf/templates/release/about.html | 123 ++++++----------------
11 files changed, 109 insertions(+), 228 deletions(-)
create mode 100644 .github/ISSUE_TEMPLATE/config.yml
create mode 100644 .github/ISSUE_TEMPLATE/report-a-bug.yml
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 000000000..c0f7ffdca
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -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.
diff --git a/.github/ISSUE_TEMPLATE/report-a-bug.yml b/.github/ISSUE_TEMPLATE/report-a-bug.yml
new file mode 100644
index 000000000..d911d8e2e
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/report-a-bug.yml
@@ -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
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 0b7bb0566..2ed7034d6 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -3,8 +3,8 @@ name: CodeQL Analysis
on:
# push:
# branches: [ main ]
- pull_request:
- branches: [ main ]
+ # pull_request:
+ # branches: [ main ]
schedule:
- cron: '23 1 * * 1'
diff --git a/README.md b/README.md
index f4580904a..e1e999846 100644
--- a/README.md
+++ b/README.md
@@ -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 %}
-
-{{ wg }} |
-{{ wg.group_acronym.name }} |
-
-{% 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:
- ```
-where `` is arbitrary. Then connect your web browser to `localhost:` 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.
---
diff --git a/ietf/release/urls.py b/ietf/release/urls.py
index 0053d9f2c..994f41190 100644
--- a/ietf/release/urls.py
+++ b/ietf/release/urls.py
@@ -10,7 +10,7 @@ from ietf.utils.urls import url
urlpatterns = [
url(r'^$', views.release),
url(r'^(?P[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),
]
diff --git a/ietf/templates/500.html b/ietf/templates/500.html
index 4fa7c0804..ea7b4b714 100644
--- a/ietf/templates/500.html
+++ b/ietf/templates/500.html
@@ -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 @@
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
- IETF database issue tracker, too.
+ server administrators. It would be helpful if you would create an issue
+ providing additional information at
+ GitHub, too.
{% endblock %}
\ No newline at end of file
diff --git a/ietf/templates/api/index.html b/ietf/templates/api/index.html
index 299d700e8..ba3401115 100644
--- a/ietf/templates/api/index.html
+++ b/ietf/templates/api/index.html
@@ -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
- models.py
files of the datatracker:
+ models.py files of the datatracker. Browse the code tree
+ for the models file in each app (such as ietf/doc/models.py,
+ ietf/group/models.py, …).
-
The API top endpoint is at
https://datatracker.ietf.org/api/v1/.
@@ -53,8 +37,8 @@
https://datatracker.ietf.org/api/v1/group/group/
-
- https://trac.ietf.org/trac/ietfdb/browser/trunk/ietf/group/models.py
+
+ ietf/group/models.py
diff --git a/ietf/templates/base.html b/ietf/templates/base.html
index 5824f80e6..bc466b057 100644
--- a/ietf/templates/base.html
+++ b/ietf/templates/base.html
@@ -1,4 +1,4 @@
-{# Copyright The IETF Trust 2015-2021, All Rights Reserved #}
+{# Copyright The IETF Trust 2015-2022, All Rights Reserved #}
{% load ietf_filters static %}
{% load origin %}
@@ -78,14 +78,14 @@
Privacy Statement
{% if version_num %}
-
About
- IETF Datatracker
-
Version {{ version_num }}
- {{ revision_date }}
+
About
+
IETF Datatracker
+ Version {{ version_num }}
+ {{ revision_date }}
{% endif %}
Report a bug:
-
- Tracker
+
+ GitHub
{% if bugreport_email %}
@@ -152,4 +152,4 @@
});