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

Issue 177: Dev QOL Stuff; PI Department info and forms #493

Open
wants to merge 154 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
cdab560
initial department fetching script
Hzaakk Nov 8, 2022
aa995ed
Cleaner output; using email_emailaddress
Hzaakk Nov 8, 2022
33a1026
bug fix
Hzaakk Nov 8, 2022
b9a543d
typo
Hzaakk Nov 8, 2022
741e96b
output now CSV
Hzaakk Nov 19, 2022
e21aab5
search multiple OUs
Hzaakk Nov 20, 2022
8a9f405
remove redundant code; use ldap for getting OU information
Hzaakk Nov 21, 2022
196dc58
some line wrapping
Hzaakk Nov 21, 2022
e37906f
gather multiple departmentnumbers in a list
Hzaakk Nov 21, 2022
01df7c1
fixed stuff
Hzaakk Nov 22, 2022
325f0a3
bunch of changes... debugging still to do
Hzaakk Jan 8, 2023
57908f7
Merge branch 'develop' into issue_177
Hzaakk Jan 8, 2023
101eb22
more todos...
Hzaakk Jan 8, 2023
760d9b4
pre changing directories
Hzaakk Jan 14, 2023
507b2f8
Python 3.8 and Postgres 10.23
Hzaakk Jan 14, 2023
dc7b2ff
upgraded simple-history and fixed department models.
Hzaakk Jan 14, 2023
12f5d8f
Initial form code
Hzaakk Jan 14, 2023
a129f72
initial department migration
Hzaakk Jan 14, 2023
67c3fbb
updated python and postgres versions in github actions
Hzaakk Jan 14, 2023
0fc7134
fixed python 3.6 reference
Hzaakk Jan 14, 2023
f87c3e1
added migration files
Hzaakk Jan 15, 2023
ed8f783
Cache packages separately for python 3.8
Hzaakk Jan 15, 2023
dffd5f9
Include postgres and python versions in playbook
Hzaakk Jan 15, 2023
dabc285
Merge branch 'issue_177' of https://github.com/ucb-rit/coldfront into…
Hzaakk Jan 15, 2023
1878749
Fixed project request features. Added user profile department editing…
Hzaakk Jan 30, 2023
ad0f016
renamed migration file
Hzaakk Jan 30, 2023
a17d52e
removed some BRC-specific references
Hzaakk Jan 30, 2023
c7c5f68
Current department initial selection
Hzaakk Feb 6, 2023
23d9061
fixed ldap cacheing
Hzaakk Feb 6, 2023
4789587
Merge branch 'develop' into issue_177
Hzaakk Feb 12, 2023
9bb14e8
moved utils, added verified badge, fixed bugs
Hzaakk Feb 12, 2023
77db67c
Addressed 88, fixed test settings, populate_ldap_user_departments now…
Hzaakk Feb 12, 2023
dee0497
deleted old department fetching file
Hzaakk Feb 13, 2023
1eae5ed
fixed pretime<time<posttime error due to microsecond=0
Hzaakk Feb 13, 2023
6d48b1a
one million to 999_999 for prev fix
Hzaakk Feb 13, 2023
ca82fbc
removed microsecond setting
Hzaakk Feb 20, 2023
1b2c721
fixed merge conflict for playbook.yml
Hzaakk Feb 20, 2023
6752b8f
updated migration file names
Hzaakk Feb 20, 2023
ffc604d
another attempt at fixing tests
Hzaakk Feb 20, 2023
e04bfbd
pre_time = 0, post_time = 999999
Hzaakk Feb 20, 2023
a63959a
initial testing
Hzaakk Feb 20, 2023
b613151
removed old comment
Hzaakk Feb 20, 2023
55e8cd4
Added tests for userprofile department selection
Hzaakk Feb 20, 2023
2d918f6
Added header to user/update-departments
Hzaakk Feb 21, 2023
f7c6bea
removed commented-out tasks from playbook.yml
Hzaakk Feb 21, 2023
cda4348
removed useless variable
Hzaakk Feb 21, 2023
c003879
Fixed test settings file
Hzaakk Feb 21, 2023
183192e
Postgres 10 -> 15
Hzaakk Feb 26, 2023
2ecca6e
Fixed merge conflicts
Hzaakk Feb 28, 2023
38271c3
Fixed duplicate playbook entries from merge
Hzaakk Feb 28, 2023
3af95eb
Added option to disable chmod tasks
Hzaakk Mar 1, 2023
f747bcd
Modified main.yml instructions in README
Hzaakk Mar 6, 2023
218ce14
fixed weird merge stuff
Hzaakk Mar 9, 2023
096b3d0
Merge branch 'develop' into issue_177
Hzaakk Mar 9, 2023
0a290bc
revert allocation/views.py
Hzaakk Mar 9, 2023
75e269d
SCL comments in playbook
Hzaakk Mar 13, 2023
f5847d0
refactored and added docstrings in ldap.py
Hzaakk Mar 13, 2023
f9bee4d
Addressed comments. moved stuff from user/ to department/
Hzaakk Mar 15, 2023
c532efd
Moved tests from user to department, fixed playbook indentation issue
Hzaakk Mar 15, 2023
bf62b4a
Moved template over
Hzaakk Mar 15, 2023
80c5a72
added logging for commands, renamed userprofile to user_profile
Hzaakk Mar 16, 2023
1bff12e
logging to populate_ldap_departments
Hzaakk Mar 16, 2023
8406644
--dry_run for populate_ldap_user_departments
Hzaakk Mar 16, 2023
6bed5ad
fixed --dry-run for populate_ldap_user_departments
Hzaakk Mar 17, 2023
ba3da72
addressed more comments
Hzaakk Mar 20, 2023
d076e3f
moved url from department to user
Hzaakk Mar 20, 2023
89edff6
specify non-berkeley users select other dept
Hzaakk Mar 20, 2023
a5a5b42
remade migration files
Hzaakk Mar 20, 2023
876dd61
renamed user_profile back to userprofile
Hzaakk Mar 27, 2023
17b9793
django simple history 3.2 -> 3.3
Hzaakk Mar 27, 2023
cb4f902
fixed user/urls bug
Hzaakk Mar 27, 2023
3d32809
added admin panel for department
Hzaakk Mar 27, 2023
938efeb
Clarify scl task name in playbook
Hzaakk Mar 27, 2023
918b5f0
Merge branch 'develop' into issue_177
matthew-li Apr 19, 2023
b35be93
Fix minor stylistic issues; align code style w/ rest of codebase
matthew-li Apr 19, 2023
85aaf2c
Adjust style in LDAP library
matthew-li Apr 19, 2023
cc43219
Fix straggling grammar issue
matthew-li Apr 19, 2023
f0f4ae6
resolved merge conflicts
Hzaakk May 22, 2023
e11db59
more docstrings, department_display_name, is_authoritative bug
Hzaakk May 22, 2023
d62ae4e
addressed #533
Hzaakk May 22, 2023
b4e97a3
lingering merge conflict bug
Hzaakk May 22, 2023
3e747c1
remove copying in dockerfile
Hzaakk May 22, 2023
aee7cfc
fi -> endif
Hzaakk May 22, 2023
c1acbae
fixed docker loading script, lookup LDAP before modifying departments
Hzaakk May 22, 2023
c9def3a
no longer search ldap when updating departments. fixed step number bug
Hzaakk May 22, 2023
51474a4
added historical tests for departments
Hzaakk May 22, 2023
2375f88
addressed testing #526
Hzaakk May 22, 2023
f6c9529
fixed bug with previous commit
Hzaakk May 22, 2023
762590d
cleaned code and removed update if no changes detected
Hzaakk May 23, 2023
e60871d
search ldap when opening update page. exclude and list authoritative …
Hzaakk May 23, 2023
c51065d
resolved merge conflicts with develop
Hzaakk Jan 22, 2024
2bf04d4
resolved merge conflicts with issue_399_gen
Hzaakk Jan 22, 2024
2462f89
Merge branch 'issue_399_gen' into issue_177
Hzaakk Jan 22, 2024
6e03563
removed temp ssh keys
Hzaakk Jan 22, 2024
a1084ed
fixed migrations
Hzaakk Jan 22, 2024
507b258
added command to get export departments
Hzaakk Jan 29, 2024
e823ada
Merge branch 'issue_399_gen' into issue_177
Hzaakk Jan 29, 2024
c203d14
fixed userdepartment filtering bug
Hzaakk Feb 26, 2024
20c1598
Fixed department filtering for userprofile
Hzaakk Mar 5, 2024
6fb71c1
fixed bug with prev commit
Hzaakk Mar 5, 2024
1e9fcf9
Merge branch 'develop' into issue_177
Hzaakk Mar 19, 2024
df2fa4d
added cacheing for l4 departments for populate_ldap_user_departments
Hzaakk Apr 9, 2024
7238a09
refactoring based off PR comments
Hzaakk Apr 9, 2024
40da804
Merge branch 'master' into issue_177
Hzaakk Sep 30, 2024
487fd2f
updated allocation migrations
Hzaakk Sep 30, 2024
852bdff
fixed migrations
Hzaakk Sep 30, 2024
dd9c091
Move core.departments --> plugins.ucb_departments
matthew-li Oct 15, 2024
0c5b9d5
Correct bug in fetching initial departments user is part of
matthew-li Oct 16, 2024
719cdae
* Remove references to departments in UserProfile
matthew-li Oct 16, 2024
c274597
* Define a single form for selecting non-authoritative departments
matthew-li Oct 16, 2024
8f0f384
Refactor export_data > users; show depts iff flag enabled
matthew-li Oct 16, 2024
0301904
De-dupe logic for fetching auth/non-auth depts for user into function
matthew-li Oct 16, 2024
57451c4
Add data source backends that department data may be fetched from
matthew-li Oct 29, 2024
08ac30f
Rename plugin: ucb_departments -> departments
matthew-li Oct 30, 2024
7d4dcb6
Incorporate interface into management commands; rename commands
matthew-li Nov 4, 2024
0783a0d
* Cache OU queries in CalNet LDAP backend
matthew-li Nov 4, 2024
75eba30
Incorporate interface/query functions into views
matthew-li Nov 4, 2024
3f8336e
Refine search filter for returning L4 OUs
matthew-li Nov 4, 2024
167cb7a
Remove comment about CalNet LDAP search result limit
matthew-li Nov 4, 2024
5747275
Reference User, not UserProfile, in UserDepartment
matthew-li Nov 11, 2024
5a8c957
Correct CalNet LDAP query bugs
matthew-li Nov 18, 2024
879d81c
Update tests for department update view
matthew-li Nov 18, 2024
b62b737
Move tests for update view into dedicated module
matthew-li Nov 18, 2024
001bc84
Fill in dummy data source backend to be based on first/last names
matthew-li Nov 18, 2024
6dc0cb1
Remove refactored UCB LDAP fetching code
matthew-li Nov 27, 2024
7b06c0c
Add class for updating UserDepartments; use in update view
matthew-li Nov 27, 2024
01a80d1
Add tests for update view
matthew-li Nov 27, 2024
b40b6f7
Pass Department obj, not PK, to UserDepartment creation
matthew-li Nov 27, 2024
910f360
Allow user to not be provided to form for selecting non-auth depts
matthew-li Dec 2, 2024
0ef85ac
Simplify/correct departments portion of new project request view test
matthew-li Dec 2, 2024
e0854fc
Avoid accessing not-yet-selected PI
matthew-li Dec 2, 2024
2f3b3ce
Reduce duplication of code for creating user data via util class
matthew-li Dec 2, 2024
a42831d
Allow either auth/non-auth to be set in UserDepartmentUpdater
matthew-li Dec 2, 2024
5a85a5c
Clarify that update view updates auth + non-auth
matthew-li Dec 2, 2024
0204d39
Ask for departments unless user has UserDepartments; skip slow lookup
matthew-li Dec 3, 2024
a478646
Add TransactionTestBase inheriting from TransactionTestCase
matthew-li Dec 3, 2024
97fde8f
Add a function to set auth. depts. for user to be run async w/ Django-Q
matthew-li Dec 3, 2024
fc2fc33
Fetch auth. depts. asynchronously for faster performance; update tests
matthew-li Dec 3, 2024
55b6e40
Merge branch 'develop' into issue_177
matthew-li Jan 8, 2025
2b04b95
Add django-flags condition for whether app is installed
matthew-li Jan 13, 2025
7d02316
Add plugin settings, configurable from parent app
matthew-li Jan 13, 2025
73d045c
Update how settings are referenced in plugin
matthew-li Jan 13, 2025
ccee33b
Update how settings are referenced in core
matthew-li Jan 13, 2025
2ba9787
Update YML config for configurting departments plugin
matthew-li Jan 13, 2025
5ea1a60
* Remove replaced setting
matthew-li Jan 13, 2025
fdbf4fd
Add Q_CLUSTER setting to test settings
matthew-li Jan 14, 2025
3329da1
Properly use dummy backend in tests
matthew-li Jan 14, 2025
6f1d809
Incorporate image/service for qcluster into Docker dev setup
matthew-li Jan 14, 2025
c5d1171
Clean up display of departments in profile, update view
matthew-li Jan 14, 2025
f21c855
Only display Update departments button on own profile
matthew-li Jan 14, 2025
74c2084
Roll back changes to Ansible playbook for upgrading Python
matthew-li Jan 14, 2025
d91b5fe
Remove unused YML setting
matthew-li Jan 17, 2025
bf2ce1f
Use Department object to create/update UserDepartments in command
matthew-li Jan 17, 2025
2b1d090
Fix KeyError when departments not prompted for; update func names + c…
matthew-li Feb 3, 2025
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
30 changes: 19 additions & 11 deletions bootstrap/ansible/main.copyme
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Types of Ansible tasks to run by default.
provisioning_tasks: true
common_tasks: true
chmod_tasks: true # Can be false when a Windows FS is mounted

