* Adds basic API endpoint for requesting plugin panels * Split PanelType out into own file * Placeholder for a plugin panel loaded dynamically * Add some dummy data for the plugin panels * Example of plugin panel selection based on page * Expose some global window attributes * Add new setting * Disable panel return if plugin integration is not enabled * Update hook to auto-magically load plugin panels * Allow custom panel integration for more panel groups * Remove debug call * Tweak query return data * async fn * Adds <PluginPanel> component for handling panel render * Cleanup * Prevent API requests before instance ID is known * Pass instance data through * Framework for a sample plugin which implements custom panels * offload custom panels to sample plugin * Load raw HTML content * Expand custom panel rendering demo * Adjust API endpoints * Add function to clear out static files which do not match installed plugin(s) * Update static files when installing plugins from file * Update static files when installing or uninstalling a plugin * Update static files on config change * Pass more information through to plugin panels * Prepend hostname to plugin source * Pass instance detail through * Cleanup code for passing data through to plugin panels - Define interface type - Shorten variable names * Update docs requirements * Revert "Update docs requirements" This reverts commit 63a06d97f58ae15d837babb799b9ed8b22c3802b. * Add placeholder for documentation * Fix imports * Add a broken panel which tries to load a non-existent javascript file * Render error message if plugin does not load correctly * Only allow superuser to perform plugin actions * Code cleanup * Add "dynamic" contnt - javascript file - to example plugin * Remove default values * Cleanup unused code * PanelGroup updates * Cleanup hooks for changing panel state * More work needed... * Code cleanup * More updates / refactoring - Allow dynamic hiding of a particular panel - Pass target ref as positional argument - Better handling of async calls * Documentation * Bump API version * Provide theme object to plugin context * Adjust sample plugin * Docs updates * Fix includefile call in docs * Improve type annotation * Cleanup * Enable plugin panels for "purchasing index" and "sales index" pages * Fix for plugin query check * Improvements to panel selection - Code refactor / cleanup - Ensure that a valid panel is always displayed - Allow plugin panels to persist, even after reload * Playwright test fixes * Update src/frontend/src/hooks/UsePluginPanels.tsx Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com> * Update src/frontend/src/components/plugins/PluginPanel.tsx Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com> * Update src/frontend/src/components/plugins/PluginContext.tsx Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com> * Fix context * Add more context data * Docs updates * Reimplement local state * Fix mkdocs.yml * Expose 'colorScheme' to plugin context * Define CustomPanel type definition * Add unit testing for user interface plugins * Add front-end tests for plugin panels * Add new setting to plugin_settings_keys * Adds helper function for annotating build line allocations * Improve query efficiency - Especially around unit testing - Ensure all settings are generated - Do not auto-create settings during registry load * Improve query efficiency for build order operations * Reduce max query count for specific test * Revert query count limit * playwright test updates --------- Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
InvenTree Documentation
This repository hosts the official documentation for InvenTree, an open source inventory management system.
To serve this documentation locally (e.g. for development), you will need to have Python 3 installed on your system.
Setup
Run the following commands from the top-level project directory:
$ git clone https://github.com/inventree/inventree
$ pip install --require-hashes -r docs/requirements.txt
Serve Locally
To serve the pages locally, run the following command (from the top-level project directory):
$ mkdocs serve -f docs/mkdocs.yml -a localhost:8080
Edit Documentation Files
Once the server is running, it will monitor the documentation files for any changes, and update the served pages.
Admonitions
"Admonition" blocks can be added as follow:
!!! info "This is the admonition block title"
This is the admonition block content
Refer to the reference documentation to customize the admonition block to the use-case (eg. warning, missing, info, etc.).
Internal Links
Links to internal documentation pages must use relative pathing, otherwise the link will be broken by the readthedocs URL formatting.
Also, linking to an internal page must use the .md
suffix!
For example, to link to the page /part/views
from /stock/stocktake
, the link must be formed as follows:
Click [here](../part/views.md)
Formatting the link as follows:
Click [here](/part/views)
will result in a broken link.
Images
Images are served from the ./docs/assets/images
folder and can be added as follow:
{% with id="image_id", url="folder/image_name.png", description="Text shown if image is not loaded properly" %}
{% include 'img.html' %}
{% endwith %}
Replace:
image_id
with a short unique identifier for the image (most commonly,image_id
is same asimage_name
)folder
with the folder indocs/assets/images
in which the image is storedimage_name
with the name of the image.png
with the image extension (PNG or JPEG are preferred formats)
Global variables
Refer to the reference documentation to find out how to add global variables to the documentation site.
Global variables should be added in the # Global Variables
section of the mkdocs.yml
configuration file.
Credits
This documentation makes use of the mkdocs-material template