This commit is contained in:
jokob-sk
2025-03-31 18:46:55 +11:00
parent e1197eb3f8
commit 9bb21ad303
5 changed files with 10 additions and 4 deletions

View File

@@ -105,7 +105,7 @@ DEV_LOCATION=/path/to/local/source/code
To run the container execute: `sudo docker-compose --env-file /path/to/.env up`
## #Example 4: Docker swarm
### Example 4: Docker swarm
Notice how the host network is defined in a swarm setup:

View File

@@ -21,6 +21,8 @@ This trigger will activate when a `Device` object is updated.
## Conditions
![Conditions example](./img/WORKFLOWS/conditions.png)
Conditions determine whether a workflow should proceed based on certain criteria. These criteria can be set for specific fields, such as whether a device is from a certain vendor, or whether it is new or archived. You can combine conditions using logical operators (`AND`, `OR`).
> [!TIP]
@@ -36,8 +38,12 @@ Conditions determine whether a workflow should proceed based on certain criteria
## Actions
![Actions example](./img/WORKFLOWS/actions.jpg)
Actions define the tasks that the workflow will perform once the conditions are met. Actions can include updating fields or deleting devices.
You can include multiple actions that should execute once the conditions are met.
### Example Action:
- **Action Type**: `update_field`
- **Field**: `devIsNew`

BIN
docs/img/WORKFLOWS/actions.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
docs/img/WORKFLOWS/conditions.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -425,7 +425,7 @@ function generateWorkflowUI(wf, wfIndex) {
// Render conditions recursively
function renderConditions(wfIndex, parentIndexPath, conditionGroupsIndex, conditions) {
let $conditionList = $("<div>", {
class: "condition-list panel panel-secondary col-sm-12 col-sx-12",
class: "condition-list panel col-sm-12 col-sx-12",
parentIndexPath: parentIndexPath
});
@@ -838,7 +838,7 @@ function duplicateWorkflow(workflows, wfIndex) {
function exportWorkflow(workflows, wfIndex) {
// Add new icon as base64 string
showModalInput ('<i class="fa fa-copy pointer"></i> <?= lang('WF_Export');?>', '<?= lang('WF_Export_Copy');?>',
showModalInput ('<i class="fa fa-file-export pointer"></i> <?= lang('WF_Export');?>', '<?= lang('WF_Export_Copy');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', null, null, JSON.stringify(workflows[wfIndex], null, 2));
}
@@ -847,7 +847,7 @@ showModalInput ('<i class="fa fa-copy pointer"></i> <?= lang('WF_Export');?>', '
function importWorkflow(workflows, wfIndex) {
// Add new icon as base64 string
showModalInput ('<i class="fa fa-arrow-up pointer"></i> <?= lang('WF_Import');?>', '<?= lang('WF_Import_Copy');?>',
showModalInput ('<i class="fa fa-file-import pointer"></i> <?= lang('WF_Import');?>', '<?= lang('WF_Import_Copy');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', 'importWorkflowExecute', null, "" );
}