###############################################################################
# General Settings
Expand Down Expand Up @@ -36,16 +37,15 @@ db_host: localhost
# The credentials for the database admin user.
# TODO: Replace the username and password.
db_admin_user: admin
db_admin_passwd: ''
db_admin_passwd: root

#------------------------------------------------------------------------------
# Redis settings
#------------------------------------------------------------------------------

# The password for Redis.
# TODO: Replace the password.
redis_passwd: ''

redis_passwd: root
redis_host: localhost

#------------------------------------------------------------------------------
Expand Down Expand Up @@ -123,7 +123,7 @@ cilogon_app_secret: ""
# Django Flags settings
#------------------------------------------------------------------------------

# # Note: Use uppercase True/False so that Python interprets these as booleans.
# Note: Use uppercase True/False so that Python interprets these as booleans.

# TODO: For LRC, disable link login.
flag_basic_auth_enabled: False
Expand All @@ -149,6 +149,15 @@ flag_mou_generation_enabled: False
# Whether to include a survey as part of the allowance renewal request process.
flag_renewal_survey_enabled: True

#------------------------------------------------------------------------------
# Plugin: departments
#------------------------------------------------------------------------------

# TODO: Enable for BRC, disable for LRC.
plugin_departments_enabled: true
plugin_departments_department_display_name: "Department"
plugin_departments_department_data_source: "coldfront.plugins.departments.utils.data_sources.backends.calnet_ldap.CalNetLdapDataSourceBackend"

