dataset_links
def dataset_links(mut h: Html, names: List[String]) orca.ui.partsPieces several pages draw: durations, times and partitions in a table's cells, a runs table with each row's actions, links to code, and a run's grant and usage as facts.
dataset_linksdef dataset_links(mut h: Html, names: List[String]) took_textdef took_text(seconds: Int) -> String A duration as 42s, 3m 07s or 2h 05m; empty for a negative one.
took_longdef took_long(seconds: Int) -> String A duration as 42 s, 3 min 21 s or 2 h 5 min.
partitions_factdef partitions_fact(mut h: Html, partitions: String) A run's partitions on its page: all of them if few, else first … last (N partitions) with the whole list in a fold.
code_linkdef code_link(mut h: Html, at: CodeRef) A link to a line of code: every one orca shows is drawn by this, so they all look alike and unlike orca's own links.
step_celldef step_cell(mut h: Html, name: String, links: CodeLinks, attempt: Int = Int(-1)) A step's name, then a link to its function where the code is known. With attempt (0 for none yet), the name shows the step's card (orca.ui.step_cards), and that attempt's on a run's page.
source_htmldef source_html(mut h: Html, v: VersionRow) The commit, linked to its tree where the host is known.
pause_buttondef pause_button(mut h: Html, name: String, paused: Bool) Resume a paused pipeline, or pause an active one.
cancel_telldef cancel_tell(r: RunRow) -> String What cancelling r does, as its Cancel's dialog says it (orca.actions.cancel_run).
row_actionsdef row_actions(mut h: Html, r: RunRow) A runs table row's Cancel (queued or running) or Retry (failed).
runs_table_htmldef runs_table_html(mut h: Html, runs: List[RunRow], show_pipeline: Bool, pick: Bool = False, code: Dict[Int, RunCode] = Dict()) A table of runs; with pick, a checkbox before each, for the list's bulk actions (form="bulk-runs", orca.ui.runs.runs_bulk_html), and one in the header that ticks the page's (with JavaScript). With a run's code, its pipeline's name shows the pipeline's declaration on hover (data-src, the page's _PEEK) and a failed run names the step that failed, linked to its function, at the commit the run ran.
mb_textdef mb_text(mb: Int) -> String 512 MB, 1.5 GB.
usage_celldef usage_cell(mut h: Html, u: Usage, limit_mb: Int = Int(0), grant_mb: Int = Int(0)) A <td> of a peak in memory, with the CPU in its title, and after it the attempt's memory limit (orca.cgroup) when it had one.
request_textdef request_text(cpus: String, memory_gb: String) -> String 1..16 CPUs, 2..24 GB; auto as CPUs auto, memory auto..24 GB.
limit_factsdef limit_facts(mut h: Html, limit_mb: Int, max_mb: Int, grant_mb: Int = Int(0)) A Memory limit fact (orca.cgroup), when there was one.
grant_factsdef grant_facts(mut h: Html, r: RunResources) A run's Requested and Granted facts (orca.resources), when its pipeline asked for any, and its memory limit (orca.cgroup) when it had one.
usage_factsdef usage_facts(mut h: Html, u: Usage, live: Bool) A run's or an attempt's Peak memory and CPU used facts (orca.usage).
named_code_linkdef named_code_link(mut h: Html, name: String, at: CodeRef) A link to a function's code labelled with its name; where it is (file.mojo:26) is in its title, and in the source shown on hover.
comptime TRIES = "Times the run's process was started: 1 is normal; more means retries, a lost instance or a resume."What a runs table's Tries column counts (orca.runs.starts).
comptime PEAK_HELP = "The most memory its processes held at once: the run's process and what it started (dista's local workers too), sampled every second by the scheduler or worker that started it, and at the end the largest single process. Not measured on EC2 or Kubernetes."comptime CPU_HELP = "The CPU time its processes used, user and system, and the most cores they kept busy over one sample's second. macOS gives only the time, and only for a process that made one attempt."comptime LIMIT_HELP = "Its latest start's cgroup (orca.cgroup): past the limit (memory.high, its grant, request or ORCA_RUN_MEMORY_MB) the kernel slows its processes and reclaims their memory; past the kill line (memory.max, ORCA_RUN_MEMORY_MARGIN above) it kills them, and the retry asks for more. None where orca can't make cgroups."