mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
commit
d9f358a502
@ -20,17 +20,17 @@
|
|||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
/* Hide Button Toolbar */
|
/* Hide Button Toolbar */
|
||||||
window.onload = function hideButtonToolbar() {
|
window.onload = function hideButtonToolbar() {
|
||||||
var toolbar = document.getElementById("button-toolbar");
|
var toolbar = document.getElementById("button-toolbar");
|
||||||
toolbar.style.display = "none";
|
toolbar.style.display = "none";
|
||||||
};
|
};
|
||||||
|
|
||||||
loadParametricPartTable(
|
loadParametricPartTable(
|
||||||
"#parametric-part-table",
|
"#parametric-part-table",
|
||||||
{
|
{
|
||||||
headers: {{ headers|safe }},
|
headers: {{ headers|safe }},
|
||||||
data: {{ parameters|safe }},
|
data: {{ parameters|safe }},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
{% if category %}
|
{% if category %}
|
||||||
$("#param-table").inventreeTable({
|
$("#param-table").inventreeTable({
|
||||||
url: "{% url 'api-part-category-parameters' pk=category.pk %}",
|
url: "{% url 'api-part-category-parameters' pk=category.pk %}",
|
||||||
queryParams: {
|
queryParams: {
|
||||||
ordering: 'name',
|
ordering: 'name',
|
||||||
@ -66,7 +66,7 @@
|
|||||||
field: 'default_value',
|
field: 'default_value',
|
||||||
title: '{% trans "Default Value" %}',
|
title: '{% trans "Default Value" %}',
|
||||||
sortable: 'true',
|
sortable: 'true',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
var bEdit = "<button title='{% trans "Edit Template" %}' class='template-edit btn btn-default btn-glyph' type='button' pk='" + row.pk + "'><span class='fas fa-edit'></span></button>";
|
var bEdit = "<button title='{% trans "Edit Template" %}' class='template-edit btn btn-default btn-glyph' type='button' pk='" + row.pk + "'><span class='fas fa-edit'></span></button>";
|
||||||
var bDel = "<button title='{% trans "Delete Template" %}' class='template-delete btn btn-default btn-glyph' type='button' pk='" + row.pk + "'><span class='fas fa-trash-alt icon-red'></span></button>";
|
var bDel = "<button title='{% trans "Delete Template" %}' class='template-delete btn btn-default btn-glyph' type='button' pk='" + row.pk + "'><span class='fas fa-trash-alt icon-red'></span></button>";
|
||||||
|
|
||||||
@ -79,7 +79,7 @@
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#new-param").click(function() {
|
$("#new-param").click(function() {
|
||||||
launchModalForm("{% url 'category-param-template-create' category.pk %}", {
|
launchModalForm("{% url 'category-param-template-create' category.pk %}", {
|
||||||
success: function() {
|
success: function() {
|
||||||
$("#param-table").bootstrapTable('refresh');
|
$("#param-table").bootstrapTable('refresh');
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
{% include "InvenTree/settings/setting.html" with key="STOCK_STALE_DAYS" icon="fa-calendar" %}
|
{% include "InvenTree/settings/setting.html" with key="STOCK_STALE_DAYS" icon="fa-calendar" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="STOCK_ALLOW_EXPIRED_SALE" icon="fa-truck" %}
|
{% include "InvenTree/settings/setting.html" with key="STOCK_ALLOW_EXPIRED_SALE" icon="fa-truck" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="STOCK_ALLOW_EXPIRED_BUILD" icon="fa-tools" %}
|
{% include "InvenTree/settings/setting.html" with key="STOCK_ALLOW_EXPIRED_BUILD" icon="fa-tools" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="STOCK_OWNERSHIP_CONTROL" icon="fa-users" %}
|
{% include "InvenTree/settings/setting.html" with key="STOCK_OWNERSHIP_CONTROL" icon="fa-users" %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -25,12 +25,12 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% if invalid_color_theme %}
|
{% if invalid_color_theme %}
|
||||||
<div class="alert alert-danger alert-block" role="alert" style="display: inline-block;">
|
<div class="alert alert-danger alert-block" role="alert" style="display: inline-block;">
|
||||||
{% blocktrans %}
|
{% blocktrans %}
|
||||||
The CSS sheet "{{invalid_color_theme}}.css" for the currently selected color theme was not found.<br>
|
The CSS sheet "{{invalid_color_theme}}.css" for the currently selected color theme was not found.<br>
|
||||||
Please select another color theme :)
|
Please select another color theme :)
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -59,6 +59,12 @@ class RuleSet(models.Model):
|
|||||||
'authtoken_token',
|
'authtoken_token',
|
||||||
'authtoken_tokenproxy',
|
'authtoken_tokenproxy',
|
||||||
'users_ruleset',
|
'users_ruleset',
|
||||||
|
'report_reportasset',
|
||||||
|
'report_reportsnippet',
|
||||||
|
'report_billofmaterialsreport',
|
||||||
|
'report_purchaseorderreport',
|
||||||
|
'report_salesorderreport',
|
||||||
|
|
||||||
],
|
],
|
||||||
'part_category': [
|
'part_category': [
|
||||||
'part_partcategory',
|
'part_partcategory',
|
||||||
@ -128,11 +134,6 @@ class RuleSet(models.Model):
|
|||||||
'common_colortheme',
|
'common_colortheme',
|
||||||
'common_inventreesetting',
|
'common_inventreesetting',
|
||||||
'company_contact',
|
'company_contact',
|
||||||
'report_reportasset',
|
|
||||||
'report_reportsnippet',
|
|
||||||
'report_billofmaterialsreport',
|
|
||||||
'report_purchaseorderreport',
|
|
||||||
'report_salesorderreport',
|
|
||||||
'users_owner',
|
'users_owner',
|
||||||
|
|
||||||
# Third-party tables
|
# Third-party tables
|
||||||
|
@ -29,16 +29,6 @@ ENV INVENTREE_SECRET_KEY_FILE="${INVENTREE_DATA_DIR}/secret_key.txt"
|
|||||||
# Default web server port is 8000
|
# Default web server port is 8000
|
||||||
ENV INVENTREE_WEB_PORT="8000"
|
ENV INVENTREE_WEB_PORT="8000"
|
||||||
|
|
||||||
# Pass DB configuration through as environment variables
|
|
||||||
# Default configuration = postgresql
|
|
||||||
ENV INVENTREE_DB_ENGINE="postgresql"
|
|
||||||
ENV INVENTREE_DB_NAME="inventree"
|
|
||||||
ENV INVENTREE_DB_HOST="db"
|
|
||||||
ENV INVENTREE_DB_PORT="5432"
|
|
||||||
|
|
||||||
# INVENTREE_DB_USER must be specified at run-time
|
|
||||||
# INVENTREE_DB_PASSWORD must be specified at run-time
|
|
||||||
|
|
||||||
LABEL org.label-schema.schema-version="1.0" \
|
LABEL org.label-schema.schema-version="1.0" \
|
||||||
org.label-schema.build-date=${DATE} \
|
org.label-schema.build-date=${DATE} \
|
||||||
org.label-schema.vendor="inventree" \
|
org.label-schema.vendor="inventree" \
|
||||||
|
@ -19,8 +19,8 @@ services:
|
|||||||
# Use PostgreSQL as the database backend
|
# Use PostgreSQL as the database backend
|
||||||
# Note: this can be changed to a different backend,
|
# Note: this can be changed to a different backend,
|
||||||
# just make sure that you change the INVENTREE_DB_xxx vars below
|
# just make sure that you change the INVENTREE_DB_xxx vars below
|
||||||
db:
|
inventree-db:
|
||||||
container_name: db
|
container_name: inventree-db
|
||||||
image: postgres
|
image: postgres
|
||||||
ports:
|
ports:
|
||||||
- 5432/tcp
|
- 5432/tcp
|
||||||
@ -35,49 +35,60 @@ services:
|
|||||||
|
|
||||||
# InvenTree web server services
|
# InvenTree web server services
|
||||||
# Uses gunicorn as the web server
|
# Uses gunicorn as the web server
|
||||||
inventree:
|
inventree-server:
|
||||||
container_name: inventree
|
container_name: inventree-server
|
||||||
image: inventree/inventree:latest
|
image: inventree/inventree:latest
|
||||||
expose:
|
expose:
|
||||||
- 8000
|
- 8000
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- inventree-db
|
||||||
volumes:
|
volumes:
|
||||||
- data:/home/inventree/data
|
- data:/home/inventree/data
|
||||||
- static:/home/inventree/static
|
- static:/home/inventree/static
|
||||||
environment:
|
environment:
|
||||||
# Default environment variables are configured to match the 'db' container
|
# Default environment variables are configured to match the 'db' container
|
||||||
# Database permissions
|
# Note: If you change the database image, these will need to be adjusted
|
||||||
|
# Note: INVENTREE_DB_HOST should match the container name of the database
|
||||||
- INVENTREE_DB_USER=pguser
|
- INVENTREE_DB_USER=pguser
|
||||||
- INVENTREE_DB_PASSWORD=pgpassword
|
- INVENTREE_DB_PASSWORD=pgpassword
|
||||||
|
- INVENTREE_DB_ENGINE=postgresql
|
||||||
|
- INVENTREE_DB_NAME=inventree
|
||||||
|
- INVENTREE_DB_HOST=inventree-db
|
||||||
|
- INVENTREE_DB_PORT=5432
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
# Background worker process handles long-running or periodic tasks
|
# Background worker process handles long-running or periodic tasks
|
||||||
worker:
|
inventree-worker:
|
||||||
container_name: worker
|
container_name: inventree-worker
|
||||||
image: inventree/inventree:latest
|
image: inventree/inventree:latest
|
||||||
entrypoint: ./start_worker.sh
|
entrypoint: ./start_worker.sh
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- inventree-db
|
||||||
- inventree
|
- inventree-server
|
||||||
volumes:
|
volumes:
|
||||||
- data:/home/inventree/data
|
- data:/home/inventree/data
|
||||||
- static:/home/inventree/static
|
- static:/home/inventree/static
|
||||||
environment:
|
environment:
|
||||||
# Default environment variables are configured to match the 'inventree' container
|
# Default environment variables are configured to match the 'db' container
|
||||||
|
# Note: If you change the database image, these will need to be adjusted
|
||||||
|
# Note: INVENTREE_DB_HOST should match the container name of the database
|
||||||
- INVENTREE_DB_USER=pguser
|
- INVENTREE_DB_USER=pguser
|
||||||
- INVENTREE_DB_PASSWORD=pgpassword
|
- INVENTREE_DB_PASSWORD=pgpassword
|
||||||
|
- INVENTREE_DB_ENGINE=postgresql
|
||||||
|
- INVENTREE_DB_NAME=inventree
|
||||||
|
- INVENTREE_DB_HOST=inventree-db
|
||||||
|
- INVENTREE_DB_PORT=5432
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
# nginx acts as a reverse proxy
|
# nginx acts as a reverse proxy
|
||||||
# static files are served by nginx
|
# static files are served by nginx
|
||||||
# web requests are redirected to gunicorn
|
# web requests are redirected to gunicorn
|
||||||
# NOTE: You will need to provide a working nginx.conf file!
|
# NOTE: You will need to provide a working nginx.conf file!
|
||||||
proxy:
|
inventree-proxy:
|
||||||
container_name: proxy
|
container_name: inventree-proxy
|
||||||
image: nginx
|
image: nginx
|
||||||
depends_on:
|
depends_on:
|
||||||
- inventree
|
- inventree-server
|
||||||
ports:
|
ports:
|
||||||
# Change "1337" to the port that you want InvenTree web server to be available on
|
# Change "1337" to the port that you want InvenTree web server to be available on
|
||||||
- 1337:80
|
- 1337:80
|
||||||
|
@ -4,9 +4,9 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# Change 'inventree' to the name of the inventree server container,
|
# Change 'inventree-server' to the name of the inventree server container,
|
||||||
# and '8000' to the INVENTREE_WEB_PORT (if not default)
|
# and '8000' to the INVENTREE_WEB_PORT (if not default)
|
||||||
proxy_pass http://inventree:8000;
|
proxy_pass http://inventree-server:8000;
|
||||||
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
Loading…
Reference in New Issue
Block a user