clusters.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { Cluster, ServerStatus } from 'generated-sources';
  2. export const onlineClusterPayload: Cluster = {
  3. name: 'secondLocal',
  4. defaultCluster: true,
  5. status: ServerStatus.ONLINE,
  6. brokerCount: 1,
  7. onlinePartitionCount: 6,
  8. topicCount: 3,
  9. bytesInPerSec: 1.55,
  10. bytesOutPerSec: 9.314,
  11. readOnly: false,
  12. features: [],
  13. };
  14. export const offlineClusterPayload: Cluster = {
  15. name: 'local',
  16. defaultCluster: false,
  17. status: ServerStatus.OFFLINE,
  18. brokerCount: 1,
  19. onlinePartitionCount: 2,
  20. topicCount: 2,
  21. bytesInPerSec: 3.42,
  22. bytesOutPerSec: 4.14,
  23. features: [],
  24. readOnly: true,
  25. };
  26. export const clustersPayload: Cluster[] = [
  27. onlineClusterPayload,
  28. offlineClusterPayload,
  29. ];
  30. export const clusterStatsPayload = {
  31. brokerCount: 2,
  32. activeControllers: 1,
  33. onlinePartitionCount: 138,
  34. offlinePartitionCount: 0,
  35. inSyncReplicasCount: 239,
  36. outOfSyncReplicasCount: 0,
  37. underReplicatedPartitionCount: 0,
  38. diskUsage: [
  39. { brokerId: 0, segmentSize: 334567, segmentCount: 245 },
  40. { brokerId: 1, segmentSize: 12345678, segmentCount: 121 },
  41. ],
  42. version: '2.2.1',
  43. };