|
@@ -1,7 +1,6 @@
|
|
import React from 'react';
|
|
import React from 'react';
|
|
import { ClusterName, BrokerMetrics, ZooKeeperStatus } from 'redux/interfaces';
|
|
import { ClusterName, BrokerMetrics, ZooKeeperStatus } from 'redux/interfaces';
|
|
import useInterval from 'lib/hooks/useInterval';
|
|
import useInterval from 'lib/hooks/useInterval';
|
|
-import formatBytes from 'lib/utils/formatBytes';
|
|
|
|
import cx from 'classnames';
|
|
import cx from 'classnames';
|
|
import MetricsWrapper from 'components/common/Dashboard/MetricsWrapper';
|
|
import MetricsWrapper from 'components/common/Dashboard/MetricsWrapper';
|
|
import Indicator from 'components/common/Dashboard/Indicator';
|
|
import Indicator from 'components/common/Dashboard/Indicator';
|
|
@@ -10,8 +9,6 @@ import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb';
|
|
interface Props extends BrokerMetrics {
|
|
interface Props extends BrokerMetrics {
|
|
clusterName: ClusterName;
|
|
clusterName: ClusterName;
|
|
isFetched: boolean;
|
|
isFetched: boolean;
|
|
- minDiskUsage: number;
|
|
|
|
- maxDiskUsage: number;
|
|
|
|
fetchBrokers: (clusterName: ClusterName) => void;
|
|
fetchBrokers: (clusterName: ClusterName) => void;
|
|
fetchBrokerMetrics: (clusterName: ClusterName) => void;
|
|
fetchBrokerMetrics: (clusterName: ClusterName) => void;
|
|
}
|
|
}
|
|
@@ -27,11 +24,6 @@ const Topics: React.FC<Props> = ({
|
|
inSyncReplicasCount,
|
|
inSyncReplicasCount,
|
|
outOfSyncReplicasCount,
|
|
outOfSyncReplicasCount,
|
|
underReplicatedPartitionCount,
|
|
underReplicatedPartitionCount,
|
|
- diskUsageDistribution,
|
|
|
|
- minDiskUsage,
|
|
|
|
- maxDiskUsage,
|
|
|
|
- networkPoolUsage,
|
|
|
|
- requestPoolUsage,
|
|
|
|
fetchBrokers,
|
|
fetchBrokers,
|
|
fetchBrokerMetrics,
|
|
fetchBrokerMetrics,
|
|
}) => {
|
|
}) => {
|
|
@@ -45,9 +37,6 @@ const Topics: React.FC<Props> = ({
|
|
|
|
|
|
useInterval(() => { fetchBrokerMetrics(clusterName); }, 5000);
|
|
useInterval(() => { fetchBrokerMetrics(clusterName); }, 5000);
|
|
|
|
|
|
- const [minDiskUsageValue, minDiskUsageSize] = formatBytes(minDiskUsage);
|
|
|
|
- const [maxDiskUsageValue, maxDiskUsageSize] = formatBytes(maxDiskUsage);
|
|
|
|
-
|
|
|
|
const zkOnline = zooKeeperStatus === ZooKeeperStatus.online;
|
|
const zkOnline = zooKeeperStatus === ZooKeeperStatus.online;
|
|
|
|
|
|
return (
|
|
return (
|
|
@@ -85,33 +74,6 @@ const Topics: React.FC<Props> = ({
|
|
{outOfSyncReplicasCount}
|
|
{outOfSyncReplicasCount}
|
|
</Indicator>
|
|
</Indicator>
|
|
</MetricsWrapper>
|
|
</MetricsWrapper>
|
|
-
|
|
|
|
- <MetricsWrapper title="Disk">
|
|
|
|
- <Indicator label="Max usage">
|
|
|
|
- {maxDiskUsageValue}
|
|
|
|
- <span className="subtitle has-text-weight-light"> {maxDiskUsageSize}</span>
|
|
|
|
- </Indicator>
|
|
|
|
- <Indicator label="Min usage">
|
|
|
|
- {minDiskUsageValue}
|
|
|
|
- <span className="subtitle has-text-weight-light"> {minDiskUsageSize}</span>
|
|
|
|
- </Indicator>
|
|
|
|
- <Indicator label="Distribution">
|
|
|
|
- <span className="is-capitalized">
|
|
|
|
- {diskUsageDistribution}
|
|
|
|
- </span>
|
|
|
|
- </Indicator>
|
|
|
|
- </MetricsWrapper>
|
|
|
|
-
|
|
|
|
- <MetricsWrapper title="System">
|
|
|
|
- <Indicator label="Network pool usage">
|
|
|
|
- {Math.round(networkPoolUsage * 10000) / 100}
|
|
|
|
- <span className="subtitle has-text-weight-light">%</span>
|
|
|
|
- </Indicator>
|
|
|
|
- <Indicator label="Request pool usage">
|
|
|
|
- {Math.round(requestPoolUsage * 10000) / 100}
|
|
|
|
- <span className="subtitle has-text-weight-light">%</span>
|
|
|
|
- </Indicator>
|
|
|
|
- </MetricsWrapper>
|
|
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|
|
};
|
|
};
|