diff --git a/package.json b/package.json index 23cdc74f..7141c586 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@netdata/dashboard", - "version": "2.25.7", + "version": "2.25.8", "homepage": ".", "main": "./lib/src/index-npm.js", "files": [ diff --git a/src/domains/charts/menuGroup/menu.js b/src/domains/charts/menuGroup/menu.js index e956639b..280bd94a 100644 --- a/src/domains/charts/menuGroup/menu.js +++ b/src/domains/charts/menuGroup/menu.js @@ -1,6 +1,6 @@ import React, { memo, forwardRef } from "react" import styled from "styled-components" -import { Flex } from "@netdata/netdata-ui" +import { Flex, Text } from "@netdata/netdata-ui" import { useContainer } from "domains/charts/charts" import { withMenuGroupIds } from "./context" import { MenuGroupContainer } from "./menuGroup" @@ -40,15 +40,53 @@ export const MenuSidebar = props => { return props.isFixedPosition ? : } +const StyledText = styled(Text)` + line-height: 25px; +` + +const NodeInfo = memo(({ showCounters, chartsCount, metricsCount, alarmsCount, nodeName }) => { + const shouldShowCounters = showCounters && chartsCount && metricsCount && alarmsCount + + if (!shouldShowCounters) return null + return ( + + Every second, Netdata collects + + {metricsCount} + + metrics on {nodeName}, presents them in + + {chartsCount} + + charts, and monitors them with + + {alarmsCount} + + alarms. + + ) +}) + export const MenuSidebarContainer = ({ onMenuGroupClick, onSubMenuClick, isFixedPosition = true, ...rest -}) => ( - - - -) +}) => { + const { showCounters, chartsCount, metricsCount, alarmsCount, nodeName } = rest + + return ( + + + + + ) +} export const SidebarContainer = memo(MenuSidebarContainer)