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
3 changes: 3 additions & 0 deletions openapi-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ const config: ConfigFile = {
})),
filterEndpoints: [
/About/,
/Agentic/,
/AI/,
/Assets/,
/Authentication/,
/CodeAnalytics/,
/Dashboard/,
/Diagnostic/,
/Environments/,
/Errors/,
/Graphs/,
Expand Down
46 changes: 42 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "digma-ui",
"version": "16.3.9",
"version": "16.4.0-alpha.2",
"description": "Digma UI",
"scripts": {
"lint:eslint": "eslint --cache .",
Expand Down Expand Up @@ -136,6 +136,7 @@
"react": "^18.2.0",
"react-cool-dimensions": "^3.0.1",
"react-dom": "^18.2.0",
"react-dropzone": "^14.3.8",
"react-error-boundary": "^5.0.0",
"react-helmet": "^6.1.0",
"react-hook-form": "^7.48.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@ import { MCPLogoIcon } from "../../../../common/icons/24px/MCPLogoIcon";
import { KubernetesLogoIcon } from "../../../../common/icons/25px/KubernetesLogoIcon";
import { PostgresLogoIcon } from "../../../../common/icons/25px/PostgresLogoIcon";
import { GitHubLogoIcon } from "../../../../common/icons/28px/GitHubLogoIcon";
import * as s from "./styles";
import type { MCPServerIconProps } from "./types";

export const DEFAULT_SIZE = 12; // in pixels

export const MCPServerIcon = ({
type,
isCustom,
isActive,
size = DEFAULT_SIZE
size = DEFAULT_SIZE,
server
}: MCPServerIconProps) => {
if (isCustom) {
if (server.icon) {
return <s.CustomImage $size={size} src={server.icon.url} />;
}

if (server.isEditable) {
return <MCPLogoIcon size={size} color={"currentColor"} />;
}

switch (type) {
switch (server.name) {
case "github":
return <GitHubLogoIcon size={size} color={"currentColor"} />;
case "postgres":
Expand All @@ -29,7 +32,7 @@ export const MCPServerIcon = ({
<DigmaLogoThemeableIcon
size={size}
color={"currentColor"}
themeKind={isActive ? "light" : "dark"}
themeKind={server.active ? "light" : "dark"}
/>
);
default:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import styled from "styled-components";
import type { CustomImageProps } from "./types";

export const CustomImage = styled.img<CustomImageProps>`
width: ${({ $size }) => $size}px;
height: ${({ $size }) => $size}px;
object-fit: contain;
`;
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import type { ExtendedAgentMCPServer } from "../types";

export interface MCPServerIconProps {
type: string;
isActive?: boolean;
isCustom?: boolean;
server: ExtendedAgentMCPServer;
size?: number;
}

export interface CustomImageProps {
$size: number;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ export const MCPServersContainer = ({ servers }: MCPServersContainerProps) => {
<Tooltip title={x.display_name} key={`${x.name}__${i}`}>
<s.MCPServerBlock $isActive={x.active} $zoomLevel={viewport.zoom}>
<MCPServerIcon
type={x.name}
isActive={x.active}
isCustom={x.isEditable}
server={x}
size={DEFAULT_ICON_SIZE * viewport.zoom}
/>
</s.MCPServerBlock>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,7 @@ export const MCPServersToolbar = ({
<div>
<Tooltip title={x.display_name}>
<s.MCPServerIconContainer $isEditable={x.isEditable}>
<MCPServerIcon
type={x.name}
isActive={x.active}
size={17}
isCustom={x.isEditable}
/>
<MCPServerIcon server={x} size={17} />
</s.MCPServerIconContainer>
</Tooltip>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const MCPServerIconContainer = styled.div<MCPServerIconContainerProps>`
display: flex;
align-items: center;
justify-content: center;
cursor: ${({ $isEditable }) => ($isEditable ? "pointer" : "default")};
cursor: ${({ $isEditable }) => ($isEditable ? "pointer" : "auto")};
`;

export const KebabMenuButton = styled.button`
Expand Down
Loading