Repository navigation
[uss_qualifier/reports] Add sequence view timeline index page #1815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
BenjaminPelletier
wants to merge
1
commit into
interuss:main
Choose a base branch
from
BenjaminPelletier:sequence-view-timeline
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,235
−727
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
736 changes: 12 additions & 724 deletions
736
monitoring/benchmarker/artifacts/timeline/templates/scenario.html
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <div id="timeline-container"> | ||
| <canvas id="timeline-canvas"></canvas> | ||
| <div id="tooltip"></div> | ||
| <div class="help-hint"> | ||
| <strong>Controls:</strong> Left-drag or Mouse wheel to scroll • Shift + Left-drag or Shift + Wheel to zoom time • | ||
| {% if timeline_horizontal %} | ||
| Ctrl/Alt + Wheel or pinch to zoom lanes • Horizontal wheel or bottom bar to scroll lanes • | ||
| {% endif %} | ||
| {{ timeline_hover_hint|default("Hover Time column to inspect active operations") }} | ||
| </div> | ||
| </div> |
11 changes: 11 additions & 0 deletions
11
monitoring/monitorlib/html/templates/timeline/controls.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <div class="btn-group"> | ||
| <button id="btn-zoom-in" class="btn-sm" title="Zoom In (or Shift + Wheel Up)">Zoom In (+)</button> | ||
| <button id="btn-zoom-out" class="btn-sm" title="Zoom Out (or Shift + Wheel Down)">Zoom Out (-)</button> | ||
| <button id="btn-reset-view" class="btn-sm" title="Reset to Full Scenario View">Reset View</button> | ||
| </div> | ||
| {% if timeline_horizontal %} | ||
| <div class="btn-group"> | ||
| <button id="btn-hzoom-in" class="btn-sm" title="Widen lanes (or Ctrl/Alt + Wheel Up)">Lanes (+)</button> | ||
| <button id="btn-hzoom-out" class="btn-sm" title="Narrow lanes (or Ctrl/Alt + Wheel Down)">Lanes (-)</button> | ||
| </div> | ||
| {% endif %} | ||
98 changes: 98 additions & 0 deletions
98
monitoring/monitorlib/html/templates/timeline/horizontal.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| {# Optional horizontal lane viewport; the caller supplies X_OPS_START and data.total_operation_lanes. #} | ||
| // Visible lane window [viewL0, viewL1], in lane units across all origins | ||
| const totalLanes = Math.max(1, data.total_operation_lanes); | ||
| const minLaneSpan = Math.min(1, totalLanes); | ||
| let viewL0 = 0; | ||
| let viewL1 = totalLanes; | ||
|
|
||
| let isDraggingHScrollbar = false; | ||
| let dragAnchorX = 0; | ||
| let dragStartL0 = 0; | ||
| let dragStartL1 = 0; | ||
|
|
||
| function clampLanes() { | ||
| let span = viewL1 - viewL0; | ||
| if (span >= totalLanes) { | ||
| viewL0 = 0; | ||
| viewL1 = totalLanes; | ||
| return; | ||
| } | ||
| if (span < minLaneSpan) { | ||
| const center = (viewL0 + viewL1) / 2; | ||
| span = minLaneSpan; | ||
| viewL0 = center - span / 2; | ||
| viewL1 = center + span / 2; | ||
| } | ||
| if (viewL0 < 0) { | ||
| viewL0 = 0; | ||
| viewL1 = span; | ||
| } | ||
| if (viewL1 > totalLanes) { | ||
| viewL1 = totalLanes; | ||
| viewL0 = totalLanes - span; | ||
| } | ||
| } | ||
|
|
||
| function zoomLanesAround(lane, factor) { | ||
| const span = viewL1 - viewL0; | ||
| const newSpan = span * factor; | ||
| const ratio = (lane - viewL0) / span; | ||
| viewL0 = lane - newSpan * ratio; | ||
| viewL1 = lane + newSpan * (1 - ratio); | ||
| clampLanes(); | ||
| } | ||
|
|
||
| function opsWidth() { | ||
| return Math.max(10, width - X_OPS_START - W_SCROLLBAR); | ||
| } | ||
|
|
||
| function laneWidth() { | ||
| return opsWidth() / (viewL1 - viewL0); | ||
| } | ||
|
|
||
| function laneToX(lane) { | ||
| return X_OPS_START + (lane - viewL0) * laneWidth(); | ||
| } | ||
|
|
||
| function xToLane(x) { | ||
| return viewL0 + (x - X_OPS_START) / laneWidth(); | ||
| } | ||
|
|
||
| function hScrollbarXToLane(x) { | ||
| return ((x - X_OPS_START) / opsWidth()) * totalLanes; | ||
| } | ||
|
|
||
| function inHScrollbar(x, y) { | ||
| return y >= H_HEADER + timelineHeight() && x >= X_OPS_START && x < width - W_SCROLLBAR; | ||
| } | ||
|
|
||
| function centerLanesOn(lane) { | ||
| const span = viewL1 - viewL0; | ||
| viewL0 = lane - span / 2; | ||
| viewL1 = lane + span / 2; | ||
| clampLanes(); | ||
| } | ||
|
|
||
| function drawHorizontalScrollbar() { | ||
| const xOpsStart = X_OPS_START; | ||
| const xOpsEnd = width - W_SCROLLBAR; | ||
| const wOpsAvailable = opsWidth(); | ||
| const yBottom = H_HEADER + timelineHeight(); | ||
| // 8. Horizontal Scroll Bar (Bottom of the operations area) | ||
| ctx.fillStyle = '#f1f5f9'; | ||
| ctx.fillRect(xOpsStart, yBottom, wOpsAvailable, H_HSCROLLBAR); | ||
| ctx.strokeStyle = '#e2e8f0'; | ||
| ctx.lineWidth = 1; | ||
| ctx.beginPath(); | ||
| ctx.moveTo(xOpsStart, yBottom); | ||
| ctx.lineTo(xOpsEnd, yBottom); | ||
| ctx.stroke(); | ||
|
|
||
| const thumbX0 = xOpsStart + (viewL0 / totalLanes) * wOpsAvailable; | ||
| const thumbW = Math.max(8, ((viewL1 - viewL0) / totalLanes) * wOpsAvailable); | ||
| ctx.fillStyle = 'rgba(59, 130, 246, 0.35)'; | ||
| ctx.fillRect(thumbX0, yBottom + 2, thumbW, H_HSCROLLBAR - 4); | ||
| ctx.strokeStyle = '#2563eb'; | ||
| ctx.lineWidth = 1.5; | ||
| ctx.strokeRect(thumbX0, yBottom + 2, thumbW, H_HSCROLLBAR - 4); | ||
| } |
207 changes: 207 additions & 0 deletions
207
monitoring/monitorlib/html/templates/timeline/style.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,207 @@ | ||
| <style> | ||
| :root { | ||
| --primary: #1976d2; | ||
| --primary-hover: #1565c0; | ||
| --bg: #f8fafc; | ||
| --surface: #ffffff; | ||
| --border: #e2e8f0; | ||
| --text: #1e293b; | ||
| --text-muted: #64748b; | ||
| --success: #10b981; | ||
| --danger: #ef4444; | ||
| --warning: #f59e0b; | ||
| } | ||
|
|
||
| * { | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body { | ||
| font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; | ||
| margin: 0; | ||
| padding: 0; | ||
| background-color: var(--bg); | ||
| color: var(--text); | ||
| overflow-x: hidden; | ||
| height: 100vh; | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| header { | ||
| background-color: var(--surface); | ||
| border-bottom: 1px solid var(--border); | ||
| padding: 0.5rem 1.25rem; | ||
| flex-shrink: 0; | ||
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); | ||
| } | ||
|
|
||
| .header-content { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| flex-wrap: wrap; | ||
| gap: 0.75rem; | ||
| } | ||
|
|
||
| .title-nav { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 1rem; | ||
| } | ||
|
|
||
| h1 { | ||
| margin: 0; | ||
| font-size: 1.15rem; | ||
| font-weight: 700; | ||
| color: var(--text); | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 0.5rem; | ||
| } | ||
|
|
||
| .nav-link { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: 0.25rem; | ||
| color: var(--primary); | ||
| text-decoration: none; | ||
| font-size: 0.875rem; | ||
| font-weight: 500; | ||
| padding: 0.25rem 0.5rem; | ||
| border-radius: 0.25rem; | ||
| border: 1px solid transparent; | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
| .nav-link:hover { | ||
| background-color: #f1f5f9; | ||
| border-color: var(--border); | ||
| } | ||
|
|
||
| .controls-bar { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 0.75rem; | ||
| flex-wrap: wrap; | ||
| } | ||
|
|
||
| .btn-group { | ||
| display: inline-flex; | ||
| border-radius: 0.375rem; | ||
| border: 1px solid var(--border); | ||
| overflow: hidden; | ||
| background: var(--surface); | ||
| } | ||
|
|
||
| .btn-sm { | ||
| padding: 0.25rem 0.6rem; | ||
| font-size: 0.8125rem; | ||
| border: none; | ||
| background: transparent; | ||
| color: var(--text); | ||
| cursor: pointer; | ||
| border-right: 1px solid var(--border); | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: 0.25rem; | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
| .btn-sm:last-child { | ||
| border-right: none; | ||
| } | ||
|
|
||
| .btn-sm:hover { | ||
| background-color: #f1f5f9; | ||
| } | ||
|
|
||
| .legend-bar { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 0.75rem; | ||
| background-color: #f8fafc; | ||
| border: 1px solid var(--border); | ||
| border-radius: 0.375rem; | ||
| padding: 0.25rem 0.6rem; | ||
| font-size: 0.75rem; | ||
| flex-wrap: wrap; | ||
| } | ||
|
|
||
| .legend-chip { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: 0.35rem; | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
| .legend-color-dot { | ||
| width: 0.75rem; | ||
| height: 0.75rem; | ||
| border-radius: 0.15rem; | ||
| border: 1px solid rgba(0,0,0,0.2); | ||
| } | ||
|
|
||
| .badge { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| padding: 0.15rem 0.5rem; | ||
| border-radius: 9999px; | ||
| font-size: 0.75rem; | ||
| font-weight: 500; | ||
| background-color: #f1f5f9; | ||
| color: var(--text-muted); | ||
| border: 1px solid var(--border); | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
| #timeline-container { | ||
| flex: 1; | ||
| position: relative; | ||
| width: 100%; | ||
| background-color: #ffffff; | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| #timeline-canvas { | ||
| display: block; | ||
| width: 100%; | ||
| height: 100%; | ||
| cursor: default; | ||
| } | ||
|
|
||
| #tooltip { | ||
| position: absolute; | ||
| display: none; | ||
| background: rgba(15, 23, 42, 0.94); | ||
| color: #ffffff; | ||
| padding: 0.5rem 0.75rem; | ||
| border-radius: 0.375rem; | ||
| font-size: 0.75rem; | ||
| line-height: 1.45; | ||
| pointer-events: none; | ||
| z-index: 1000; | ||
| box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1); | ||
| max-width: 420px; | ||
| } | ||
|
|
||
| #tooltip strong { | ||
| color: #93c5fd; | ||
| } | ||
|
|
||
| .help-hint { | ||
| position: absolute; | ||
| bottom: {{ "calc(14px + 0.5rem)" if timeline_horizontal else "0.5rem" }}; | ||
| left: 0.75rem; | ||
| background: rgba(255, 255, 255, 0.9); | ||
| backdrop-filter: blur(4px); | ||
| border: 1px solid var(--border); | ||
| border-radius: 0.25rem; | ||
| padding: 0.25rem 0.6rem; | ||
| font-size: 0.75rem; | ||
| color: var(--text-muted); | ||
| pointer-events: none; | ||
| z-index: 10; | ||
| box-shadow: 0 1px 2px rgba(0,0,0,0.05); | ||
| } | ||
| </style> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, but indent seems all over the place (in previous file as well)