diff --git a/src/app/shared/nodes/container-node/container-node.html b/src/app/shared/nodes/container-node/container-node.html
index e01367f..534bd1e 100644
--- a/src/app/shared/nodes/container-node/container-node.html
+++ b/src/app/shared/nodes/container-node/container-node.html
@@ -1,4 +1,12 @@
+ @if (isSchemaLoading && !isAssigning) {
+
+
+
+ Loading container...
+
+
+ }
@if (deleteConfirmOpen) {
}
@@ -222,6 +230,15 @@
(click)="openParameterEditor(field.path, $event)">
+ } @else if (field.expandable) {
+
}
{{ contentField.label }}
+ @if (contentField.expandable && isReadonly) {
+
+ }
@for (part of contentField.parts; track $index) {
diff --git a/src/app/shared/nodes/container-node/container-node.ts b/src/app/shared/nodes/container-node/container-node.ts
index e155317..5235574 100644
--- a/src/app/shared/nodes/container-node/container-node.ts
+++ b/src/app/shared/nodes/container-node/container-node.ts
@@ -1,5 +1,5 @@
import { CommonModule } from '@angular/common';
-import { ChangeDetectorRef, Component, HostBinding, Input, inject } from '@angular/core';
+import { ChangeDetectorRef, Component, HostBinding, HostListener, Input, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { MatTooltipModule } from '@angular/material/tooltip';
import { currentFlowPortValueKind, flowValueKindLabel, FlowBlock, FlowContainer, FlowData, FLOW_DEPENDANT_PORT_KEY, FLOW_DEPENDENCY_PORT_KEY } from '@models/flow';
@@ -87,9 +87,14 @@ export class ContainerNodeComponent {
parameterFields: ContainerFieldView[] = [];
richContentFields: RichContentView[] = [];
schemaReady = false;
+ private schemaLoading = false;
nameEditorOpen = false;
draftName = '';
+ get isSchemaLoading() {
+ return this.schemaLoading;
+ }
+
@Input() data!: any;
@Input() emit!: (data: any) => void;
@Input() rendered!: () => void;
@@ -114,6 +119,12 @@ export class ContainerNodeComponent {
void this.loadSchemaContext();
}
+ @HostListener('click')
+ onNodeClick() {
+ if (!this.shouldRetrySchemaLoad()) return;
+ void this.loadSchemaContext();
+ }
+
ngAfterViewInit() {
this.rendered();
}
@@ -535,6 +546,20 @@ export class ContainerNodeComponent {
this.subflowPreview.open(this.subFlow, `${this.name} subflow`);
}
+ async openFieldPreview(field: ContainerFieldView, event?: Event) {
+ event?.preventDefault();
+ event?.stopPropagation();
+ if (!field.expandable) return;
+ await this.openReadonlyTextDialog(field.label, field.value);
+ }
+
+ async openMainContentPreview(field: RichContentView, event?: Event) {
+ event?.preventDefault();
+ event?.stopPropagation();
+ if (!field.expandable) return;
+ await this.openReadonlyTextDialog(field.label, field.rawValue);
+ }
+
private get configuration(): Record | null {
const value = this.data?.data?.specificConfiguration;
return value && typeof value === 'object' ? value as Record : null;
@@ -553,6 +578,25 @@ export class ContainerNodeComponent {
return !this.isAssigning && !this.replaceConfirmOpen && this.selectedCount > 0;
}
+ private async openReadonlyTextDialog(label: string, value: string) {
+ await this.settingsDialog.open({
+ title: label,
+ previewOnly: true,
+ fields: [
+ {
+ key: 'value',
+ label,
+ type: 'textarea',
+ readonly: true,
+ rows: 18
+ }
+ ],
+ initial: {
+ value
+ }
+ });
+ }
+
private assignSelectionToContainer(payload: string[]) {
this.importErrorMessage = null;
const assign = this.data?.data?.assignSelectedBlocksToContainer;
@@ -664,6 +708,9 @@ export class ContainerNodeComponent {
}
private async loadSchemaContext() {
+ if (this.schemaLoading) return;
+ this.schemaLoading = true;
+ this.schemaReady = false;
try {
const containerType = this.containersService.peekContainerType(this.typeName) ?? await this.containersService.getContainerType(this.typeName);
this.containerSchema = (containerType?.schema ?? null) as Record | null;
@@ -671,6 +718,7 @@ export class ContainerNodeComponent {
this.containerFieldDefinitions = this.buildContainerFieldDefinitions(this.containerSchema);
this.refreshParameterFields();
} finally {
+ this.schemaLoading = false;
this.schemaReady = true;
queueMicrotask(() => {
try {
@@ -682,6 +730,11 @@ export class ContainerNodeComponent {
}
}
+ private shouldRetrySchemaLoad(): boolean {
+ if (this.schemaLoading) return false;
+ return !this.containerSchema || this.containerFieldDefinitions.length === 0;
+ }
+
private isMissingValue(value: unknown): boolean {
if (value == null) return true;
if (typeof value === 'string') return value.trim().length === 0;
diff --git a/src/app/shared/nodes/generic-node/generic-node.html b/src/app/shared/nodes/generic-node/generic-node.html
index 209a503..484c13c 100644
--- a/src/app/shared/nodes/generic-node/generic-node.html
+++ b/src/app/shared/nodes/generic-node/generic-node.html
@@ -10,6 +10,14 @@
}
@@ -252,6 +260,15 @@
(click)="openParameterEditor(field.path, $event)">