* 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
* 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
* Adds API endpoint for fetching error information
* Bump API version
* Implement table for displaying server errors
* Add support for "bulk delete" in new table component
* Update API version with PR
* Fix unused variables
* Enable table sorting
* Display error details
* Add option to display full names instead of usernames
* InvenTree Setting added to allow for admins to choose full names
over usernames for display in the web GUI
* Fix FA icon for settings page
* Remove debug print
* added deepsource coverage settings
* Ignore missing coverage
* trigger full CI run
* typo
* Added general status lookup endpoint
* Bumped API version
* cleaned up branch
* Fixed PlaygroundArea accordion behaviour
* Added dummy area for status labels
* Added StatusRenderer skeleton
* Fetch data from server
* Made server api state session persistant
* cleanup
* Added StatusLabel lookups based on ModelType
* Made use of translated status fields
* Added new ModelTypes
* Used new StatusRenderer
* Simplified renderer
* style fixes
* revert style change
* Squashed commit of the following:
commit 5e8ea099068475fd257d8c172348dc6f3edf9bcf
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 09:22:38 2023 +0200
Update ui_plattform.spec.ts
commit 49da3312beff7fd6837ea741e621df221c445d19
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 07:56:25 2023 +0200
more logging
commit 5337be4c3990051b805a6fce2e79ca4030b4afe5
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 07:56:11 2023 +0200
added filter method for undefined settings that overwrite defaults
commit 5df8a0b3e77cd5dcf04c39ad7638ac845df75e4c
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 03:05:06 2023 +0200
you do not need to string a string
commit 0650d3b3a0132889c2a76de38db38224e974d205
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 03:04:34 2023 +0200
fix things that were borken for no good reason
commit a40dbfd1364cf01465037350184f59d2a2a8afab
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 02:39:34 2023 +0200
reduce unneeded blocking timeouts
commit bf9046a5361ae919e70662e717d6156434b6fe43
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 02:34:10 2023 +0200
catch server fetching errors
commit aa01e67e8c8e789fdf755ac4481e730fe5ea4183
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 02:33:29 2023 +0200
move init as things are now plugged together different
commit 290c33bd3125d50779497d6fc5981d5813b58f5d
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 01:49:32 2023 +0200
do not log a failed automatic login try - why would you?
The use of `else` or `elif` becomes redundant and can be dropped if the last statement under the leading `if` / `elif` block is a `return` statement.
In the case of an `elif` after `return`, it can be written as a separate `if` block.
For `else` blocks after `return`, the statements can be shifted out of `else`. Please refer to the examples below for reference.
Refactoring the code this way can improve code-readability and make it easier to maintain.
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
There shouldn't be any blank lines after the function docstring.
Remove the blank lines to fix this issue.
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* Update settings API endpoints:
- Use cache to prevent unnecessary hits to db
- Make settings detail endpoints case insensitive
- Update API version
* Remove is_admin and is_superuser
- Contaminated from other commit
* revert seralizers.py
* Revert breaking change to users/api.py
* Improved handling of race condition when saving setting value
* Improvements for managing pending migrations
- Inform user if there are outstanding migrations
- reload plugin registry (if necessary)
* Increase django-q polling time
According to this thread, should reduce multiple workers taking the same task:
https://github.com/Koed00/django-q/issues/183#issuecomment-239676084
* Revert default behavior
* Better logging
* Remove comment
* Update unit test
* Revert maintenance mode behaviour
* raise ValidationError in settings
* Add plugin mixin class for supporting exchange rates
* Split some mixin classes out into their own files
- mixins.py is becoming quite bloated!
* Add some new settings for controlling currency updates
* Adds basic plugin implementation
* Refactor existing implementation
- Builtin plugin uses frankfurter.app API
- Better error / edge case handlign
* Add sample plugin for currency exchange
* Allow user to select which plugin to use for plugin updates
* Observe user-configured setting for how often exchange rates are updated
* Updates for some of the sample plugins
* Fix plugin slug
* Add doc page
* Document simple example
* Improve sample
* Add blank page for currency settings info
* More info in "config" page
* Update docs again
* Updated unit tests
* Fill out default settings values when InvenTree runs
* Add log messages
* Significant improvement in default settings speed
- Use bulk create
- Be efficient
- Dont' be inefficient
* More strict checks
* Refactor default values implementation
- Don't run at startup
- Run on list API
- Implement generic @classmethod
* Allow reload of plugin registry when config changes
- Any global settings which control plugin behaviour trigger reload
- Plugin registry hash includes the value of these settings
- Plugin registry hash is now cached
* typo
* get_setting_object: Handle ProgrammingError
* Improved exception handling
- Address a few cases on application startup if the database is not ready (migrations not applied)
* Fix bug in loading setting from cache
- Need to bring out "cache" key first, otherwise it gets included in the calculated cache key
- Reference: https://github.com/inventree/InvenTree/issues/5586
* Unit test fixes
* Fix missing filters for get settings validator
* merge default model instance filters and kwargs
* Added tests for validators
* Give it a try without the kwargs passed to clean in save function
* Added string for identification for debug statement
* Added more debug comments
* Added more debug prints
* Fix test debug
* Modiefied workflow
* trigger ci
* Fix test and remove unused kwargs
* Added debug prints
* Only run one test in ci
* Added more debug code
* Remove all debug prints and reset workflow
* Reset overlooked file
* Skip ready functions if not in main thread or plugins are not loaded yet
* Debug integration tests
* Update ready.py
* Update ready.py
* Fix isInMainThread and isPluginRegistryLoaded ready functions
* Preload gunicorn app to only invoke the appconfig ready functions once
* debug: test prints for statistics
* Remove debug print
* Test without
* Revert "Test without"
This reverts commit 1bc18728935f2cebed38ae64ffe9f4e2f1d8e539.
* Second test
* Add checks back to part, label, user model
* Add checks back to inventree, plugin apps
* log server output for debugging
* hopefully I can get the log this time+
* Next test
* Test with --noreload
* Next test
* trigger: ci, because session expired
* block the second ready execution instead of the first
* fix: load order
* Fix test and revert gh actions workflow change
* Added all_apps method to reload machanism
* Changed detect reload mechanism
* Also trigger ready on reload
* Add skipping second reload back for testing mode
* Added doc string back
* Update InvenTree/plugin/base/integration/AppMixin.py
* Add database model for defining custom units
- Database model
- DRF serializer
- API endpoints
* Add validation hook
* Custom check for the 'definition' field
* Add settings page for custom units
- Table of units
- Create / edit / delete buttons
* Allow "unit" field to be empty
- Not actually required for custom unit definition
* Load custom unit definitions into global registry
* Docs: add core concepts page(s)
* Add some back links
* Update docs
* Add unit test for custom unit conversion
* More unit testing
* remove print statements
* Add missing table rule
* Add skeleton for builtin label printing plugin
* Force selection of plugin when printing labels
* Enhance LabelPrintingMixin class
- Add render_to_pdf method
- Add render_to_html method
* Enhance plugin mixin
- Add class attribute to select blocking or non-blocking printing
- Add render_to_png method
- Add default method for printing multiple labels
- Add method for offloding print job
* Simplify print_label background function
- All arguments now handled by specific plugin
* Simplify label printing API
- Simply pass data to the particular plugin
- Check result type
- Return result
* Updated sample plugin
* Working on client side code
* Cleanup
* Update sample plugin
* Add new model type
- LabelOutput model
- Stores generated label file to the database
- Makes available for download
* Update label printing plugin mixin
* Add background task to remove any old label outputs
* Open file if response contains filename
* Remove "default printer" option which does not specify a plugin
* Delete old labels after 5 days
* Remove debug statements
* Update API version
* Changed default behaviour to background printing
* Update label plugin mixin docs
* Provide default printer if none provided (legacy)
* Update unit test
* unit test updates
* Further fixes for unit tests
* unit test updates
* Hide protected setting in settings view
* Implement custom serializer for setting value
- Return '***' if the setting is protected
* Implement to_internal_value
* Stringify
* Add protected setting to sample plugin
* Unit tests for plugin settings API
* Update unit test
* Added required attribute to settings/plugins, refactor: allValues
- added 'required' attribute to InvenTreeBaseSetting
- added 'check_all_settings'
- added 'all_settings' to get a list of all defined settings
- refactored 'allValues' to use new 'all_settings' function
- added docs for new 'check_setting' function on plugin SettingsMixin
* Fix typing to be compatible with python 3.9
* trigger: ci
* Fixed **kwargs bug and added tests
* Add 'location' filtering option for part.stock_entries
* Add "exclude_external" field to stocktake report
* Add "stocktake_exclude_external" default option
* Implement setting to exclude external stock
* Split stocktake functionality out into separate file
* Change name of internal setting
* Refactoring
* Add 'exclude_external' field to stocktake form
* Disable migration testing
- Compare how long the unit tests take
* Change file
- To get unit tests to run
* Fix format
* Consolidate tasks.py
- Remove coverage task
- Add --coverage flag to test task
* Fix typo
* Run migration unit tests if migration files are updated
* Fix
* Touch migration file
- Should cause migration unit tests to be run
* Force migration checks for docker build
* Prevent default report creation in unit tests
- Should save some time
* Add simple profiling for plugin loading
- Display time taken to load each plugin
* Fix to invoke test
* Disable get_git_log (for testing)
* Disable get_git_path in CI
- Might remove this entirely?
- For now, bypass for unit testing
* Add debug for unit registry
- Display time taken to load registry
* Don't full-reload unit registry
* Adjust migration test workflow
- env var updates
- change paths-filter output
* Fix for migration_test.yaml
- Actually need to set the output
* env fix
* db name
* Prevent sleep if in test mode
* Reduce sleep time on wait_for_db
* remove STOCK_RECENT_COUNT parameter
- Now "recent" is set by date
- Tables are paginated by the server
* Display total row count
* remove PART_RECENT_COUNT
- Replace with date filter
- Update Part.api
* Bump API version