From c327908493d08b99d698bef230ef0321244f491e Mon Sep 17 00:00:00 2001 From: Oleg Shuralev Date: Sun, 19 Jan 2020 17:45:04 +0300 Subject: [PATCH] [UI] Cleanup --- frontend/src/components/AppContainer.tsx | 2 +- frontend/src/components/Brokers/Brokers.tsx | 2 +- frontend/src/components/Brokers/BrokersContainer.ts | 2 +- frontend/src/components/Nav/ClusterMenu.tsx | 2 +- frontend/src/components/Nav/Nav.tsx | 2 +- frontend/src/components/Nav/NavConatiner.ts | 2 +- frontend/src/components/Topics/Details/Details.tsx | 2 +- frontend/src/components/Topics/Details/DetailsContainer.ts | 2 +- frontend/src/components/Topics/Details/Messages/Messages.tsx | 2 +- .../src/components/Topics/Details/Messages/MessagesContainer.ts | 2 +- frontend/src/components/Topics/Details/Overview/Overview.tsx | 2 +- .../src/components/Topics/Details/Overview/OverviewContainer.ts | 2 +- frontend/src/components/Topics/Details/Settings/Settings.tsx | 2 +- .../src/components/Topics/Details/Settings/SettingsContainer.ts | 2 +- frontend/src/components/Topics/List/List.tsx | 2 +- frontend/src/components/Topics/List/ListContainer.ts | 2 +- frontend/src/components/Topics/List/ListItem.tsx | 2 +- frontend/src/components/Topics/New/New.tsx | 2 +- frontend/src/components/Topics/New/NewContainer.ts | 2 +- frontend/src/components/Topics/Topics.tsx | 2 +- frontend/src/components/Topics/TopicsContainer.ts | 2 +- frontend/src/lib/api/brokers.ts | 2 +- frontend/src/lib/api/clusters.ts | 2 +- frontend/src/lib/api/topics.ts | 2 +- frontend/src/{types => lib/interfaces}/broker.ts | 0 frontend/src/{types => lib/interfaces}/cluster.ts | 2 ++ frontend/src/{types => lib/interfaces}/index.ts | 0 frontend/src/{types => lib/interfaces}/loader.ts | 2 +- frontend/src/{types => lib/interfaces}/topic.ts | 0 frontend/src/lib/paths.ts | 2 +- frontend/src/redux/reducers/brokers/actions.ts | 2 +- frontend/src/redux/reducers/brokers/reducer.ts | 2 +- frontend/src/redux/reducers/brokers/selectors.ts | 2 +- frontend/src/redux/reducers/brokers/thunks.ts | 2 +- frontend/src/redux/reducers/clusters/actions.ts | 2 +- frontend/src/redux/reducers/clusters/reducer.ts | 2 +- frontend/src/redux/reducers/clusters/selectors.ts | 2 +- frontend/src/redux/reducers/clusters/thunks.ts | 2 +- frontend/src/redux/reducers/index.ts | 2 +- frontend/src/redux/reducers/loader/reducer.ts | 2 +- frontend/src/redux/reducers/loader/selectors.ts | 2 +- frontend/src/redux/reducers/topics/actions.ts | 2 +- frontend/src/redux/reducers/topics/reducer.ts | 2 +- frontend/src/redux/reducers/topics/selectors.ts | 2 +- frontend/src/redux/reducers/topics/thunks.ts | 2 +- 45 files changed, 43 insertions(+), 41 deletions(-) rename frontend/src/{types => lib/interfaces}/broker.ts (100%) rename frontend/src/{types => lib/interfaces}/cluster.ts (85%) rename frontend/src/{types => lib/interfaces}/index.ts (100%) rename frontend/src/{types => lib/interfaces}/loader.ts (58%) rename frontend/src/{types => lib/interfaces}/topic.ts (100%) diff --git a/frontend/src/components/AppContainer.tsx b/frontend/src/components/AppContainer.tsx index b7cc2fd68b..0687f08320 100644 --- a/frontend/src/components/AppContainer.tsx +++ b/frontend/src/components/AppContainer.tsx @@ -4,7 +4,7 @@ import { } from 'redux/reducers/clusters/thunks'; import App from './App'; import { getIsClusterListFetched } from 'redux/reducers/clusters/selectors'; -import { RootState } from 'types'; +import { RootState } from 'lib/interfaces'; const mapStateToProps = (state: RootState) => ({ isClusterListFetched: getIsClusterListFetched(state), diff --git a/frontend/src/components/Brokers/Brokers.tsx b/frontend/src/components/Brokers/Brokers.tsx index 32b9f32576..bec64cc090 100644 --- a/frontend/src/components/Brokers/Brokers.tsx +++ b/frontend/src/components/Brokers/Brokers.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ClusterId, BrokerMetrics, ZooKeeperStatus } from 'types'; +import { ClusterId, BrokerMetrics, ZooKeeperStatus } from 'lib/interfaces'; import useInterval from 'lib/hooks/useInterval'; import formatBytes from 'lib/utils/formatBytes'; import cx from 'classnames'; diff --git a/frontend/src/components/Brokers/BrokersContainer.ts b/frontend/src/components/Brokers/BrokersContainer.ts index 771977e629..88ee382893 100644 --- a/frontend/src/components/Brokers/BrokersContainer.ts +++ b/frontend/src/components/Brokers/BrokersContainer.ts @@ -5,7 +5,7 @@ import { } from 'redux/reducers/brokers/thunks'; import Brokers from './Brokers'; import * as brokerSelectors from 'redux/reducers/brokers/selectors'; -import { RootState, ClusterId } from 'types'; +import { RootState, ClusterId } from 'lib/interfaces'; import { RouteComponentProps } from 'react-router-dom'; interface RouteProps { diff --git a/frontend/src/components/Nav/ClusterMenu.tsx b/frontend/src/components/Nav/ClusterMenu.tsx index fe112139ee..880ceaa7f6 100644 --- a/frontend/src/components/Nav/ClusterMenu.tsx +++ b/frontend/src/components/Nav/ClusterMenu.tsx @@ -1,5 +1,5 @@ import React, { CSSProperties } from 'react'; -import { Cluster } from 'types'; +import { Cluster } from 'lib/interfaces'; import { NavLink } from 'react-router-dom'; import { clusterBrokersPath, clusterTopicsPath } from 'lib/paths'; diff --git a/frontend/src/components/Nav/Nav.tsx b/frontend/src/components/Nav/Nav.tsx index 1cd7a526a4..1d1a2ad6b3 100644 --- a/frontend/src/components/Nav/Nav.tsx +++ b/frontend/src/components/Nav/Nav.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Cluster } from 'types'; +import { Cluster } from 'lib/interfaces'; import { NavLink } from 'react-router-dom'; import cx from 'classnames'; import ClusterMenu from './ClusterMenu'; diff --git a/frontend/src/components/Nav/NavConatiner.ts b/frontend/src/components/Nav/NavConatiner.ts index b18df8f0af..2ab2a365c3 100644 --- a/frontend/src/components/Nav/NavConatiner.ts +++ b/frontend/src/components/Nav/NavConatiner.ts @@ -1,7 +1,7 @@ import { connect } from 'react-redux'; import Nav from './Nav'; import { getIsClusterListFetched, getClusterList } from 'redux/reducers/clusters/selectors'; -import { RootState } from 'types'; +import { RootState } from 'lib/interfaces'; const mapStateToProps = (state: RootState) => ({ isClusterListFetched: getIsClusterListFetched(state), diff --git a/frontend/src/components/Topics/Details/Details.tsx b/frontend/src/components/Topics/Details/Details.tsx index dec65ae2ea..1907477d00 100644 --- a/frontend/src/components/Topics/Details/Details.tsx +++ b/frontend/src/components/Topics/Details/Details.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ClusterId, Topic, TopicDetails, TopicName } from 'types'; +import { ClusterId, Topic, TopicDetails, TopicName } from 'lib/interfaces'; import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb'; import { NavLink, Switch, Route } from 'react-router-dom'; import { clusterTopicsPath, clusterTopicSettingsPath, clusterTopicPath, clusterTopicMessagesPath } from 'lib/paths'; diff --git a/frontend/src/components/Topics/Details/DetailsContainer.ts b/frontend/src/components/Topics/Details/DetailsContainer.ts index 717b3114fd..3a706ec055 100644 --- a/frontend/src/components/Topics/Details/DetailsContainer.ts +++ b/frontend/src/components/Topics/Details/DetailsContainer.ts @@ -1,6 +1,6 @@ import { connect } from 'react-redux'; import Details from './Details'; -import { RootState } from 'types'; +import { RootState } from 'lib/interfaces'; import { withRouter, RouteComponentProps } from 'react-router-dom'; interface RouteProps { diff --git a/frontend/src/components/Topics/Details/Messages/Messages.tsx b/frontend/src/components/Topics/Details/Messages/Messages.tsx index be5a6906fa..e9715491db 100644 --- a/frontend/src/components/Topics/Details/Messages/Messages.tsx +++ b/frontend/src/components/Topics/Details/Messages/Messages.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ClusterId, TopicName } from 'types'; +import { ClusterId, TopicName } from 'lib/interfaces'; interface Props { clusterId: ClusterId; diff --git a/frontend/src/components/Topics/Details/Messages/MessagesContainer.ts b/frontend/src/components/Topics/Details/Messages/MessagesContainer.ts index 69cc39b765..a2f0c3aad7 100644 --- a/frontend/src/components/Topics/Details/Messages/MessagesContainer.ts +++ b/frontend/src/components/Topics/Details/Messages/MessagesContainer.ts @@ -1,6 +1,6 @@ import { connect } from 'react-redux'; import Messages from './Messages'; -import { RootState } from 'types'; +import { RootState } from 'lib/interfaces'; import { withRouter, RouteComponentProps } from 'react-router-dom'; interface RouteProps { diff --git a/frontend/src/components/Topics/Details/Overview/Overview.tsx b/frontend/src/components/Topics/Details/Overview/Overview.tsx index e44c2df3b8..a1eed58cf6 100644 --- a/frontend/src/components/Topics/Details/Overview/Overview.tsx +++ b/frontend/src/components/Topics/Details/Overview/Overview.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ClusterId, Topic, TopicDetails, TopicName } from 'types'; +import { ClusterId, Topic, TopicDetails, TopicName } from 'lib/interfaces'; import MetricsWrapper from 'components/common/Dashboard/MetricsWrapper'; import Indicator from 'components/common/Dashboard/Indicator'; diff --git a/frontend/src/components/Topics/Details/Overview/OverviewContainer.ts b/frontend/src/components/Topics/Details/Overview/OverviewContainer.ts index d0bfd52184..2302f244b5 100644 --- a/frontend/src/components/Topics/Details/Overview/OverviewContainer.ts +++ b/frontend/src/components/Topics/Details/Overview/OverviewContainer.ts @@ -3,7 +3,7 @@ import { fetchTopicDetails, } from 'redux/reducers/topics/thunks'; import Overview from './Overview'; -import { RootState, TopicName, ClusterId } from 'types'; +import { RootState, TopicName, ClusterId } from 'lib/interfaces'; import { getTopicByName, getIsTopicDetailsFetched } from 'redux/reducers/topics/selectors'; import { withRouter, RouteComponentProps } from 'react-router-dom'; diff --git a/frontend/src/components/Topics/Details/Settings/Settings.tsx b/frontend/src/components/Topics/Details/Settings/Settings.tsx index 839f28f4a3..d07203cffd 100644 --- a/frontend/src/components/Topics/Details/Settings/Settings.tsx +++ b/frontend/src/components/Topics/Details/Settings/Settings.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ClusterId, TopicName, TopicConfig } from 'types'; +import { ClusterId, TopicName, TopicConfig } from 'lib/interfaces'; interface Props { clusterId: ClusterId; diff --git a/frontend/src/components/Topics/Details/Settings/SettingsContainer.ts b/frontend/src/components/Topics/Details/Settings/SettingsContainer.ts index 32805cf08b..e10c0cd293 100644 --- a/frontend/src/components/Topics/Details/Settings/SettingsContainer.ts +++ b/frontend/src/components/Topics/Details/Settings/SettingsContainer.ts @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { RootState, ClusterId, TopicName } from 'types'; +import { RootState, ClusterId, TopicName } from 'lib/interfaces'; import { withRouter, RouteComponentProps } from 'react-router-dom'; import { fetchTopicConfig, diff --git a/frontend/src/components/Topics/List/List.tsx b/frontend/src/components/Topics/List/List.tsx index d193b077f4..41b8798954 100644 --- a/frontend/src/components/Topics/List/List.tsx +++ b/frontend/src/components/Topics/List/List.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { TopicWithDetailedInfo, ClusterId } from 'types'; +import { TopicWithDetailedInfo, ClusterId } from 'lib/interfaces'; import ListItem from './ListItem'; import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb'; import { NavLink } from 'react-router-dom'; diff --git a/frontend/src/components/Topics/List/ListContainer.ts b/frontend/src/components/Topics/List/ListContainer.ts index 6efbef3a59..15a348a1d9 100644 --- a/frontend/src/components/Topics/List/ListContainer.ts +++ b/frontend/src/components/Topics/List/ListContainer.ts @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { RootState } from 'types'; +import { RootState } from 'lib/interfaces'; import { getTopicList, getExternalTopicList } from 'redux/reducers/topics/selectors'; import List from './List'; import { withRouter, RouteComponentProps } from 'react-router-dom'; diff --git a/frontend/src/components/Topics/List/ListItem.tsx b/frontend/src/components/Topics/List/ListItem.tsx index 0ca652295b..de0bf42bde 100644 --- a/frontend/src/components/Topics/List/ListItem.tsx +++ b/frontend/src/components/Topics/List/ListItem.tsx @@ -1,7 +1,7 @@ import React from 'react'; import cx from 'classnames'; import { NavLink } from 'react-router-dom'; -import { TopicWithDetailedInfo } from 'types'; +import { TopicWithDetailedInfo } from 'lib/interfaces'; const ListItem: React.FC = ({ name, diff --git a/frontend/src/components/Topics/New/New.tsx b/frontend/src/components/Topics/New/New.tsx index 2941061359..63d581302e 100644 --- a/frontend/src/components/Topics/New/New.tsx +++ b/frontend/src/components/Topics/New/New.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ClusterId, CleanupPolicy, TopicFormData, TopicName } from 'types'; +import { ClusterId, CleanupPolicy, TopicFormData, TopicName } from 'lib/interfaces'; import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb'; import { clusterTopicsPath } from 'lib/paths'; import { useForm, ErrorMessage } from 'react-hook-form'; diff --git a/frontend/src/components/Topics/New/NewContainer.ts b/frontend/src/components/Topics/New/NewContainer.ts index 8c247b3a93..9a006909ac 100644 --- a/frontend/src/components/Topics/New/NewContainer.ts +++ b/frontend/src/components/Topics/New/NewContainer.ts @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { RootState, ClusterId, TopicFormData, TopicName, Action } from 'types'; +import { RootState, ClusterId, TopicFormData, TopicName, Action } from 'lib/interfaces'; import New from './New'; import { withRouter, RouteComponentProps } from 'react-router-dom'; import { createTopic } from 'redux/reducers/topics/thunks'; diff --git a/frontend/src/components/Topics/Topics.tsx b/frontend/src/components/Topics/Topics.tsx index 50d4c48b60..d1074575cf 100644 --- a/frontend/src/components/Topics/Topics.tsx +++ b/frontend/src/components/Topics/Topics.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ClusterId } from 'types'; +import { ClusterId } from 'lib/interfaces'; import { Switch, Route, diff --git a/frontend/src/components/Topics/TopicsContainer.ts b/frontend/src/components/Topics/TopicsContainer.ts index 878abcfd24..4928366f8d 100644 --- a/frontend/src/components/Topics/TopicsContainer.ts +++ b/frontend/src/components/Topics/TopicsContainer.ts @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import { fetchTopicList } from 'redux/reducers/topics/thunks'; import Topics from './Topics'; import { getIsTopicListFetched } from 'redux/reducers/topics/selectors'; -import { RootState, ClusterId } from 'types'; +import { RootState, ClusterId } from 'lib/interfaces'; import { RouteComponentProps } from 'react-router-dom'; interface RouteProps { diff --git a/frontend/src/lib/api/brokers.ts b/frontend/src/lib/api/brokers.ts index 417be6f8c7..3789222936 100644 --- a/frontend/src/lib/api/brokers.ts +++ b/frontend/src/lib/api/brokers.ts @@ -2,7 +2,7 @@ import { Broker, ClusterId, BrokerMetrics, -} from 'types'; +} from 'lib/interfaces'; import { BASE_URL, BASE_PARAMS, diff --git a/frontend/src/lib/api/clusters.ts b/frontend/src/lib/api/clusters.ts index d68197beb5..f4af3b482d 100644 --- a/frontend/src/lib/api/clusters.ts +++ b/frontend/src/lib/api/clusters.ts @@ -1,6 +1,6 @@ import { Cluster, -} from 'types'; +} from 'lib/interfaces'; import { BASE_URL, BASE_PARAMS, diff --git a/frontend/src/lib/api/topics.ts b/frontend/src/lib/api/topics.ts index b5bc4901d4..2769b8441d 100644 --- a/frontend/src/lib/api/topics.ts +++ b/frontend/src/lib/api/topics.ts @@ -5,7 +5,7 @@ import { TopicDetails, TopicConfig, TopicFormData, -} from 'types'; +} from 'lib/interfaces'; import { BASE_URL, BASE_PARAMS, diff --git a/frontend/src/types/broker.ts b/frontend/src/lib/interfaces/broker.ts similarity index 100% rename from frontend/src/types/broker.ts rename to frontend/src/lib/interfaces/broker.ts diff --git a/frontend/src/types/cluster.ts b/frontend/src/lib/interfaces/cluster.ts similarity index 85% rename from frontend/src/types/cluster.ts rename to frontend/src/lib/interfaces/cluster.ts index b80bacaa0f..fcddb23367 100644 --- a/frontend/src/types/cluster.ts +++ b/frontend/src/lib/interfaces/cluster.ts @@ -13,4 +13,6 @@ export interface Cluster { brokerCount: number; onlinePartitionCount: number; topicCount: number; + bytesInPerSec: number; + bytesOutPerSec: number; } diff --git a/frontend/src/types/index.ts b/frontend/src/lib/interfaces/index.ts similarity index 100% rename from frontend/src/types/index.ts rename to frontend/src/lib/interfaces/index.ts diff --git a/frontend/src/types/loader.ts b/frontend/src/lib/interfaces/loader.ts similarity index 58% rename from frontend/src/types/loader.ts rename to frontend/src/lib/interfaces/loader.ts index 00213c15a3..0ff91468cc 100644 --- a/frontend/src/types/loader.ts +++ b/frontend/src/lib/interfaces/loader.ts @@ -1,4 +1,4 @@ -import { FetchStatus } from "types"; +import { FetchStatus } from 'lib/interfaces'; export interface LoaderState { [key: string]: FetchStatus; diff --git a/frontend/src/types/topic.ts b/frontend/src/lib/interfaces/topic.ts similarity index 100% rename from frontend/src/types/topic.ts rename to frontend/src/lib/interfaces/topic.ts diff --git a/frontend/src/lib/paths.ts b/frontend/src/lib/paths.ts index 787e5de7a2..a0eccbb23b 100644 --- a/frontend/src/lib/paths.ts +++ b/frontend/src/lib/paths.ts @@ -1,4 +1,4 @@ -import { ClusterId, TopicName } from "types"; +import { ClusterId, TopicName } from 'lib/interfaces'; const clusterPath = (clusterId: ClusterId) => `/clusters/${clusterId}`; diff --git a/frontend/src/redux/reducers/brokers/actions.ts b/frontend/src/redux/reducers/brokers/actions.ts index d83b44c64c..a50af6e28c 100644 --- a/frontend/src/redux/reducers/brokers/actions.ts +++ b/frontend/src/redux/reducers/brokers/actions.ts @@ -1,6 +1,6 @@ import { createAsyncAction} from 'typesafe-actions'; import ActionType from './actionType'; -import { Broker, BrokerMetrics } from 'types'; +import { Broker, BrokerMetrics } from 'lib/interfaces'; export const fetchBrokersAction = createAsyncAction( ActionType.GET_BROKERS__REQUEST, diff --git a/frontend/src/redux/reducers/brokers/reducer.ts b/frontend/src/redux/reducers/brokers/reducer.ts index 1a94afb2af..efd1d9a51b 100644 --- a/frontend/src/redux/reducers/brokers/reducer.ts +++ b/frontend/src/redux/reducers/brokers/reducer.ts @@ -1,4 +1,4 @@ -import { Action, BrokersState, ZooKeeperStatus, BrokerMetrics } from 'types'; +import { Action, BrokersState, ZooKeeperStatus, BrokerMetrics } from 'lib/interfaces'; import actionType from 'redux/reducers/actionType'; export const initialState: BrokersState = { diff --git a/frontend/src/redux/reducers/brokers/selectors.ts b/frontend/src/redux/reducers/brokers/selectors.ts index 04df42f564..767a988818 100644 --- a/frontend/src/redux/reducers/brokers/selectors.ts +++ b/frontend/src/redux/reducers/brokers/selectors.ts @@ -1,5 +1,5 @@ import { createSelector } from 'reselect'; -import { RootState, FetchStatus, BrokersState } from 'types'; +import { RootState, FetchStatus, BrokersState } from 'lib/interfaces'; import { createFetchingSelector } from 'redux/reducers/loader/selectors'; const brokersState = ({ brokers }: RootState): BrokersState => brokers; diff --git a/frontend/src/redux/reducers/brokers/thunks.ts b/frontend/src/redux/reducers/brokers/thunks.ts index 082b55e5e4..9dd07c3807 100644 --- a/frontend/src/redux/reducers/brokers/thunks.ts +++ b/frontend/src/redux/reducers/brokers/thunks.ts @@ -3,7 +3,7 @@ import { fetchBrokersAction, fetchBrokerMetricsAction, } from './actions'; -import { PromiseThunk, ClusterId } from 'types'; +import { PromiseThunk, ClusterId } from 'lib/interfaces'; export const fetchBrokers = (clusterId: ClusterId): PromiseThunk => async (dispatch) => { diff --git a/frontend/src/redux/reducers/clusters/actions.ts b/frontend/src/redux/reducers/clusters/actions.ts index ffb704304b..867643aa48 100644 --- a/frontend/src/redux/reducers/clusters/actions.ts +++ b/frontend/src/redux/reducers/clusters/actions.ts @@ -1,6 +1,6 @@ import { createAsyncAction} from 'typesafe-actions'; import ActionType from './actionType'; -import { Cluster } from 'types'; +import { Cluster } from 'lib/interfaces'; export const fetchClusterListAction = createAsyncAction( ActionType.GET_CLUSTERS__REQUEST, diff --git a/frontend/src/redux/reducers/clusters/reducer.ts b/frontend/src/redux/reducers/clusters/reducer.ts index dd1431e2e5..e6f283b799 100644 --- a/frontend/src/redux/reducers/clusters/reducer.ts +++ b/frontend/src/redux/reducers/clusters/reducer.ts @@ -1,4 +1,4 @@ -import { Cluster, Action } from 'types'; +import { Cluster, Action } from 'lib/interfaces'; import actionType from 'redux/reducers/actionType'; export const initialState: Cluster[] = []; diff --git a/frontend/src/redux/reducers/clusters/selectors.ts b/frontend/src/redux/reducers/clusters/selectors.ts index e631378493..5f7080cccb 100644 --- a/frontend/src/redux/reducers/clusters/selectors.ts +++ b/frontend/src/redux/reducers/clusters/selectors.ts @@ -1,5 +1,5 @@ import { createSelector } from 'reselect'; -import { Cluster, RootState, FetchStatus } from 'types'; +import { Cluster, RootState, FetchStatus } from 'lib/interfaces'; import { createFetchingSelector } from 'redux/reducers/loader/selectors'; const clustersState = ({ clusters }: RootState): Cluster[] => clusters; diff --git a/frontend/src/redux/reducers/clusters/thunks.ts b/frontend/src/redux/reducers/clusters/thunks.ts index 78e11664fd..6c281faed4 100644 --- a/frontend/src/redux/reducers/clusters/thunks.ts +++ b/frontend/src/redux/reducers/clusters/thunks.ts @@ -4,7 +4,7 @@ import { import { fetchClusterListAction, } from './actions'; -import { Cluster, PromiseThunk } from 'types'; +import { Cluster, PromiseThunk } from 'lib/interfaces'; export const fetchClustersList = (): PromiseThunk => async (dispatch) => { dispatch(fetchClusterListAction.request()); diff --git a/frontend/src/redux/reducers/index.ts b/frontend/src/redux/reducers/index.ts index 77437dc5c8..c2b6cac28a 100644 --- a/frontend/src/redux/reducers/index.ts +++ b/frontend/src/redux/reducers/index.ts @@ -3,7 +3,7 @@ import topics from './topics/reducer'; import clusters from './clusters/reducer'; import brokers from './brokers/reducer'; import loader from './loader/reducer'; -import { RootState } from 'types'; +import { RootState } from 'lib/interfaces'; export default combineReducers({ topics, diff --git a/frontend/src/redux/reducers/loader/reducer.ts b/frontend/src/redux/reducers/loader/reducer.ts index 166273257f..a60a2eaca5 100644 --- a/frontend/src/redux/reducers/loader/reducer.ts +++ b/frontend/src/redux/reducers/loader/reducer.ts @@ -1,4 +1,4 @@ -import { FetchStatus, Action, LoaderState } from 'types'; +import { FetchStatus, Action, LoaderState } from 'lib/interfaces'; export const initialState: LoaderState = {}; diff --git a/frontend/src/redux/reducers/loader/selectors.ts b/frontend/src/redux/reducers/loader/selectors.ts index df32a2c9a6..3f43c75609 100644 --- a/frontend/src/redux/reducers/loader/selectors.ts +++ b/frontend/src/redux/reducers/loader/selectors.ts @@ -1,4 +1,4 @@ -import { RootState, FetchStatus } from 'types'; +import { RootState, FetchStatus } from 'lib/interfaces'; export const createFetchingSelector = (action: string) => (state: RootState) => (state.loader[action] || FetchStatus.notFetched); diff --git a/frontend/src/redux/reducers/topics/actions.ts b/frontend/src/redux/reducers/topics/actions.ts index 8bbd8c374d..5dc79a350c 100644 --- a/frontend/src/redux/reducers/topics/actions.ts +++ b/frontend/src/redux/reducers/topics/actions.ts @@ -1,6 +1,6 @@ import { createAsyncAction} from 'typesafe-actions'; import ActionType from './actionType'; -import { Topic, TopicDetails, TopicName, TopicConfig} from 'types'; +import { Topic, TopicDetails, TopicName, TopicConfig} from 'lib/interfaces'; export const fetchTopicListAction = createAsyncAction( ActionType.GET_TOPICS__REQUEST, diff --git a/frontend/src/redux/reducers/topics/reducer.ts b/frontend/src/redux/reducers/topics/reducer.ts index 47add74dd3..f2701da5df 100644 --- a/frontend/src/redux/reducers/topics/reducer.ts +++ b/frontend/src/redux/reducers/topics/reducer.ts @@ -1,4 +1,4 @@ -import { Action, TopicsState, Topic } from 'types'; +import { Action, TopicsState, Topic } from 'lib/interfaces'; import actionType from 'redux/reducers/actionType'; export const initialState: TopicsState = { diff --git a/frontend/src/redux/reducers/topics/selectors.ts b/frontend/src/redux/reducers/topics/selectors.ts index bab0c3a75d..a071f31059 100644 --- a/frontend/src/redux/reducers/topics/selectors.ts +++ b/frontend/src/redux/reducers/topics/selectors.ts @@ -1,5 +1,5 @@ import { createSelector } from 'reselect'; -import { RootState, TopicName, FetchStatus, TopicsState } from 'types'; +import { RootState, TopicName, FetchStatus, TopicsState } from 'lib/interfaces'; import { createFetchingSelector } from 'redux/reducers/loader/selectors'; const topicsState = ({ topics }: RootState): TopicsState => topics; diff --git a/frontend/src/redux/reducers/topics/thunks.ts b/frontend/src/redux/reducers/topics/thunks.ts index d57472a16d..72c732a835 100644 --- a/frontend/src/redux/reducers/topics/thunks.ts +++ b/frontend/src/redux/reducers/topics/thunks.ts @@ -10,7 +10,7 @@ import { fetchTopicConfigAction, createTopicAction, } from './actions'; -import { PromiseThunk, ClusterId, TopicName, TopicFormData } from 'types'; +import { PromiseThunk, ClusterId, TopicName, TopicFormData } from 'lib/interfaces'; export const fetchTopicList = (clusterId: ClusterId): PromiseThunk => async (dispatch) => { dispatch(fetchTopicListAction.request());