forked from coldfront/coldfront
-
Notifications
You must be signed in to change notification settings - Fork 3
feat: refactor project join tracking into generic tracking framework #702
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
Open
helbashandy
wants to merge
4
commits into
upgrade/rocky8-python3.13-develop
Choose a base branch
from
issue_668_progress_tracker_tests_protocol
base: upgrade/rocky8-python3.13-develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| [run] | ||
| source = coldfront | ||
| omit = | ||
| */migrations/* | ||
| */tests/* | ||
| */venv/* | ||
| */env/* | ||
| manage.py | ||
| */settings/* | ||
| */config/* | ||
| */__pycache__/* | ||
| */static/* | ||
| */media/* | ||
|
|
||
| [report] | ||
| exclude_lines = | ||
| pragma: no cover | ||
| def __repr__ | ||
| if self.debug: | ||
| if settings.DEBUG | ||
| raise AssertionError | ||
| raise NotImplementedError | ||
| if 0: | ||
| if __name__ == .__main__.: | ||
| class .*\bProtocol\): | ||
| @(abc\.)?abstractmethod | ||
|
|
||
| [html] | ||
| directory = htmlcov | ||
| title = ColdFront Test Coverage Report | ||
|
|
||
| [xml] | ||
| output = coverage.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| from .settings import * | ||
|
|
||
| # Override the DATABASES setting to use SQLite in-memory database | ||
| DATABASES = { | ||
| 'default': { | ||
| 'ENGINE': 'django.db.backends.sqlite3', | ||
| 'NAME': ':memory:' | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,12 @@ | ||
| import os | ||
|
|
||
| # Define variables that local_settings.py expects before importing | ||
| EXTRA_EXTRA_APPS = [] | ||
| EXTRA_EXTRA_MIDDLEWARE = [] | ||
| STREAM_LOGS_TO_STDOUT = False | ||
| CILOGON_APP_CLIENT_ID = '' | ||
| CILOGON_APP_SECRET = '' | ||
|
|
||
| # SECURITY WARNING: don't run with debug turned on in production! | ||
| DEBUG = True | ||
|
|
||
|
|
@@ -56,18 +63,13 @@ DATABASES = { | |
| LOG_PATH = '/var/log/user_portals/cf_mybrc/cf_mybrc_portal.log' | ||
| API_LOG_PATH = '/var/log/user_portals/cf_mybrc/cf_mybrc_api.log' | ||
|
|
||
| STREAM_LOGS_TO_STDOUT = False | ||
|
|
||
| # A list of admin email addresses to CC when certain requests are approved. | ||
| REQUEST_APPROVAL_CC_LIST = ['[email protected]'] | ||
| # A list of admin email addresses to notify when a project-user removal request | ||
| # is processed. | ||
| PROJECT_USER_REMOVAL_REQUEST_PROCESSED_EMAIL_ADMIN_LIST = ['[email protected]'] | ||
|
|
||
| # Extra apps to be included. | ||
| EXTRA_EXTRA_APPS = [] | ||
| # Extra middleware to be included. | ||
| EXTRA_EXTRA_MIDDLEWARE = [] | ||
| # Additional extra apps and middleware are added below | ||
|
|
||
| #------------------------------------------------------------------------------ | ||
| # Django Cache settings | ||
|
|
@@ -134,8 +136,7 @@ SESSION_COOKIE_SECURE = False | |
| # Django All-Auth settings | ||
| #------------------------------------------------------------------------------ | ||
|
|
||
| CILOGON_APP_CLIENT_ID = '' | ||
| CILOGON_APP_SECRET = '' | ||
| # CILOGON_APP_CLIENT_ID and CILOGON_APP_SECRET are defined above before imports | ||
|
|
||
| #------------------------------------------------------------------------------ | ||
| # django debug toolbar settings | ||
|
|
@@ -170,9 +171,7 @@ FLAGS = { | |
| # Plugin: departments | ||
| #------------------------------------------------------------------------------ | ||
|
|
||
| EXTRA_EXTRA_APPS += [ | ||
| 'coldfront.plugins.departments' | ||
| ] | ||
| EXTRA_EXTRA_APPS.append('coldfront.plugins.departments') | ||
|
|
||
| DEPARTMENTS_DEPARTMENT_DISPLAY_NAME = 'Department' | ||
| DEPARTMENTS_DEPARTMENT_DATA_SOURCE = 'coldfront.plugins.departments.utils.data_sources.backends.dummy.DummyDataSourceBackend' | ||
|
|
@@ -181,9 +180,7 @@ DEPARTMENTS_DEPARTMENT_DATA_SOURCE = 'coldfront.plugins.departments.utils.data_s | |
| # Plugin: hardware_procurements | ||
| #------------------------------------------------------------------------------ | ||
|
|
||
| EXTRA_EXTRA_APPS += [ | ||
| 'coldfront.plugins.hardware_procurements' | ||
| ] | ||
| EXTRA_EXTRA_APPS.append('coldfront.plugins.hardware_procurements') | ||
|
|
||
| HARDWARE_PROCUREMENTS_CONFIG = { | ||
| 'DATA_SOURCE': 'coldfront.plugins.hardware_procurements.utils.data_sources.backends.dummy.DummyDataSourceBackend', | ||
|
|
@@ -199,3 +196,6 @@ Q_CLUSTER = { | |
| 'sync': True, | ||
| 'timeout': 24 * 60 * 60, | ||
| } | ||
|
|
||
| # Now import base settings after defining all required variables | ||
| from .settings import * | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
coldfront/core/portal/templates/portal/decommission_entry_detail.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| {% extends "common/base.html" %} | ||
| {% load static %} | ||
| {% load portal_tags %} | ||
|
|
||
| {% block title %}Condo Allocation Entry Detail{% endblock %} | ||
|
|
||
| {% block content %} | ||
| <div class="container my-4"> | ||
| <h1>Condo Allocation Entry Detail</h1> | ||
| <hr> | ||
| <div class="card"> | ||
| <div class="card-body"> | ||
| {% for col in decommission_detail_columns %} | ||
| <div class="row mb-2"> | ||
| <div class="col-sm-4 font-weight-bold">{{ col }}:</div> | ||
| <div class="col-sm-8">{{ alert.record|get_item:col }}</div> | ||
| </div> | ||
| {% endfor %} | ||
| </div> | ||
| </div> | ||
| <a href="{% url 'decommission_details' %}" class="btn btn-primary mt-3">Back to Decommission Alerts</a> | ||
| </div> | ||
| {% endblock %} | ||
22 changes: 22 additions & 0 deletions
22
coldfront/core/portal/templates/portal/progress_modal.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <!--Import the progress tracker --> | ||
|
|
||
| <div class="modal fade" id="progressModal{{ project.pk }}" tabindex="-1" role="dialog" aria-labelledby="progressModalLabel{{ project.pk }}" aria-hidden="true"> | ||
| <div class="modal-dialog modal-lg" role="document"> | ||
| <div class="modal-content"> | ||
| <div class="modal-header"> | ||
| <h5 class="modal-title" id="progressModalLabel{{ project.pk }}">Join Request Progress for {{ project.name }}</h5> | ||
| <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||
| <span aria-hidden="true">×</span> | ||
| </button> | ||
| </div> | ||
| <div class="modal-body"> | ||
| {% include "progress_tracker.html" with steps=project.progress_steps %} | ||
| </div> | ||
| <pre>{{ project.progress_steps|safe }}</pre> | ||
|
|
||
| <div class="modal-footer"> | ||
| <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks to be a stale file from a previous PR.