mirror of
https://github.com/jwetzell/showbridge-webui.git
synced 2026-09-10 07:39:25 +00:00
remove sub action stuff
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
@for (key of paramKeys(); track key) {
|
@for (key of paramKeys(); track key) {
|
||||||
<div class="flex items-center m-1">
|
<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>
|
<label class="mr-2 text-gray-300"> {{ paramInfo.display }}: </label>
|
||||||
@switch (paramInfo.type) {
|
@switch (paramInfo.type) {
|
||||||
@case ('boolean') {
|
@case ('boolean') {
|
||||||
|
|||||||
@@ -187,16 +187,6 @@ export class ParamsFormComponent implements OnInit {
|
|||||||
return this.paramsFormInfo?.paramsInfo[key];
|
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) {
|
getParamValue(key: string) {
|
||||||
if (this.paramsSchema) {
|
if (this.paramsSchema) {
|
||||||
const params = this.schemaService.cleanParams(
|
const params = this.schemaService.cleanParams(
|
||||||
|
|||||||
@@ -489,12 +489,6 @@ export class SchemaService {
|
|||||||
} else {
|
} else {
|
||||||
console.error(`schema-service: unhandled array schema type: ${schema.items?.type}`);
|
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 {
|
} else {
|
||||||
// NOTE(jwetzell): default to comma-separated strings
|
// NOTE(jwetzell): default to comma-separated strings
|
||||||
return paramValue.split(',').map((part: string) => part.trim());
|
return paramValue.split(',').map((part: string) => part.trim());
|
||||||
|
|||||||
Reference in New Issue
Block a user