paths.ts 1.2 KB

123456789101112131415161718192021222324252627282930
  1. import { ClusterName, TopicName } from 'redux/interfaces';
  2. const clusterPath = (clusterName: ClusterName) => `/ui/clusters/${clusterName}`;
  3. export const clusterBrokersPath = (clusterName: ClusterName) =>
  4. `${clusterPath(clusterName)}/brokers`;
  5. export const clusterTopicsPath = (clusterName: ClusterName) =>
  6. `${clusterPath(clusterName)}/topics`;
  7. export const clusterTopicNewPath = (clusterName: ClusterName) =>
  8. `${clusterPath(clusterName)}/topics/new`;
  9. export const clusterConsumerGroupsPath = (clusterName: ClusterName) =>
  10. `${clusterPath(clusterName)}/consumer-groups`;
  11. export const clusterTopicPath = (
  12. clusterName: ClusterName,
  13. topicName: TopicName
  14. ) => `${clusterTopicsPath(clusterName)}/${topicName}`;
  15. export const clusterTopicSettingsPath = (
  16. clusterName: ClusterName,
  17. topicName: TopicName
  18. ) => `${clusterTopicsPath(clusterName)}/${topicName}/settings`;
  19. export const clusterTopicMessagesPath = (
  20. clusterName: ClusterName,
  21. topicName: TopicName
  22. ) => `${clusterTopicsPath(clusterName)}/${topicName}/messages`;
  23. export const clusterTopicsTopicEditPath = (
  24. clusterName: ClusterName,
  25. topicName: TopicName
  26. ) => `${clusterTopicsPath(clusterName)}/${topicName}/edit`;