Compare commits

...

21 Commits

Author SHA1 Message Date
gadotroee
0709b861d6 Develop -> main (Release 31.0)
Merge pull request #1036 from up9inc/develop #major
2022-04-24 15:06:44 +03:00
leon-up9
95a37c877e fix/ui/Service-map-filtering-is-not-updated-after-refresh_TRA-4497 (#1033)
* filter graph when refresh

* change to const

* listen only for getServicesForFilter

Co-authored-by: Leon <>
Co-authored-by: Igor Gov <iggvrv@gmail.com>
2022-04-24 11:53:30 +03:00
Igor Gov
7ce74c71b4 Merge branch 'main' into develop
# Conflicts:
#	ui-common/package.json
#	ui-common/src/components/TrafficViewer/EntryListItem/EntryListItem.module.sass
#	ui-common/src/components/TrafficViewer/EntryListItem/EntryListItem.tsx
#	ui/package.json
#	ui/src/components/Pages/TrafficPage/TrafficPage.tsx
#	ui/src/components/ServiceMapModal/ServiceMapModal.tsx
#	ui/src/components/ServiceMapModal/ServiceMapOptions.ts
2022-04-24 11:36:08 +03:00
RoyUP9
6a15bf1aed Fixed OAS showing unresolved services (#1037) 2022-04-24 11:28:50 +03:00
Igor Gov
2de57a6630 Fix: websocket timeouts when many traffic etries sent (#1038) 2022-04-24 11:23:59 +03:00
leon-up9
b5c5a8934b Fix/ui/Service-map-GUI-issues_TRA-4499 (#1034)
* LoadingOverlay z-index

* resizable max width
servicemap edges background color

* z-index as overlay

Co-authored-by: Leon <>
2022-04-24 10:28:00 +03:00
leon-up9
df269fa950 method changed to useCallback (#1032)
height for horizontal scroll like in Ent

Co-authored-by: Leon <>
Co-authored-by: lirazyehezkel <61656597+lirazyehezkel@users.noreply.github.com>
2022-04-24 10:20:19 +03:00
lirazyehezkel
dc0365dfb0 HOTFIX: Fix TLS icon position
HOTFIX: Fix TLS icon position #patch
2022-03-31 11:28:33 +03:00
lirazyehezkel
84f641d8fe Merge branch 'main' into hotfix/TRA-4451_fix_TLS_icon_position 2022-03-30 17:20:39 +03:00
Liraz Yehezkel
ac94554d2f common versions 2022-03-30 17:14:56 +03:00
Nimrod Gilboa Markevich
2ef6afa395 Hotfix tap issues - restart service mesh tapping when tap targets change, fallback to source namespace (#953)
* Read from service mesh network namespaces upon update (#944)  #patch

* Set the entry namespace to the source namespace if the destination is not resolved (#950)
2022-03-30 17:13:56 +03:00
Liraz Yehezkel
697bfef861 TLS icon position 2022-03-30 17:03:21 +03:00
lirazyehezkel
f8c0ddd69a HOTFIX: [FE] Avoid overlap only for service map including under 10 services
HOTFIX: [FE] Avoid overlap only for service map including under 10 services #patch
2022-03-30 15:11:08 +03:00
Liraz Yehezkel
2253737625 Try to avoid overlap only for maps including under 10 services 2022-03-30 13:09:10 +03:00
Igor Gov
4a0294c61a Hotfix: [FE] Remove user token from websocket
Hotfix: Remove token from mizu community #patch
Merge pull request #947 from up9inc/hotfix/Remove_token_from_community
2022-03-29 13:01:53 +03:00
Liraz Yehezkel
9053c58146 Remove token from mizu community 2022-03-29 10:25:25 +03:00
Igor Gov
5d5b13fc86 Develop -> main (Release 30.0)
Merge pull request #942 from up9inc/develop #major
Develop -> main (Release 30.0)
2022-03-28 13:00:15 +03:00
gadotroee
af61c69fb6 Merge pull request #889 from up9inc/develop
develop -> main (Release 29.0) #major
2022-03-13 10:30:12 +02:00
RamiBerm
94dfa68858 Revert "Support stopping oas/servicemesh/telemetry in flight (#867)" (#868)
This reverts commit 50c0062db4.
2022-03-02 09:48:42 +02:00
RamiBerm
50c0062db4 Support stopping oas/servicemesh/telemetry in flight (#867)
* Update oas_generator.go and servicemap.go

* Update oas_generator.go

* Update esClient.go

* Update servicemap.go
2022-03-01 14:41:23 +02:00
Igor Gov
720969bbe6 Merge pull request #861 from up9inc/develop
Develop -> main (28.0) #major
2022-02-27 11:27:05 +02:00
7 changed files with 42 additions and 43 deletions

View File

@@ -123,22 +123,23 @@ func SendToSocket(socketId int, message []byte) error {
return fmt.Errorf("socket %v is disconnected", socketId)
}
var sent = false
time.AfterFunc(time.Second*5, func() {
if !sent {
logger.Log.Error("socket timed out")
socketCleanup(socketId, socketObj)
}
})
socketObj.lock.Lock() // gorilla socket panics from concurrent writes to a single socket
err := socketObj.connection.WriteMessage(1, message)
socketObj.lock.Unlock()
sent = true
defer socketObj.lock.Unlock()
if err != nil {
return fmt.Errorf("failed to write message to socket %v, err: %w", socketId, err)
if connectedWebsockets[socketId] == nil {
return fmt.Errorf("socket %v is disconnected", socketId)
}
if err := socketObj.connection.SetWriteDeadline(time.Now().Add(time.Second * 10)); err != nil {
socketCleanup(socketId, socketObj)
return fmt.Errorf("error setting timeout to socket %v, err: %v", socketId, err)
}
if err := socketObj.connection.WriteMessage(websocket.TextMessage, message); err != nil {
socketCleanup(socketId, socketObj)
return fmt.Errorf("failed to write message to socket %v, err: %v", socketId, err)
}
return nil
}

View File

@@ -142,17 +142,18 @@ func (g *defaultOasGenerator) runGenerator() {
func (g *defaultOasGenerator) handleEntry(mizuEntry *api.Entry) {
if mizuEntry.Protocol.Name == "http" {
dest := mizuEntry.Destination.Name
if dest == "" {
logger.Log.Debugf("OAS: Unresolved entry %d", mizuEntry.Id)
return
}
entry, err := har.NewEntry(mizuEntry.Request, mizuEntry.Response, mizuEntry.StartTime, mizuEntry.ElapsedTime)
if err != nil {
logger.Log.Warningf("Failed to turn MizuEntry %d into HAR Entry: %s", mizuEntry.Id, err)
return
}
dest := mizuEntry.Destination.Name
if dest == "" {
dest = mizuEntry.Destination.IP + ":" + mizuEntry.Destination.Port
}
entryWSource := &EntryWithSource{
Entry: *entry,
Source: mizuEntry.Source.Name,

View File

@@ -78,15 +78,8 @@ export const ServiceMapModal: React.FC<ServiceMapModalProps> = ({ isOpen, onClos
const serviceMapData: ServiceMapGraph = await getServiceMapDataApi()
setServiceMapApiData(serviceMapData)
const newGraphData: GraphData = { nodes: [], edges: [] }
if (serviceMapData.nodes) {
newGraphData.nodes = serviceMapData.nodes.map(mapNodesDatatoGraph)
}
if (serviceMapData.edges) {
newGraphData.edges = serviceMapData.edges.map(mapEdgesDatatoGraph)
}
newGraphData.nodes = serviceMapData.nodes.map(mapNodesDatatoGraph)
newGraphData.edges = serviceMapData.edges.map(mapEdgesDatatoGraph)
setGraphData(newGraphData)
} catch (ex) {
toast.error("An error occurred while loading Mizu Service Map, see console for mode details", { containerId: TOAST_CONTAINER_ID });
@@ -130,7 +123,7 @@ export const ServiceMapModal: React.FC<ServiceMapModalProps> = ({ isOpen, onClos
return [...resolved, ...unResolved]
}, [serviceMapApiData])
const filterServiceMap = (newProtocolsFilters?: any[], newServiceFilters?: string[]) => {
const filterServiceMap = useCallback((newProtocolsFilters?: any[], newServiceFilters?: string[]) => {
const filterProt = newProtocolsFilters || checkedProtocols
const filterService = newServiceFilters || checkedServices
setCheckedProtocols(filterProt)
@@ -140,11 +133,15 @@ export const ServiceMapModal: React.FC<ServiceMapModalProps> = ({ isOpen, onClos
edges: serviceMapApiData.edges?.filter(edge => filterProt.includes(edge.protocol.abbr)).map(mapEdgesDatatoGraph)
}
setGraphData(newGraphData);
}
}, [checkedProtocols, checkedServices, serviceMapApiData])
useEffect(() => {
if (checkedServices.length > 0) return // only after refresh
filterServiceMap(checkedProtocols, getServicesForFilter.map(x => x.key).filter(serviceName => !Utils.isIpAddress(serviceName)))
if (checkedServices.length > 0)
filterServiceMap()
else
filterServiceMap(checkedProtocols, getServicesForFilter.map(x => x.key).filter(serviceName => !Utils.isIpAddress(serviceName)))
}, [getServicesForFilter])
useEffect(() => {
@@ -176,7 +173,7 @@ export const ServiceMapModal: React.FC<ServiceMapModalProps> = ({ isOpen, onClos
<Box sx={modalStyle}>
<div className={styles.modalContainer}>
<div className={styles.filterSection}>
<Resizeable minWidth={170}>
<Resizeable minWidth={170} maxWidth={320}>
<div className={styles.filterWrapper}>
<div className={styles.protocolsFilterList}>
<SelectList items={protocols} checkBoxWidth="5%" tableName={"Protocols"} multiSelect={true}

View File

@@ -67,11 +67,11 @@ const ServiceMapOptions = {
color: '#343434',
size: 12, // px
face: 'arial',
background: 'none',
background: 'rgba(255,255,255,0.7)',
strokeWidth: 2, // px
strokeColor: '#ffffff',
align: 'horizontal',
multi: false,
multi: false
},
labelHighlightBold: true,
selectionWidth: 1,

View File

@@ -5,9 +5,10 @@ import styles from './style/Resizeable.module.sass'
export interface Props {
children
minWidth: number
maxWidth?: number
}
const Resizeable: React.FC<Props> = ({ children, minWidth }) => {
const Resizeable: React.FC<Props> = ({ children, minWidth, maxWidth }) => {
const resizeble = useRef(null)
let mousePos = { x: 0, y: 0 }
let elementDimention = { w: 0, h: 0 }
@@ -47,14 +48,11 @@ const Resizeable: React.FC<Props> = ({ children, minWidth }) => {
};
return (
<React.Fragment>
<div className={styles.resizable} ref={resizeble} style={{ width: elemWidth }}>
{children}
<div className={`${styles.resizer} ${styles.resizerRight}`} onMouseDown={mouseDownHandler}></div>
{/* <div className={`${styles.resizer} ${styles.resizerB}`} onMouseDown={mouseDownHandler}></div> -- FutureUse*/}
</div>
</React.Fragment>
<div className={styles.resizable} ref={resizeble} style={{ width: elemWidth, maxWidth: maxWidth }}>
{children}
<div className={`${styles.resizer} ${styles.resizerRight}`} onMouseDown={mouseDownHandler}></div>
{/* <div className={`${styles.resizer} ${styles.resizerB}`} onMouseDown={mouseDownHandler}></div> -- FutureUse*/}
</div>
);
};

View File

@@ -8,6 +8,7 @@
align-items: center
justify-content: center
background-color: rgba(25, 25, 25, 0.5)
z-index: 1000
.loadingOverlaySpinner
width: 60px

View File

@@ -139,6 +139,7 @@ button
::-webkit-scrollbar
width: 6px
height: 6px
::-webkit-scrollbar-thumb
background-color: $light-blue-color