#------------------------------------------------------------------------------
# User-facing strings
#------------------------------------------------------------------------------
Expand All @@ -167,6 +176,8 @@ center_user_guide: "https://docs-research-it.berkeley.edu/services/high-performa
center_login_guide: "https://docs-research-it.berkeley.edu/services/high-performance-computing/user-guide/logging-brc-clusters/#Logging-in"
# TODO: For MyLRC, use "[email protected]".
center_help_email: "[email protected]"
# TODO: For MyLRC, use "Division".
department_display_name: "Department"

#------------------------------------------------------------------------------
# BRC Vector settings
Expand Down Expand Up @@ -421,16 +432,13 @@ sentry_dsn: ""
# # Email settings.
# email_host: localhost
# email_port: 1025
# # TODO: Set these addresses to yours.
# from_email: [email protected]
# admin_email: [email protected]
# from_email: [email protected]
# admin_email: [email protected]
# # TODO: For LRC, use the substring 'MyLRC'.
# email_subject_prefix: '[MyBRC-User-Portal]'

# # A list of admin email addresses to be notified about new requests and other
# # events.
# # TODO: Set these addresses to yours.
# email_admin_list: ['[email protected]']
# email_admin_list: ['[email protected]']
# # A list of email addresses to CC when certain requests are processed.
# # TODO: Set these addresses to yours.
# request_approval_cc_list: ['[email protected]']
# request_approval_cc_list: ['[email protected]']
8 changes: 7 additions & 1 deletion bootstrap/ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
cwd: "{{ lookup('env', 'PWD') }} "
provisioning_tasks: true
common_tasks: true

