From 3eb74bdaea40fa481e5bb5eb6ade3a1d2829de78 Mon Sep 17 00:00:00 2001 From: Oleg Shuralev Date: Sun, 12 Jan 2020 02:12:16 +0300 Subject: [PATCH] [UI] Cleanup --- frontend/src/components/App.scss | 1 + frontend/src/components/Brokers/Brokers.tsx | 24 +++++----- .../src/components/Topics/Details/Details.tsx | 44 ++++++++++++------- .../Topics/Details/Overview/Overview.tsx | 14 ++++-- .../components/common/Dashboard/Indicator.tsx | 8 ++-- 5 files changed, 55 insertions(+), 36 deletions(-) diff --git a/frontend/src/components/App.scss b/frontend/src/components/App.scss index 2922058d3b..2508994b1b 100644 --- a/frontend/src/components/App.scss +++ b/frontend/src/components/App.scss @@ -7,6 +7,7 @@ $navbar-width: 250px; 0 0.9375rem 1.40625rem rgba(4,9,20,0.03), 0 0.25rem 0.53125rem rgba(4,9,20,0.05), 0 0.125rem 0.1875rem rgba(4,9,20,0.03); + z-index: 31; } &__container { diff --git a/frontend/src/components/Brokers/Brokers.tsx b/frontend/src/components/Brokers/Brokers.tsx index 3c947ff2fa..32b9f32576 100644 --- a/frontend/src/components/Brokers/Brokers.tsx +++ b/frontend/src/components/Brokers/Brokers.tsx @@ -53,13 +53,13 @@ const Topics: React.FC = ({ Brokers overview - + {brokerCount} - + {activeControllers} - + {zkOnline ? 'Online' : 'Offline'} @@ -67,21 +67,21 @@ const Topics: React.FC = ({ - + {onlinePartitionCount} of {onlinePartitionCount + offlinePartitionCount} - + {underReplicatedPartitionCount} - + Soon - + Soon @@ -89,15 +89,15 @@ const Topics: React.FC = ({ - + {maxDiskUsageValue} {maxDiskUsageSize} - + {minDiskUsageValue} {minDiskUsageSize} - + {diskUsageDistribution} @@ -105,11 +105,11 @@ const Topics: React.FC = ({ - + {Math.round(networkPoolUsage * 10000) / 100} % - + {Math.round(requestPoolUsage * 10000) / 100} % diff --git a/frontend/src/components/Topics/Details/Details.tsx b/frontend/src/components/Topics/Details/Details.tsx index c916911af4..fd1abc3d79 100644 --- a/frontend/src/components/Topics/Details/Details.tsx +++ b/frontend/src/components/Topics/Details/Details.tsx @@ -28,26 +28,36 @@ const Details: React.FC = ({ {topicName} -
- -
-
-
    -
  • - Overview -
  • -
  • - Messages -
  • -
  • - Settings -
  • -
-
- + +
diff --git a/frontend/src/components/Topics/Details/Overview/Overview.tsx b/frontend/src/components/Topics/Details/Overview/Overview.tsx index 05ac02c92e..d330860268 100644 --- a/frontend/src/components/Topics/Details/Overview/Overview.tsx +++ b/frontend/src/components/Topics/Details/Overview/Overview.tsx @@ -19,6 +19,7 @@ const Overview: React.FC = ({ inSyncReplicas, replicas, partitionCount, + internal, replicationFactor, fetchTopicDetails, }) => { @@ -34,19 +35,24 @@ const Overview: React.FC = ({ return ( <> - + {partitionCount} - + {replicationFactor} - + {underReplicatedPartitions} - + {inSyncReplicas} of {replicas} + +
+ {internal ? 'Internal' : 'External'} +
+
diff --git a/frontend/src/components/common/Dashboard/Indicator.tsx b/frontend/src/components/common/Dashboard/Indicator.tsx index f1b136da14..0a364a5ddb 100644 --- a/frontend/src/components/common/Dashboard/Indicator.tsx +++ b/frontend/src/components/common/Dashboard/Indicator.tsx @@ -1,17 +1,19 @@ import React from 'react'; interface Props { - title: string; + label: string; + title?: string; } const Indicator: React.FC = ({ + label, title, children, }) => { return (
-
-

{title}

+
+

{label}

{children}