@netdata/charts
Version:
Netdata frontend SDK and chart utilities
52 lines • 1.56 kB
JavaScript
import React from "react";
import styled from "styled-components";
import { Flex, TextMicro } from "@netdata/netdata-ui";
import { useAttributeValue } from "../../provider";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var Container = styled(Flex).attrs({
alignItems: "center",
flexWrap: true,
gap: 3,
width: {
min: "0px"
}
}).withConfig({
displayName: "updateEvery__Container",
componentId: "sc-rvkfim-0"
})([""]);
var Item = styled(Flex).attrs({
alignItems: "center",
gap: 1,
width: {
min: "0px"
},
"data-testid": "chartPopover-collection"
}).withConfig({
displayName: "updateEvery__Item",
componentId: "sc-rvkfim-1"
})([""]);
var UpdateEvery = function UpdateEvery() {
var viewUpdateEvery = useAttributeValue("viewUpdateEvery");
var updateEvery = useAttributeValue("updateEvery");
var groupingMethod = useAttributeValue("groupingMethod");
return /*#__PURE__*/_jsxs(Container, {
children: [/*#__PURE__*/_jsxs(Item, {
children: [/*#__PURE__*/_jsx(TextMicro, {
color: "textLite",
children: "Granularity:"
}), /*#__PURE__*/_jsxs(TextMicro, {
color: "text",
children: [updateEvery, "s"]
})]
}), viewUpdateEvery !== updateEvery && /*#__PURE__*/_jsxs(Item, {
children: [/*#__PURE__*/_jsx(TextMicro, {
color: "textLite",
children: "View point:"
}), /*#__PURE__*/_jsxs(TextMicro, {
color: "text",
children: [groupingMethod, " ", viewUpdateEvery, "s"]
})]
})]
});
};
export default UpdateEvery;