python_version: 3.6
postgres_version: 15
python_version_dotless: "{{ python_version | regex_replace('\\.','') }}"
Expand Down Expand Up @@ -61,6 +60,9 @@
name: https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm
state: present

# The SCL role runs many tasks when it's included, so having it do
# everything in one run would be ideal to not have redundant tasks.

- name: Install SCL
Hzaakk marked this conversation as resolved.
Show resolved Hide resolved
include_role:
role: smbambling.scl
Expand Down Expand Up @@ -648,6 +650,8 @@
requirements: "{{ git_prefix }}/{{ reponame }}/requirements.txt"
executable: "{{ git_prefix }}/venv/bin/pip3"
become_user: "{{ djangooperator }}"
environment: # needed as pg_config isn't in PATH by default
PATH: "{{ ansible_env.PATH }}:/usr/pgsql-{{ postgres_version }}/bin"

# Run Django management commands.

Expand Down Expand Up @@ -731,6 +735,7 @@
state: directory
mode: 0755
group: apache
when: chmod_tasks

- name: Grant Apache recursive read access to the application directory
file:
Expand All @@ -739,6 +744,7 @@
recurse: true
mode: "u=rwX,g=rX,o=rX"
group: apache
when: chmod_tasks

# Gracefully restart Apache so that processes handle current requests
# before being replaced by a new process.
Expand Down
16 changes: 15 additions & 1 deletion bootstrap/ansible/settings_template.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CENTER_BASE_URL = '{{ full_host_path }}'
CENTER_HELP_URL = CENTER_BASE_URL + '/help'
CENTER_PROJECT_RENEWAL_HELP_URL = CENTER_BASE_URL + '/help'

