123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- import {
- ClusterName,
- ConnectName,
- ConnectorName,
- SchemaName,
- TopicName,
- } from 'redux/interfaces';
- import { GIT_REPO_LINK } from './constants';
- export const gitCommitPath = (commit: string) =>
- `${GIT_REPO_LINK}/commit/${commit}`;
- export const clusterPath = (clusterName: ClusterName) =>
- `/ui/clusters/${clusterName}`;
- // Brokers
- export const clusterBrokersPath = (clusterName: ClusterName) =>
- `${clusterPath(clusterName)}/brokers`;
- // Consumer Groups
- export const clusterConsumerGroupsPath = (clusterName: ClusterName) =>
- `${clusterPath(clusterName)}/consumer-groups`;
- export const clusterConsumerGroupDetailsPath = (
- clusterName: ClusterName,
- groupId: string
- ) => `${clusterPath(clusterName)}/consumer-groups/${groupId}`;
- export const clusterConsumerGroupResetOffsetsPath = (
- clusterName: ClusterName,
- groupId: string
- ) => `${clusterPath(clusterName)}/consumer-groups/${groupId}/reset-offsets`;
- // Schemas
- export const clusterSchemasPath = (clusterName: ClusterName) =>
- `${clusterPath(clusterName)}/schemas`;
- export const clusterSchemaNewPath = (clusterName: ClusterName) =>
- `${clusterPath(clusterName)}/schemas/create-new`;
- export const clusterSchemaPath = (
- clusterName: ClusterName,
- subject: SchemaName
- ) => `${clusterSchemasPath(clusterName)}/${subject}`;
- export const clusterSchemaEditPath = (
- clusterName: ClusterName,
- subject: SchemaName
- ) => `${clusterSchemasPath(clusterName)}/${subject}/edit`;
- export const clusterSchemaSchemaDiffPath = (
- clusterName: ClusterName,
- subject: SchemaName
- ) => `${clusterSchemaPath(clusterName, subject)}/diff`;
- // Topics
- export const clusterTopicsPath = (clusterName: ClusterName) =>
- `${clusterPath(clusterName)}/topics`;
- export const clusterTopicNewPath = (clusterName: ClusterName) =>
- `${clusterPath(clusterName)}/topics/create-new`;
- export const clusterTopicPath = (
- clusterName: ClusterName,
- topicName: TopicName
- ) => `${clusterTopicsPath(clusterName)}/${topicName}`;
- export const clusterTopicSettingsPath = (
- clusterName: ClusterName,
- topicName: TopicName
- ) => `${clusterTopicsPath(clusterName)}/${topicName}/settings`;
- export const clusterTopicMessagesPath = (
- clusterName: ClusterName,
- topicName: TopicName
- ) => `${clusterTopicsPath(clusterName)}/${topicName}/messages`;
- export const clusterTopicEditPath = (
- clusterName: ClusterName,
- topicName: TopicName
- ) => `${clusterTopicsPath(clusterName)}/${topicName}/edit`;
- export const clusterTopicConsumerGroupsPath = (
- clusterName: ClusterName,
- topicName: TopicName
- ) => `${clusterTopicsPath(clusterName)}/${topicName}/consumer-groups`;
- export const clusterTopicSendMessagePath = (
- clusterName: ClusterName,
- topicName: TopicName
- ) => `${clusterTopicsPath(clusterName)}/${topicName}/message`;
- // Kafka Connect
- export const clusterConnectsPath = (clusterName: ClusterName) =>
- `${clusterPath(clusterName)}/connects`;
- export const clusterConnectorsPath = (clusterName: ClusterName) =>
- `${clusterPath(clusterName)}/connectors`;
- export const clusterConnectorNewPath = (clusterName: ClusterName) =>
- `${clusterConnectorsPath(clusterName)}/create-new`;
- export const clusterConnectConnectorsPath = (
- clusterName: ClusterName,
- connectName: ConnectName
- ) => `${clusterConnectsPath(clusterName)}/${connectName}/connectors`;
- export const clusterConnectConnectorPath = (
- clusterName: ClusterName,
- connectName: ConnectName,
- connectorName: ConnectorName
- ) =>
- `${clusterConnectConnectorsPath(clusterName, connectName)}/${connectorName}`;
- export const clusterConnectConnectorEditPath = (
- clusterName: ClusterName,
- connectName: ConnectName,
- connectorName: ConnectorName
- ) =>
- `${clusterConnectConnectorsPath(
- clusterName,
- connectName
- )}/${connectorName}/edit`;
- export const clusterConnectConnectorTasksPath = (
- clusterName: ClusterName,
- connectName: ConnectName,
- connectorName: ConnectorName
- ) =>
- `${clusterConnectConnectorPath(
- clusterName,
- connectName,
- connectorName
- )}/tasks`;
- export const clusterConnectConnectorConfigPath = (
- clusterName: ClusterName,
- connectName: ConnectName,
- connectorName: ConnectorName
- ) =>
- `${clusterConnectConnectorPath(
- clusterName,
- connectName,
- connectorName
- )}/config`;
- // KsqlDb
- export const clusterKsqlDbPath = (clusterName: ClusterName = ':clusterName') =>
- `${clusterPath(clusterName)}/ksql-db`;
- export const clusterKsqlDbQueryPath = (
- clusterName: ClusterName = ':clusterName'
- ) => `${clusterPath(clusterName)}/ksql-db/query`;
|