InvenTree/src/frontend
Oliver c0c4e9c226
[WIP] Plugin Updates (#6400)
* Add method to extract "install name" from a plugin

* Include more information in plugin meta serializer

* Implement better API filtering for PluginConfig list

* Add an "update" button to the plugin table row actions

- Only for "package" plugins

* Adds method to update a plugin:

- Add plugin.installer.update_plugin method
- Add error logging to existing methods
- Add API endpoint and serializer
- Integrate into PUI table

* Implement lazy loading for plugin tables

* Extract package information on registry load

- Info is already available via entrypoint data
- Significantly faster as introspection operation is expensive
- Less code is good code

* Frontend updates

* Add accordion to plugin page

* Add setting to control periodic version check updates

* Update API version info

* Add "package_name" field to PluginConfig

- When the plugin is loaded, save this name to the PluginConfig model
- Update the admin view

* Update API serializer

* Refactor plugin installer code

- Add common functions

* Adds API endpoint for uninstalling an installed plugin

* Allow uninstall of plugin via API

- Add API endpoints
- Add UI elements

* Tweak for admin list display

* Update plugin

* Refactor "update" method

- Just use the "install" function
- Add optional "version" specifier
- UI updates

* Allow deletion of PluginConfig when uninstalling plugin

* Add placeholder for deleting database tables

* Revert code change

- get_object() is required

* Use registry.get_plugin()

- Instead of registry.plugins.get()
- get_plugin checks registry hash
- performs registry reload if necessary

* Add PluginValidationMixin class

- Allows the entire model to be validated via plugins
- Called on model.full_clean()
- Called on model.save()

* Update Validation sample plugin

* Fix for InvenTreeTree models

* Refactor build.models

- Expose models to plugin validation

* Update stock.models

* Update more models

- common.models
- company.models

* Update more models

- label.models
- order.models
- part.models

* More model updates

* Update docs

* Fix for potential plugin edge case

- plugin slug is globally unique
- do not use get_or_create with two lookup fields
- will throw an IntegrityError if you change the name of a plugin

* Inherit DiffMixin into PluginValidationMixin

- Allows us to pass model diffs through to validation
- Plugins can validate based on what has *changed*

* Update documentation

* Add get_plugin_config helper function

* Bug fix

* Bug fix

* Update plugin hash when calling set_plugin_state

* Working on unit testing

* More unit testing

* Fix typo (installing -> uninstalling)

* Reduce default timeout

* set default timeout as part of ApiDefaults

* revert changes to launch.json

* Remove delete_tables field

- Will come back in a future PR

* Fix display of nonFIeldErrors in ApiForm.tsx

* Allow deletion of deleted plugins

- PluginConfig which no longer matches a valid (installed) plugin

* Cleanup

* Move get_plugin_config into registry.py

* Move extract_int into InvenTree.helpers

* Fix log formatting

* Update model definitions

- Ensure there are no changes to the migrations

* Update PluginErrorTable.tsx

Remove unused var

* Update PluginManagementPanel.tsx

remove unused var

* Comment out format line

* Comment out format line

* Fix access to get_plugin_config

* Fix tests for SimpleActionPlugin

* More unit test fixes

* Update plugin/installer.py

- Account for version string
- Remove on uninstall

* Fix
2024-02-07 02:08:30 +11:00
..
public Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
src [WIP] Plugin Updates (#6400) 2024-02-07 02:08:30 +11:00
tests Squashed commit of the following: (#5785) 2023-10-26 07:55:52 +11:00
.babelrc Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
.eslintrc.cjs Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
.gitignore Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
.linguirc Add support for Slovak (#6351) 2024-01-29 10:56:58 +11:00
.prettierrc Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
index.html P UI: Basic UI & Auth setup (#5207) 2023-07-21 08:54:57 +10:00
netlify.toml [P_UI] Added django settings for p_ui (#5343) 2023-08-10 20:57:33 +10:00
package.json Bump vite from 4.4.12 to 4.5.2 in /src/frontend (#6296) 2024-01-20 02:40:52 +00:00
playwright.config.ts P-UI: Fast language / theme / server selection (#5301) 2023-07-22 22:19:19 +10:00
tsconfig.json Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
tsconfig.node.json Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
vite.config.ts Remove proxy support in vite server (#6359) 2024-01-29 22:18:25 +11:00
yarn.lock Bump vite from 4.4.12 to 4.5.2 in /src/frontend (#6296) 2024-01-20 02:40:52 +00:00