Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pkg/model/enum/revision_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ type RevisionStateFrontendMetadata struct {
var RevisionStates = map[RevisionState]RevisionStateFrontendMetadata{
RevisionStateInferred: {
EnumKeyName: "RevisionStateInferred",
BackgroundColor: mustHexToHDRColor4("#997700"),
BackgroundColor: mustHexToHDRColor4("#999922"),
CSSSelector: "inferred",
Label: "Resource may be existing",
Icon: "unknown_document",
Expand Down Expand Up @@ -168,6 +168,7 @@ var RevisionStates = map[RevisionState]RevisionStateFrontendMetadata{
CSSSelector: "container_waiting",
Label: "Waiting for starting container",
Icon: "deployed_code_history",
Style: RevisionStateStyleDeleted,
},
RevisionStateContainerRunningNonReady: {
EnumKeyName: "RevisionStateContainerRunningNonReady",
Expand Down Expand Up @@ -295,14 +296,14 @@ var RevisionStates = map[RevisionState]RevisionStateFrontendMetadata{
},
RevisionStateEndpointTerminating: {
EnumKeyName: "RevisionStateEndpointTerminating",
BackgroundColor: mustHexToHDRColor4("#fed700"),
BackgroundColor: mustHexToHDRColor4("#cea700"),
CSSSelector: "terminating",
Label: "Endpoint is being terminated",
Icon: "auto_delete",
},
RevisionStateProvisioning: {
EnumKeyName: "RevisionStateProvisioning",
BackgroundColor: mustHexToHDRColor4("#4444ff"),
BackgroundColor: mustHexToHDRColor4("#6666ff"),
CSSSelector: "provisioning",
Label: "Resource is being provisioned",
Icon: "deployed_code_history",
Expand All @@ -327,6 +328,7 @@ var RevisionStates = map[RevisionState]RevisionStateFrontendMetadata{
CSSSelector: "condition_not_given",
Label: "Condition is not defined at this moment",
Icon: "select",
Style: RevisionStateStyleDeleted,
},
RevisionStateConditionNoAvailableInfo: {
EnumKeyName: "RevisionStateConditionNoAvailableInfo",
Expand Down
1 change: 1 addition & 0 deletions web/src/app/header/titlebar.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ $menu-width: 135px;
:host {
background-color: $background;
display: flex;
align-items: center;
user-select: none;
}

Expand Down
1 change: 1 addition & 0 deletions web/src/app/log/log-view-log-line.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
tr {
width: 100%;
height: 20px;
line-height: 20px;
border-bottom: 0.2px solid rgba(0, 0, 0, 0.3);

td {
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/log/log-view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</div>
<table class="log-list-container" tabindex="0" (keydown)="onKeyDown($event)">
<cdk-virtual-scroll-viewport
itemSize="23.33"
itemSize="19"
Comment thread
kyasbal marked this conversation as resolved.
class="virtual-viewport"
(scrolledIndexChange)="_onScroll()"
>
Expand Down
1 change: 0 additions & 1 deletion web/src/app/pages/main/main.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ $BUTTON_COLOR_INACTIVE: black;
}

.timeline {
// display: grid;
position: relative;
}

Expand Down
2 changes: 1 addition & 1 deletion web/src/app/pages/main/main.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class AppComponent implements OnInit, OnDestroy {
this.dialog.open(StartupDialogComponent, {
maxWidth: '100vw',
panelClass: 'startup-modalbox',
disableClose: false,
disableClose: true,
});
}
// Start monitoring popup request from server
Expand Down
32 changes: 13 additions & 19 deletions web/src/app/timeline/components/style-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,12 @@ export function generateDefaultChartStyle(): TimelineChartStyle {
iconSizeInPx: 14,
iconPaddingInPx: [6, 6],
iconThicknessBySelectionType: {
[TimelineChartItemHighlightType.None]: 0.65,
[TimelineChartItemHighlightType.Selected]: 0.5,
[TimelineChartItemHighlightType.Hovered]: 0.5,
[TimelineChartItemHighlightType.None]: 0.5,
[TimelineChartItemHighlightType.Selected]: 0.4,
[TimelineChartItemHighlightType.Hovered]: 0.4,
},
fontAntialias: 0.2,
iconAntialias: 0.5,
iconAntialias: 0.2,
fontStepInPx: 8,
selectionBorderThickness: 6,
hoverBorderThickness: 6 * 0.8,
Expand All @@ -359,12 +359,12 @@ export function generateDefaultChartStyle(): TimelineChartStyle {
iconSizeInPx: 12,
iconPaddingInPx: [6, 4],
iconThicknessBySelectionType: {
[TimelineChartItemHighlightType.None]: 0.65,
[TimelineChartItemHighlightType.Selected]: 0.5,
[TimelineChartItemHighlightType.Hovered]: 0.5,
[TimelineChartItemHighlightType.None]: 0.5,
[TimelineChartItemHighlightType.Selected]: 0.4,
[TimelineChartItemHighlightType.Hovered]: 0.4,
},
fontAntialias: 0.2,
iconAntialias: 0.5,
iconAntialias: 0.2,
fontStepInPx: 6,
selectionBorderThickness: 5,
hoverBorderThickness: 5 * 0.8,
Expand Down Expand Up @@ -397,17 +397,17 @@ export function generateDefaultChartStyle(): TimelineChartStyle {
highlightBorderColor: RendererConvertUtil.hexSRGBToHDRColor('#FFFF22FF'),
revisionStateStyle: {
[generated.RevisionStateStyle.Normal]: {
alphaTransparency: 0.5,
alphaTransparency: 0.4,
borderStripePatten: 0,
bodyStripePattern: 0,
},
[generated.RevisionStateStyle.Deleted]: {
alphaTransparency: 0.3,
alphaTransparency: 0.4,
borderStripePatten: 1,
bodyStripePattern: 0,
},
[generated.RevisionStateStyle.PartialInfo]: {
alphaTransparency: 0.3,
alphaTransparency: 0.4,
borderStripePatten: 0,
bodyStripePattern: 1,
},
Expand Down Expand Up @@ -446,10 +446,7 @@ export function generateDefaultRulerStyle(): TimelineRulerStyle {
generated.severityColors[
generated.severities[generated.Severity.SeverityInfo]
],
[generated.Severity.SeverityUnknown]:
generated.severityColors[
generated.severities[generated.Severity.SeverityUnknown]
],
[generated.Severity.SeverityUnknown]: [0.5, 0.5, 0.5, 1], // the severity color(black) is too vivid for histogram. Use gray instead.
},
severityStrokeColors: {
[generated.Severity.SeverityFatal]:
Expand All @@ -468,10 +465,7 @@ export function generateDefaultRulerStyle(): TimelineRulerStyle {
generated.severityBorderColors[
generated.severities[generated.Severity.SeverityInfo]
],
[generated.Severity.SeverityUnknown]:
generated.severityBorderColors[
generated.severities[generated.Severity.SeverityUnknown]
],
[generated.Severity.SeverityUnknown]: [0.8, 0.8, 0.8, 1], // the severity color(black) is too vivid for histogram. Use gray instead.
},
nonHighlightedAlpha: 0.2,
highlightedAlpha: 1,
Expand Down
47 changes: 26 additions & 21 deletions web/src/app/timeline/components/timeline-frame.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,33 @@

<!--chart space overlay elements-->
<div class="cursor-time-label-container">
<div class="cursor-vertical-line"></div>
<div class="cursor-vertical-line-header vertical-line"></div>
<p class="cursor-time-label">{{ cursorTimeString() }}</p>
</div>
<div class="cursor-vertical-line-body-container">
<div class="cursor-vertical-line-body vertical-line"></div>
</div>

@if (timelineHoverOverlay()) {
<div
class="hover-overlay-offset"
[style.--offset-x.px]="timelineHoverOverlayOffsetX()"
[style.--offset-y.px]="timelineHoverOverlayOffsetY()"
>
<khi-timeline-hover-overlay
[timelineHoverOverlay]="timelineHoverOverlay()"
[logs]="allLogsWithoutFilter()"
[timezoneShiftHours]="timezoneShiftHours()"
[highlights]="timelineChartItemHighlights()"
(hoverOnElement)="
handleTimelineChartItemEvent($event, hoverOnTimelineItem)
"
(clickOnElement)="
handleTimelineChartItemEvent($event, clickOnTimelineItem)
"
></khi-timeline-hover-overlay>
</div>
}

<div class="chart">
<div class="chart-inner">
Expand All @@ -95,26 +119,6 @@
handleTimelineChartItemEvent($event, clickOnTimelineItem)
"
></khi-timeline-chart>
@if (timelineHoverOverlay()) {
<div
class="hover-overlay-offset"
[style.--offset-x.px]="timelineHoverOverlayOffsetX()"
[style.--offset-y.px]="timelineHoverOverlayOffsetY()"
>
<khi-timeline-hover-overlay
[timelineHoverOverlay]="timelineHoverOverlay()"
[logs]="allLogsWithoutFilter()"
[timezoneShiftHours]="timezoneShiftHours()"
[highlights]="timelineChartItemHighlights()"
(hoverOnElement)="
handleTimelineChartItemEvent($event, hoverOnTimelineItem)
"
(clickOnElement)="
handleTimelineChartItemEvent($event, clickOnTimelineItem)
"
></khi-timeline-hover-overlay>
</div>
}
<div
class="expander"
[style.--total-height.px]="totalContentHeight()"
Expand Down Expand Up @@ -151,6 +155,7 @@
<div class="legend">
<khi-timeline-legend
[timeline]="selectedTimeline()"
[expanded]="true"
></khi-timeline-legend>
</div>
</div>
Expand Down
89 changes: 64 additions & 25 deletions web/src/app/timeline/components/timeline-frame.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
@use "@angular/material" as mat;
@use "../../common.scss" as common;

$z-index-spacer: 20;
$z-index-index: 15;
$z-index-overlay: 16;
$z-index-header: 10;
$z-index-cursor: 11; // cursor is under index but above header
$z-index-hover-overlay: 8;
$z-index-sticky-chart: 7;
$z-index-content: 6;
$z-index-resizer: 100;
$z-index-spacer: 999;
$z-index-index: 800;
$z-index-overlay: 900;
$z-index-header: 700;
$z-index-cursor-header: 701;
$z-index-cursor-body: 502;
$z-index-hover-overlay: 502;
$z-index-sticky-chart: 501;
$z-index-chart: 6;
$z-index-resizer: 1000;

// stick-to-header mixin is for the container element sticky to the header area.
// margin-left is applied to align with the right grid area (header or chart) without considering the size of the gutter.
Expand Down Expand Up @@ -68,11 +69,12 @@ $z-index-resizer: 100;

// chart-item place an element stick to the chart coordinate space.
// left and top are in pixels from the left and top of the chart area and must be calculated.
// This must be placed direct child of the container element having chart-item-container mixin.
// This must be placed direct child of the container element.
@mixin chart-item($left, $top) {
position: absolute;
left: $left;
top: $top;
transform: translateX($left) translateY($top);
margin-left: var(--gutter-width);
grid-area: chart;
}

// screen-space-overlay mixin is for the container element absolute to the entire container.
Expand Down Expand Up @@ -197,24 +199,45 @@ $z-index-resizer: 100;
}
}

@keyframes neon-pulse {
0% {
background-color: color(display-p3 1 1 0);
box-shadow:
0 0 1px color(display-p3 1 1 1 / 1),
0 0 2px color(display-p3 1 1 0 / 0.8),
0 0 3px color(display-p3 1 1 0 / 0.4);
}
50% {
background-color: color(display-p3 1 1 1);
box-shadow:
0 0 1px color(display-p3 1 1 1 / 1),
0 0 2px color(display-p3 0 1 1 / 0.8),
0 0 3px color(display-p3 0 1 1 / 0.4);
}
}

.vertical-line {
width: 1px;
transform: translateX(-50%);
opacity: 0.8;
background-color: color(display-p3 1 1 0);
box-shadow:
0 0 1px color(display-p3 1 1 1 / 1),
0 0 2px color(display-p3 1 1 0 / 0.8),
0 0 3px color(display-p3 1 1 0 / 0.4);
animation: neon-pulse 10s ease-in-out infinite;
}

.cursor-time-label-container {
@include stick-to-header(0px);
width: 0;
z-index: $z-index-cursor;
z-index: $z-index-cursor-header;
transform: translateX(var(--cursor-offset-left));

.cursor-vertical-line {
pointer-events: all;
.cursor-vertical-line-header {
position: absolute;
top: 10px;
width: 1px;
transform: translateX(-50%);
height: calc(var(--viewport-height) + var(--header-height) - 10px);
opacity: 0.8;
background-color: color(display-p3 1 1 0);
box-shadow:
1px 0px 0.5px 0 color(display-p3 0 0 0/0.3),
-1px 0px 0.5px 0 color(display-p3 0 0 0/0.3);
bottom: 0px;
}

.cursor-time-label {
Expand All @@ -231,6 +254,17 @@ $z-index-resizer: 100;
}
}

.cursor-vertical-line-body-container {
@include chart-item(var(--cursor-offset-left), 0);
z-index: $z-index-cursor-body;
height: 100%;
}

.cursor-vertical-line-body {
width: 1px;
height: 100%;
}

.index {
@include stick-to-left(0);
z-index: $z-index-index;
Expand All @@ -243,7 +277,7 @@ $z-index-resizer: 100;

.chart {
@include chart-item-container();
z-index: $z-index-content;
z-index: $z-index-chart;
.chart-inner {
position: relative;
z-index: 0;
Expand Down Expand Up @@ -316,6 +350,11 @@ $z-index-resizer: 100;
}

.hover-overlay-offset {
z-index: $z-index-hover-overlay;
@include chart-item(var(--offset-x), var(--offset-y));
z-index: $z-index-hover-overlay;
pointer-events: none;
khi-timeline-hover-overlay {
pointer-events: all;
transform: translateX(-50%);
}
}
Loading