mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-28 17:19:44 +00:00
parent
45b368b33e
commit
02b3672e09
@ -34,8 +34,6 @@
|
|||||||
font-weight: 600
|
font-weight: 600
|
||||||
margin-right: 35px
|
margin-right: 35px
|
||||||
|
|
||||||
& .actions
|
|
||||||
|
|
||||||
.graphSection
|
.graphSection
|
||||||
flex: 85%
|
flex: 85%
|
||||||
|
|
||||||
|
@ -33,6 +33,11 @@ const modalStyle = {
|
|||||||
padding: "1px 1px",
|
padding: "1px 1px",
|
||||||
paddingBottom: "15px"
|
paddingBottom: "15px"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const protocolDisplayNameMap = {
|
||||||
|
"GQL": "GraphQL"
|
||||||
|
}
|
||||||
|
|
||||||
interface LegentLabelProps {
|
interface LegentLabelProps {
|
||||||
color: string,
|
color: string,
|
||||||
name: string
|
name: string
|
||||||
@ -119,7 +124,11 @@ export const ServiceMapModal: React.FC<ServiceMapModalProps> = ({ isOpen, onClos
|
|||||||
const getProtocolsForFilter = useMemo(() => {
|
const getProtocolsForFilter = useMemo(() => {
|
||||||
return serviceMapApiData.edges.reduce<ProtocolType[]>((returnArr, currentValue, currentIndex, array) => {
|
return serviceMapApiData.edges.reduce<ProtocolType[]>((returnArr, currentValue, currentIndex, array) => {
|
||||||
if (!returnArr.find(prot => prot.key === currentValue.protocol.abbr))
|
if (!returnArr.find(prot => prot.key === currentValue.protocol.abbr))
|
||||||
returnArr.push({ key: currentValue.protocol.abbr, value: currentValue.protocol.abbr, component: <LegentLabel color={currentValue.protocol.backgroundColor} name={currentValue.protocol.abbr} /> })
|
returnArr.push({
|
||||||
|
key: currentValue.protocol.abbr, value: currentValue.protocol.abbr,
|
||||||
|
component: <LegentLabel color={currentValue.protocol.backgroundColor}
|
||||||
|
name={protocolDisplayNameMap[currentValue.protocol.abbr] ? protocolDisplayNameMap[currentValue.protocol.abbr] : currentValue.protocol.abbr} />
|
||||||
|
})
|
||||||
return returnArr
|
return returnArr
|
||||||
}, new Array<ProtocolType>())
|
}, new Array<ProtocolType>())
|
||||||
}, [serviceMapApiData])
|
}, [serviceMapApiData])
|
||||||
@ -221,12 +230,12 @@ export const ServiceMapModal: React.FC<ServiceMapModalProps> = ({ isOpen, onClos
|
|||||||
<div className={styles.card}>
|
<div className={styles.card}>
|
||||||
<SelectList items={getProtocolsForFilter} checkBoxWidth="5%" tableName={"PROTOCOLS"} multiSelect={true}
|
<SelectList items={getProtocolsForFilter} checkBoxWidth="5%" tableName={"PROTOCOLS"} multiSelect={true}
|
||||||
checkedValues={checkedProtocols} setCheckedValues={onProtocolsChange} tableClassName={styles.filters}
|
checkedValues={checkedProtocols} setCheckedValues={onProtocolsChange} tableClassName={styles.filters}
|
||||||
inputSearchClass={styles.servicesFilterSearch} isFilterable={false}/>
|
inputSearchClass={styles.servicesFilterSearch} isFilterable={false} />
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.servicesFilterWrapper + ` ${styles.card}`}>
|
<div className={styles.servicesFilterWrapper + ` ${styles.card}`}>
|
||||||
<div className={styles.servicesFilterList}>
|
<div className={styles.servicesFilterList}>
|
||||||
<SelectList items={getServicesForFilter} tableName={"SERVICES"} tableClassName={styles.filters} multiSelect={true}
|
<SelectList items={getServicesForFilter} tableName={"SERVICES"} tableClassName={styles.filters} multiSelect={true}
|
||||||
checkBoxWidth="5%" checkedValues={checkedServices} setCheckedValues={onServiceChanges} inputSearchClass={styles.servicesFilterSearch}/>
|
checkBoxWidth="5%" checkedValues={checkedServices} setCheckedValues={onServiceChanges} inputSearchClass={styles.servicesFilterSearch} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user