Commit Graph

711 Commits

Author SHA1 Message Date
Matthias 897dd115f9
PEP fix 2022-05-15 04:14:13 +02:00
Matthias b0439267ea
fix error-type to use custom errors 2022-05-15 04:12:57 +02:00
Matthias 025c6f9b82
raise proper error 2022-05-15 04:08:45 +02:00
Matthias 7a102dcd8e
PEP fix 2022-05-15 03:22:43 +02:00
Matthias 976cbfbb8b
remove old definition 2022-05-15 03:20:11 +02:00
Matthias 5048d51558
Refactor printer into own base dir 2022-05-15 03:19:47 +02:00
Matthias 43b1d25016
PEP fix 2022-05-15 03:06:35 +02:00
Matthias 4fa23cbe4d
split up tests 2022-05-15 02:58:01 +02:00
Matthias 777e3f42df
fix test 2022-05-15 02:57:23 +02:00
Matthias 68940deb5b
rename test 2022-05-15 02:56:05 +02:00
Matthias e68cd009f6
fix input 2022-05-15 02:54:21 +02:00
Matthias eb7e9f4703
test url args in action 2022-05-15 02:49:08 +02:00
Matthias 7abdffae0d
Add post test 2022-05-15 02:48:59 +02:00
Matthias 7c0dea69b0
add test for api_call with full url 2022-05-15 02:42:40 +02:00
Matthias 039dbbbe7e
fix doctest 2022-05-15 02:40:23 +02:00
Matthias 442341de50
split into more tests 2022-05-15 02:39:55 +02:00
Matthias 3e6b37bf55
Add test without simple_response 2022-05-15 02:35:06 +02:00
Matthias 8c6061d3b7
move failing test to seperate test 2022-05-15 02:32:26 +02:00
Matthias aeaf15b374
Test action error messages 2022-05-15 02:25:30 +02:00
Matthias abac26725b
use returns for checks 2022-05-15 01:47:44 +02:00
Matthias 640242eca3
Add tests for plugin installs form url with pkgn 2022-05-15 01:32:52 +02:00
Matthias 1cb51d1782
Do not cover custom install dirs 2022-05-15 01:29:50 +02:00
Matthias 76f92003fd
Fix assertation 2022-05-15 01:15:00 +02:00
Matthias 6660069f45
add docs 2022-05-15 01:10:46 +02:00
Matthias 39543555af
Add test for call_funciton 2022-05-15 01:10:23 +02:00
Matthias 43179bbfd5
remove coverage where it does not make sense 2022-05-15 01:07:50 +02:00
Matthias 47673c293e
Merge branch 'master' of https://github.com/inventree/InvenTree into plugin-app-refactor 2022-05-12 23:45:12 +02:00
Oliver a81ea01e8e Model introspection
- Find the class registered to the model (or log an error)
- Pass the api_url through to the frontend
2022-05-12 17:28:55 +10:00
Oliver e112d555d4 Simplify the various settings objects, to improve retrieval of 'parameters' from the base class
- Remove the GenericReferencedSettingsClass mixin
- Each subclass defines a very simple get_kwargs() method
- Now, at object level *and* class level we can perform lookup of settings and actually get proper data back
- Adds "model" option to setting (precursor of things to come)
2022-05-12 16:45:27 +10:00
Matthias 3d580e732f
change test to slug 2022-05-12 00:51:02 +02:00
Matthias eaab905bfd
reset plugin name default 2022-05-12 00:50:29 +02:00
Matthias bd42fea5fa
another pep check 2022-05-12 00:07:19 +02:00
Matthias 699db12b24
make test more precise 2022-05-12 00:04:37 +02:00
Matthias a6e889b25e
pep fix 2022-05-12 00:04:29 +02:00
Matthias c809398bda
Add check for IntegrationPluginBase depreciation 2022-05-12 00:01:23 +02:00
Matthias da3b7ae7d0
fix assertation typ 2022-05-11 23:57:21 +02:00
Matthias c274228806
fix test 2022-05-11 23:46:41 +02:00
Matthias 8becad3c0a
reset zero behaviour 2022-05-11 23:45:45 +02:00
Matthias c462399fef
check if depreciation fires 2022-05-11 23:45:17 +02:00
Matthias 2c83728f71
also check message 2022-05-11 23:27:42 +02:00
Matthias f8e51c0873
fix test 2022-05-11 23:21:42 +02:00
Matthias 912d0625f0
PEP fix 2022-05-11 23:12:27 +02:00
Matthias 432a9b2e4d
add warning if plugin testing - is need to probe for 2022-05-11 23:12:21 +02:00
Matthias 4397f57acc
test that a save() action on a plugin is reloading 2022-05-11 23:11:54 +02:00
Matthias baca0dc268
do not cover error 2022-05-11 23:05:22 +02:00
Matthias 8a91fc362b
test plugin model more 2022-05-11 23:05:08 +02:00
Matthias da885456b7
tests for template 2022-05-11 22:47:41 +02:00
Matthias 50156466db
fix title asks 2022-05-11 17:51:23 +02:00
Matthias d794890264
fix assertations 2022-05-11 17:38:42 +02:00
Matthias 5cb4f0e73d
PEP fix 2022-05-11 16:57:23 +02:00
Matthias 272d2f79cc
patch mixin 2022-05-11 16:55:38 +02:00
Matthias 175066ba19
rename functions 2022-05-11 16:51:50 +02:00
Matthias 37f72e9652
remove integration naming from docs 2022-05-11 16:50:36 +02:00
Matthias 1782974df8
replace depreceated values everywhere 2022-05-11 16:46:03 +02:00
Matthias 81deb8201e
new references for Meta values in plugin
depreceate old values - add depreeation warning
2022-05-11 16:35:38 +02:00
Matthias 5de6cc0d11
remove double def 2022-05-11 14:58:29 +02:00
Matthias e8c9d71360
Adapt docs 2022-05-11 14:55:45 +02:00
Matthias b1b1db29b9
restructure 2022-05-11 14:54:11 +02:00
Matthias 9eadcce0eb
move mixins 2022-05-11 14:48:36 +02:00
Matthias 355695c679
make MixinBase betterfor init 2022-05-11 14:47:00 +02:00
Matthias f76dcdeb82
move properties to meta 2022-05-11 14:45:45 +02:00
Matthias dfb11cca1d
Add legacy 2022-05-11 14:40:00 +02:00
Matthias 1571b99ed2
rename IntegrationPluginBase to InvenTreePlugin 2022-05-11 14:28:26 +02:00
Matthias 01e8b5dce3
remove InvenTreePluginBase 2022-05-11 14:21:16 +02:00
Matthias 05839ca94c
remove legacy action 2022-05-11 14:20:05 +02:00
Matthias 19cfa540d9
add export definition 2022-05-11 14:06:11 +02:00
Matthias 538e5e6c21
rename shim 2022-05-11 14:03:24 +02:00
Matthias 1636459ccd
move to use shim 2022-05-11 14:02:45 +02:00
Matthias 066eaa119d
fix import 2022-05-11 14:01:29 +02:00
Matthias 3503ca4b4e
move import back too 2022-05-11 13:54:08 +02:00
Matthias 7361a9637a
move event back 2022-05-11 13:49:49 +02:00
Matthias 182ffd880a
init directories 2022-05-11 13:46:07 +02:00
Matthias dd5f53d2ef
PEP fix 2022-05-11 13:42:15 +02:00
Matthias 887609cf2a
move import 2022-05-11 13:38:24 +02:00
Matthias 1098327ba9
move out templete renderer into helper 2022-05-11 13:32:29 +02:00
Matthias 970503f424
refactor events 2022-05-11 13:28:59 +02:00
Matthias 5a139ec74b
make import simpler
the minimum version is 3.9
2022-05-11 13:19:24 +02:00
Matthias 9788419b0c
remove unneeded import 2022-05-11 13:13:34 +02:00
Matthias 51cca7a13c
move apis to their respective bases 2022-05-11 13:10:29 +02:00
Matthias 499f37a97a
PEP fix 2022-05-11 12:55:52 +02:00
Matthias 16a2328702
move tests to their functions 2022-05-11 12:55:04 +02:00
Matthias 934b795f9b
split tests to functions tests 2022-05-11 12:54:01 +02:00
Matthias 4ae5ed36a7
fix imports 2022-05-11 12:53:31 +02:00
Matthias 1da12fe5ff
add import comment 2022-05-11 12:45:40 +02:00
Matthias 18ad87433e
move plugin and integration together 2022-05-11 12:45:25 +02:00
Matthias 87ef2a3382
remove old code 2022-05-11 12:41:08 +02:00
Matthias 34467003ad
fix bacodeMixin base 2022-05-11 12:38:37 +02:00
Matthias 0d89959d49
move action 2022-05-11 12:38:14 +02:00
Matthias 308dd53c35
rename tests 2022-05-11 12:37:22 +02:00
Matthias b030c42480
move inegration mixins 2022-05-11 12:36:54 +02:00
Matthias b28f71374e
move barcodes 2022-05-11 12:35:42 +02:00
Matthias 3c9e4e7eab
make imports easier 2022-05-11 12:17:46 +02:00
Matthias f0d2730ae6
rename file to fit structure 2022-05-11 12:16:06 +02:00
Matthias b7087b83b5
Merge branch 'master' of https://github.com/inventree/InvenTree into add-report-check 2022-05-11 04:19:18 +02:00
Matthias 9a69f125a9
move barcodes to plugin 2022-05-11 04:08:13 +02:00
Oliver db018af0ce Prevent some model based events from triggering during data import 2022-05-10 13:43:16 +10:00
Matthias 688cb7469c
fix usage of old html tags 2022-05-09 19:58:38 +02:00
Oliver Walters 6c0661a6f2 PEP style fixes 2022-05-09 23:52:19 +10:00
Oliver Walters 57f3efe758 Adds an endpoint for calling the plugin code to "locate" something 2022-05-09 23:42:28 +10:00
Oliver Walters 4704db5183 Adds 'locate item' and 'locate location' buttons 2022-05-09 22:48:26 +10:00
Oliver Walters 26f32a0ce8 Plugin list API filters
- Filter by "active" status
- Filter by "mixin" support
2022-05-09 22:33:33 +10:00
Oliver Walters 6aeb7d723d Fix typo in mixin name 2022-05-09 22:25:09 +10:00
Oliver Walters 0a0a6a799a Fix for sample plugin 2022-05-09 22:20:00 +10:00
Oliver Walters 172705cc3b Adds sample plugin for locating items 2022-05-09 22:13:07 +10:00
Oliver Walters 59c747841c Adds plugin mixin to "locate" items 2022-05-09 22:01:27 +10:00
Oliver Walters b3c1d6b603 Fix plugin registry function so tests pass 2022-05-09 07:59:01 +10:00
Oliver Walters aed02f6f0f PEP fixes 2022-05-08 22:53:49 +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 ada1eeeb35 Remove 'no cover' 2022-05-08 07:53:21 +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 12c58b14d6 Improvements for panel mixin sample 2022-05-06 23:19:47 +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 9e1d8e52f3
Merge pull request #2805 from matmair/matmair/issue2385
Plugins for notifications
2022-05-06 20:00:56 +10:00
Matthias 0d0b713f6e
Fix tests 2022-05-06 02:26:58 +02:00
Matthias baf7e4505e
do not cover pacakge code - is not CI'd 2022-05-06 01:52:32 +02:00
Matthias 1a70829f5c
do not cover dev error catcher 2022-05-06 01:12:11 +02:00
Matthias 50b17d6ae8
add mixin test 2022-05-06 01:03:11 +02:00
Matthias 17127e914d
PEP fix 2022-05-04 17:44:27 +02:00
Matthias 05d1f9703e
Add nice repr for NotificationUserSetting 2022-05-04 17:42:45 +02:00
Matthias a27f8a427a
Merge branch 'matmair/issue2385' of https://github.com/matmair/InvenTree into matmair/issue2385 2022-05-04 17:40:47 +02:00
Matthias cf986e557c
make unloading safer 2022-05-04 17:40:44 +02:00
Matthias 0ff407348d
Add admin for NotificationUserSetting 2022-05-04 17:39:37 +02:00
Matthias 34855bbb37
add API endpoint for notifications 2022-05-04 17:38:50 +02:00
Matthias c684e7d5e0
Add generic serializer 2022-05-04 16:57:39 +02:00
Matthias Mair cf93ba7cf9
Merge branch 'inventree:master' into matmair/issue2385 2022-05-04 12:23:05 +02:00
Oliver b65a969433
Merge pull request #2928 from matmair/coverage-adaption
Increase coverage
2022-05-04 09:39:24 +10:00
Matthias 8038cff874
ignore for coverage 2022-05-04 00:43:49 +02:00
Matthias 6504ef535a
fix test - len needs to be recalculated 2022-05-03 23:23:36 +02:00
Matthias e1b395c9be
test is_active 2022-05-03 23:19:51 +02:00
Matthias cf0cbff69a
we are not covering packages right now 2022-05-03 23:19:01 +02:00
Matthias 5e277130fa
do not cover not implemented Mixin 2022-05-03 23:07:16 +02:00
Matthias c5acfaf541
do not coverage catch for load 2022-05-03 23:06:57 +02:00
Matthias e95c3e0948
do not cover default returns 2022-05-03 23:06:38 +02:00
Matthias 1522d330fa
add test for is_sample 2022-05-03 23:06:11 +02:00
Matthias 096c0c876c
PEP fix 2022-05-03 22:58:24 +02:00
Matthias d49f74746a
test that MixinImplementationErrors raise 2022-05-03 22:56:28 +02:00
Matthias 204b4fd527
rename test 2022-05-03 22:55:39 +02:00
Matthias 626e3838ae
also cover errors 2022-05-03 22:15:24 +02:00
Matthias a357c4ef88
also cover unregistering 2022-05-03 22:13:29 +02:00
Matthias 08e278232b
ignore db not ready in coverage 2022-05-03 22:12:34 +02:00