(report: ClusterReport)
| 554 | |
| 555 | |
| 556 | def render_output(report: ClusterReport): |
| 557 | def render_node_output(node: Node) -> Optional[Model]: |
| 558 | processes = [p for p in node.processes if is_valid_process(p)] |
| 559 | |
| 560 | def render_process_output(process: ProcessInfo) -> Optional[Model]: |
| 561 | items = [("out", process.process.stdout), ("err", process.process.stderr)] |
| 562 | |
| 563 | def render_item(item: Tuple[str, str]): |
| 564 | name, path = item |
| 565 | path = Path(path) |
| 566 | if path.is_file(): |
| 567 | content = load_process_output(path) |
| 568 | content = PreText(text=content) |
| 569 | return Panel(child=content, title=name) |
| 570 | |
| 571 | return Panel(child=create_tabs(items, render_item), title=process.key) |
| 572 | |
| 573 | return Panel(child=create_tabs(processes, render_process_output), title=node.hostname) |
| 574 | |
| 575 | return create_node_tabs(report, render_node_output) |
| 576 | |
| 577 | |
| 578 | def render_process_resource_usage(report: ClusterReport, per_process_df: pd.DataFrame): |
nothing calls this directly
no test coverage detected