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
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const Default: Story = {
],
environment: "SAMPLE_ENV",
severity: 0,
isRecalculateEnabled: false,
isRecalculateEnabled: true,
prefixedCodeObjectId:
"method:org.springframework.samples.petclinic.sample.SampleInsightsController$_$genNPlusOneWithoutInternalSpan",
customStartTime: null,
Expand Down
1 change: 1 addition & 0 deletions src/components/Insights/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ export interface EndpointSuspectedNPlusOneInsight extends EndpointInsight {
category: InsightCategory.Performance;
specifity: InsightSpecificity.TargetAndReasonFound;
importance: InsightImportance.HighlyImportant;
isRecalculateEnabled: true;
spans: {
occurrences: number;
internalSpan: SpanInfo | null;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Notifications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const Notifications = (props: NotificationsProps) => {
}

setData(props.data);
}, [data, props.data]);
}, [props.data]);

useEffect(() => {
if (!previousData && data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ export OTEL_RESOURCE_ATTRIBUTES=digma.environment=${props.environment.originalNa
return (
<s.Container>
<s.Header>
<content.icon size={16} color={"currentColor"} />
<s.IconContainer>
<content.icon size={16} color={"currentColor"} />
</s.IconContainer>
{content.title}
</s.Header>
{props.environment.type === "shared" && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ export const Header = styled.div`
}};
`;

export const IconContainer = styled.div`
display: flex;
align-self: center;
`;

export const ContentContainer = styled.div`
display: flex;
gap: 12px;
Expand Down
65 changes: 62 additions & 3 deletions src/components/RecentActivity/RecentActivityTable/styles.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import styled from "styled-components";
import { getCodeFont } from "../../common/App/styles";
import { Link } from "../../common/Link";
import { HEADER_HEIGHT } from "../styles";

export const TABLE_BORDER_SPACING = 4; // in pixels;

export const Table = styled.table`
width: 100%;
border-spacing: 0 4px;
border-spacing: 0 ${TABLE_BORDER_SPACING}px;
font-size: 14px;
color: ${({ theme }) => {
switch (theme.mode) {
Expand All @@ -19,6 +22,9 @@ export const Table = styled.table`
`;

export const TableHead = styled.thead`
position: sticky;
top: ${HEADER_HEIGHT + TABLE_BORDER_SPACING}px;
z-index: 1;
font-size: 14px;
height: 28px;
color: ${({ theme }) => {
Expand All @@ -31,6 +37,36 @@ export const TableHead = styled.thead`
return "#b4b8bf";
}
}};
box-shadow: -12px -${TABLE_BORDER_SPACING}px 0 ${({ theme }) => {
switch (theme.mode) {
case "light":
return "#f7f8fa";
case "dark":
return "#0f0f0f";
case "dark-jetbrains":
return "#2b2d30";
}
}},
0 -${TABLE_BORDER_SPACING}px 0 ${({ theme }) => {
switch (theme.mode) {
case "light":
return "#f7f8fa";
case "dark":
return "#0f0f0f";
case "dark-jetbrains":
return "#2b2d30";
}
}};
background: ${({ theme }) => {
switch (theme.mode) {
case "light":
return "#f7f8fa";
case "dark":
return "#0f0f0f";
case "dark-jetbrains":
return "#2b2d30";
}
}};
`;

export const TableHeaderCell = styled.th`
Expand Down Expand Up @@ -155,8 +191,21 @@ export const ListContainer = styled.div`
`;

export const ListHeader = styled.div`
margin: 12px 0 8px;
padding-left: 12px;
position: sticky;
top: ${HEADER_HEIGHT}px;
z-index: 1;
padding: 12px 0 8px 12px;
box-shadow: -12px 0 0
${({ theme }) => {
switch (theme.mode) {
case "light":
return "#f7f8fa";
case "dark":
return "#0f0f0f";
case "dark-jetbrains":
return "#2b2d30";
}
}};
font-size: 14px;
color: ${({ theme }) => {
switch (theme.mode) {
Expand All @@ -168,6 +217,16 @@ export const ListHeader = styled.div`
return "#b4b8bf";
}
}};
background: ${({ theme }) => {
switch (theme.mode) {
case "light":
return "#f7f8fa";
case "dark":
return "#0f0f0f";
case "dark-jetbrains":
return "#2b2d30";
}
}};
`;

export const List = styled.ul`
Expand Down
28 changes: 17 additions & 11 deletions src/components/RecentActivity/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ export const RecentActivity = (props: RecentActivityProps) => {
) {
return (
<>
<s.Header>Recent Activity</s.Header>
<s.RecentActivityTableTitle>
Recent Activity
</s.RecentActivityTableTitle>
{renderNoData()}
</>
);
Expand All @@ -390,16 +392,20 @@ export const RecentActivity = (props: RecentActivityProps) => {
<s.Container>
<Allotment defaultSizes={[70, 30]}>
<s.RecentActivityContainer id={RECENT_ACTIVITY_CONTAINER_ID}>
<EnvironmentPanel
environments={environments}
viewMode={viewMode}
selectedEnvironment={selectedEnvironment}
onEnvironmentSelect={handleEnvironmentSelect}
onViewModeChange={handleViewModeChange}
onEnvironmentAdd={handleEnvironmentAdd}
onEnvironmentDelete={handleEnvironmentDelete}
/>
{renderContent()}
<s.RecentActivityHeader>
<EnvironmentPanel
environments={environments}
viewMode={viewMode}
selectedEnvironment={selectedEnvironment}
onEnvironmentSelect={handleEnvironmentSelect}
onViewModeChange={handleViewModeChange}
onEnvironmentAdd={handleEnvironmentAdd}
onEnvironmentDelete={handleEnvironmentDelete}
/>
</s.RecentActivityHeader>
<s.RecentActivityContentContainer>
{renderContent()}
</s.RecentActivityContentContainer>
</s.RecentActivityContainer>
<Allotment.Pane visible={Boolean(liveData)} minSize={450}>
{liveData && (
Expand Down
31 changes: 28 additions & 3 deletions src/components/RecentActivity/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import styled from "styled-components";
import { Button } from "../common/Button";

export const HEADER_HEIGHT = 64; // in pixels;

export const Container = styled.div`
height: 100%;
position: relative;
Expand Down Expand Up @@ -39,15 +41,37 @@ export const Container = styled.div`
}
`;

export const RecentActivityContainer = styled.div`
export const RecentActivityHeader = styled.div`
height: ${HEADER_HEIGHT}px;
box-sizing: border-box;
padding: 12px;
padding-right: 24px;
z-index: 1;
position: sticky;
top: 0;
background: ${({ theme }) => {
switch (theme.mode) {
case "light":
return "#f7f8fa";
case "dark":
return "#0f0f0f";
case "dark-jetbrains":
return "#2b2d30";
}
}};
`;

export const RecentActivityContainer = styled.div`
height: 100%;
overflow: auto;
box-sizing: border-box;
padding-right: 24px;
`;

export const Header = styled.div`
export const RecentActivityContentContainer = styled.div`
padding: 0 24px 12px 12px;
`;

export const RecentActivityTableTitle = styled.div`
margin: 12px 0 8px;
padding-left: 12px;
font-weight: 400;
Expand Down Expand Up @@ -131,4 +155,5 @@ export const Overlay = styled.div`
justify-content: center;
padding: 80px 0;
overflow: auto;
z-index: 2;
`;
5 changes: 5 additions & 0 deletions src/components/common/App/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import {
import { os } from "../../../os";
import { platform } from "../../../platform";

export const LAYERS = {
MODAL: 1000,
TOOLTIP: 2000
};

export const getMainFont = (customFont: string): FlattenSimpleInterpolation => {
const customFontString = customFont ? `"${customFont}"` : "";

Expand Down
4 changes: 3 additions & 1 deletion src/components/common/NewPopover/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from "@floating-ui/react";
import { Children, cloneElement, useRef } from "react";
import { DefaultTheme, useTheme } from "styled-components";
import { LAYERS } from "../App/styles";
import { PopoverProps } from "./types";

// in pixels
Expand Down Expand Up @@ -111,7 +112,8 @@ export const NewPopover = (props: PopoverProps) => {
<div
ref={refs.setFloating}
style={{
...floatingStyles
...floatingStyles,
zIndex: LAYERS.MODAL
}}
{...getFloatingProps()}
>
Expand Down
2 changes: 2 additions & 0 deletions src/components/common/Tooltip/styles.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import styled from "styled-components";
import { LAYERS } from "../App/styles";

export const TooltipContainer = styled.div`
padding: 8px;
border-radius: 4px;
box-shadow: 0 0 6px 0 rgba(0 0 0 / 15%);
font-size: 14px;
word-break: break-all;
z-index: ${LAYERS.TOOLTIP};
color: ${({ theme }) => {
switch (theme.mode) {
case "light":
Expand Down