Commit Graph

12913 Commits

Author SHA1 Message Date
Oliver Walters
b0d2ece263 Unit test fixes 2022-05-09 20:11:02 +10:00
Oliver Walters
037e057c53 Adds global setting to enable or disable webcam support for barcode scanning 2022-05-09 19:46:11 +10:00
Oliver
77eb978c25
Merge pull request #2944 from SchrodingersGat/settings-by-key
Settings by key
2022-05-09 19:38:46 +10:00
Oliver
931081cb4f
Merge pull request #2948 from SchrodingersGat/column-extraction-fix
Check for empty column name in data importer
2022-05-09 08:15:00 +10:00
Oliver Walters
b3c1d6b603 Fix plugin registry function so tests pass 2022-05-09 07:59:01 +10:00
Oliver Walters
3db09156ed Check for empty column name in data importer
Ref: https://github.com/inventree/InvenTree/issues/2940
2022-05-09 07:53:10 +10:00
Oliver Walters
aed02f6f0f PEP fixes 2022-05-08 22:53:49 +10:00
Oliver Walters
e78a5dc104 Keep existing behaviour for notification settings (at least for now) 2022-05-08 22:52:08 +10:00
Oliver Walters
3a9bacb27c Implement new approach for plugin settings
- URL specifies plugin slug and setting key
2022-05-08 22:48:47 +10:00
Oliver Walters
f733e23b65 Update serializer for plugin settings API
- Use string key rather than pk for plugin
- Allow filtering by 'enabled' status of the plugin
- Allow filtering by the plugin key
2022-05-08 17:46:19 +10:00
Oliver Walters
5cd2c20a11 PEP style fixes 2022-05-08 17:32:23 +10:00
Oliver Walters
6415a20e6e Update api_version.py 2022-05-08 13:33:28 +10:00
Oliver Walters
9e872d283b Update unit tests to match new format
- Add more unit tests for global settings
- Add more unit tests for user settings
2022-05-08 13:31:53 +10:00
Oliver Walters
5560706c33 User settings are now accessed via unique KEY 2022-05-08 10:58:31 +10:00
Oliver Walters
dd017f36c7 Augment existing frontend code to allow adjustment of notification settings 2022-05-08 10:50:57 +10:00
Oliver Walters
cd6a6b9196 Access global settings via the API using the <key> of the setting, rather than the <PK>
- Allows us to access settings even if they have not been 'created' yet
- Settings are created with default values if not found
2022-05-08 10:39:14 +10:00
Oliver
64e2234159
Merge pull request #2937 from SchrodingersGat/panel-plugin
[Feature] UI Plugins
2022-05-08 09:01:43 +10:00
Oliver Walters
ada1eeeb35 Remove 'no cover' 2022-05-08 07:53:21 +10:00
Oliver Walters
50d8f242bb Fix for unit test 2022-05-07 23:50:41 +10:00
Oliver
52bae1feef
Translation updates (#2924)
* 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 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 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 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-07 23:25:54 +10:00
Oliver Walters
b2689b943e Specific call to super() was actually needed 2022-05-07 23:22:54 +10:00
Oliver Walters
e57a3870c6 Fix build index template 2022-05-07 22:47:48 +10:00
Oliver Walters
06e79ee91b Move view mixin to plugin.views 2022-05-07 22:34:03 +10:00
Oliver Walters
9f15dd8e2a Custom panels can now be rendered from a template 2022-05-07 22:32:26 +10:00
Oliver Walters
103921f5c4 Rename plugin.loader to plugin.template
- Add helper function for rendering a template
2022-05-07 19:59:59 +10:00
Oliver Walters
44c4e88646 Add a configurable setting to the demo plugin 2022-05-07 02:17:20 +10:00
Oliver Walters
96f61dfcdb Add plugin description 2022-05-06 23:48:24 +10:00
Oliver Walters
bcf6e41b48 Add some example docs 2022-05-06 23:43:54 +10:00
Oliver Walters
5ed0128435 PEP style fixes 2022-05-06 23:34:34 +10:00
Oliver Walters
60f799c90a Add plugin view support for most of the remaining views 2022-05-06 23:32:42 +10:00
Oliver Walters
243e3ff37d Fix calls to super() 2022-05-06 23:32:09 +10:00
Oliver Walters
12c58b14d6 Improvements for panel mixin sample 2022-05-06 23:19:47 +10:00
Oliver Walters
0797e9ebf0 Simplify the new template rendering
- No extra template code is required for any new page
- All loaded in base.html or page_base.html
- Oh, so clean!
2022-05-06 23:19:21 +10:00
Oliver Walters
71128a1c8e Refactor the plugin javascript template
- Can appear in "base.html"
- Only renders anything if there are actually plugins available for the page
2022-05-06 22:57:15 +10:00
Oliver Walters
c80b36fc2f Adds a new InvenTreePluginMixin mixin class for enabling custom plugin rendering on a page
- Any view which needs custom plugin code must implement this mixin
- Initially implement for the PartDetail page
2022-05-06 22:52:52 +10:00
Oliver Walters
7b8a10173d Adds a new "Panel" mixin which can render custom panels on given pages
- Adds item to sidebar menu
- Adds panel content
- Runs custom javascript when the page is loaded
2022-05-06 22:49:51 +10:00
Oliver Walters
28e16616e5 Adds a PanelMixin plugin mixin class
Intended to allow rendering of custom panels on pages
2022-05-06 21:32:11 +10:00
Oliver Walters
170cb54490 Sort urls.py 2022-05-06 21:30:27 +10:00
Oliver Walters
b80ff5e460 Tweak display of plugin badges 2022-05-06 21:03:30 +10:00
Oliver
9e1d8e52f3
Merge pull request #2805 from matmair/matmair/issue2385
Plugins for notifications
2022-05-06 20:00:56 +10:00
Oliver
1b7172b57e
Merge pull request #2936 from matmair/test_tags
Test more templatetags
2022-05-06 12:16:14 +10:00
Matthias
09ceada639
fix test assertation 2022-05-06 03:03:08 +02:00
Matthias
0d0b713f6e
Fix tests 2022-05-06 02:26:58 +02:00
Matthias
2261e7a615
PEP fix 2022-05-06 02:20:38 +02:00
Matthias
33e3385830
fix assertations 2022-05-06 02:17:53 +02:00
Matthias
20d552f809
extend tag tests 2022-05-06 02:13:25 +02:00
Matthias
0eff4a4526
can not be covered in testing 2022-05-06 02:07:59 +02:00
Matthias
baf7e4505e
do not cover pacakge code - is not CI'd 2022-05-06 01:52:32 +02:00
Matthias
9a9a7e0ff4
also cover list API 2022-05-06 01:31:23 +02:00
Matthias
a2331829c9
this can not happen with normal operation 2022-05-06 01:31:11 +02:00