Added traceability

This commit is contained in:
2025-08-25 23:20:10 +02:00
parent 957a92f903
commit 63058ef4a9
6 changed files with 67 additions and 9 deletions

View File

@@ -0,0 +1,16 @@
.es-container {
overflow-x: auto;
white-space: nowrap;
}
.es-entry {
border: 2px solid var(--color-base-300);
padding: 2px;
cursor: pointer;
display: inline-block; /* Ensure entries align horizontally if needed */
}
.es-entry:hover {
background-color: var(--color-base-300);
}

View File

@@ -40,7 +40,6 @@ class EntrySelector(BaseComponentMultipleInstance):
def __ft__(self):
return Div(
*self._mk_content(),
style=f"width: {self._boundaries['width']}px;",
cls="flex",
cls="flex es-container",
id=f"{self._id}",
)

View File

@@ -29,7 +29,8 @@ class WorkflowDesignerProperties(BaseComponent):
self._input_entry_selector = InstanceManager.new(self._session,
EntrySelector,
owner=self,
content_id=f"pic_{self._id}", data=100)
content_id=f"pic_{self._id}",
data=100)
self._output_entry_selector = InstanceManager.new(self._session,
EntrySelector,
owner=self,

View File

@@ -98,6 +98,8 @@ class WorkflowPlayer(BaseComponent):
if component.id not in engine.errors:
runtime_state.state = ComponentState.SUCCESS
runtime_state.input = engine.debug[component.id]["input"]
runtime_state.output = engine.debug[component.id]["output"]
continue
# the component failed
@@ -177,7 +179,7 @@ class WorkflowPlayer(BaseComponent):
# Return sorted components
return [components_by_id[cid] for cid in sorted_order]
def _get_engine(self, sorted_components):
def _get_engine(self, sorted_components) -> WorkflowEngine:
# first reorder the component, according to the connection definitions
engine = WorkflowEngine()
for component in sorted_components:

View File

@@ -48,6 +48,8 @@ class WorkflowComponentRuntimeState:
id: str
state: ComponentState = ComponentState.SUCCESS
error_message: str | None = None
input: list = None
output: list = None
@dataclass
@@ -62,7 +64,7 @@ class WorkflowsDesignerState:
component_counter: int = 0
designer_height: int = 230
properties_input_width: int = None
properties_properties_width : int = None
properties_properties_width: int = None
properties_output_width: int = None
selected_component_id: str | None = None