Commit Graph

15011 Commits

Author SHA1 Message Date
Oliver
3bfde82394
Tracing improvements (#6353)
* Prevent tracing in worker thread

* Tweak logic

* Further improvements

* Adds invoke command to launch gunicorn server

* Update docstring

* Add explicit check for migrations or data import

* Update tracing.py

Allow tracing in worker thread
2024-01-31 10:29:56 +11:00
Oliver
282ecebc39
[PUI] API Endpoint refactor (#6358)
* Cleanup SupplierPartTable

* Show PurchaseOrder table on SupplierPart page

* Perform edit actions as PATCH requests

* Implement ManufacturerPartParameter table

* Fix link

* supplier part link fix

* Add new ApiEndpoints enumeration

* Refactor calls to ApiState

* Revert previous change

* remove unused imports
2024-01-30 16:36:32 +11:00
Oliver
b42f3de357
Bug fix for javascript rendering (#6362)
* Check template name when rendering also

* Update i18n.py

Enforce stringiness
2024-01-30 10:51:23 +11:00
Oliver
b29d86403e
Remove proxy support in vite server (#6359)
- Does not support OPTIONS requests
- No point keeping it around
2024-01-29 22:18:25 +11:00
Oliver
9a215f97f5
[PUI] Tables (#6357)
* Cleanup SupplierPartTable

* Show PurchaseOrder table on SupplierPart page

* Perform edit actions as PATCH requests

* Implement ManufacturerPartParameter table

* Fix link

* supplier part link fix

* Revert code which introduced bug

* Remove unused import
2024-01-29 17:51:29 +11:00
Oliver
0f7d385755
URL nav improvements (#6356)
* Implement getDetailUrl method

* Add nav link for PurchaseOrderLineItem table

* URL cleanup

- Replace hard-coded URLs with lookup
2024-01-29 16:51:54 +11:00
Oliver
b42f8a620b
Token tweaks (#6354)
- Adjust to allow "bearer" token type
2024-01-29 15:58:56 +11:00
Oliver
cf7a20e1b7
Add support for Slovak (#6351) 2024-01-29 10:56:58 +11:00
Oliver
f6ba180cc4
Build order improvements (#6343)
* Auto-fill project code

When creating a new child build order, copy project code from parent build

* Auto-fill project code for sales orders

* Annotate "building" quantity to BuildLine serializer

- So we know how many units are in production

* Display building quantity in build line table

* Update API version info

* Skeleton for BuildLineTable

- No content yet (needs work)

* Refactor part hovercard

* Navigate to part

* Add actions for build line table

* Display more information for "available stock" column

* More updates

* Fix "building" filter

- Rename to "in_production"

* Add filters

* Remove unused imports
2024-01-29 10:56:34 +11:00
Oliver
1272b89839
New Crowdin updates (#6340)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix faulty translation

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-29 10:45:23 +11:00
Oliver
0f2675c139
[PUI] Child item table (#6334)
* Add child stock item table

* Fix stock item splitting bug

- StockItem tree was not being rebuilt correctly
- Add unit tests

* Annotate StockItem serializer with "child_items" count

* Show or hide "child items" panel

* Account for case where tree_id is zero
2024-01-24 12:33:34 +00:00
Oliver
65ecb975c6
[PUI] Assigned stock table (#6337)
* Display "assigned stock" table

* Add BuildOrder table to SalesOrder page
2024-01-24 12:24:02 +00:00
Oliver
fb0baa9e7a
Fix stock item splitting bug (#6335)
* Fix stock item splitting bug

- StockItem tree was not being rebuilt correctly
- Add unit tests

* Account for zero tree_id value
2024-01-24 12:09:33 +00:00
Oliver
f07d8a7a80
[PUI] Add missing pages (#6326)
* Add placeholder page for SupplierPartDetail

- All empty at this stage

* Adds ManufacturerPartDetail page

* Further updates to supplierpart and manufacturerpart support

* Cleanup unused vars

* More cleanup
2024-01-24 09:39:37 +11:00
Oliver
76410ef68d
New Crowdin updates (#6307)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-24 09:15:55 +11:00
Philipp Fruck
0a94758d63
fix(docker): SELinux volume labels (#6330)
When mounting volumes into containers with SELinux
enabled on the host the z option must be specified
2024-01-24 09:01:21 +11:00
Oliver
d8f69c0609
Specify empty OIDC prefix (#6324)
* Specify empty OIDC prefix

Ref: https://github.com/inventree/InvenTree/discussions/6273

* Add extra comment around version information

* Update InvenTree/InvenTree/settings.py

Co-authored-by: Philipp Fruck <dev@p-fruck.de>

---------

Co-authored-by: Philipp Fruck <dev@p-fruck.de>
2024-01-23 13:14:11 +00:00
Matthias Mair
8f6893a6b2
[PUI] Auth behaviour controls (#6314)
* optimize login layout

* move auth/reg up

* [PUI] Registration
Fixes #6282

* [PUI] Registration
Fixes #6282

* fix type

* Add auth settings to API state

* control showing of registration via state

* small cleanups

* Added registration and password forgotten to auth endpoint

* control password forgotten via state

* cleanup imports

* bump api version
2024-01-23 23:27:41 +11:00
dependabot[bot]
f35ce29612
Bump pillow from 10.1.0 to 10.2.0 (#6323)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.1.0...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 10:03:07 +11:00
Oliver
d502d93380
[PUI] Small updates (#6320)
* Ensure .ts files are generated

- "yarn run compile" before "yarn run dev"
- ensures that .ts locale files are all generated

* Implement "Add Part Category" button

* Create new stock location

* Rename customActionGroups to tableActions

* Rename customFilters to tableFilters

* Edit category from table

* Edit stock location from table

* Add some placeholder buttons

* More placeholders
2024-01-22 13:55:44 +00:00
Oliver
ab921ccb31
[PUI] Logout Fixes (#6318)
* Refactor method to extract token from request

* Reimplement error-report API endpoint

- Removed in previous commit - b8b3dfc90e
- Adds unit tests to ensure it doesn't happen again

* Adds custom logout view for API

- Ensure correct token gets deleted
- Our new custom token setup is incompatible with default dj-rest-auth
2024-01-22 12:07:35 +00:00
Oliver
e7d926f983
Reimplement error-report API endpoint (#6317)
- Removed in previous commit - b8b3dfc90e
- Adds unit tests to ensure it doesn't happen again
2024-01-22 12:03:58 +00:00
Oliver
f85b773a50
Only import tracing module if tracing is enabled (#6316) 2024-01-22 22:14:55 +11:00
Matthias Mair
d64fbfc254
[PUI] Registration (#6309)
* optimize login layout

* move auth/reg up

* [PUI] Registration
Fixes #6282

* [PUI] Registration
Fixes #6282

* fix type

* style: cleaned imports
2024-01-22 21:39:06 +11:00
Oliver
2fbb8c757f
[PUI] Test template table (#6311)
* Add PartTestTemplateTable

* Update PartTestTemplate API

- Improve filtering options
- Add sorting options
- Add search options

* Update table

* Add placeholders for editing and deleting test templates

* Update calls to DescriptionColumn

* CORS fixes:

- Update CORS headers in settings.py

* Add / edit / delete templates

* Fix for partId
2024-01-22 04:49:33 +00:00
Oliver
edad000d8e
CORS fixes: (#6310)
* CORS fixes:

- Update CORS headers in settings.py

* Remove dead code
2024-01-22 04:48:58 +00:00
Lavissa
917a88c6f4
Add check for KeyError on reading plugin commit (#6300)
* Add check for KeyError on reading plugin commit

* .

* .
2024-01-22 06:56:08 +11:00
Oliver
428a4c0386
SSO Error Improvememts (#6246)
* Improve exception handling

* Extract extra information from SSO auth failure

* Revert order of ignore check
2024-01-21 23:31:47 +11:00
Oliver
4b5fcd4e69
Remove {% jstrans %} tag (#6298)
* Revert {% jstrans %} for .js files

- file extension is enough

* Remove custom jstrans templatetag

* Replace jstrans calls for .html files

- Add "escape=True"

* Allow for custom "escape" argument

* Update custom trans tag

- Cannot pass kwargs in the same way
- Add the "escape" attribute

* Update js translations in html files
2024-01-21 22:47:47 +11:00
Oliver
c5d0902379
django-allauth==0.6.1 (#6301) 2024-01-20 22:33:41 +00:00
Oliver
e3f6624cf9
SSO config docs (#6297)
* Fix django-allauth URLs

* Update SSO docs
2024-01-20 15:31:17 +11:00
dependabot[bot]
22068da3fa
Bump vite from 4.4.12 to 4.5.2 in /src/frontend (#6296)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.12 to 4.5.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.2/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-20 02:40:52 +00:00
Oliver
4f8dddc597
JS translation fix (#6288)
* Implement {% jstrans %} template

- Forces string escaping in translated text
- Required for js written in templates

* Fix part_base.html

* Update .html files

- Change any templated javascript code to use {% jstrans %}

* Update .js files

- Explicitly use {% jstrans %}

* Update CI checks
2024-01-19 01:16:17 +00:00
Matthias Mair
914743627b
[PUI] Fix global login (#6287)
* Global login PUI -> CUI
Fixes #6285

* ensure session is always set

* Check if user is already logged in CUI->PUI

* reduce diff
2024-01-19 00:57:00 +00:00
Oliver
a0b595de6e
Tracing tweaks (#6278)
* Tweaks for OpenTelemetry tracing:

- Add logger info message if enabled
- Explicit kwargs to setup_tracing method
- Change is_http to True by default (as per internal docs)

* Allow operation without specifying tracing.headers

* Clean up log message
2024-01-19 11:55:48 +11:00
Matthias Mair
357f715789
[PUI] Fix logout (#6284)
* fix path

* changed PUI to use logout route
Fixes #5968
2024-01-19 11:30:19 +11:00
Matthias Mair
64dbf8c1e3
[FR] Add tracing support (#6211)
* [FR] Add tracing support
Fixes #6208

* move checks out of manage.py

* fixed reqs

* small cleanup

* move tracing init to settings
similar to how sentry is handled

* rephrase

* clean up imports

* added argument regarding console debugging

* fix typing

* added auth section

* remove empty headers

* made protocol configurable

* rename vars & cleanup template

* more docs for template

* add docs
2024-01-18 17:50:05 +11:00
Oliver
89e458bcba
Import Fix (#6274)
* Fix check for static dir

* Fix export price field for SalesOrderLineItem

* Automatically detect which non-nullable fields need conversion

* Fix bug during import

- fulfilled_quantity and allocated_quantity must have a pk
- Cannot work before imported!
2024-01-18 17:25:25 +11:00
Oliver
1d3a23ca4e
News updates (#6275)
* Set default ordering

* Order table by "most recent entries" by default
2024-01-18 17:25:15 +11:00
Matthias Mair
b8b3dfc90e
Move more paths to basic path (#6251)
* move more paths to basic path

* changed url route to only match fully - fixed test

* revert path changes on labelprint pages

* fix not found/redirect

* revert test change
2024-01-18 17:05:10 +11:00
Oliver
c3a5d777b1
Do not create owners when importing data (#6271)
- Prevent issues due to duplicate Owner objects
2024-01-18 10:31:43 +11:00
Oliver
053df0f59d
Update README.md (#6270)
Add new sponsor

(Thanks @markus-k :) )
2024-01-18 09:37:54 +11:00
Lavissa
0892de8c99
Fix news feed task timeout (#6250) 2024-01-17 17:52:52 +11:00
Oliver
eb7fd4de2b
New Crowdin updates (#6258)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-17 16:40:17 +11:00
Oliver
b983a8636c
Report copy fix (#6264)
* Update process for copying default report templates

- Overwrite if the file hash has changed

* Cleanup inline code
2024-01-17 16:40:05 +11:00
Oliver
7d36049ac9
[React] UI Translation Updates (#6257)
* Move locales definition into separate file

- Cleanup settings.py a bit

* Update docstring

* Expose 'default_locale' to info API endpoint

* Validate settings.LANGUAGE_CODE

* Fix bug in BuildDetail page

* Use selected language when making API queries

* Translate more strings

* Tweak variable name

* Update locale config

* Remove duplicate code

* Remove compiled messages.ts translation files

* Fixes for LanguageContext.tsx

* Update messages.d.ts for sr locale

* Ensure compiled files are served by django runserver

* Amend changes to STATICFILES_DIRS

* Cleanup prerender.py

* Refetch status codes when locale is changed

* Fix log msg

* Clear out old static files
2024-01-17 16:29:06 +11:00
Oliver
386aa5952c
Update invoke docs (#6263)
- Minimum invoke version is 2.0.0
2024-01-17 12:36:24 +11:00
Oliver
75f75ed820
Tasks API Endpoint (#6230)
* Add API endpoint for background task overview

* Cleanup other pending heartbeat tasks

* Adds API endpoint for queued tasks

* Adds API endpoint for scheduled tasks

* Add API endpoint for failed tasks

* Update API version info

* Add table for displaying pending tasks

* Add failed tasks table

* Use accordion

* Annotate extra data to scheduled tasks serializer

* Extend API functionality

* Update tasks.py

- Allow skipping of static file step in "invoke update"
- Allows for quicker updates in dev mode

* Display task result error for failed tasks

* Allow delete of failed tasks

* Remove old debug message

* Adds ability to delete pending tasks

* Update table columns

* Fix unused imports

* Prevent multiple heartbeat functions from being added to the queue at startup

* Add unit tests for API
2024-01-17 07:10:42 +11:00
miggland
5c7d3af150
Add tests for report API (#6214)
* Add tests for report api

* Add test for delete endpoint

* Use pk in reverse call

* Allow kwargs in APITestCase methods

* Data is in response.data

* Fix comment

* Use expected_code argument instead of separate check

* Test with superuser

* Negative indexing not allowed, try with this alternative

* Looking for what went wrong..

* APITestCase does not work like Python requests - change POST calls

* Upload success is code 201

* In PATCH method, change test file and description as well

* Add test for get_api_url method

* Change format parameter for file upload

* Copy tests for report API over to label API

* Add test model for BuildLineLabel

* Update tests

* Make example template valid

* Add methods for testing label printing
2024-01-17 06:55:55 +11:00
Oliver
21ff17332d
Do not translate string (#6248) 2024-01-16 22:12:59 +11:00