diff --git a/.dockerignore b/.dockerignore index fee4b36..91e2311 100644 --- a/.dockerignore +++ b/.dockerignore @@ -10,5 +10,9 @@ Dockerfile .cache *.md !README*.md +env/ +venv/ +logs/ +public/ docker-compose.yml diff --git a/.gitignore b/.gitignore index ac0fdfb..501c9c9 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,7 @@ staticfiles # virtual environments .env env/ +venv/ db.sqlite3 # Hitch directory diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index f197519..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "python.pythonPath": "C:\\Users\\Dell\\AppData\\Local\\Programs\\Python\\Python37\\python.exe", - "python.linting.pycodestyleEnabled": true, - "python.linting.pylintEnabled": true, - "files.associations": { - "**/*.html": "html", - "**/templates/**/*.html": "django-html", - "**/templates/**/*": "django-txt", - "**/requirements{/**,*}.{txt,in}": "pip-requirements" - }, - "emmet.includeLanguages": {"django-html": "html"} -} \ No newline at end of file diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md deleted file mode 100644 index eb9abfc..0000000 --- a/DEVELOPMENT.md +++ /dev/null @@ -1,101 +0,0 @@ -# Jasmin Web Panel -
- -Jasmin SMS Web Interface for Jasmin SMS Gateway - -## Getting Started - -In your terminal for **Unix** (Linux/Mac) - -```sh -pip install virtualenv - -git clone https://github.com/101t/jasmin-web-panel --depth 1 - -cd jasmin-web-panel/ - -virtualenv -p python3 env - -source env/bin/activate - -pip install -r requirements.txt - -cp -rf Sample.env .env - -./load_data.sh --init -``` - -In Command Prompt for **Windows** - -```sh -python -m pip install virtualenv - -git clone https://github.com/101t/jasmin-web-panel --depth 1 - -cd jasmin-web-panel/ - -virtualenv env - -env/Scripts/activate - -pip install -r requirements.txt - -copy Sample.env .env - -load_data_win.bat --init -``` - -> Note: the `admin` user automatically added to project as default administrator user, the credentials authentication is **Username: `admin`, Password: `secret`**. - -## Development - -### Prepare Translations - -Adding translation made easy by this commands - -```sh -cd jasmin-web-panel/main/ - -django-admin makemessages -l en - -django-admin compilemessages -``` -> Note: make sure you have `gettext` installed in your `Unix` Environment - -```sh -# using gettext in ubuntu or macOS -msgunfmt [django.mo] > [django.po] -``` - -### Run Celery - -To run your celery in development -```sh -celery worker -A main.taskapp -l debug -``` - -### Run Channels -To run channels in development as `ASGI` using `daphne` -```sh -daphne config.asgi:application -b 0.0.0.0 -p 9000 -``` - -### Run Django -To run django in development as `HTTP` -```sh -python manage.py runserver 0.0.0.0:8000 -``` - -### Upgrading Packages - -Here the following examples how to upgrade some packages - -```sh -pip install -U django -pip install -U channels -pip install -U celery -pip install -U djangorestframework markdown django-filter -``` -> Note: be careful about sub-packages compatibility and dependencies conflict while **upgrading** diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 302cd43..0000000 --- a/Dockerfile +++ /dev/null @@ -1,46 +0,0 @@ -FROM python:3.8-alpine - -ENV PYTHONDONTWRITEBYTECODE 1 -ENV PYTHONUNBUFFERED 1 -ENV PATH="/jasmin:${PATH}" -ENV JASMIN_HOME=/jasmin - -# RUN mkdir /jasmin - -RUN addgroup -S jasmin && adduser -S jasmin -G jasmin -h $JASMIN_HOME - -#RUN apk del busybox-extras -RUN apk update && apk add busybox-extras -RUN apk add build-base git gcc cmake py3-setuptools -RUN busybox-extras --list -RUN apk add --no-cache bash - - - -WORKDIR $JASMIN_HOME - -RUN mkdir -p $JASMIN_HOME/public/media -RUN mkdir -p $JASMIN_HOME/public/static - -# RUN chown -R jasmin:jasmin $JASMIN_HOME/ - -COPY ./requirements.txt $JASMIN_HOME/requirements.txt - -RUN pip install --upgrade pip -RUN pip install -r requirements.txt - -# RUN export PATH="/usr/local/bin:$HOME/.local/bin::$PATH" - -COPY . $JASMIN_HOME - -COPY ./docker-entrypoint.sh docker-entrypoint.sh - -#RUN chmod -R u+x ${JASMIN_HOME} && \ -# chgrp -R 0 ${JASMIN_HOME} && \ -# chmod -R g=u ${JASMIN_HOME} - -RUN chown -R jasmin:jasmin $JASMIN_HOME/ - -USER jasmin - -ENTRYPOINT ["docker-entrypoint.sh"] \ No newline at end of file diff --git a/README.md b/README.md index f0ed61b..f003b03 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ docker pull tarekaec/jasmin_web_panel ``` also you could build it on you local machine by navigating to project directory ```shell -docker build -t jasmin_web_panel:1.0 . +docker build -f config/docker/slim/Dockerfile -t jasmin_web_panel:1.0 . ``` You need to configure the environment variable in `.env` file ```shell diff --git a/Sample.env b/Sample.env index 57886dd..0f08c6f 100644 --- a/Sample.env +++ b/Sample.env @@ -8,19 +8,19 @@ TIME_ZONE=Etc/GMT-3 LANGUAGE_CODE=en SITE_ID=1 -MYSQLDB_URL=mysql://root:123456@127.0.0.1/jasmin_web_db -SQLITE3_URL=sqlite:///db.sqlite3 -POSTGRE_URL=postgres://postgres:123@127.0.0.1:5432/jasmin_web_db +# mysql://root:123456@127.0.0.1/jasmin_web_db +# sqlite:///db.sqlite3 +# postgres://jasmin:jasmin@127.0.0.1:5432/jasmin DEVDB_URL=sqlite:///db.sqlite3 -PRODB_URL=postgres://postgres:123@127.0.0.1:5432/jasmin_web_db +PRODB_URL=postgres://jasmin:jasmin@127.0.0.1:5432/jasmin # REDIS_HOST=localhost # REDIS_PORT=6379 # REDIS_DB=0 -ACTIVE_APP=web ALLOWED_HOSTS=* +CSRF_TRUSTED_ORIGINS= TELNET_HOST=127.0.0.1 TELNET_PORT=8990 diff --git a/celery_run.sh b/celery_run.sh deleted file mode 100755 index 498b73f..0000000 --- a/celery_run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd $JASMIN_HOME - -celery -A main.taskapp worker -l info --autoscale=10,3 \ No newline at end of file diff --git a/config/celery.py b/config/celery.py new file mode 100644 index 0000000..58d7946 --- /dev/null +++ b/config/celery.py @@ -0,0 +1,36 @@ +import os +from django.conf import settings +from celery import Celery +from celery.utils.log import get_task_logger + +from django.utils import timezone + +logger = get_task_logger(__name__) + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.dev") + +app = Celery('config') + +app.config_from_object("django.conf:settings", namespace="CELERY") +app.conf.broker_url = settings.CELERY_BROKER_URL +app.conf.result_backend = settings.CELERY_RESULT_BACKEND +app.conf.broker_connection_max_retries = 0 +app.conf.broker_connection_retry_on_startup = True +app.autodiscover_tasks(lambda: settings.INSTALLED_APPS, related_name='tasks') + +BROKER_CONNECTION_TIMEOUT = 120 + +CELERY_DEFAULT_UP_TIME = timezone.now() + + +@app.task(bind=True) +def debug_task(self): + print("Request: {0!r}".format(self.Request)) + + +def revoke_task(task_id): + app.control.revoke(task_id) + + +def clear_tasks(): + return app.control.purge() diff --git a/config/docker/alpine/Dockerfile b/config/docker/alpine/Dockerfile new file mode 100644 index 0000000..b61871c --- /dev/null +++ b/config/docker/alpine/Dockerfile @@ -0,0 +1,48 @@ +FROM alpine:3.11 + +ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONUNBUFFERED 1 +ENV JASMIN_HOME=/jasmin +ENV PATH="${PATH}:/jasmin" + +# RUN mkdir /jasmin +RUN addgroup -S jasmin && adduser -S jasmin -G jasmin -h $JASMIN_HOME + +#RUN apk del busybox-extras +RUN apk --update --no-cache upgrade +RUN apk add python3 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.11/main && ln -sf python3 /usr/bin/python +# RUN apk search busybox-extras +RUN apk add busybox-extras +# RUN busybox --list +# RUN apk add --no-cache bash curl nmap apache2-utils bind-tools tcpdump mtr iperf3 strace tree busybox-extras netcat-openbsd +RUN echo alias telnet='busybox-extras telnet' >> .bashrc +RUN telnet google.com 80 + +RUN apk add --update build-base git gcc cmake py3-setuptools py3-pip python3-dev bash + +# RUN apk add --no-cache bash + +WORKDIR $JASMIN_HOME + +USER jasmin + +RUN mkdir -p $JASMIN_HOME/public/media +RUN mkdir -p $JASMIN_HOME/public/static + +# RUN chown -R jasmin:jasmin $JASMIN_HOME/ + +COPY --chown=jasmin:jasmin ./requirements.txt $JASMIN_HOME/requirements.txt + +ENV PATH="${PATH}:/jasmin/.local/bin" + +RUN pip3 install --upgrade pip && pip3 install -r requirements.txt + +COPY --chown=jasmin:jasmin . $JASMIN_HOME + +COPY --chown=jasmin:jasmin ./docker-entrypoint.sh docker-entrypoint.sh + +# RUN chown -R jasmin:jasmin $JASMIN_HOME/ + +# USER root + +ENTRYPOINT ["docker-entrypoint.sh"] \ No newline at end of file diff --git a/config/docker/alpine/docker-compose-alpine.yml b/config/docker/alpine/docker-compose-alpine.yml new file mode 100644 index 0000000..d30b958 --- /dev/null +++ b/config/docker/alpine/docker-compose-alpine.yml @@ -0,0 +1,34 @@ +version: '3.7' + +services: + jasmin_web: + image: tarekaec/jasmin_web_panel:1.0-alpine + ports: + - "8000:8000" + deploy: + replicas: 1 + env_file: + - .env + environment: + JASMIN_PORT: 8000 + healthcheck: + disable: true + volumes: + - ./public:/web/public + # entrypoint: /jasmin/docker-entrypoint.sh + jasmin_celery: + image: tarekaec/jasmin_web_panel:1.0-alpine + deploy: + replicas: 1 + env_file: + - .env + environment: + DEBUG: 0 + healthcheck: + disable: true + depends_on: + - jasmin_redis + entrypoint: /jasmin/celery_run.sh + jasmin_redis: + image: redis:alpine + tty: true diff --git a/config/docker/jasmin/README.md b/config/docker/jasmin/README.md new file mode 100644 index 0000000..1c17067 --- /dev/null +++ b/config/docker/jasmin/README.md @@ -0,0 +1,6 @@ +# Jasmin SMS Gateway +This is the docker version of jasmin sms gateway + +```shell +docker stack deploy -c config/docker/jasmin/docker-compose.yml jasmin +``` \ No newline at end of file diff --git a/config/docker/jasmin/docker-compose.yml b/config/docker/jasmin/docker-compose.yml new file mode 100644 index 0000000..ff78140 --- /dev/null +++ b/config/docker/jasmin/docker-compose.yml @@ -0,0 +1,82 @@ +version: "3" + +services: + redis: + image: redis:alpine + restart: always + volumes: + - /data/jasmin/redis:/data + healthcheck: + test: redis-cli ping | grep PONG + deploy: + resources: + limits: + cpus: '0.2' + memory: 128M + + rabbit-mq: + image: rabbitmq:3.10-management-alpine + restart: always + volumes: + - /data/jasmin/rabbitmq:/var/lib/rabbitmq + healthcheck: + test: rabbitmq-diagnostics -q ping + deploy: + resources: + limits: + cpus: '0.5' + memory: 525M + + jasmin: + image: tarekaec/jasmin:0.10.13 +# command: > +# bash -c " +# sed -i "s/.*publish_submit_sm_resp\s*=.*/publish_submit_sm_resp=True/g" /etc/jasmin/jasmin.cfg +# /docker-entrypoint.sh +# " + ports: + - '${FORWARD_JASMIN_SMPP_PORT:-2776}:2775' + - '${FORWARD_JASMIN_CLI_PORT:-8991}:8990' + - '${FORWARD_JASMIN_HTTP_PORT:-1402}:1401' + volumes: + # - /data/jasmin/jasmin:/usr/jasmin/jasmin + - /data/jasmin/jasmin_config:/etc/jasmin + - /data/jasmin/jasmin_logs:/var/log/jasmin + - /data/jasmin/jasmin_resource:/etc/jasmin/resource + - /data/jasmin/jasmin_store:/etc/jasmin/store + depends_on: + - redis + - rabbit-mq + environment: + REDIS_CLIENT_HOST: ${REDIS_CLIENT_HOST:-redis} + REDIS_CLIENT_PORT: ${REDIS_CLIENT_PORT:-6379} + AMQP_BROKER_HOST: ${AMQP_BROKER_HOST:-rabbit-mq} + AMQP_BROKER_PORT: ${AMQP_BROKER_PORT:-5672} + ENABLE_PUBLISH_SUBMIT_SM_RESP: ${ENABLE_PUBLISH_SUBMIT_SM_RESP:-1} + RESTAPI_MODE: ${RESTAPI_MODE:-0} + deploy: + restart_policy: + condition: on-failure + resources: + limits: + cpus: '1' + memory: 256M + sms_logger: + image: tarekaec/jasmin_log:1.1 + volumes: + - /data/jasmin/jasmin_resource:/app/resource + environment: + DB_TYPE_MYSQL: ${DB_TYPE_MYSQL:-0} + AMQP_BROKER_HOST: ${AMQP_BROKER_HOST:-rabbit-mq} + AMQP_BROKER_PORT: ${AMQP_BROKER_PORT:-5672} + AMQP_SPEC_FILE: '/app/resource/amqp0-9-1.xml' + DB_HOST: ${DB_HOST:-172.17.0.1} + DB_DATABASE: ${DB_DATABASE:-jasmin} + DB_TABLE: ${DB_TABLE:-submit_log} + DB_USER: ${DB_USER:-jasmin} + DB_PASS: ${DB_PASS:-jasmin} + depends_on: + - rabbit-mq + restart: on-failure + healthcheck: + disable: true \ No newline at end of file diff --git a/config/docker/jasmin/jasmin/config/dlr.cfg b/config/docker/jasmin/jasmin/config/dlr.cfg new file mode 100644 index 0000000..060b236 --- /dev/null +++ b/config/docker/jasmin/jasmin/config/dlr.cfg @@ -0,0 +1,75 @@ +# +# This is the Jasmin DLR Daemon configuration file. +# DLR Daemon will start DLR throwers (http+smpp) and connect to SMPPServerPB +# +# For any modifications to this file, refer to Jasmin Documentation. +# If that does not help, post your question on Jasmin's web forum +# hosted at Google Groups: https://groups.google.com/group/jasmin-sms-gateway +# +# Do NOT simply read the instructions in here without understanding +# what they do. They're here only as hints or reminders. If you are unsure +# consult the online docs. + +[dlr-thrower] +# The following directives define the process of delivering delivery-receipts through http to third party +# application, it is explained in "HTTP API" documentation +# Sets socket timeout in seconds for outgoing client http connections. +#http_timeout = 30 +# Define how many seconds should pass within the queuing system for retrying a failed throw. +#retry_delay = 30 +# Define how many retries should be performed for failing throws of DLR. +#max_retries = 3 + +# Specify the pdu type to consider when throwing a receipt through SMPPs, possible values: +# - data_sm +# - deliver_sm (default pdu) +#dlr_pdu = deliver_sm + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/dlr-thrower.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +[smpp-server-pb-client] +# The following directives define client connector to SMPPServerPB +#host = 127.0.0.1 +#port = 14000 +#username = smppsadmin +#password = smppspwd + +[amqp-broker] +# The following directives define the way how Jasmin is connecting to the AMQP Broker, +# default values must work with a freshly installed RabbitMQ server. +#host = 127.0.0.1 +host = rabbit-mq +vhost = / +spec = /etc/jasmin/resource/amqp0-9-1.xml +port = 5672 +username = guest +password = guest +#heartbeat = 0 \ No newline at end of file diff --git a/config/docker/jasmin/jasmin/config/dlrlookupd.cfg b/config/docker/jasmin/jasmin/config/dlrlookupd.cfg new file mode 100644 index 0000000..241edac --- /dev/null +++ b/config/docker/jasmin/jasmin/config/dlrlookupd.cfg @@ -0,0 +1,142 @@ +# +# This is the Jasmin DLR Lookup Daemon configuration file. +# DLR Lookup Daemon will fetch dlr mappings from Redis and publish DLRContent +# to the right AMQP route. +# +# For any modifications to this file, refer to Jasmin Documentation. +# If that does not help, post your question on Jasmin's web forum +# hosted at Google Groups: https://groups.google.com/group/jasmin-sms-gateway +# +# Do NOT simply read the instructions in here without understanding +# what they do. They're here only as hints or reminders. If you are unsure +# consult the online docs. + +[amqp-broker] +# The following directives define the way how Jasmin is connecting to the AMQP Broker, +# default values must work with a freshly installed RabbitMQ server. +#host = 127.0.0.1 +host = rabbit-mq +vhost = / +spec = /etc/jasmin/resource/amqp0-9-1.xml +port = 5672 +username = guest +password = guest +#heartbeat = 0 + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/amqp-client.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +#connection_loss_retry = True +#connection_failure_retry = True +#connection_loss_retry_delay = 10 +#connection_loss_failure_delay = 10 + +[redis-client] +# The following directives define the way how Jasmin is connecting to the redis server, +# default values must work with a freshly installed redis server. +#host = 127.0.0.1 +#port = 6379 +#dbid = 0 +#password = None +#poolsize = 10 + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/redis-client.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +[dlr] +# DLRLookup process id +pid = dlrlookupd-01 + +# DLRLookup mechanism configuration +#dlr_lookup_retry_delay = 10 +#dlr_lookup_max_retries = 2 + +# If smpp_receipt_on_success_submit_sm_resp is True, every connected user to smpp server will +# receive a receipt (data_sm or deliver_sm) whenever a submit_sm_resp is received +# for a message he sent and requested receipt for it. +#smpp_receipt_on_success_submit_sm_resp = False + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/messages.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = midnight + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S +#log_privacy = False \ No newline at end of file diff --git a/config/docker/jasmin/jasmin/config/interceptor.cfg b/config/docker/jasmin/jasmin/config/interceptor.cfg new file mode 100644 index 0000000..43d2c97 --- /dev/null +++ b/config/docker/jasmin/jasmin/config/interceptor.cfg @@ -0,0 +1,57 @@ +# +# This is the Jasmin interceptor configuration file. +# For any modifications to this file, refer to Jasmin Documentation. +# If that does not help, post your question on Jasmin's web forum +# hosted at Google Groups: https://groups.google.com/group/jasmin-sms-gateway +# +# Do NOT simply read the instructions in here without understanding +# what they do. They're here only as hints or reminders. If you are unsure +# consult the online docs. + +[interceptor] +# If you want you can bind a single interface, you can specify its IP here +#bind = 0.0.0.0 + +# Accept connections on the specified port, default is 8987 +#port = 8987 + +# If authentication is True, access will require entering a username and password +# as defined in admin_username and admin_password, you can disable this security +# layer by setting authentication to False, in this case admin_* values are ignored. +#authentication = True +#admin_username = iadmin +# This is a MD5 password digest hex encoded +#admin_password = dd8b84cdb60655fed3b9b2d668c5bd9e + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/interceptor.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +# This is a duration threshold (seconds) for logging slow scripts. +#log_slow_script = 1 diff --git a/config/docker/jasmin/jasmin/config/jasmin.cfg b/config/docker/jasmin/jasmin/config/jasmin.cfg new file mode 100644 index 0000000..1f06a6f --- /dev/null +++ b/config/docker/jasmin/jasmin/config/jasmin.cfg @@ -0,0 +1,662 @@ +# +# This is the main Jasmin SMS gateway configuration file. +# For any modifications to this file, refer to Jasmin Documentation. +# If that does not help, post your question on Jasmin's web forum +# hosted at Google Groups: https://groups.google.com/group/jasmin-sms-gateway +# +# Do NOT simply read the instructions in here without understanding +# what they do. They're here only as hints or reminders. If you are unsure +# consult the online docs. + +[smpp-server] + +# SMPP Server identifier +#id = "smpps_01" + +# If you want you can bind a single interface, you can specify its IP here +#bind = 0.0.0.0 + +# Accept connections on the specified port, default is 2775 +#port = 2775 + +# Activate billing feature +# May be disabled if not needed/used +#billing_feature = True + +# Timeout for response to bind request +#sessionInitTimerSecs = 30 + +# Enquire link interval +#enquireLinkTimerSecs = 30 + +# Maximum time lapse allowed between transactions, after which, +# the connection is considered as inactive +#inactivityTimerSecs = 300 + +# Timeout for responses to any request PDU +#responseTimerSecs = 60 + +# Timeout for reading a single PDU, this is the maximum lapse of time between +# receiving PDU's header and its complete read, if the PDU reading timed out, +# the connection is considered as 'corrupt' and will reconnect +#pduReadTimerSecs = 10 + +# When message is routed to a SMPP Client connecter: How much time it is kept in +# redis waiting for receipt +#dlr_expiry = 86400 + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/default-smpps_01.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = midnight + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S +#log_privacy = False + +[smpp-server-pb] +# If you want you can bind a single interface, you can specify its IP here +#bind = 0.0.0.0 + +# Accept connections on the specified port, default is 14000 +#port = 14000 + +# If authentication is True, access will require entering a username and password +# as defined in admin_username and admin_password, you can disable this security +# layer by setting authentication to False, in this case admin_* values are ignored. +#authentication = True +#admin_username = smppsadmin +# This is a MD5 password digest hex encoded +#admin_password = e97ab122faa16beea8682d84f3d2eea4 + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/smpp-server-pb.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +[client-management] +# Jasmin persists its configuration profiles in /etc/jasmin/store by +# default. You can specify a custom location here +#store_path = /etc/jasmin/store + +# If you want you can bind a single interface, you can specify its IP here +#bind = 0.0.0.0 + +# Accept connections on the specified port, default is 8989 +#port = 8989 + +# If authentication is True, access will require entering a username and password +# as defined in admin_username and admin_password, you can disable this security +# layer by setting authentication to False, in this case admin_* values are ignored. +#authentication = True +#admin_username = cmadmin +# This is a MD5 password digest hex encoded +#admin_password = e1c5136acafb7016bc965597c992eb82 + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/smppclient-manager.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +# The protocol version used to pickle objects before transfering +# them to client side, this is used in the client manager only, +# the pickle protocol defined in SMPPClientManagerPBProxy is set +# to 2 and is not configurable +#pickle_protocol = 2 + +[service-smppclient] +# For each smppclient connector a service is associated +# refer to "Message flows" documentation for more details + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/service-smppclients.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +[sm-listener] +# SM listener consumes submit_sm and deliver_sm messages from amqp broker +# refer to "Message flows" documentation for more details + +# If publish_submit_sm_resp is True, any received SubmitSm PDU will be published +# to the 'messaging' exchange on 'submit.sm.resp.CID' route, useful when you have +# a third party application waiting for these messages. +#publish_submit_sm_resp = False +publish_submit_sm_resp = True + +# If the error is defined in submit_error_retrial, Jasmin will retry sending submit_sm if it +# gets one of these errors. +# submit_sm retrial will be executed 'count' times and delayed for 'delay' seconds each time. +#submit_error_retrial = { +# 'ESME_RSYSERR': {'count': 2, 'delay': 30}, +# 'ESME_RTHROTTLED': {'count': 20, 'delay': 30}, +# 'ESME_RMSGQFUL': {'count': 2, 'delay': 180}, +# 'ESME_RINVSCHED': {'count': 2, 'delay': 300}, +# } + +# The maximum number of seconds a message can stay in queue waiting for SMPPC to get ready for +# delivey (connected and bound). +#submit_max_age_smppc_not_ready = 1200 + +# Delay (seconds) when retrying a submit with a not-yet ready SMPPc +# Hint: for large scale messaging deployment, it is advised to set this value to few seconds +# in order to keep Jasmin free. +#submit_retrial_delay_smppc_not_ready = 30 + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/messages.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = midnight + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S +#log_privacy = False + +[dlr] +# DLRLookup process id +#pid = main + +# DLRLookup mechanism configuration +#dlr_lookup_retry_delay = 10 +#dlr_lookup_max_retries = 2 + +# If smpp_receipt_on_success_submit_sm_resp is True, every connected user to smpp server will +# receive a receipt (data_sm or deliver_sm) whenever a submit_sm_resp is received +# for a message he sent and requested receipt for it. +#smpp_receipt_on_success_submit_sm_resp = False + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/messages.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = midnight + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S +#log_privacy = False + +[amqp-broker] +# The following directives define the way how Jasmin is connecting to the AMQP Broker, +# default values must work with a freshly installed RabbitMQ server. +host = rabbit-mq +vhost = / +spec = /etc/jasmin/resource/amqp0-9-1.xml +port = 5672 +username = guest +password = guest +heartbeat = 0 +#host = 127.0.0.1 +#vhost = / +#spec = /etc/jasmin/resource/amqp0-9-1.xml +#port = 5672 +#username = guest +#password = guest +#heartbeat = 0 + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/amqp-client.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +#connection_loss_retry = True +#connection_failure_retry = True +#connection_loss_retry_delay = 10 +#connection_loss_failure_delay = 10 + +[http-api] +# If you want you can bind a single interface, you can specify its IP here +#bind = 0.0.0.0 + +# Accept connections on the specified port, default is 1401 +#port = 1401 + +# Activate billing feature +# May be disabled if not needed/used +#billing_feature = True + +# How many message parts you can get for a long message, default is 5 so you +# can't exceed 800 characters (160x5) when sending a long latin message. +#long_content_max_parts = 5 + +# Splitting long content can be made through SAR options or UDH +# Possible values are: sar and udh +#long_content_split = udh + +# Specify the access log file path +#access_log = /var/log/jasmin/http-access.log + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/http-api.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S +#log_privacy = False + +[router] +# Jasmin router persists its routing configuration profiles in /etc/jasmin/store by +# default. You can specify a custom location here +#store_path = /etc/jasmin/store + +# Router will automatically persist users and groups to disk whenever a critical information +# is updated (ex: user balance), persistence is executed every persistence_timer_secs +#persistence_timer_secs = 60 + +# If you want you can bind a single interface, you can specify its IP here +#bind = 0.0.0.0 + +# Accept connections on the specified port, default is 8988 +#port = 8988 + +# If authentication is True, access will require entering a username and password +# as defined in admin_username and admin_password, you can disable this security +# layer by setting authentication to False, in this case admin_* values are ignored. +#authentication = True +#admin_username = radmin +# This is a MD5 password digest hex encoded +#admin_password = 82a606ca5a0deea2b5777756788af5c8 + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/router.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +# The protocol version used to pickle objects before transfering +# them to client side, this is used in the client manager only, +# the pickle protocol defined in SMPPClientManagerPBProxy is set +# to 2 and is not configurable +#pickle_protocol = 2 + +[deliversm-thrower] +# The following directives define the process of delivery SMS-MO through http to third party +# application, it is explained in "HTTP API" documentation +# Sets socket timeout in seconds for outgoing client http connections. +#http_timeout = 30 +# Define how many seconds should pass within the queuing system for retrying a failed throw. +#retry_delay = 30 +# Define how many retries should be performed for failing throws of SMS-MO. +#max_retries = 3 + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/deliversm-thrower.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +[dlr-thrower] +# The following directives define the process of delivering delivery-receipts through http to third party +# application, it is explained in "HTTP API" documentation +# Sets socket timeout in seconds for outgoing client http connections. +#http_timeout = 30 +# Define how many seconds should pass within the queuing system for retrying a failed throw. +#retry_delay = 30 +# Define how many retries should be performed for failing throws of DLR. +#max_retries = 3 + +# Specify the pdu type to consider when throwing a receipt through SMPPs, possible values: +# - data_sm +# - deliver_sm (default pdu) +#dlr_pdu = deliver_sm + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/dlr-thrower.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +[redis-client] +# The following directives define the way how Jasmin is connecting to the redis server, +# default values must work with a freshly installed redis server. +host = redis +port = 6379 +dbid = 0 +password = None +poolsize = 10 +#host = 127.0.0.1 +#port = 6379 +#dbid = 0 +#password = None +#poolsize = 10 + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/redis-client.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +[jcli] +# If you want you can bind a single interface, you can specify its IP here +#bind = 127.0.0.1 + +# Accept connections on the specified port, default is 8990 +#port = 8990 + +# If authentication is True, access will require entering a username and password +# as defined in admin_username and admin_password, you can disable this security +# layer by setting authentication to False, in this case admin_* values are ignored. +#authentication = True +#admin_username = jcliadmin +# This is a MD5 password digest hex encoded +#admin_password = 79e9b0aa3f3e7c53e916f7ac47439bcb + +# Specify the server verbosity level. +# This can be one of: +# NOTSET (disable logging) +# DEBUG (a lot of information, useful for development/testing) +# INFO (moderately verbose, what you want in production probably) +# WARNING (only very important / critical messages and errors are logged) +# ERROR (only errors / critical messages are logged) +# CRITICAL (only critical messages are logged) +#log_level = INFO + +# Specify the log file path +#log_file = /var/log/jasmin/jcli.log + +# When to rotate the log file, possible values: +# S: Seconds +# M: Minutes +# H: Hours +# D: Days +# W0-W6: Weekday (0=Monday) +# midnight: Roll over at midnight +#log_rotate = W6 + +# The following directives define logging patterns including: +# - log_format: using python logging's attributes +# refer to https://docs.python.org/2/library/logging.html#logrecord-attributes +# -log_date_format: using python strftime formating directives +# refer to https://docs.python.org/2/library/time.html#time.strftime +#log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s +#log_date_format = %Y-%m-%d %H:%M:%S + +[interceptor-client] +# The following directives define client connector to InterceptorPB, it's used when jasmind +# is started with --enable-interceptor-client +#host = 127.0.0.1 +#port = 8987 +#username = iadmin +#password = ipwd diff --git a/config/docker/jasmin/jasmin/logs/.gitignore b/config/docker/jasmin/jasmin/logs/.gitignore new file mode 100644 index 0000000..bf0824e --- /dev/null +++ b/config/docker/jasmin/jasmin/logs/.gitignore @@ -0,0 +1 @@ +*.log \ No newline at end of file diff --git a/config/docker/jasmin/jasmin/resource/amqp0-8.stripped.rabbitmq.xml b/config/docker/jasmin/jasmin/resource/amqp0-8.stripped.rabbitmq.xml new file mode 100644 index 0000000..d1fd2c0 --- /dev/null +++ b/config/docker/jasmin/jasmin/resource/amqp0-8.stripped.rabbitmq.xml @@ -0,0 +1,771 @@ + + ++ + | +|||||
+
|
+
+ {{ site_name }} + | +
+ + | +|||||
+
|
+
+ {{ site_name }} + | +
An error occurred,
+
+
+ `; + toastr.error(html_message, {closeButton: true, progressBar: true, enableHtml: true,}); + var html_source = html_response; + html_source = html_source.replace(/["]/g, '"') + $("#quick_display_modal").closest('div').find('.modal-body').html(''); + if($("#collectionlist").length){ + $("#collectionlist").html($(".isEmpty").html()); + } + } $("form").validate({ errorClass: "text-danger", errorElementClass: 'text-success', diff --git a/main/web/templates/auth/base.html b/main/web/templates/auth/base.html index 9bd94d1..579c2d9 100644 --- a/main/web/templates/auth/base.html +++ b/main/web/templates/auth/base.html @@ -1,6 +1,6 @@ {% load static i18n %} - +
v{{ VERSION }}
+