Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI updates: Compilation bug fix and improvements for json forms

Rich Turner4f2ee1ed85ce
diff --git a/manager/src/web/shared/locales/en/or.json b/manager/src/web/shared/locales/en/or.json
index 689ac4b38..d58c6e503 100644
--- a/manager/src/web/shared/locales/en/or.json
+++ b/manager/src/web/shared/locales/en/or.json
@@ -416,8 +416,6 @@
"loadFailedRoles": "Failed to load roles",
"loadFailedUsers": "Failed to load users",
"loadFailedServiceUsers": "Failed to load service users",
- "key": "Key",
- "anyOfPickerLabel": "{{label}} type",
"validation": {
"noSchemaMatchFound": "No schema match found",
"invalidAsset": "Asset is not valid",
@@ -435,5 +433,14 @@
"assetTemplate": "Asset template",
"createAsRestrictedUser": "Create restricted user",
"ignoreExpiryDate": "Ignore expiry date",
- "CACertPem": "CA Certificate (PEM)"
+ "CACertPem": "CA Certificate (PEM)",
+ "schema": {
+ "noDescriptionAvailable": "No description is available",
+ "selectTypeMessage": "Select a type to see a description",
+ "keyInputLabel": "Key",
+ "anyOfPickerLabel": "{{label}} type",
+ "title": {
+ "indexedItem": "Item {{index}}"
+ }
+ }
}
diff --git a/ui/app/manager/package.json b/ui/app/manager/package.json
index 633b62681..762e51945 100644
--- a/ui/app/manager/package.json
+++ b/ui/app/manager/package.json
@@ -11,7 +11,7 @@
"modelWatch": "npx orutil watch",
"build": "npx tsc -b -f && npx cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --mode production",
"serve": "npx cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack serve --mode development",
- "watch": "npx tsc -b -w",
+ "watch": "npx tsc -b -w -f",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
diff --git a/ui/app/manager/src/pages/page-users.ts b/ui/app/manager/src/pages/page-users.ts
index 52184b46b..5b851db11 100644
--- a/ui/app/manager/src/pages/page-users.ts
+++ b/ui/app/manager/src/pages/page-users.ts
@@ -135,18 +135,18 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {
padding-left: 36px;
}
- .attribute-meta-row td {
+ .item-row td {
padding: 0;
}
- .meta-item-container {
+ .item-row-content {
flex-direction: row;
overflow: hidden;
max-height: 0;
padding-left: 16px;
}
- .attribute-meta-row.expanded .meta-item-container {
+ .item-row.expanded .item-row-content {
overflow: visible;
max-height: unset;
}
@@ -223,8 +223,8 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {
}
public connectedCallback() {
- this.loadUsers();
super.connectedCallback();
+ this.loadUsers();
}
public disconnectedCallback() {
@@ -243,7 +243,6 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {
return;
}
- const loadedDeferred = new Util.Deferred<TemplateResult>();
const realm = this.getState().app.realm;
const responseAndStateOK: <T extends GenericAxiosResponse<any[]>>(response: T, errorMsg: string) => boolean = (response, errorMsg) => {
@@ -550,9 +549,9 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {
<or-translate .value="${user.enabled ? "enabled" : "disabled"}"></or-translate>
</td>
</tr>
- <tr class="attribute-meta-row${!user.id ? " expanded" : ""}">
+ <tr class="item-row${!user.id ? " expanded" : ""}">
<td colspan="4">
- <div class="meta-item-container">
+ <div class="item-row-content">
<div class="row">
<div class="column">
<h5>${i18next.t("details")}</h5>
diff --git a/ui/component/or-attribute-input/src/index.ts b/ui/component/or-attribute-input/src/index.ts
index 4ea106def..30726c765 100644
--- a/ui/component/or-attribute-input/src/index.ts
+++ b/ui/component/or-attribute-input/src/index.ts
@@ -169,7 +169,7 @@ export const jsonFormsInputTemplateProvider: (fallback: ValueInputProvider) => V
if (!schema) {
// TODO: Load agent link schema from AssetModelUtil
- schema = JSON.parse("{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"title\":\"Agent Link\",\"oneOf\":[{\"$ref\":\"#/definitions/SNMPAgentLink\"},{\"$ref\":\"#/definitions/DefaultAgentLink\"},{\"$ref\":\"#/definitions/HTTPAgentLink\"},{\"$ref\":\"#/definitions/MockAgentLink\"},{\"$ref\":\"#/definitions/ZWaveAgentLink\"},{\"$ref\":\"#/definitions/WebsocketAgentLink\"},{\"$ref\":\"#/definitions/KNXAgentLink\"},{\"$ref\":\"#/definitions/SimulatorAgentLink\"},{\"$ref\":\"#/definitions/VelbusAgentLink\"}],\"definitions\":{\"SNMPAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"SNMPAgentLink\"],\"default\":\"SNMPAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\"},{\"$ref\":\"#/definitions/ValueNotEmptyPredicate\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"oid\":{\"type\":\"string\"}},\"title\":\"SNMPAgentLink\",\"required\":[\"type\",\"oid\"]},\"regex\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"regex\"],\"default\":\"regex\"},\"pattern\":{\"type\":\"string\"},\"matchGroup\":{\"type\":\"integer\"},\"matchIndex\":{\"type\":\"integer\"}},\"title\":\"regex\",\"required\":[\"type\"]},\"substring\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"substring\"],\"default\":\"substring\"},\"beginIndex\":{\"type\":\"integer\"},\"endIndex\":{\"type\":\"integer\"}},\"title\":\"substring\",\"required\":[\"type\",\"beginIndex\"]},\"jsonPath\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"jsonPath\"],\"default\":\"jsonPath\"},\"path\":{\"type\":\"string\"},\"returnFirst\":{\"type\":\"boolean\"},\"returnLast\":{\"type\":\"boolean\"}},\"title\":\"JSON Path\",\"required\":[\"type\",\"path\",\"returnFirst\",\"returnLast\"]},\"PatternPropertiesSimpleKeyAnyType\":{\"type\":\"object\",\"additionalProperties\":true,\"patternProperties\":{\"^[a-zA-Z][a-zA-Z0-9]*\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}},\"properties\":{}},\"StringPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"string\"],\"default\":\"string\"},\"match\":{\"type\":\"string\",\"enum\":[\"EXACT\",\"BEGIN\",\"END\",\"CONTAINS\"]},\"caseSensitive\":{\"type\":\"boolean\"},\"value\":{\"type\":\"string\"},\"negate\":{\"type\":\"boolean\"}},\"title\":\"string\",\"required\":[\"predicateType\",\"caseSensitive\",\"negate\"]},\"BooleanPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"boolean\"],\"default\":\"boolean\"},\"value\":{\"type\":\"boolean\"}},\"title\":\"boolean\",\"required\":[\"predicateType\",\"value\"]},\"DateTimePredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"datetime\"],\"default\":\"datetime\"},\"value\":{\"type\":\"string\"},\"rangeValue\":{\"type\":\"string\"},\"operator\":{\"type\":\"string\",\"enum\":[\"EQUALS\",\"GREATER_THAN\",\"GREATER_EQUALS\",\"LESS_THAN\",\"LESS_EQUALS\",\"BETWEEN\"]},\"negate\":{\"type\":\"boolean\"}},\"title\":\"datetime\",\"required\":[\"predicateType\",\"negate\"]},\"NumberPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"number\"],\"default\":\"number\"},\"value\":{\"type\":\"number\"},\"rangeValue\":{\"type\":\"number\"},\"operator\":{\"type\":\"string\",\"enum\":[\"EQUALS\",\"GREATER_THAN\",\"GREATER_EQUALS\",\"LESS_THAN\",\"LESS_EQUALS\",\"BETWEEN\"]},\"negate\":{\"type\":\"boolean\"}},\"title\":\"number\",\"required\":[\"predicateType\",\"negate\"]},\"RadialGeofencePredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"radial\"],\"default\":\"radial\"},\"radius\":{\"type\":\"integer\"},\"lat\":{\"type\":\"number\"},\"lng\":{\"type\":\"number\"},\"negated\":{\"type\":\"boolean\"}},\"title\":\"radial\",\"required\":[\"predicateType\",\"radius\",\"lat\",\"lng\",\"negated\"]},\"RectangularGeofencePredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"rect\"],\"default\":\"rect\"},\"latMin\":{\"type\":\"number\"},\"lngMin\":{\"type\":\"number\"},\"latMax\":{\"type\":\"number\"},\"lngMax\":{\"type\":\"number\"},\"negated\":{\"type\":\"boolean\"}},\"title\":\"rect\",\"required\":[\"predicateType\",\"latMin\",\"lngMin\",\"latMax\",\"lngMax\",\"negated\"]},\"ArrayPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"array\"],\"default\":\"array\"},\"value\":{\"$ref\":\"#/definitions/AnyType\"},\"index\":{\"type\":\"integer\"},\"lengthEquals\":{\"type\":\"integer\"},\"lengthGreaterThan\":{\"type\":\"integer\"},\"lengthLessThan\":{\"type\":\"integer\"},\"negated\":{\"type\":\"boolean\"}},\"title\":\"array\",\"required\":[\"predicateType\",\"negated\"]},\"AnyType\":{\"additionalProperties\":true,\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"],\"properties\":{}},\"ValueEmptyPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"value-empty\"],\"default\":\"value-empty\"}},\"title\":\"value-empty\",\"required\":[\"predicateType\"]},\"ValueNotEmptyPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"value-not-empty\"],\"default\":\"value-not-empty\"}},\"title\":\"value-not-empty\",\"required\":[\"predicateType\"]},\"CalendarEventPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"calendar-event\"],\"default\":\"calendar-event\"},\"timestamp\":{\"type\":\"integer\",\"format\":\"utc-millisec\"}},\"title\":\"calendar-event\",\"required\":[\"predicateType\"]},\"DefaultAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"DefaultAgentLink\"],\"default\":\"DefaultAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\"},{\"$ref\":\"#/definitions/ValueNotEmptyPredicate\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"}},\"title\":\"DefaultAgentLink\",\"required\":[\"type\"]},\"HTTPAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"HTTPAgentLink\"],\"default\":\"HTTPAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\"},{\"$ref\":\"#/definitions/ValueNotEmptyPredicate\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"headers\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"description\":\"A JSON object of headers to be added to HTTP request; the key represents the name of the header and for each string value supplied a new header will be added with the key name and specified string value\"},\"queryParameters\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"description\":\"A JSON object of query parameters to be added to HTTP request URL; the key represents the name of the query parameter and for each string value supplied a new query parameter will be added with the key name and specified string value (e.g. 'https://..../?test=1&test2\"},\"pollingMillis\":{\"type\":\"integer\",\"description\":\"Indicates that this HTTP request is used to update the linked attribute; this value indicates how frequently the HTTP request is made in order to update the linked attribute value\"},\"pagingMode\":{\"type\":\"boolean\",\"description\":\"Indicates that the HTTP server supports pagination using the standard Link header mechanism\"},\"path\":{\"type\":\"string\",\"description\":\"The URL path to append to the agents Base URL when making requests for this linked attribute\"},\"method\":{\"type\":\"string\",\"enum\":[\"GET\",\"POST\",\"PUT\",\"DELETE\",\"OPTIONS\",\"PATCH\"],\"description\":\"The HTTP method to use when making requests for this linked attribute\"},\"contentType\":{\"type\":\"string\",\"description\":\"The content type header value to use when making requests for this linked attribute (shortcut alternative to using headers parameter)\"},\"pollingAttribute\":{\"type\":\"string\",\"description\":\"Allows the polled response to be written to another attribute with the specified name on the same asset as the linked attribute\"}},\"title\":\"HTTPAgentLink\",\"required\":[\"type\"]},\"MockAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"MockAgentLink\"],\"default\":\"MockAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\"},{\"$ref\":\"#/definitions/ValueNotEmptyPredicate\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"requiredValue\":{\"type\":\"string\"}},\"title\":\"MockAgentLink\",\"required\":[\"type\"]},\"ZWaveAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"ZWaveAgentLink\"],\"default\":\"ZWaveAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\"},{\"$ref\":\"#/definitions/ValueNotEmptyPredicate\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"deviceNodeId\":{\"type\":\"integer\"},\"deviceEndpoint\":{\"type\":\"integer\"},\"deviceValue\":{\"type\":\"string\"}},\"title\":\"ZWaveAgentLink\",\"required\":[\"type\"]},\"WebsocketAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"WebsocketAgentLink\"],\"default\":\"WebsocketAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\"},{\"$ref\":\"#/definitions/ValueNotEmptyPredicate\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"websocketSubscriptions\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/websocket\"},{\"$ref\":\"#/definitions/http\"}]}}},\"title\":\"WebsocketAgentLink\",\"required\":[\"type\"]},\"websocket\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"websocket\"],\"default\":\"websocket\"},\"body\":{\"$ref\":\"#/definitions/AnyType\"}},\"title\":\"websocket\",\"required\":[\"type\"]},\"http\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"http\"],\"default\":\"http\"},\"body\":{\"$ref\":\"#/definitions/AnyType\"},\"method\":{\"type\":\"string\",\"enum\":[\"GET\",\"PUT\",\"POST\"]},\"contentType\":{\"type\":\"string\"},\"headers\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"uri\":{\"type\":\"string\"}},\"title\":\"http\",\"required\":[\"type\"]},\"KNXAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"KNXAgentLink\"],\"default\":\"KNXAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\"},{\"$ref\":\"#/definitions/ValueNotEmptyPredicate\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"dpt\":{\"type\":\"string\",\"pattern\":\"^\\\\d{1,3}\\\\.\\\\d{1,3}$\"},\"actionGroupAddress\":{\"type\":\"string\",\"pattern\":\"^\\\\d{1,3}/\\\\d{1,3}/\\\\d{1,3}$\"},\"statusGroupAddress\":{\"type\":\"string\",\"pattern\":\"^\\\\d{1,3}/\\\\d{1,3}/\\\\d{1,3}$\"}},\"title\":\"KNXAgentLink\",\"required\":[\"type\",\"dpt\"]},\"SimulatorAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"SimulatorAgentLink\"],\"default\":\"SimulatorAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\"},{\"$ref\":\"#/definitions/ValueNotEmptyPredicate\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"replayData\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/SimulatorReplayDatapoint\"},\"description\":\"Used to store 24h dataset of values that should be replayed (i.e. written to the linked attribute) in a continuous loop.\"}},\"title\":\"SimulatorAgentLink\",\"required\":[\"type\"]},\"SimulatorReplayDatapoint\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"timestamp\":{\"type\":\"integer\"},\"value\":{\"$ref\":\"#/definitions/AnyType\"}},\"required\":[\"timestamp\"]},\"VelbusAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"VelbusAgentLink\"],\"default\":\"VelbusAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"deviceAddress\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":255},\"deviceValueLink\":{\"type\":\"string\",\"pattern\":\"^.*\\\\S+.*$\",\"minLength\":1},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\"},{\"$ref\":\"#/definitions/ValueNotEmptyPredicate\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\"},{\"$ref\":\"#/definitions/substring\"},{\"$ref\":\"#/definitions/jsonPath\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"}},\"title\":\"VelbusAgentLink\",\"required\":[\"type\",\"deviceAddress\",\"deviceValueLink\"]}}}");
+ schema = JSON.parse("{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"title\":\"Agent Link\",\"oneOf\":[{\"$ref\":\"#/definitions/SNMPAgentLink\"},{\"$ref\":\"#/definitions/DefaultAgentLink\"},{\"$ref\":\"#/definitions/HTTPAgentLink\"},{\"$ref\":\"#/definitions/MockAgentLink\"},{\"$ref\":\"#/definitions/MQTTAgentLink\"},{\"$ref\":\"#/definitions/WebsocketAgentLink\"},{\"$ref\":\"#/definitions/ZWaveAgentLink\"},{\"$ref\":\"#/definitions/KNXAgentLink\"},{\"$ref\":\"#/definitions/SimulatorAgentLink\"},{\"$ref\":\"#/definitions/VelbusAgentLink\"}],\"definitions\":{\"SNMPAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"SNMPAgentLink\"],\"default\":\"SNMPAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\",\"title\":\"Radial geofence\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\",\"title\":\"Rectangular geofence\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueAnyPredicate\",\"title\":\"Any value\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\",\"title\":\"Empty value\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\",\"title\":\"Calendar\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"oid\":{\"type\":\"string\"}},\"title\":\"SNMPAgentLink\",\"required\":[\"type\",\"oid\"]},\"regex\":{\"type\":\"object\",\"additionalProperties\":true,\"title\":\"regex\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"regex\"],\"default\":\"regex\"},\"pattern\":{\"type\":\"string\"},\"matchGroup\":{\"type\":\"integer\"},\"matchIndex\":{\"type\":\"integer\"}},\"required\":[\"type\"]},\"substring\":{\"type\":\"object\",\"additionalProperties\":true,\"title\":\"substring\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"substring\"],\"default\":\"substring\"},\"beginIndex\":{\"type\":\"integer\"},\"endIndex\":{\"type\":\"integer\"}},\"required\":[\"type\",\"beginIndex\"]},\"jsonPath\":{\"type\":\"object\",\"additionalProperties\":true,\"title\":\"jsonPath\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"jsonPath\"],\"default\":\"jsonPath\"},\"path\":{\"type\":\"string\"},\"returnFirst\":{\"type\":\"boolean\"},\"returnLast\":{\"type\":\"boolean\"}},\"required\":[\"type\",\"path\",\"returnFirst\",\"returnLast\"]},\"PatternPropertiesSimpleKeyAnyType\":{\"type\":\"object\",\"additionalProperties\":true,\"patternProperties\":{\"^[a-zA-Z][a-zA-Z0-9]*\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}},\"properties\":{}},\"StringPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"string\"],\"default\":\"string\"},\"match\":{\"type\":\"string\",\"enum\":[\"EXACT\",\"BEGIN\",\"END\",\"CONTAINS\"]},\"caseSensitive\":{\"type\":\"boolean\"},\"value\":{\"type\":\"string\"},\"negate\":{\"type\":\"boolean\"}},\"title\":\"string\",\"required\":[\"predicateType\",\"caseSensitive\",\"negate\"]},\"BooleanPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"boolean\"],\"default\":\"boolean\"},\"value\":{\"type\":\"boolean\"}},\"title\":\"boolean\",\"required\":[\"predicateType\",\"value\"]},\"DateTimePredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"datetime\"],\"default\":\"datetime\"},\"value\":{\"type\":\"string\"},\"rangeValue\":{\"type\":\"string\"},\"operator\":{\"type\":\"string\",\"enum\":[\"EQUALS\",\"GREATER_THAN\",\"GREATER_EQUALS\",\"LESS_THAN\",\"LESS_EQUALS\",\"BETWEEN\"]},\"negate\":{\"type\":\"boolean\"}},\"title\":\"datetime\",\"required\":[\"predicateType\",\"negate\"]},\"NumberPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"number\"],\"default\":\"number\"},\"value\":{\"type\":\"number\"},\"rangeValue\":{\"type\":\"number\"},\"operator\":{\"type\":\"string\",\"enum\":[\"EQUALS\",\"GREATER_THAN\",\"GREATER_EQUALS\",\"LESS_THAN\",\"LESS_EQUALS\",\"BETWEEN\"]},\"negate\":{\"type\":\"boolean\"}},\"title\":\"number\",\"required\":[\"predicateType\",\"negate\"]},\"RadialGeofencePredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"title\":\"radial\",\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"radial\"],\"default\":\"radial\"},\"radius\":{\"type\":\"integer\"},\"lat\":{\"type\":\"number\"},\"lng\":{\"type\":\"number\"},\"negated\":{\"type\":\"boolean\"}},\"required\":[\"predicateType\",\"radius\",\"lat\",\"lng\",\"negated\"]},\"RectangularGeofencePredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"title\":\"rect\",\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"rect\"],\"default\":\"rect\"},\"latMin\":{\"type\":\"number\"},\"lngMin\":{\"type\":\"number\"},\"latMax\":{\"type\":\"number\"},\"lngMax\":{\"type\":\"number\"},\"negated\":{\"type\":\"boolean\"}},\"required\":[\"predicateType\",\"latMin\",\"lngMin\",\"latMax\",\"lngMax\",\"negated\"]},\"ArrayPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"array\"],\"default\":\"array\"},\"value\":{\"$ref\":\"#/definitions/AnyType\"},\"index\":{\"type\":\"integer\"},\"lengthEquals\":{\"type\":\"integer\"},\"lengthGreaterThan\":{\"type\":\"integer\"},\"lengthLessThan\":{\"type\":\"integer\"},\"negated\":{\"type\":\"boolean\"}},\"title\":\"array\",\"required\":[\"predicateType\",\"negated\"]},\"AnyType\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"],\"additionalProperties\":true,\"properties\":{}},\"ValueAnyPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"title\":\"value-any\",\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"value-any\"],\"default\":\"value-any\"}},\"required\":[\"predicateType\"]},\"ValueEmptyPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"title\":\"value-empty\",\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"value-empty\"],\"default\":\"value-empty\"},\"negate\":{\"type\":\"boolean\"}},\"required\":[\"predicateType\",\"negate\"]},\"CalendarEventPredicate\":{\"type\":\"object\",\"additionalProperties\":true,\"title\":\"calendar-event\",\"properties\":{\"predicateType\":{\"type\":\"string\",\"enum\":[\"calendar-event\"],\"default\":\"calendar-event\"},\"timestamp\":{\"type\":\"integer\",\"format\":\"utc-millisec\"}},\"required\":[\"predicateType\"]},\"DefaultAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"DefaultAgentLink\"],\"default\":\"DefaultAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\",\"title\":\"Radial geofence\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\",\"title\":\"Rectangular geofence\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueAnyPredicate\",\"title\":\"Any value\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\",\"title\":\"Empty value\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\",\"title\":\"Calendar\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"}},\"title\":\"DefaultAgentLink\",\"required\":[\"type\"]},\"HTTPAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"HTTPAgentLink\"],\"default\":\"HTTPAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\",\"title\":\"Radial geofence\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\",\"title\":\"Rectangular geofence\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueAnyPredicate\",\"title\":\"Any value\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\",\"title\":\"Empty value\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\",\"title\":\"Calendar\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"headers\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"description\":\"A JSON object of headers to be added to HTTP request; the key represents the name of the header and for each string value supplied a new header will be added with the key name and specified string value\"},\"queryParameters\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"description\":\"A JSON object of query parameters to be added to HTTP request URL; the key represents the name of the query parameter and for each string value supplied a new query parameter will be added with the key name and specified string value (e.g. 'https://..../?test=1&test2\"},\"pollingMillis\":{\"type\":\"integer\",\"description\":\"Indicates that this HTTP request is used to update the linked attribute; this value indicates how frequently the HTTP request is made in order to update the linked attribute value\"},\"pagingMode\":{\"type\":\"boolean\",\"description\":\"Indicates that the HTTP server supports pagination using the standard Link header mechanism\"},\"path\":{\"type\":\"string\",\"description\":\"The URL path to append to the agents Base URL when making requests for this linked attribute\"},\"method\":{\"type\":\"string\",\"enum\":[\"GET\",\"POST\",\"PUT\",\"DELETE\",\"OPTIONS\",\"PATCH\"],\"description\":\"The HTTP method to use when making requests for this linked attribute\"},\"contentType\":{\"type\":\"string\",\"description\":\"The content type header value to use when making requests for this linked attribute (shortcut alternative to using headers parameter)\"},\"pollingAttribute\":{\"type\":\"string\",\"description\":\"Allows the polled response to be written to another attribute with the specified name on the same asset as the linked attribute\"}},\"title\":\"HTTPAgentLink\",\"required\":[\"type\"]},\"MockAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"MockAgentLink\"],\"default\":\"MockAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\",\"title\":\"Radial geofence\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\",\"title\":\"Rectangular geofence\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueAnyPredicate\",\"title\":\"Any value\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\",\"title\":\"Empty value\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\",\"title\":\"Calendar\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"requiredValue\":{\"type\":\"string\"}},\"title\":\"MockAgentLink\",\"required\":[\"type\"]},\"MQTTAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"MQTTAgentLink\"],\"default\":\"MQTTAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\",\"title\":\"Radial geofence\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\",\"title\":\"Rectangular geofence\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueAnyPredicate\",\"title\":\"Any value\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\",\"title\":\"Empty value\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\",\"title\":\"Calendar\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"subscriptionTopic\":{\"type\":\"string\"},\"publishTopic\":{\"type\":\"string\"}},\"title\":\"MQTTAgentLink\",\"required\":[\"type\"]},\"WebsocketAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"WebsocketAgentLink\"],\"default\":\"WebsocketAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\",\"title\":\"Radial geofence\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\",\"title\":\"Rectangular geofence\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueAnyPredicate\",\"title\":\"Any value\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\",\"title\":\"Empty value\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\",\"title\":\"Calendar\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"websocketSubscriptions\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/websocket\"},{\"$ref\":\"#/definitions/http\"}]}}},\"title\":\"WebsocketAgentLink\",\"required\":[\"type\"]},\"websocket\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"websocket\"],\"default\":\"websocket\"},\"body\":{\"$ref\":\"#/definitions/AnyType\"}},\"title\":\"websocket\",\"required\":[\"type\"]},\"http\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"http\"],\"default\":\"http\"},\"body\":{\"$ref\":\"#/definitions/AnyType\"},\"method\":{\"type\":\"string\",\"enum\":[\"GET\",\"PUT\",\"POST\"]},\"contentType\":{\"type\":\"string\"},\"headers\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"uri\":{\"type\":\"string\"}},\"title\":\"http\",\"required\":[\"type\"]},\"ZWaveAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"ZWaveAgentLink\"],\"default\":\"ZWaveAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\",\"title\":\"Radial geofence\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\",\"title\":\"Rectangular geofence\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueAnyPredicate\",\"title\":\"Any value\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\",\"title\":\"Empty value\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\",\"title\":\"Calendar\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"deviceNodeId\":{\"type\":\"integer\"},\"deviceEndpoint\":{\"type\":\"integer\"},\"deviceValue\":{\"type\":\"string\"}},\"title\":\"ZWaveAgentLink\",\"required\":[\"type\"]},\"KNXAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"KNXAgentLink\"],\"default\":\"KNXAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\",\"title\":\"Radial geofence\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\",\"title\":\"Rectangular geofence\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueAnyPredicate\",\"title\":\"Any value\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\",\"title\":\"Empty value\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\",\"title\":\"Calendar\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"dpt\":{\"type\":\"string\",\"pattern\":\"^\\\\d{1,3}\\\\.\\\\d{1,3}$\"},\"actionGroupAddress\":{\"type\":\"string\",\"pattern\":\"^\\\\d{1,3}/\\\\d{1,3}/\\\\d{1,3}$\"},\"statusGroupAddress\":{\"type\":\"string\",\"pattern\":\"^\\\\d{1,3}/\\\\d{1,3}/\\\\d{1,3}$\"}},\"title\":\"KNXAgentLink\",\"required\":[\"type\",\"dpt\"]},\"SimulatorAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"SimulatorAgentLink\"],\"default\":\"SimulatorAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\",\"title\":\"Radial geofence\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\",\"title\":\"Rectangular geofence\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueAnyPredicate\",\"title\":\"Any value\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\",\"title\":\"Empty value\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\",\"title\":\"Calendar\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"},\"replayData\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/SimulatorReplayDatapoint\"},\"description\":\"Used to store 24h dataset of values that should be replayed (i.e. written to the linked attribute) in a continuous loop.\"}},\"title\":\"SimulatorAgentLink\",\"required\":[\"type\"]},\"SimulatorReplayDatapoint\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"timestamp\":{\"type\":\"integer\"},\"value\":{\"$ref\":\"#/definitions/AnyType\"}},\"required\":[\"timestamp\"]},\"VelbusAgentLink\":{\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"VelbusAgentLink\"],\"default\":\"VelbusAgentLink\"},\"id\":{\"type\":\"string\",\"format\":\"or-agent-id\"},\"deviceAddress\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":255},\"deviceValueLink\":{\"type\":\"string\",\"pattern\":\"^.*\\\\S+.*$\",\"minLength\":1},\"valueFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"Defines ValueFilters to apply to an incoming value before it is written to a protocol linked attribute; this is particularly useful for generic protocols. The message should pass through the filters in array order\"},\"valueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValueConverter\":{\"type\":\"object\",\"patternProperties\":{\".+\":{\"type\":[\"null\",\"number\",\"integer\",\"boolean\",\"string\",\"array\",\"object\"]}}},\"writeValue\":{\"type\":\"string\",\"description\":\"String to be used for attribute writes and can contain '{$value}' placeholders to allow the written value to be injected into the string or to even hardcode the value written to the protocol (particularly useful for executable attributes)\"},\"messageMatchPredicate\":{\"oneOf\":[{\"$ref\":\"#/definitions/StringPredicate\"},{\"$ref\":\"#/definitions/BooleanPredicate\"},{\"$ref\":\"#/definitions/DateTimePredicate\"},{\"$ref\":\"#/definitions/NumberPredicate\"},{\"$ref\":\"#/definitions/RadialGeofencePredicate\",\"title\":\"Radial geofence\"},{\"$ref\":\"#/definitions/RectangularGeofencePredicate\",\"title\":\"Rectangular geofence\"},{\"$ref\":\"#/definitions/ArrayPredicate\"},{\"$ref\":\"#/definitions/ValueAnyPredicate\",\"title\":\"Any value\"},{\"$ref\":\"#/definitions/ValueEmptyPredicate\",\"title\":\"Empty value\"},{\"$ref\":\"#/definitions/CalendarEventPredicate\",\"title\":\"Calendar\"}],\"description\":\"The predicate to apply to incoming messages to determine if the message is intended for the linked attribute; the value used in the predicate can be filtered using the message match filters\"},\"messageMatchFilters\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"$ref\":\"#/definitions/regex\",\"title\":\"Regex\"},{\"$ref\":\"#/definitions/substring\",\"title\":\"Substring\"},{\"$ref\":\"#/definitions/jsonPath\",\"title\":\"JSON Path\"}]},\"description\":\"ValueFilters to apply to incoming messages prior to comparison with the messageMatchPredicate\"}},\"title\":\"VelbusAgentLink\",\"required\":[\"type\",\"deviceAddress\",\"deviceValueLink\"]}}}");
}
loadedAgents = await loadAgents();
diff --git a/ui/component/or-json-forms/src/layouts/layout-vertical-element.ts b/ui/component/or-json-forms/src/layouts/layout-vertical-element.ts
index 11e23a04a..26010f82e 100644
--- a/ui/component/or-json-forms/src/layouts/layout-vertical-element.ts
+++ b/ui/component/or-json-forms/src/layouts/layout-vertical-element.ts
@@ -19,7 +19,14 @@ import {
import {css, html, TemplateResult, unsafeCSS} from "lit";
import {customElement, property} from "lit/decorators.js";
import {LayoutBaseElement} from "./layout-base-element";
-import {controlWithoutLabel, getLabel, getTemplateFromProps, showJsonEditor} from "../util";
+import {
+ CombinatorInfo,
+ controlWithoutLabel,
+ getLabel,
+ getSchemaPicker,
+ getTemplateFromProps,
+ showJsonEditor
+} from "../util";
import {InputType, OrInputChangedEvent, OrMwcInput} from "@openremote/or-mwc-components/or-mwc-input";
import {i18next} from "@openremote/or-translate";
import {showDialog} from "@openremote/or-mwc-components/or-mwc-dialog";
@@ -157,7 +164,7 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Gr
${this.errors || (optionalProps.length === 0 && !dynamic) ? `` : html`
<div id="footer">
- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("addParameter")}" icon="plus" @click="${() => this._addParameter(optionalProps, dynamicPropertyRegex, dynamicValueSchema)}"></or-mwc-input>
+ <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("addParameter")}" icon="plus" @click="${() => this._addParameter(rootSchema, optionalProps, dynamicPropertyRegex, dynamicValueSchema)}"></or-mwc-input>
</div>`}
</div>
`;
@@ -241,10 +248,11 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Gr
});
}
- protected _addParameter(optionalProps: StatePropsOfControl[], dynamicPropertyRegex?: string, dynamicValueSchema?: JsonSchema) {
+ protected _addParameter(rootSchema: JsonSchema, optionalProps: StatePropsOfControl[], dynamicPropertyRegex?: string, dynamicValueSchema?: JsonSchema) {
const dynamic = optionalProps.length === 0;
let selectedParameter: StatePropsOfControl | undefined;
+ let selectedOneOf: CombinatorInfo;
const listItems: ListItem[] = optionalProps.map(props => {
const labelStr = computeLabel(props.label, !!props.required, false);
@@ -257,9 +265,9 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Gr
const onParamChanged = (selected: StatePropsOfControl) => {
selectedParameter = selected;
- const descElem = dialog.shadowRoot!.getElementById("parameter-desc") as HTMLDivElement;
- descElem.innerHTML = selected.description || "";
- (dialog.shadowRoot!.getElementById("add-btn") as OrMwcInput).disabled = false;
+ const isOneOf = !!(selectedParameter && selectedParameter.schema && selectedParameter.schema.oneOf);
+ dialog.dialogContent = dialogContentProvider();
+ (dialog.shadowRoot!.getElementById("add-btn") as OrMwcInput).disabled = isOneOf;
};
// const keyValue: [any, any] = [undefined, undefined];
@@ -269,10 +277,10 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Gr
// (dialog.shadowRoot!.getElementById("add-btn") as OrMwcInput).disabled = !valid;
// };
let keyValue: string | undefined;
- const onKeyChanged = (event: OrInputChangedEvent) => {
+ const onKeyChanged = (event: KeyboardEvent) => {
const keyInput = event.currentTarget as OrMwcInput;
keyInput.setCustomValidity(undefined);
- keyValue = event.detail.value as string;
+ keyValue = keyInput.currentValue as string;
let valid = keyInput.valid;
if (this.data[keyValue] !== undefined) {
@@ -282,8 +290,21 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Gr
(dialog.shadowRoot!.getElementById("add-btn") as OrMwcInput).disabled = !valid;
};
- const dialog = showDialog({
- content: html`
+ const dialogContentProvider: () => TemplateResult = () => {
+
+ // Only set when !dynamic
+ let schemaPicker: TemplateResult | undefined = undefined;
+
+ if (selectedParameter && selectedParameter.schema && selectedParameter.schema.oneOf) {
+ const handleChange = (selectedSchema: CombinatorInfo) => {
+ selectedOneOf = selectedSchema;
+ (dialog.shadowRoot!.getElementById("add-btn") as OrMwcInput).disabled = !selectedOneOf;
+ (dialog.shadowRoot!.getElementById("schema-description") as HTMLParagraphElement).innerHTML = (selectedOneOf ? selectedOneOf.description : i18next.t("schema.selectTypeMessage")) || i18next.t("schema.noDescriptionAvailable");
+ };
+ schemaPicker = getSchemaPicker(rootSchema, selectedParameter.schema, selectedParameter.path, "oneOf", selectedParameter.label, handleChange);
+ }
+
+ return html`
<div class="col">
<form id="mdc-dialog-form-add" class="row">
${dynamic ? `` : html`
@@ -292,7 +313,28 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Gr
</div>
`}
<div id="parameter-desc" class="col">
- ${!dynamic ? `` : html`
+ ${!selectedParameter ? `` : html`<p>${selectedParameter.description}</p>`}
+ ${!dynamic ? !schemaPicker ? `` : html`
+ <style>
+ #schema-picker {
+ align-self: stretch;
+ margin: auto 10px;
+ display: flex;
+ align-items: center;
+ }
+ #schema-picker > or-translate {
+ padding-right: 20px;
+ }
+ #schema-picker > or-mwc-input {
+ flex: 1;
+ }
+ </style>
+ <div id="schema-picker">
+ <or-translate style="justify-self: left;" value="type"></or-translate>
+ ${schemaPicker}
+ </div>
+ <p id="schema-description">${i18next.t("schema.selectTypeMessage")}</p>`
+ : html`
<style>
#dynamic-wrapper > or-mwc-input {
display: block;
@@ -300,13 +342,17 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Gr
}
</style>
<div id="dynamic-wrapper">
- <or-mwc-input required .type="${InputType.TEXT}" .pattern="${dynamicPropertyRegex}" .label="${i18next.t("key")}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => onKeyChanged(evt)}"></or-mwc-input>
+ <or-mwc-input required .type="${InputType.TEXT}" .pattern="${dynamicPropertyRegex}" .label="${i18next.t("schema.keyInputLabel")}" @keyup="${(evt: KeyboardEvent) => onKeyChanged(evt)}"></or-mwc-input>
</div>
`}
</div>
</form>
</div>
- `,
+ `;
+ };
+
+ const dialog = showDialog({
+ content: dialogContentProvider(),
styles: addItemOrParameterDialogStyle,
title: (this.label ? computeLabel(this.label, this.required, false) + " - " : "") + i18next.t("addParameter"),
actions: [
@@ -321,7 +367,7 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Gr
const key = dynamic ? keyValue as string : selectedParameter!.path.split(".").pop()!;
const data = {...this.data};
const schema = dynamic ? dynamicValueSchema! : selectedParameter!.schema;
- data[key] = Array.isArray(schema.type) ? null : createDefaultValue(schema);
+ data[key] = Array.isArray(schema.type) ? null : ((selectedOneOf ? selectedOneOf.defaultValueCreator() : undefined) || createDefaultValue(schema));
this.handleChange(this.path || "", data);
},
content: html`<or-mwc-input id="add-btn" .type="${InputType.BUTTON}" disabled .label="${i18next.t("add")}"></or-mwc-input>`
diff --git a/ui/component/or-json-forms/src/standard-renderers.ts b/ui/component/or-json-forms/src/standard-renderers.ts
index 866814787..442406ec1 100644
--- a/ui/component/or-json-forms/src/standard-renderers.ts
+++ b/ui/component/or-json-forms/src/standard-renderers.ts
@@ -44,7 +44,7 @@ import {JsonFormsStateContext} from "./index";
import {
getCombinatorInfos,
getLabel,
- getSchemaConst,
+ getSchemaConst, getSchemaPicker,
getTemplateFromProps,
mapStateToCombinatorRendererProps,
showJsonEditor
@@ -240,7 +240,7 @@ export const anyOfOneOfControlRenderer = (state: JsonFormsStateContext, props: C
resolvedProps.uischemas
);
- if (data !== undefined && (resolvedProps.indexOfFittingSchema === undefined || resolvedProps.indexOfFittingSchema < 0)) {
+ if (data !== undefined && data !== null && (resolvedProps.indexOfFittingSchema === undefined || resolvedProps.indexOfFittingSchema < 0)) {
// Try and match the data using our own combinator info objects
const combinatorInfos = getCombinatorInfos(resolvedSchema[keyword]!, rootSchema);
@@ -254,7 +254,7 @@ export const anyOfOneOfControlRenderer = (state: JsonFormsStateContext, props: C
if (resolvedProps.indexOfFittingSchema === undefined || resolvedProps.indexOfFittingSchema < 0) {
const { handleChange } = mapDispatchToControlProps(state.dispatch);
- if (data !== undefined) {
+ if (data !== undefined && data !== null) {
// We have data that doesn't match a schema so show invalid template
console.warn("Cannot match " + keyword + " schema to instance data");
@@ -267,20 +267,11 @@ export const anyOfOneOfControlRenderer = (state: JsonFormsStateContext, props: C
};
return html`
- <span style="padding-right: 5px;">${label}:</span><span style="padding-right: 5px;"><b><or-translate value="validation.noSchemaMatchFound"></b></span><or-mwc-input .type="${InputType.BUTTON}" outlined .label="${i18next.t("json")}" icon="pencil" @click="${(ev: MouseEvent) => showJson(ev)}"></or-mwc-input>
+ <div class="item-container no-match-container"><span>${label}:</span><b><or-translate value="validation.noSchemaMatchFound"></b><or-mwc-input .type="${InputType.BUTTON}" outlined .label="${i18next.t("json")}" icon="pencil" @click="${(ev: MouseEvent) => showJson(ev)}"></or-mwc-input></div>
`;
} else {
// We have no data so show a schema picker
- const combinatorInfos = getCombinatorInfos(resolvedSchema[keyword]!, rootSchema);
- const options: [string, string][] = combinatorInfos.map((combinatorInfo, index) => [index+"", Util.camelCaseToSentenceCase(combinatorInfo.title) || i18next.t("Item ") + (index+1)]);
- const pickerUpdater = (index: number) => {
- const matchedInfo = combinatorInfos[index];
- handleChange(path, matchedInfo.defaultValueCreator());
- };
- const pickerLabel = (props.label || label) ? i18next.t("anyOfPickerLabel", {label: (props.label || label)}) : i18next.t("type");
- return html`
- <or-mwc-input class="any-of-picker" .label="${pickerLabel}" .type="${InputType.SELECT}" .options="${options}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => pickerUpdater(Number(ev.detail.value))}"></or-mwc-input>
- `;
+ return getSchemaPicker(rootSchema, resolvedSchema, path, keyword, props.label || label, (selectedSchema => handleChange(path, selectedSchema.defaultValueCreator())))
}
}
diff --git a/ui/component/or-json-forms/src/styles.ts b/ui/component/or-json-forms/src/styles.ts
index 3e7f9d604..714477bd5 100644
--- a/ui/component/or-json-forms/src/styles.ts
+++ b/ui/component/or-json-forms/src/styles.ts
@@ -21,6 +21,14 @@ export const baseStyle = css`
visibility: visible;
}
+ .no-match-container {
+ align-items: center;
+ }
+
+ .no-match-container > *:not(:last-child) {
+ margin-right: 10px;
+ }
+
.button-clear {
background: none;
color: ${unsafeCSS(DefaultColor5)};
@@ -126,8 +134,11 @@ export const addItemOrParameterDialogStyle = html`
display: block;
}
#parameter-desc {
- padding: 5px;
+ text-align: justify;
+ padding: 15px;
flex: 1;
+ display: flex;
+ flex-direction: column;
}
</style>
`;
diff --git a/ui/component/or-json-forms/src/util.ts b/ui/component/or-json-forms/src/util.ts
index f3469fc14..54d2b413a 100644
--- a/ui/component/or-json-forms/src/util.ts
+++ b/ui/component/or-json-forms/src/util.ts
@@ -2,6 +2,7 @@ import {
CombinatorKeyword,
composeWithUi,
ControlElement,
+ ControlProps,
createDefaultValue,
deriveTypes,
getAjv,
@@ -23,7 +24,7 @@ import {
StatePropsOfCombinator,
} from "@jsonforms/core";
import {DefaultColor5, Util} from "@openremote/core";
-import { InputType, OrMwcInput } from "@openremote/or-mwc-components/or-mwc-input";
+import { InputType, OrInputChangedEvent, OrMwcInput } from "@openremote/or-mwc-components/or-mwc-input";
import { i18next } from "@openremote/or-translate";
import "@openremote/or-components/or-ace-editor";
import {OrAceEditor, OrAceEditorChangedEvent} from "@openremote/or-components/or-ace-editor";
@@ -32,6 +33,7 @@ import {createRef, Ref, ref} from 'lit/directives/ref.js';
import {ErrorObject} from "./index";
import {unknownTemplate} from "./standard-renderers";
import { showDialog } from "@openremote/or-mwc-components/or-mwc-dialog";
+import {AdditionalProps} from "./base-element";
export function getTemplateFromProps<T extends OwnPropsOfRenderer>(state: JsonFormsSubStates | undefined, props: T | undefined): TemplateResult {
if (!state || !props) {
@@ -110,7 +112,7 @@ export function getCombinatorInfos(schemas: JsonSchema[], rootSchema: JsonSchema
}
return {
- title: Util.camelCaseToSentenceCase(titleAndDescription[0]),
+ title: i18next.t("schema.title." + titleAndDescription[0], {defaultValue: Util.camelCaseToSentenceCase(titleAndDescription[0])}),
description: titleAndDescription[1],
defaultValueCreator: creator,
constProperty: constProperty,
@@ -133,6 +135,19 @@ export function getSchemaConst(schema: JsonSchema): any {
}
}
+export function getSchemaPicker(rootSchema: JsonSchema, resolvedSchema: JsonSchema, path: string, keyword: "anyOf" | "oneOf", label: string, selectedCallback: (selectedSchema: CombinatorInfo) => void): TemplateResult {
+ const combinatorInfos = getCombinatorInfos(resolvedSchema[keyword]!, rootSchema);
+ const options: [string, string][] = combinatorInfos.map((combinatorInfo, index) => [index+"", combinatorInfo.title || i18next.t("schema.title.indexedItem", {index: index})]);
+ const pickerUpdater = (index: number) => {
+ const matchedInfo = combinatorInfos[index];
+ selectedCallback(matchedInfo);
+ };
+ const pickerLabel = label ? i18next.t("schema.anyOfPickerLabel", {label: label}) : i18next.t("type");
+ return html`
+ <or-mwc-input class="any-of-picker" .label="${pickerLabel}" .type="${InputType.SELECT}" .options="${options}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => pickerUpdater(Number(ev.detail.value))}"></or-mwc-input>
+ `;
+}
+
export function findSchemaTitleAndDescription(schema: JsonSchema, rootSchema: JsonSchema): [string | undefined, string | undefined] {
let title: string | undefined;
diff --git a/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts b/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts
index 23df50bd1..271ffeb06 100644
--- a/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts
+++ b/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts
@@ -244,7 +244,7 @@ export class OrRuleActionNotification extends LitElement {
items: [
{
name: { "predicateType": "string", "value": "email" },
- value: { "predicateType": "value-not-empty" }
+ value: { "predicateType": "value-empty", negate: true }
}
]
}
diff --git a/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts b/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts
index c3630ec45..7d74167a3 100644
--- a/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts
+++ b/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts
@@ -224,8 +224,6 @@ export class OrRuleAssetQuery extends translate(i18next)(LitElement) {
return html `<span>NOT IMPLEMENTED</span>`;
case "value-empty":
return ``;
- case "value-not-empty":
- return ``;
case "array":
// TODO: Update once we can determine inner type of array
// Assume string array
@@ -430,9 +428,7 @@ export class OrRuleAssetQuery extends translate(i18next)(LitElement) {
}
return valuePredicate.negated ? AssetQueryOperator.NOT_CONTAINS : AssetQueryOperator.CONTAINS;
case "value-empty":
- return AssetQueryOperator.VALUE_EMPTY;
- case "value-not-empty":
- return AssetQueryOperator.VALUE_NOT_EMPTY;
+ return valuePredicate.negate ? AssetQueryOperator.VALUE_NOT_EMPTY : AssetQueryOperator.VALUE_EMPTY;
}
}
@@ -621,7 +617,8 @@ export class OrRuleAssetQuery extends translate(i18next)(LitElement) {
break;
case AssetQueryOperator.VALUE_NOT_EMPTY:
predicate = {
- predicateType: "value-not-empty"
+ predicateType: "value-empty",
+ negate: true
};
break;
case AssetQueryOperator.CONTAINS:
diff --git a/ui/component/or-rules/src/json-viewer/or-rule-json-viewer.ts b/ui/component/or-rules/src/json-viewer/or-rule-json-viewer.ts
index f35abece6..16e40ad79 100644
--- a/ui/component/or-rules/src/json-viewer/or-rule-json-viewer.ts
+++ b/ui/component/or-rules/src/json-viewer/or-rule-json-viewer.ts
@@ -406,7 +406,6 @@ export class OrRuleJsonViewer extends translate(i18next)(LitElement) implements
case "array":
return (valuePredicate.index && !valuePredicate.value) || valuePredicate.value || valuePredicate.lengthEquals || valuePredicate.lengthLessThan || valuePredicate.lengthGreaterThan;
case "value-empty":
- case "value-not-empty":
return true;
default:
return false;