Explorar o código

[API] Update cluster mocks

Oleg Shuralev %!s(int64=5) %!d(string=hai) anos
pai
achega
4b176b87b4
Modificáronse 2 ficheiros con 6 adicións e 2 borrados
  1. 2 2
      api/mocks/brokers.js
  2. 4 0
      api/services/clusters.js

+ 2 - 2
api/mocks/brokers.js

@@ -1,6 +1,6 @@
 const randomBroker = () => ({
-  bytesInPerSec: Math.ceil(Math.random() * 10000),
-  bytesOutPerSec: Math.ceil(Math.random() * 10000),
+  bytesInPerSec: Math.ceil(Math.random() * 10_000),
+  bytesOutPerSec: Math.ceil(Math.random() * 10_000),
   segmentSize: Math.ceil(Math.random() * 1_000_000_000),
   partitionReplicas: 134,
 });

+ 4 - 0
api/services/clusters.js

@@ -11,6 +11,8 @@ module.exports = function (fastify, opts, next) {
         brokerCount: 1,
         onlinePartitionCount: 20,
         topicCount: 2,
+        bytesInPerSec: Math.ceil(Math.random() * 10_000),
+        bytesOutPerSec: Math.ceil(Math.random() * 10_000),
       },
       {
         id: 'dMMQx-WRh77BKYas_g2ZTz',
@@ -20,6 +22,8 @@ module.exports = function (fastify, opts, next) {
         brokerCount: 0,
         onlinePartitionCount: 0,
         topicCount: 0,
+        bytesInPerSec: Math.ceil(Math.random() * 10_000),
+        bytesOutPerSec: Math.ceil(Math.random() * 10_000),
       },
     ]);
   });