From 7555e52b8b61882663dde82fc69e1fd1d1fddd1d Mon Sep 17 00:00:00 2001 From: Marco Date: Fri, 26 Jul 2024 14:57:43 +0200 Subject: [PATCH] Update plugin pages and urls --- docs/getting-started/configuration.md | 2 +- docs/plug-in/export.md | 127 +----------------- docs/plug-in/index.mdx | 18 ++- docusaurus.config.ts | 6 +- ...ailwind-config.cjs => tailwind-plugin.cjs} | 0 5 files changed, 20 insertions(+), 133 deletions(-) rename plugins/{tailwind-config.cjs => tailwind-plugin.cjs} (100%) diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md index fff1593..2f8c8d7 100644 --- a/docs/getting-started/configuration.md +++ b/docs/getting-started/configuration.md @@ -144,7 +144,7 @@ This document describes the configuration file parameters for MantisTable UI. Th PLUGINS_PORT="port" ``` - The port on which the plugins service will run. + The port on which the plugins service (Doker container) will run. ## Configuration File Example diff --git a/docs/plug-in/export.md b/docs/plug-in/export.md index b53f6b9..a41174a 100644 --- a/docs/plug-in/export.md +++ b/docs/plug-in/export.md @@ -2,61 +2,10 @@ sidebar_position: 1 --- -# Export +# Export Plugins -MantisTable UI is designed with extensibility in mind, allowing users to enhance its capabilities through the use of plugins. There are three main types of plugins that can be integrated into MantisTable UI: - -1. **Export Plugins** -2. **Add-on Plugins** -3. **Transformation Plugins** - -## Plugin Types - -### 1. Export Plugins - -**Description:** Export plugins enable MantisTable UI to export data and annotation in user-defined formats. -**Use Cases:** -- Exporting tables to custom file formats (e.g., JSON, XML, CSV) -- Generating reports in PDF or other document formats -- Custom serialization of table data for integration with other systems - -### 2. Add-on Plugins - -**Description:** -Add-on plugins use semantic annotations to process table data, providing additional functionalities such as lexicalization and visualization. These plugins enhance the interpretability and presentation of the data. - -**Use Cases:** -- Visualizing table data in charts or graphs -- Generating natural language descriptions of table content -- Integrating with external semantic services for enriched data processing - -### 3. Transformation Plugins - -**Description:** -Transformation plugins perform various transformations on table data, such as data cleaning and data transformation. These plugins help in improving data quality and reshaping data to meet specific analysis needs. - -**Use Cases:** -- Cleaning and normalizing data entries -- Transforming table structures -- Applying complex data transformations and computations - -## Plugin Configuration - -Plugins are configured through the MantisTable UI configuration file (`.env`). The relevant parameters for configuring plugins include the base URL for the plugins service and the specific settings for each type of plugin. - -### Example Configuration - -```env -PLUGINS_PORT="5001" -EXPORT_PLUGINS_DIR="/path/to/export/plugins" -ADDON_PLUGINS_DIR="/path/to/addon/plugins" -TRANSFORMATION_PLUGINS_DIR="/path/to/transformation/plugins" -``` - -## Developing Plugins - ### General Guidelines 1. **Isolation:** Each plugin should operate independently and not interfere with other plugins or the core functionality of MantisTable UI. @@ -97,74 +46,6 @@ module.exports = { } ``` -### Add-on Plugin Example - -**Structure:** - -``` -/addon-plugin-example - /src - index.js - /config - config.json - /docs - README.md -``` - -**index.js:** - -```javascript -module.exports = { - process: (annotatedTable) => { - // Implement custom processing functionality here - return processedData; - } -}; -``` - -**config.json:** - -```json -{ - "name": "semantic-visualizer", - "description": "Add-on plugin for visualizing annotated tables" -} -``` - -### Transformation Plugin Example - -**Structure:** - -``` -/transformation-plugin-example - /src - index.js - /config - config.json - /docs - README.md -``` - -**index.js:** - -```javascript -module.exports = { - transform: (tableData) => { - // Implement custom transformation functionality here - return transformedData; - } -}; -``` - -**config.json:** - -```json -{ - "name": "data-cleaner", - "description": "Transformation plugin for cleaning and normalizing data" -} -``` - ## Using Plugins in MantisTable UI 1. **Install the Plugin:** @@ -178,8 +59,4 @@ module.exports = { 3. **Access Plugin Functionality:** - Export plugins can be accessed through the export menu in the UI. - Add-on plugins are typically accessed through semantic processing options. - - Transformation plugins can be applied through the data transformation tools in the UI. - -## Conclusion - -The plugin system in MantisTable UI provides a flexible and powerful way to extend the functionality of the application. By developing custom export, add-on, and transformation plugins, users can tailor MantisTable UI to meet their specific needs and enhance their data management workflows. \ No newline at end of file + - Transformation plugins can be applied through the data transformation tools in the UI. \ No newline at end of file diff --git a/docs/plug-in/index.mdx b/docs/plug-in/index.mdx index bf5efe2..a0658a7 100644 --- a/docs/plug-in/index.mdx +++ b/docs/plug-in/index.mdx @@ -1,17 +1,25 @@ -# Plug-in +# Plugin -MantisTable UI is designed with extensibility in mind, allowing users to enhance its capabilities through the use of plugins. There are three main types of plugins that can be integrated into MantisTable UI: +MantisTable UI is designed with extensibility in mind, allowing users to enhance its capabilities through the use of plugins. +There are three main types of plugins that can be integrated: 1. **Export Plugins** 2. **Add-on Plugins** 3. **Transformation Plugins** +To ensure security and stability, the plugins are executed in isolation within Docker containers. +This approach guarantees that each plugin operates in an independent environment, preventing interference between plugins and the core system. + +:::warning +For correct execution of the plugins, remember to set the corresponding [port](/docs/getting-started/configuration#plugins). +::: + ## Plugin Types ### 1. Export Plugins **Description:** -Export plugins enable MantisTable UI to export data and annotation in user-defined formats. +Export plugins enable MantisTable UI to export data and annotations in user-defined formats. **Use Cases:** - Exporting tables to custom file formats (e.g., JSON, XML, CSV) @@ -21,7 +29,9 @@ Export plugins enable MantisTable UI to export data and annotation in user-defin ### 2. Add-on Plugins **Description:** -Add-on plugins use semantic annotations to process table data, providing additional functionalities such as lexicalization and visualization. These plugins enhance the interpretability and presentation of the data. +Add-on plugins use semantic annotations to process table data, providing additional functionalities such as lexicalization and visualization. +These plugins enhance the interpretability and presentation of the data. + **Use Cases:** - Visualizing table data in charts or graphs diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 55e4ff3..efc14d7 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -1,7 +1,7 @@ import {themes as prismThemes} from 'prism-react-renderer'; import type {Config} from '@docusaurus/types'; import type * as Preset from '@docusaurus/preset-classic'; -import tailwindPlugin from './plugins/tailwind-config.cjs'; +import tailwindPlugin from './plugins/tailwind-plugin.cjs'; const config: Config = { title: 'MantisTable UI', @@ -12,7 +12,7 @@ const config: Config = { url: 'https://unimibinside.github.io', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: '/mantistable-docs/', + baseUrl: '/mantistable-ui-docs/', // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. @@ -73,7 +73,7 @@ const config: Config = { label: 'Documentation', }, { - href: 'https://github.com/UNIMIBInside/mantistable', + href: 'https://github.com/UNIMIBInside/mantistable-ui', label: 'GitHub', position: 'right', }, diff --git a/plugins/tailwind-config.cjs b/plugins/tailwind-plugin.cjs similarity index 100% rename from plugins/tailwind-config.cjs rename to plugins/tailwind-plugin.cjs