UNPKG

@netdata/charts

Version:

Netdata frontend SDK and chart utilities

33 lines 1.24 kB
import React, { Fragment } from "react"; import { Flex, TextMicro } from "@netdata/netdata-ui"; import { useAttributeValue } from "../../provider"; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; var UpdateEvery = function UpdateEvery() { var viewUpdateEvery = useAttributeValue("viewUpdateEvery"); var updateEvery = useAttributeValue("updateEvery"); var groupingMethod = useAttributeValue("groupingMethod"); return /*#__PURE__*/_jsxs(Fragment, { children: [/*#__PURE__*/_jsxs(Flex, { gap: 1, "data-testid": "chartPopover-collection", children: [/*#__PURE__*/_jsx(TextMicro, { color: "textLite", children: "Granularity:" }), /*#__PURE__*/_jsxs(TextMicro, { color: "textDescription", children: [updateEvery, "s"] })] }), viewUpdateEvery !== updateEvery && /*#__PURE__*/_jsxs(Flex, { gap: 1, "data-testid": "chartPopover-collection", children: [/*#__PURE__*/_jsx(TextMicro, { color: "textLite", children: "View point:" }), /*#__PURE__*/_jsxs(TextMicro, { color: "textDescription", children: [groupingMethod, " ", viewUpdateEvery, "s"] })] })] }); }; export default UpdateEvery;