Skip to content

Commit

Permalink
An indication for clients need to update their SDK version + their la…
Browse files Browse the repository at this point in the history
…nguage- UI
  • Loading branch information
otabek-memphis committed Dec 27, 2023
1 parent be0e253 commit b5d173a
Showing 1 changed file with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ import Spinner from '../../../../components/spinner';
import TooltipComponent from '../../../../components/tooltip/tooltip';
import { isCloud } from '../../../../services/valueConvertor';
import { sendTrace } from '../../../../services/genericServices';
import { BiLogoGoLang, BiLogoPython } from "react-icons/bi"
import { SiDotnet } from "react-icons/si";
import { DiJavascript1 } from "react-icons/di";

const overlayStylesConnectors = {
borderRadius: '8px',
Expand Down Expand Up @@ -363,6 +366,21 @@ const ProduceConsumList = ({ producer }) => {
return connected + disconnected;
};

function getIconByLang(item) {
const lang = item?.sdk_language;

const mapping = {
go: <BiLogoGoLang/>,
js: <DiJavascript1/>,
python3: <BiLogoPython/>,
NET: <SiDotnet/>
};

const iconComponent = lang ? mapping[lang] : <ProducerIcon />;

return <div style={{fontSize: '17px', display: 'flex', alignItems: 'center'}}>{iconComponent}</div>;
}

return (
<div className="station-observabilty-side">
<div className="pubSub-list-container">
Expand Down Expand Up @@ -454,12 +472,17 @@ const ProduceConsumList = ({ producer }) => {
</TooltipComponent>
) : (
<TooltipComponent text="producer">
<ProducerIcon />
{getIconByLang(row)}
</TooltipComponent>
)}
<OverflowTip text={row.name} width={'80px'}>
{row.name}
</OverflowTip>
{row?.update_available && (
<TooltipComponent text="SDK update avaliable" placement="bottom">
<MdError size={'16px'} fill={'#FF9F38'} />
</TooltipComponent>
)}
{row?.error_logs_exist && (
<span onClick={() => handleConnectorErr(index, row)}>
<MdError size={'16px'} fill={'#E54F4F'} />
Expand Down Expand Up @@ -543,12 +566,17 @@ const ProduceConsumList = ({ producer }) => {
</TooltipComponent>
) : (
<TooltipComponent text="consumer">
<ProducerIcon />
{getIconByLang(row)}
</TooltipComponent>
)}
<OverflowTip text={row?.name} width={'80px'}>
{row?.name}
</OverflowTip>
{row?.update_available && (
<TooltipComponent text="SDK update avaliable" placement="bottom">
<MdError size={'16px'} fill={'#FF9F38'} />
</TooltipComponent>
)}
{row?.error_logs_exist && (
<span onClick={() => handleConnectorErr(index, row)}>
<MdError size={'16px'} fill={'#E54F4F'} />
Expand Down

0 comments on commit b5d173a

Please sign in to comment.