diff --git a/OpenBench/static/ux.css b/OpenBench/static/ux.css index 3661fc4..deed320 100644 --- a/OpenBench/static/ux.css +++ b/OpenBench/static/ux.css @@ -736,6 +736,212 @@ button.ev-move:hover { font-size: 12.5px; } +/* ---------- Pipelines ---------- */ + +.pl-scroll { + padding: 14px 12px 12px; + overflow-x: auto; +} + +.pl-graph { + display: block; + max-width: none; + font-family: var(--font-sans); +} + +/* Steps. A step that has not run is quiet, one that has takes on the colour of how it ended */ + +.pl-box { + fill: var(--color3); + stroke: var(--line-strong); + stroke-width: 1; +} + +.pl-name { + fill: var(--color-font1); + font-size: 13.5px; + font-weight: 600; +} + +.pl-what, +.pl-speed { + fill: var(--muted); + font-family: var(--font-mono); + font-size: 12px; +} + +.pl-status { + fill: var(--muted); + font-size: 11.5px; + font-weight: 600; +} + +.pl-play { + fill: var(--accent); +} + +.pl-s-queued .pl-box, +.pl-s-launching .pl-box { + stroke: #566074; + stroke-dasharray: 4 3; +} + +.pl-s-running .pl-box { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.6; } +.pl-s-passed .pl-box { fill: rgba(52, 211, 153, 0.08); stroke: var(--ok); } +.pl-s-failed .pl-box { fill: rgba(248, 113, 113, 0.09); stroke: var(--bad); } +.pl-s-stopped .pl-box { fill: rgba(245, 185, 65, 0.08); stroke: var(--warn); } +.pl-s-error .pl-box { fill: rgba(248, 113, 113, 0.09); stroke: var(--bad); stroke-dasharray: 4 3; } + +.pl-s-running .pl-status { fill: var(--accent-hover); } +.pl-s-passed .pl-status { fill: var(--ok); } +.pl-s-failed .pl-status, +.pl-s-error .pl-status { fill: var(--bad); } +.pl-s-stopped .pl-status { fill: var(--warn); } + +.pl-unreachable { + opacity: 0.5; +} + +.pl-unreachable .pl-box { + stroke-dasharray: 4 3; +} + +.pl-graph a { + outline: none; +} + +.pl-graph a:hover .pl-box { + stroke-width: 2; +} + +.pl-graph a:focus-visible .pl-box { + stroke: var(--accent-hover); + stroke-width: 2.5; +} + +/* Edges. The colour says what has to happen for the edge to be followed */ + +.pl-edge .pl-line { + fill: none; + stroke: #566074; + stroke-width: 1.6; +} + +.pl-arrow { fill: #566074; } +.pl-end { fill: #566074; } + +.pl-c-passed .pl-line { stroke: var(--ok); } +.pl-c-failed .pl-line { stroke: var(--bad); } +.pl-c-stopped .pl-line { stroke: var(--warn); } + +.pl-arrow.pl-c-passed { fill: var(--ok); } +.pl-arrow.pl-c-failed { fill: var(--bad); } +.pl-arrow.pl-c-stopped { fill: var(--warn); } + +.pl-back .pl-line { + stroke-dasharray: 5 4; +} + +/* On a run, the way that was gone along stands out and the rest steps back */ + +.pl-taken .pl-line { + stroke-width: 3; +} + +.pl-idle .pl-line { opacity: 0.22; } +.pl-idle .pl-label { opacity: 0.45; } + +.pl-label rect { + fill: var(--color1); + stroke: var(--line-strong); +} + +.pl-label text { + fill: var(--color-font2); + font-size: 11.5px; + font-weight: 500; +} + +@media (prefers-reduced-motion: no-preference) { + + /* The one thing that moves: the step that is going right now */ + + @keyframes pl-pulse { + 50% { stroke-opacity: 0.4; } + } + + .pl-s-running .pl-box { + animation: pl-pulse 2.4s ease-in-out infinite; + } +} + +/* Around the graph */ + +.page-actions form, +.pl-toolbar form { + margin: 0; +} + +.pl-toolbar { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + min-height: 38px; + margin-bottom: 16px; +} + +.pl-checks { + margin: 0; + padding: 6px 0; + list-style: none; +} + +.pl-check { + display: flex; + align-items: flex-start; + gap: 12px; + padding: 9px 16px; + color: var(--color-font2); +} + +.pl-check i { + margin-top: 4px; +} + +.pl-check strong { + color: var(--color-font1); +} + +.pl-check-error i { color: var(--bad); } +.pl-check-warning i { color: var(--warn); } +.pl-check-info i { color: var(--accent); } + +#content td.pl-leads { + white-space: normal; +} + +#content .pl-message { + max-width: 52ch; + white-space: pre-wrap; + word-break: break-word; +} + +/* On the page of a test that a pipeline started */ + +.pl-chip { + display: inline-flex; + align-items: center; + gap: 8px; + margin-bottom: 14px; + padding: 6px 12px; + background-color: var(--accent-soft); + border: 1px solid rgba(76, 141, 255, 0.4); + border-radius: var(--radius); + color: var(--color-font1); + font-size: 13px; +} + /* ---------- Responsive ---------- */ @media (max-width: 767px) { diff --git a/OpenBench/urls.py b/OpenBench/urls.py index d8648f0..eb86e8d 100644 --- a/OpenBench/urls.py +++ b/OpenBench/urls.py @@ -18,7 +18,7 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -import django.urls, OpenBench.views, OpenBench.seo +import django.urls, OpenBench.views, OpenBench.pipeline_views, OpenBench.seo urlpatterns = [ @@ -42,6 +42,15 @@ urlpatterns = [ django.urls.path(r'greens//', OpenBench.views.greens), django.urls.path(r'search/', OpenBench.views.search), + # Links for viewing and managing Pipelines + django.urls.path(r'pipelines/', OpenBench.pipeline_views.pipelines), + django.urls.path(r'pipelines//', OpenBench.pipeline_views.pipeline), + django.urls.path(r'pipelines//start/', OpenBench.pipeline_views.pipeline_start), + django.urls.path(r'pipelines//toggle/', OpenBench.pipeline_views.pipeline_toggle), + django.urls.path(r'pipelines//delete/', OpenBench.pipeline_views.pipeline_delete), + django.urls.path(r'pipelines/run//', OpenBench.pipeline_views.pipeline_run), + django.urls.path(r'pipelines/run//cancel/', OpenBench.pipeline_views.pipeline_run_cancel), + # Links for viewing general information tables django.urls.path(r'users/', OpenBench.views.users), django.urls.path(r'event//', OpenBench.views.event), diff --git a/Templates/OpenBench/base.html b/Templates/OpenBench/base.html index 5fb41b7..fd2e3e5 100644 --- a/Templates/OpenBench/base.html +++ b/Templates/OpenBench/base.html @@ -158,6 +158,7 @@
  • Index
  • Greens
  • Search
  • +
  • Pipelines
  • diff --git a/Templates/OpenBench/workload.html b/Templates/OpenBench/workload.html index 291b288..e5c6f11 100644 --- a/Templates/OpenBench/workload.html +++ b/Templates/OpenBench/workload.html @@ -17,6 +17,14 @@ {% block content %} + {% if pipeline_step %} +
    + + Step {{ pipeline_step.name }} of {{ pipeline_step.pipeline }} + {% if pipeline_step.after %}{{ pipeline_step.after }}{% endif %} +
    + {% endif %} +
    {% if type == "TUNE" %}
    {% endif %}