EMAIL_HOST = '{{ email_host}}'
EMAIL_HOST = '{{ email_host }}'
EMAIL_PORT = {{ email_port }}
EMAIL_SUBJECT_PREFIX = '{{ email_subject_prefix }}'
# A list of admin email addresses to be notified about new requests and other
Expand Down Expand Up @@ -298,6 +298,7 @@ FLAGS = {
'SECURE_DIRS_REQUESTABLE': [{'condition': 'boolean', 'value': {{ flag_brc_enabled }}}],
'SERVICE_UNITS_PURCHASABLE': [{'condition': 'boolean', 'value': {{ flag_brc_enabled }}}],
'SSO_ENABLED': [{'condition': 'boolean', 'value': {{ flag_sso_enabled }}}],
'USER_DEPARTMENTS_ENABLED': [{'condition': 'app installed', 'value': 'coldfront.plugins.departments'}],
'MOU_GENERATION_ENABLED': [{'condition': 'boolean', 'value': {{ flag_mou_generation_enabled }}}],
'RENEWAL_SURVEY_ENABLED': [{'condition': 'boolean', 'value': {{ flag_renewal_survey_enabled }}}],
}
Expand All @@ -318,6 +319,19 @@ if (not FLAGS['SSO_ENABLED'][0]['value'] and
'LINK_LOGIN_ENABLED should only be enabled when SSO_ENABLED is '
'enabled.')

{% if plugin_departments_enabled is defined and plugin_departments_enabled | bool %}
#------------------------------------------------------------------------------
# Plugin: departments
#------------------------------------------------------------------------------

EXTRA_EXTRA_APPS += [
'coldfront.plugins.departments'
]

DEPARTMENTS_DEPARTMENT_DISPLAY_NAME = '{{ plugin_departments_department_display_name }}'
DEPARTMENTS_DEPARTMENT_DATA_SOURCE = '{{ plugin_departments_department_data_source }}'
{% endif %}

