kafka-ui/kafka-ui-react-app/src/redux/reducers/clusters/reducer.ts
Yevgen Taran 498eb96bee
Feature/backend init (#3)
* move react-app to its own folder inside project

* move backend to kafka-ui repo

* setup react inside netty

* make application ready in 2 commands

* update readme

* update readme

* update readme

* update readme

* update profiles for application start inside (sdp profile) and outside docker (local profile)

* broker metrics endpoint

* topics endpoint start commit

* topics details endpoint start commit //
dependencies and versions fix

* small pom updates //
continue review fixes

* fix review issues //
save errors //
save connections and update connection logic //
save jmx, zookeeper, kafka statuses //
error with getting one topic doesn't fail others //
async metrics processing //
cluster data storage refactoring

* properties version extracting

* properties versions

* topic details

* remove jmx, topic details, topic configs

* create topic

* final fixes, topic creation

* topic creation ui fixes

* add check for cases when cluster is offline
2020-02-27 15:55:53 +03:00

15 lines
377 B
TypeScript

import { Cluster, Action } from 'redux/interfaces';
import { ActionType } from 'redux/actionType';
export const initialState: Cluster[] = [];
const reducer = (state = initialState, action: Action): Cluster[] => {
switch (action.type) {
case ActionType.GET_CLUSTERS__SUCCESS:
return action.payload;
default:
return state;
}
};
export default reducer;