2017-05-16 13:34:00 +02:00
|
|
|
import {LOAD_CONFIG_SUCCESS} from './actions'
|
|
|
|
|
|
|
|
const initialState = {
|
|
|
|
routes_columns: {
|
|
|
|
Gateway: "gateway",
|
|
|
|
Interface: "interface",
|
|
|
|
Metric: "metric",
|
2017-07-04 12:37:16 +02:00
|
|
|
},
|
|
|
|
prefix_lookup_enabled: false
|
2017-05-16 13:34:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default function reducer(state = initialState, action) {
|
|
|
|
switch(action.type) {
|
|
|
|
case LOAD_CONFIG_SUCCESS:
|
2017-07-04 12:37:16 +02:00
|
|
|
return {
|
|
|
|
routes_columns: action.payload.routes_columns,
|
|
|
|
prefix_lookup_enabled: action.payload.prefix_lookup_enabled
|
|
|
|
};
|
2017-05-16 13:34:00 +02:00
|
|
|
}
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|