You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/plugins.md
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1068,6 +1068,46 @@ Finally, you can define groups of items in the menu by including an object with
1068
1068
}
1069
1069
```
1070
1070
1071
+
### System Menu
1072
+
1073
+
A "system menu" is a dynamically populated menu, similar to a [Bucket Menu](#bucket-menu), but the menu items are pulled from xyOps itself. This is useful when a Plugin needs the user to select an existing xyOps object, such as an event, category, server, server group, plugin, user, role, web hook or monitor.
1074
+
1075
+
When you add your parameter and select the "System Menu" field type, you will need to select the internal xyOps list to use for the menu. The menu is populated automatically from the current system data, and xyOps adds a `(None)` item at the top so no item is selected by default.
1076
+
1077
+
When the user selects an item, the selected item's ID is stored in [Job.params](data.md#job-params) and passed to the Plugin. For example, if you define a parameter with ID `custom_event`, point it at the Events system list, and the user selects an event with ID `emp6dulft42zjevn8`, the Plugin would receive this:
1078
+
1079
+
```json
1080
+
{
1081
+
"custom_event": "emp6dulft42zjevn8"
1082
+
}
1083
+
```
1084
+
1085
+
Most system menus store the selected item's normal `id` property. The Users menu is a special case, and stores the selected user's `username`.
1086
+
1087
+
The following system lists are available:
1088
+
1089
+
| List | Stored Value |
1090
+
|------|--------------|
1091
+
| Alerts | Alert ID |
1092
+
| Algorithms | Target algorithm ID |
1093
+
| Buckets | Bucket ID |
1094
+
| Categories | Category ID |
1095
+
| Channels | Channel ID |
1096
+
| Events | Event ID |
1097
+
| Groups | Server group ID |
1098
+
| Monitors | Monitor ID |
1099
+
| Plugins | Plugin ID |
1100
+
| Roles | Role ID |
1101
+
| Servers | Server ID |
1102
+
| Tags | Tag ID |
1103
+
| Targets | Server group ID or server ID |
1104
+
| Users | Username |
1105
+
| Web Hooks | Web Hook ID |
1106
+
1107
+
The "Targets" menu is a combined list which includes both server groups and individual servers, arranged into menu sections. This is handy for Plugin parameters that should accept either kind of job target. The Algorithms menu contains the built-in event target selection algorithms, such as Random.
1108
+
1109
+
API Keys and Secrets are intentionally not offered as system menu sources.
1110
+
1071
1111
### Checkbox
1072
1112
1073
1113
A checkbox is displayed with a label, and the "checked" state is stored as a Boolean parameter value (`true` or `false`).
@@ -1342,4 +1382,3 @@ To use a pre-existing Docker image such as `ubuntu`, you can set the launch comm
1342
1382
## Plugin Marketplace
1343
1383
1344
1384
xyOps has an integrated Plugin Marketplace, so you can expand the app's feature set by leveraging Plugins published both by PixlCore (the makers of xyOps), as well as the developer community. For more on this, please see the [Marketplace Guide](marketplace.md).
caption: 'Optionally enter a `dot.delimited.path` to the array within the bucket data record. If omitted, the array should be at the top-level of the bucket data.'
4761
4776
});
4762
4777
4778
+
// system menu
4779
+
html+=this.getFormRow({
4780
+
id: 'd_epa_list_id',
4781
+
label: 'System Menu:',
4782
+
content: this.getFormMenuSingle({
4783
+
id: 'fe_epa_list_id',
4784
+
title: 'Select System List',
4785
+
options: this.getSystemListMenuItems(),
4786
+
value: param.list_id||'',
4787
+
default_icon: ''
4788
+
}),
4789
+
caption: 'Select an internal list of items to populate the system menu. No item will be selected by default. [Learn More](#Docs/plugins/system-menu)'
0 commit comments