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

Changed color of button on "create tag" page to improve accessibility. #29

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ffcdbed
Add procps to the image to be able to run ps.
cmeiklejohn Sep 15, 2020
1e701b3
Add procps to lower base image.
cmeiklejohn Sep 15, 2020
be0b3a4
Switch to development configuration from production.
cmeiklejohn Sep 15, 2020
f063567
Enable debug for Django in the development environment.
cmeiklejohn Sep 15, 2020
97320de
Start unicorn with the reload flag.
cmeiklejohn Sep 15, 2020
3998241
Switch to development environment and enable reload flag.
cmeiklejohn Sep 15, 2020
d710add
Disable manifest storage.
cmeiklejohn Sep 15, 2020
3caba71
Add new compose file.
cmeiklejohn Sep 15, 2020
3a5151a
Fix css path.
cmeiklejohn Sep 17, 2020
1303125
Don't link, copy.
cmeiklejohn Sep 17, 2020
13b4d5d
Add README.
cmeiklejohn Sep 17, 2020
b59b8d9
Update README.md
cmeiklejohn Sep 17, 2020
899cca2
Update README.md
clegoues Sep 18, 2020
1a1b00c
Update README.md
clegoues Sep 18, 2020
d1394c1
Merge CMU-313 Fall 2020 with Mayan v4.0.7
rohanpadhye Aug 24, 2021
99db57f
Add expect script for programattic credential management
rohanpadhye Aug 24, 2021
6f2295d
updating button to be darker for accessibility
allisonchang Sep 10, 2021
41dbf64
Revert "updating button to be darker for accessibility"
allisonchang Sep 10, 2021
3e2d410
changing button color to black to improve accessibility
allisonchang Sep 10, 2021
31fb421
CI
rohanpadhye Sep 15, 2021
f656b2a
README: Add build badge
rohanpadhye Sep 16, 2021
12c97a9
Pin jsonschema version to avoid swagger bugs
rohanpadhye Nov 9, 2021
27972ab
Requirements: Fix jsonschema again
rohanpadhye Nov 9, 2021
a3200ae
Merge branch 'CMU-313:master' into master
allisonchang Nov 12, 2021
4b1e25d
Add cache action to build.yml file
allisonchang Nov 12, 2021
50f6abc
test
allisonchang Nov 19, 2021
6a1f6ec
test2
allisonchang Nov 19, 2021
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
55 changes: 55 additions & 0 deletions .github/changepassword.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/expect -f
#
# This Expect script was generated by autoexpect on Tue Aug 24 19:02:13 2021
# Expect and autoexpect were both written by Don Libes, NIST.
#
# Note that autoexpect does not guarantee a working script. It
# necessarily has to guess about certain things. Two reasons a script
# might fail are:
#
# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
# etc.) and devices discard or ignore keystrokes that arrive "too
# quickly" after prompts. If you find your new script hanging up at
# one spot, try adding a short sleep just before the previous send.
# Setting "force_conservative" to 1 (see below) makes Expect do this
# automatically - pausing briefly before sending each character. This
# pacifies every program I know of. The -c flag makes the script do
# this in the first place. The -C flag allows you to define a
# character to toggle this mode off and on.

set force_conservative 0 ;# set to 1 to force conservative mode even if
;# script wasn't run conservatively originally
if {$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s -- $arg
}
}

#
# 2) differing output - Some programs produce different output each time
# they run. The "date" command is an obvious example. Another is
# ftp, if it produces throughput statistics at the end of a file
# transfer. If this causes a problem, delete these patterns or replace
# them with wildcards. An alternative is to use the -p flag (for
# "prompt") which makes Expect only look for the last line of output
# (i.e., the prompt). The -P flag allows you to define a character to
# toggle this mode off and on.
#
# Read the man page for more info.
#
# -Don


set timeout -1
spawn /opt/mayan-edms/bin/mayan-edms.py changepassword admin
match_max 100000
expect -exact "Changing password for user 'admin'\r
Password: "
send -- "cmu-313-mayan\r"
expect -exact "\r
Password (again): "
send -- "cmu-313-mayan\r"
expect eof

