mirror of
https://github.com/jwetzell/showbridge-webui.git
synced 2026-08-14 10:53:39 +00:00
remove sub action stuff
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<div class="flex flex-col">
|
||||
@for (key of paramKeys(); track key) {
|
||||
<div class="flex items-center m-1">
|
||||
@if (showParam(key) && getParamInfo(key); as paramInfo) {
|
||||
@if (getParamInfo(key); as paramInfo) {
|
||||
<label class="mr-2 text-gray-300"> {{ paramInfo.display }}: </label>
|
||||
@switch (paramInfo.type) {
|
||||
@case ('boolean') {
|
||||
|
||||
@@ -186,17 +186,7 @@ export class ParamsFormComponent implements OnInit {
|
||||
getParamInfo(key: string): ParamInfo | undefined {
|
||||
return this.paramsFormInfo?.paramsInfo[key];
|
||||
}
|
||||
|
||||
showParam(key: string): boolean {
|
||||
const paramInfo = this.paramsFormInfo?.paramsInfo[key];
|
||||
if (paramInfo) {
|
||||
if (paramInfo?.schema?.$ref === '#/definitions/ActionList') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
getParamValue(key: string) {
|
||||
if (this.paramsSchema) {
|
||||
const params = this.schemaService.cleanParams(
|
||||
|
||||
@@ -489,12 +489,6 @@ export class SchemaService {
|
||||
} else {
|
||||
console.error(`schema-service: unhandled array schema type: ${schema.items?.type}`);
|
||||
}
|
||||
} else if (schema['$ref'] === '#/definitions/ActionList') {
|
||||
try {
|
||||
return JSON.parse(`[${paramValue}]`);
|
||||
} catch (error) {
|
||||
console.error('sub action list is not JSON');
|
||||
}
|
||||
} else {
|
||||
// NOTE(jwetzell): default to comma-separated strings
|
||||
return paramValue.split(',').map((part: string) => part.trim());
|
||||
|
||||
Reference in New Issue
Block a user