@andormarkus thank you for creating this issue. Will try to fix it asap
Frontend: Segment size calculation error
Hi Team,

Bases on my testing when a topic segment size is larger than 1gb it wont calculate its values in `mb` or `gb` just returns it in `bytes`.

![Screenshot 2021-03-22 at 08 10 10](https://user-images.githubusercontent.com/51825189/111952883-15ee9300-8ae6-11eb-8721-0ae0073faa8d.png)

Thanks,
Andor

kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx kafka-ui-react-app/src/components/common/BytesFormatted/__tests__/BytesFormatted.spec.tsx
kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx kafka-ui-react-app/src/components/common/BytesFormatted/__tests__/BytesFormatted.spec.tsx
diff --git a/kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml b/kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml
index 493290c0f2f..bd81c4118d0 100644
--- a/kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml
+++ b/kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml
@@ -1182,6 +1182,7 @@ components:
           type: integer
         segmentSize:
           type: integer
+          format: int64
         segmentCount:
           type: integer
         underReplicatedPartitions:
diff --git a/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx b/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx
index 9447f724025..ad45e454db7 100644
--- a/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx
+++ b/kafka-ui-react-app/src/components/common/BytesFormatted/BytesFormatted.tsx
@@ -11,7 +11,7 @@ const BytesFormatted: React.FC<Props> = ({ value, precision = 0 }) => {
   const formatedValue = React.useMemo((): string => {
     try {
       const bytes = typeof value === 'string' ? parseInt(value, 10) : value;
-      if (Number.isNaN(bytes)) return `-Bytes`;
+      if (Number.isNaN(bytes) || (bytes && bytes < 0)) return `-Bytes`;
       if (!bytes || bytes < 1024) return `${Math.ceil(bytes || 0)}${sizes[0]}`;
       const pow = Math.floor(Math.log2(bytes) / 10);
       const multiplier = 10 ** (precision < 0 ? 0 : precision);
diff --git a/kafka-ui-react-app/src/components/common/BytesFormatted/__tests__/BytesFormatted.spec.tsx b/kafka-ui-react-app/src/components/common/BytesFormatted/__tests__/BytesFormatted.spec.tsx
index 85ed10877b3..135673586c6 100644
--- a/kafka-ui-react-app/src/components/common/BytesFormatted/__tests__/BytesFormatted.spec.tsx
+++ b/kafka-ui-react-app/src/components/common/BytesFormatted/__tests__/BytesFormatted.spec.tsx
@@ -32,6 +32,9 @@ describe('BytesFormatted', () => {
     component = shallow(<BytesFormatted value="some string" />);
     expect(component.text()).toEqual(`-${sizes[0]}`);
 
+    component = shallow(<BytesFormatted value={-100000} />);
+    expect(component.text()).toEqual(`-${sizes[0]}`);
+
     component = shallow(<BytesFormatted value={undefined} />);
     expect(component.text()).toEqual(`0${sizes[0]}`);
   });