{% if file_storage_backend == 'google_drive' %}
#------------------------------------------------------------------------------
# django-googledrive-storage settings
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/development/docker-legacy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
- 6379:6379
volumes:
- redis_data:/data
command: --requirepass ${REDIS_PASSWORD}
command: --requirepass "${REDIS_PASSWORD}"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ echo MODIFYING PERMISSIONS...
docker exec -i coldfront-db-1 \
psql -U $DB_OWNER -c "ALTER SCHEMA public OWNER TO $DB_OWNER;" $DB_NAME

echo DONE.
echo DONE.
4 changes: 4 additions & 0 deletions bootstrap/development/docker/config/brc_defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ flag_lrc_enabled: False
flag_next_period_renewal_requestable_month: 5
flag_multiple_email_addresses_allowed: False

plugin_departments_enabled: true
plugin_departments_department_display_name: "Department"
plugin_departments_department_data_source: "coldfront.plugins.departments.utils.data_sources.backends.calnet_ldap.CalNetLdapDataSourceBackend"

portal_name: MyBRC
program_name_long: Berkeley Research Computing
program_name_short: BRC
Expand Down
4 changes: 4 additions & 0 deletions bootstrap/development/docker/config/lrc_defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ flag_lrc_enabled: True
flag_next_period_renewal_requestable_month: 9
flag_multiple_email_addresses_allowed: False

plugin_departments_enabled: false
plugin_departments_department_display_name: "Division"
plugin_departments_department_data_source: "coldfront.plugins.departments.utils.data_sources.backends.dummy.DummyDataSourceBackend"

portal_name: MyLRC
program_name_long: Laboratory Research Computing
program_name_short: LRC
Expand Down
5 changes: 5 additions & 0 deletions bootstrap/development/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ services:
volumes:
- ../../..:/var/www/coldfront_app/coldfront

qcluster:
image: coldfront-qcluster
volumes:
- ../../..:/var/www/coldfront_app/coldfront

volumes:
db-postgres:
external: false
Expand Down
3 changes: 3 additions & 0 deletions bootstrap/development/docker/images/qcluster.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM coldfront-app-base

