File tree Expand file tree Collapse file tree 6 files changed +24
-17
lines changed
IncidentDetails/AgentFlowChart/MCPServerIcon
MCPServerDialog/ToolsStep Expand file tree Collapse file tree 6 files changed +24
-17
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,13 @@ export const MCPServerIcon = ({
1313 server
1414} : MCPServerIconProps ) => {
1515 if ( server . icon ) {
16- return < s . CustomImage $size = { size } src = { server . icon . url } /> ;
16+ return (
17+ < s . CustomImage
18+ $size = { size }
19+ src = { server . icon . url }
20+ $isActive = { server . active }
21+ />
22+ ) ;
1723 }
1824
1925 if ( server . isEditable ) {
Original file line number Diff line number Diff line change @@ -5,4 +5,5 @@ export const CustomImage = styled.img<CustomImageProps>`
55 width: ${ ( { $size } ) => $size } px;
66 height: ${ ( { $size } ) => $size } px;
77 object-fit: contain;
8+ opacity: ${ ( { $isActive } ) => ( $isActive ? 1 : 0.14 ) } ;
89` ;
Original file line number Diff line number Diff line change @@ -7,4 +7,5 @@ export interface MCPServerIconProps {
77
88export interface CustomImageProps {
99 $size : number ;
10+ $isActive ?: boolean ;
1011}
Original file line number Diff line number Diff line change 11import axios from "axios" ;
2- import { useEffect , useState , type ChangeEvent } from "react" ;
2+ import { useState , type ChangeEvent } from "react" ;
33import { useDropzone } from "react-dropzone" ;
44import { useFormDataRequest } from "../../../../../hooks/useFormDataRequest" ;
55import type { MCPServerIcon } from "../../../../../redux/services/types" ;
@@ -184,7 +184,8 @@ export const ToolsStep = ({
184184 ) ;
185185 const areAllSelected = tools . every ( ( x ) => selectedTools . includes ( x ) ) ;
186186
187- const isSaveButtonEnabled = selectedTools . length > 0 && ! isLoading ;
187+ const isSaveButtonEnabled =
188+ selectedTools . length > 0 && ! isLoading && ! isSending ;
188189
189190 const handleRemoveFile = ( ) => {
190191 if ( isSending ) {
@@ -195,15 +196,6 @@ export const ToolsStep = ({
195196 setDropzoneError ( undefined ) ;
196197 } ;
197198
198- useEffect ( ( ) => {
199- if ( icon ?. id ) {
200- setFileToUpload ( null ) ;
201- setIconId ( icon . id ) ;
202- } else {
203- setIconId ( null ) ;
204- }
205- } , [ icon ?. id ] ) ;
206-
207199 const formattedFileSize = fileDetails
208200 ? fileDetails . size >= MAX_ICON_FILE_SIZE
209201 ? `${ roundTo ( fileDetails . size / 1024 / 1024 , 0 ) } MB`
Original file line number Diff line number Diff line change @@ -92,7 +92,9 @@ export const IncidentTemplate = () => {
9292 } ;
9393
9494 const handleEditMCPServer = ( agentId : string , serverName : string ) => {
95- const serverId = mcpServers ?. mcps . find ( ( x ) => x . name === serverName ) ?. uid ;
95+ const serverId = mcpServers ?. mcps . find (
96+ ( x ) => x . name === serverName && x . agents . includes ( agentId )
97+ ) ?. uid ;
9698
9799 if ( ! serverId ) {
98100 return ;
@@ -102,8 +104,10 @@ export const IncidentTemplate = () => {
102104 setMCPServerIdToUpdate ( serverId ) ;
103105 } ;
104106
105- const handleDeleteMCPServer = ( _ : string , serverName : string ) => {
106- const serverId = mcpServers ?. mcps . find ( ( x ) => x . name === serverName ) ?. uid ;
107+ const handleDeleteMCPServer = ( agentId : string , serverName : string ) => {
108+ const serverId = mcpServers ?. mcps . find (
109+ ( x ) => x . name === serverName && x . agents . includes ( agentId )
110+ ) ?. uid ;
107111
108112 if ( ! serverId ) {
109113 return ;
Original file line number Diff line number Diff line change @@ -51,17 +51,19 @@ export const IncidentsListContainer = styled.div`
5151 display: flex;
5252 flex-direction: column;
5353 gap: 16px;
54- padding: 24px;
54+ padding: 24px 0 ;
5555 border-radius: 8px;
5656 border: 1px solid ${ ( { theme } ) => theme . colors . v3 . stroke . primary } ;
5757 background: ${ ( { theme } ) => theme . colors . v3 . surface . primary } ;
5858 flex-grow: 1;
59+ overflow: auto;
5960` ;
6061
6162export const IncidentsListHeader = styled . div `
6263 display: flex;
6364 justify-content: space-between;
6465 align-items: center;
66+ padding: 0 24px;
6567` ;
6668
6769export const IncidentsListTitle = styled . div `
@@ -74,7 +76,8 @@ export const IncidentsList = styled.ul`
7476 flex-direction: column;
7577 gap: 4px;
7678 margin: 0;
77- padding: 0;
79+ padding: 0 24px;
80+ overflow: auto;
7881` ;
7982
8083export const IncidentItem = styled . li < IncidentItemProps > `
You can’t perform that action at this time.
0 commit comments