mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-12 06:24:10 +01:00
console/frontend: add IPv4 vs IPv6
This commit is contained in:
@@ -39,9 +39,14 @@
|
||||
title="Top countries"
|
||||
:refresh="refreshOccasionally"
|
||||
/>
|
||||
<WidgetTop
|
||||
what="etype"
|
||||
title="IPv4/IPv6"
|
||||
:refresh="refreshOccasionally"
|
||||
/>
|
||||
<WidgetGraph
|
||||
:refresh="refreshInfrequently"
|
||||
class="col-span-2 md:col-span-4"
|
||||
class="col-span-2 md:col-span-3"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -123,6 +123,9 @@ func (c *Component) widgetTopHandlerFunc(gc *gin.Context) {
|
||||
case "protocol":
|
||||
selector = `dictGetOrDefault('protocols', 'name', Proto, '???')`
|
||||
groupby = `Proto`
|
||||
case "etype":
|
||||
selector = `if(equals(EType, 34525), 'IPv6', if(equals(EType, 2048), 'IPv4', '???'))`
|
||||
groupby = `EType`
|
||||
case "src-port":
|
||||
selector = `concat(dictGetOrDefault('protocols', 'name', Proto, '???'), '/', toString(SrcPort))`
|
||||
groupby = `Proto, SrcPort`
|
||||
|
||||
Reference in New Issue
Block a user