25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: make docker-build
- name: Run tests
run: make docker-runtest-all
- name: Mypy Check
# You may pin to the exact commit or the version.
# uses: jpetrucciani/mypy-check@e4de43b8ca2e83e7cc9caac4ecddcd2b8f947b7e
uses: jpetrucciani/mypy-check@0.910
with:
# File or directory to run mypy on
path: '.'
18 changes: 18 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Mypy

on: [push]

jobs:
build:
runs-on: ubuntu-latest
name: Mypy
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Dependencies
run: |
pip install mypy
- uses: jpetrucciani/mypy-check@master
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ docs/_templates/layout.html
docs/_templates/footer.html
gitlab-ci-volume/
.DS_Store
data/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Build](https://github.com/rohanpadhye/Mayan-EDMS/actions/workflows/build.yml/badge.svg)](https://github.com/rohanpadhye/Mayan-EDMS/actions/workflows/build.yml)
[![pypi][pypi]][pypi-url]
![python][python]
![license][license]
Expand All @@ -9,6 +10,7 @@
[![Donation](https://img.shields.io/badge/donation-PayPal-brightgreen)](https://paypal.me/MayanEDMS)



[pypi]: https://img.shields.io/pypi/v/mayan-edms.svg
[pypi-url]: https://pypi.org/project/mayan-edms/

Expand Down
5 changes: 4 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
exiftool \
expect \
fonts-arphic-uming \
fonts-arphic-ukai \
fonts-unfonts-core \
Expand All @@ -49,6 +50,7 @@ apt-get update \
libmagic1 \
libmariadb3 \
libpq5 \
procps \
poppler-utils \
python3-distutils \
sane-utils \
Expand Down Expand Up @@ -124,6 +126,7 @@ apt-get install -y --no-install-recommends \
python3-dev \
python3-venv \
zlib1g-dev \
procps \
&& mkdir -p "${PROJECT_INSTALL_DIR}" \
&& chown -R mayan:mayan "${PROJECT_INSTALL_DIR}" \
&& chown -R mayan:mayan /src
Expand Down Expand Up @@ -156,7 +159,7 @@ RUN set -a \
&& pip install --no-cache-dir dist/mayan_edms-*.whl \
# Install the static content.
&& mayan-edms.py installdependencies \
&& MAYAN_STATIC_ROOT=${PROJECT_INSTALL_DIR}static mayan-edms.py preparestatic --link --noinput
&& MAYAN_STATIC_ROOT=${PROJECT_INSTALL_DIR}static mayan-edms.py preparestatic --noinput

COPY --chown=mayan:mayan requirements/testing-base.txt "${PROJECT_INSTALL_DIR}"

Expand Down
16 changes: 7 additions & 9 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ x-mayan-container:
# Enable to use RabbitMQ
# MAYAN_CELERY_BROKER_URL: amqp://${MAYAN_RABBITMQ_USER:-mayan}:${MAYAN_RABBITMQ_PASSWORD:-mayanrabbitpass}@rabbitmq:5672/${MAYAN_RABBITMQ_VHOST:-mayan}
# To use RabbitMQ as broker, disable Redis as broker
PYTHONDONTWRITEBYTECODE: 1
MAYAN_CELERY_BROKER_URL: redis://:${MAYAN_REDIS_PASSWORD:-mayanredispassword}@redis:6379/0
MAYAN_CELERY_RESULT_BACKEND: redis://:${MAYAN_REDIS_PASSWORD:-mayanredispassword}@redis:6379/1
MAYAN_DATABASES: "{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'${MAYAN_DATABASE_NAME:-mayan}','PASSWORD':'${MAYAN_DATABASE_PASSWORD:-mayandbpass}','USER':'${MAYAN_DATABASE_USER:-mayan}','HOST':'${MAYAN_DATABASE_HOST:-postgresql}'}}"
Expand All @@ -20,12 +21,14 @@ x-mayan-container:
MAYAN_LOCK_MANAGER_BACKEND_ARGUMENTS: "{'redis_url':'redis://:${MAYAN_REDIS_PASSWORD:-mayanredispassword}@redis:6379/2'}"
# Replace with the line below when using RabbitMQ
# MAYAN_DOCKER_WAIT: "${MAYAN_DATABASE_HOST:-postgresql}:5432 redis:6379 rabbitmq:5672"
image: ${MAYAN_DOCKER_IMAGE_NAME:-mayanedms/mayanedms}:${MAYAN_DOCKER_IMAGE_TAG:-s4.0}
image: ${MAYAN_DOCKER_IMAGE_NAME:-mayanedms/mayanedms}:${MAYAN_DOCKER_IMAGE_TAG:-4.0.7}
networks:
- bridge
restart: unless-stopped
volumes:
- ${MAYAN_APP_VOLUME:-app}:/var/lib/mayan
- ${PWD}/data/app:/var/lib/mayan
- ${PWD}/mayan/apps/appearance/static/appearance/css:/opt/mayan-edms/static/appearance/css
- ${PWD}/mayan:/opt/mayan-edms/lib/python3.7/site-packages/mayan
# Optional volumes to access external data like staging or watch folders
# - /opt/staging_files:/staging_files
# - /opt/watch_folder:/watch_folder
Expand All @@ -37,11 +40,6 @@ networks:
services:
app:
<<: *mayan-container
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=Host(`www.example.com`)" # Replace this with your published URL
- "traefik.http.routers.mayan.rule=Host(`mayan.app`)"
- "traefik.http.routers.mayan.entrypoints=web"
ports:
- "80:8000"

Expand Down Expand Up @@ -72,7 +70,7 @@ services:
# - "5432:5432"
restart: unless-stopped
volumes:
- ${MAYAN_POSTGRES_VOLUME:-postgres}:/var/lib/postgresql/data
- ${PWD}/data/postgres:/var/lib/postgresql/data

redis:
command:
Expand All @@ -98,7 +96,7 @@ services:
- bridge
restart: unless-stopped
volumes:
- ${MAYAN_REDIS_VOLUME:-redis}:/data
- ${PWD}/data/redis:/data

# Celery flower a monitor for Celery
celery_flower:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h4>
{% endif %}

{% for button in extra_buttons %}
<button class="btn btn-default" name="{% if form.prefix %}{{ form.prefix }}-{{ button.name }}{% else %}{{ button.name }}{% endif %}" type="submit">
<button class="btn btn-default" style="color:#000000" name="{% if form.prefix %}{{ form.prefix }}-{{ button.name }}{% else %}{{ button.name }}{% endif %}" type="submit">
{% if button.icon %}
{{ button.icon.render }}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export MAYAN_BIN=/opt/mayan-edms/bin/mayan-edms.py
export MAYAN_INSTALL_DIR=/opt/mayan-edms
export MAYAN_PYTHON_BIN_DIR=/opt/mayan-edms/bin/
export MAYAN_MEDIA_ROOT=/var/lib/mayan
export MAYAN_SETTINGS_MODULE=${MAYAN_SETTINGS_MODULE:-mayan.settings.production}
export MAYAN_SETTINGS_MODULE=${MAYAN_SETTINGS_MODULE:-mayan.settings.development}

export PYTHONDONTWRITEBYTECODE=1

# Set DJANGO_SETTINGS_MODULE to MAYAN_SETTINGS_MODULE to avoid two
# different environments for the setting file.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[program:mayan-edms-gunicorn]
autorestart = false
autostart = true
command = /bin/bash -c "${MAYAN_GUNICORN_BIN} --workers ${MAYAN_GUNICORN_WORKERS} ${MAYAN_GUNICORN_TEMPORARY_DIRECTORY} mayan.wsgi --max-requests ${MAYAN_GUNICORN_MAX_REQUESTS} --max-requests-jitter ${MAYAN_GUNICORN_JITTER} --worker-class ${MAYAN_GUNICORN_WORKER_CLASS} --bind 0.0.0.0:8000 --env DJANGO_SETTINGS_MODULE=${MAYAN_SETTINGS_MODULE} --timeout ${MAYAN_GUNICORN_TIMEOUT} --limit-request-line ${MAYAN_GUNICORN_LIMIT_REQUEST_LINE}"
command = /bin/bash -c "${MAYAN_GUNICORN_BIN} --workers ${MAYAN_GUNICORN_WORKERS} ${MAYAN_GUNICORN_TEMPORARY_DIRECTORY} mayan.wsgi --max-requests ${MAYAN_GUNICORN_MAX_REQUESTS} --max-requests-jitter ${MAYAN_GUNICORN_JITTER} --worker-class ${MAYAN_GUNICORN_WORKER_CLASS} --bind 0.0.0.0:8000 --env DJANGO_SETTINGS_MODULE=${MAYAN_SETTINGS_MODULE} --timeout ${MAYAN_GUNICORN_TIMEOUT} --limit-request-line ${MAYAN_GUNICORN_LIMIT_REQUEST_LINE} --reload"
redirect_stderr = true
stderr_logfile = /dev/fd/2
stderr_logfile_maxbytes = 0
Expand Down
5 changes: 3 additions & 2 deletions mayan/apps/platform/templates/platform/supervisord.tmpl
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[supervisord]
environment=
PYTHONPATH="{{ MEDIA_ROOT }}{{ USER_SETTINGS_FOLDER }}",
DJANGO_SETTINGS_MODULE=mayan.settings.production,
DJANGO_SETTINGS_MODULE=mayan.settings.development,
MAYAN_ALLOWED_HOSTS='["*"]',
MAYAN_MEDIA_ROOT="{{ MEDIA_ROOT }}"
PYTHONDONTWRITEBYTECODE=1

[program:mayan-edms-gunicorn]
autorestart = true
autostart = true
command = {{ INSTALLATION_PATH }}bin/gunicorn --workers {{ GUNICORN_WORKERS }} mayan.wsgi --max-requests {{ GUNICORN_MAX_REQUESTS }} --max-requests-jitter {{ GUNICORN_JITTER }} --worker-class {{ GUNICORN_WORKER_CLASS }} --bind 0.0.0.0:8000 --timeout {{ GUNICORN_TIMEOUT }} --limit-request-line {{ GUNICORN_LIMIT_REQUEST_LINE }}
command = {{ INSTALLATION_PATH }}bin/gunicorn --workers {{ GUNICORN_WORKERS }} mayan.wsgi --max-requests {{ GUNICORN_MAX_REQUESTS }} --max-requests-jitter {{ GUNICORN_JITTER }} --worker-class {{ GUNICORN_WORKER_CLASS }} --bind 0.0.0.0:8000 --timeout {{ GUNICORN_TIMEOUT }} --limit-request-line {{ GUNICORN_LIMIT_REQUEST_LINE }} --reload
user = mayan
{% for worker in workers %}
[program:mayan-edms-{{ worker.name }}]
Expand Down
3 changes: 3 additions & 0 deletions mayan/apps/rest_api/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
PythonDependency(
module=__name__, name='flex', version_string='==6.14.1'
)
PythonDependency(
module=__name__, name='jsonschema', version_string='==3.2.0'
)
PythonDependency(
module=__name__, name='swagger-spec-validator', version_string='==2.5.0'
)
2 changes: 1 addition & 1 deletion mayan/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
'mayan.apps.views.finders.MayanAppDirectoriesFinder'
)

STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STATICFILES_STORAGE = 'whitenoise.storage.StaticFilesStorage'

TEST_RUNNER = 'mayan.apps.testing.runner.MayanTestRunner'

Expand Down
2 changes: 1 addition & 1 deletion mayan/settings/testing/development.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .base import * # NOQA

DEBUG = False
DEBUG = True
SIGNATURES_GPG_PATH = '/usr/bin/gpg1'
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fusepy==3.0.1
gevent==20.4.0
graphviz==0.14
gunicorn==20.0.4
jsonschema==3.2.0
mock==4.0.2
node-semver==0.8.0
packaging==20.3
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def find_packages(directory):
gevent==20.4.0
graphviz==0.14
gunicorn==20.0.4
jsonschema==3.2.0
mock==4.0.2
node-semver==0.8.0
packaging==20.3
Expand Down