CMD ["python3", "manage.py", "qcluster"]
1 change: 1 addition & 0 deletions bootstrap/development/docker/scripts/build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ docker build -f bootstrap/development/docker/images/app-shell.Dockerfile -t cold
docker build -f bootstrap/development/docker/images/web.Dockerfile -t coldfront-web .
docker build -f bootstrap/development/docker/images/email-server.Dockerfile -t coldfront-email-server .
docker build -f bootstrap/development/docker/images/db-postgres-shell.Dockerfile -t coldfront-db-postgres-shell .
docker build -f bootstrap/development/docker/images/qcluster.Dockerfile -t coldfront-qcluster .
18 changes: 8 additions & 10 deletions bootstrap/development/docs/vagrant-vm-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@ The application may be installed within a Vagrant VM that is running on Scientif
# This produces two lines: condense them into one.
openssl rand -base64 64
```
8. Customize `main.yml`. In particular, uncomment everything under the `dev_settings` section, and fill in the below variables. Note that quotes need not be provided, except in the list variable.
```
django_secret_key: secret_key_from_previous_step
db_admin_passwd: password_here
redis_passwd: password_here
from_email: [email protected]
admin_email: [email protected]
email_admin_list: ["[email protected]"]
request_approval_cc_list: ["[email protected]"]
```
8. In `main.yml`, uncomment everything under the dev_settings section,
and customize the following variables with your own values.
```
django_secret_key: secret_key_from_previous_step
chmod_tasks: true # Can be false when a Windows FS is mounted
db_admin_passwd: root
redis_passwd: root
```
9. Provision the VM. This should run the Ansible playbook. Expect this to take a few minutes on the first run.
```
vagrant up
Expand Down
1 change: 1 addition & 0 deletions coldfront/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
INSTALLED_APPS += [
'coldfront.core.user',
'coldfront.core.field_of_science',
# 'coldfront.core.department',
'coldfront.core.utils',
'coldfront.core.portal',
'coldfront.core.project',
Expand Down
20 changes: 20 additions & 0 deletions coldfront/config/test_settings.py.sample
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,26 @@ FLAGS = {
'SECURE_DIRS_REQUESTABLE': [{'condition': 'boolean', 'value': True}],
'SERVICE_UNITS_PURCHASABLE': [{'condition': 'boolean', 'value': True}],
'SSO_ENABLED': [{'condition': 'boolean', 'value': False}],
'USER_DEPARTMENTS_ENABLED': [{'condition': 'app installed', 'value': 'coldfront.plugins.departments'}],
'MOU_GENERATION_ENABLED': [{'condition': 'boolean', 'value': False}],
'RENEWAL_SURVEY_ENABLED': [{'condition': 'boolean', 'value': True}],
}

#------------------------------------------------------------------------------
# Plugin: departments
#------------------------------------------------------------------------------

EXTRA_EXTRA_APPS += [
'coldfront.plugins.departments'
]

DEPARTMENTS_DEPARTMENT_DISPLAY_NAME = 'Department'
DEPARTMENTS_DEPARTMENT_DATA_SOURCE = 'coldfront.plugins.departments.utils.data_sources.backends.dummy.DummyDataSourceBackend'

#------------------------------------------------------------------------------
# django-q settings
#------------------------------------------------------------------------------

Q_CLUSTER = {
'sync': True,
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from django import forms
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ImproperlyConfigured
from django.core.validators import MaxValueValidator
from django.core.validators import MinLengthValidator
from django.core.validators import MinValueValidator
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{% extends "common/base.html" %}
{% load feature_flags %}
{% load crispy_forms_tags %}
{% load common_tags %}
{% load static %}


{% block title %}
{{ PRIMARY_CLUSTER_NAME }} Project Request - PI {% settings_value 'DEPARTMENTS_DEPARTMENT_DISPLAY_NAME' %}
{% endblock %}


{% block head %}
{{ wizard.form.media }}
{% endblock %}


{% block content %}
<script type="text/javascript" src="{% static 'common/js/leave_form_alert.js' %}"></script>
<script type='text/javascript' src="{% static 'selectize/selectize.min.js' %}"></script>
<link rel='stylesheet' type='text/css' href="{% static 'selectize/selectize.bootstrap3.css' %}"/>

<h1>{{ PRIMARY_CLUSTER_NAME }}: Principal Investigator</h1><hr>

<ol class="breadcrumb">
<li>Allowance: {{ computing_allowance.name }}</li>
<li>&nbsp;<i class="fas fa-angle-double-right"></i>&nbsp;</li>
<li>Allocation Period: {{ allocation_period.name }}</li>
<li>&nbsp;<i class="fas fa-angle-double-right"></i>&nbsp;</li>
<li>{{ breadcrumb_pi }}</li>
</ol>
Hzaakk marked this conversation as resolved.
Show resolved Hide resolved

{% settings_value 'DEPARTMENTS_DEPARTMENT_DISPLAY_NAME' as department_display_name %}
<p>Select one or more {{ department_display_name | lower }}s for the Principal Investigator of the project. You may search for the {{ department_display_name | lower }}(s) in the selection field.</p>
<p>
{% flag_enabled 'BRC_ONLY' as brc_only %}
{% if brc_only %} Non-Berkeley {% else %} Non-Lab {% endif %}
users should select "Other".</p>

<form action="" method="post">
{% csrf_token %}
<table>
{{ wizard.management_form }}
{% if wizard.form.forms %}
{{ wizard.form.management_form }}
{% for form in wizard.form.forms %}
{{ form|crispy }}
{% endfor %}
{% else %}
{{ wizard.form|crispy }}
{% endif %}
</table>
{% if wizard.steps.prev %}
<button
class="btn btn-secondary"
formnovalidate="formnovalidate"
name="wizard_goto_step"
type="submit"
value="{{ wizard.steps.first }}">
First Step
</button>
<button
class="btn btn-secondary"
formnovalidate="formnovalidate"
name="wizard_goto_step"
type="submit"
value="{{ wizard.steps.prev }}">
Previous Step
</button>
{% endif %}
<input class="btn btn-primary" type="submit" value="Next Step"/>
</form>
<br>

<p>Step {{ wizard.steps.step1 }} of {{ wizard.steps.count }}</p>

<script>
$('select').selectize({
create: false,
sortField: 'text'
})
</script>

{% endblock %}
Loading