13 changed files with 190 additions and 39 deletions
@ -0,0 +1,31 @@ |
|||
/** |
|||
* Copyright © 2016-2017 The Thingsboard Authors |
|||
* |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); |
|||
* you may not use this file except in compliance with the License. |
|||
* You may obtain a copy of the License at |
|||
* |
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
|||
* |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, |
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
* See the License for the specific language governing permissions and |
|||
* limitations under the License. |
|||
*/ |
|||
package org.thingsboard.server.extensions.core.action.telemetry; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonInclude; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Andrew Shvayka |
|||
*/ |
|||
@Data |
|||
@JsonInclude(JsonInclude.Include.NON_NULL) |
|||
public class TelemetryPluginActionConfiguration { |
|||
|
|||
private String timeUnit; |
|||
private int ttlValue; |
|||
|
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
{ |
|||
"schema": { |
|||
"title": "Telemetry Plugin Action Configuration", |
|||
"type": "object", |
|||
"properties": { |
|||
"timeUnit": { |
|||
"title": "Time Unit", |
|||
"type": "string", |
|||
"default": "DAYS" |
|||
}, |
|||
"ttlValue": { |
|||
"title": "TTL", |
|||
"type": "integer", |
|||
"default": 365, |
|||
"minimum": 0, |
|||
"maximum": 100000 |
|||
} |
|||
}, |
|||
"required": [ |
|||
"timeUnit", |
|||
"ttlValue" |
|||
] |
|||
}, |
|||
"form": [ |
|||
{ |
|||
"key": "timeUnit", |
|||
"type": "rc-select", |
|||
"multiple": false, |
|||
"items": [ |
|||
{ |
|||
"value": "SECONDS", |
|||
"label": "Seconds" |
|||
}, |
|||
{ |
|||
"value": "MINUTES", |
|||
"label": "Minutes" |
|||
}, |
|||
{ |
|||
"value": "HOURS", |
|||
"label": "Hours" |
|||
}, |
|||
{ |
|||
"value": "DAYS", |
|||
"label": "Days" |
|||
} |
|||
] |
|||
}, |
|||
"ttlValue" |
|||
] |
|||
} |
|||
Loading…
Reference in new issue