Skip to content

Commit

Permalink
docs: job plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
soofstad committed Jun 3, 2024
1 parent 8aae3a2 commit cf200ef
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 3 deletions.
47 changes: 47 additions & 0 deletions packages/dm-core-plugins/docs/JobControlPlugin/Documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Plugin for `WorkflowDS/Blueprints/Job` and `WorkflowDS/Blueprints/RecurringJob` entities.

Features:

- Start/Stop/Restart/Cancel job
- View job logs
- Select "job runner" from a list of templates
- Configure and register recurring jobs

__Job__

![control](./control.png)

__RecurringJob__

![recurring](./recurring.jpg)
## Usage

Example UiRecipe

``` json
{
"name": "job-control",
"type": "CORE:UiRecipe",
"plugin": "@development-framework/dm-core-plugins/job"
"config": {
"type": "PLUGINS:dm-core-plugins/job/ControlConfig",
"hideLogs": false,
"runnerTemplates": [
{
"type": "PLUGINS:dm-core-plugins/common/Template",
"label": "Radix",
"path": "dmss://DemoDataSource/plugins/job/radixJobRunner"
},
{
"type": "PLUGINS:dm-core-plugins/common/Template",
"label": "Local",
"path": "~.~.localContainerRunner"
}
]
},
}
```

`runnerTamplates` is a list of templates that will be shown in the cog-icon dropdown.
The `path` must be an _absolute_ or _relative_ reference to a `runner` entity of the
type `WorkflowDS/Blueprints/JobHandler`(or extending from it).
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"folder": "job",
"main": "ControlConfig"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions packages/dm-core-plugins/docs/JobCreatePlugin/Documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Plugin for creating and controlling entities of type `WorkflowDS/Blueprints/Job` and `WorkflowDS/Blueprints/RecurringJob`.

This plugin can be used on any entity.

Features:

- Start/Stop/Restart/Cancel job
- View job logs
- Select "job runner" from a list of templates
- Configure and register recurring jobs
- Configure job input (recipe config)
- Configure job save location (recipe config

__Job__

![control](./control.png)

__RecurringJob__

![recurring](./recurring.jpg)
## Usage

Example UiRecipe

``` json
{
"name": "CreateAndRunJob",
"type": "CORE:UiRecipe",
"description": "Create and run a job",
"config": {
"type": "PLUGINS:dm-core-plugins/job/CreateConfig",
"jobInputAddress": ".",
"jobTargetAddress": ".job",
"jobTemplates": [
{
"type": "PLUGINS:dm-core-plugins/common/Template",
"label": "signal job",
"path": "/$4483c9b0-d505-46c9-a157-94c79f4d7a6a.study.jobTemplate"
}
],
"recurring": false
},
"plugin": "@development-framework/dm-core-plugins/job/create"
}
```

`runnerTamplates` is a list of templates that will be shown in the cog-icon dropdown.
The `path` must be an _absolute_ or _relative_ reference to a `runner` entity of the
type `WorkflowDS/Blueprints/JobHandler`(or extending from it).
4 changes: 4 additions & 0 deletions packages/dm-core-plugins/docs/JobCreatePlugin/blueprints.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"folder": "job",
"main": "CreateConfig"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions packages/dm-core-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
},
"files": [
"blueprints",
"dist",
"docs"
"dist"
],
"types": "dist/index.d.ts",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export const BlueprintAttributeList = ({
<Accordion>
{Array.isArray(formData?.attributes) &&
formData.attributes.map((attribute: any, index: number) => (
<Accordion.Item key={attribute._id} className={'ms-5'}>
<Accordion.Item
key={attribute._id || attribute.name}
className={'ms-5'}
>
<Accordion.Header>
<div className={'flex space-x-2 justify-between w-full'}>
<div
Expand Down

0 comments on commit cf200ef

Please sign in to comment.