Added custom API widget (#1858)

* Added custom API widget

* Rename custom widget to customapi

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
Denis Papec 2023-08-26 07:39:15 +01:00 committed by GitHub
parent 14b886793c
commit fc7e73eba2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 92 additions and 0 deletions

View file

@ -299,6 +299,8 @@ export function cleanServiceGroups(groups) {
stream, // mjpeg
fit,
method, // openmediavault widget
mappings, // customapi widget
refreshInterval,
} = cleanedService.widget;
let fieldsList = fields;
@ -372,6 +374,10 @@ export function cleanServiceGroups(groups) {
if (type === "openmediavault") {
if (method) cleanedService.widget.method = method;
}
if (type === "customapi") {
if (mappings) cleanedService.widget.mappings = mappings;
if (refreshInterval) cleanedService.widget.refreshInterval = refreshInterval;
}
}
return cleanedService;