1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
alice-lg-alice-lg/client/components/routeservers/routes/bgp-attributes-modal-actions.jsx

41 lines
766 B
React
Raw Normal View History

2017-05-16 13:34:00 +02:00
export const SHOW_BGP_ATTRIBUTES_MODAL = '@birdseye/SHOW_BGP_ATTRIBUTES_MODAL';
export const HIDE_BGP_ATTRIBUTES_MODAL = '@birdseye/HIDE_BGP_ATTRIBUTES_MODAL';
export const SET_BGP_ATTRIBUTES = '@birdseye/SET_BGP_ATTRIBUTES';
/**
* Action Creators
*/
export function showBgpAttributesModal() {
return {
type: SHOW_BGP_ATTRIBUTES_MODAL,
}
}
export function hideBgpAttributesModal() {
return {
type: HIDE_BGP_ATTRIBUTES_MODAL
}
}
export function setBgpAttributes(attributes) {
return {
type: SET_BGP_ATTRIBUTES,
payload: {
bgpAttributes: attributes
}
}
}
export function showBgpAttributes(attributes) {
return (dispatch) => {
dispatch(setBgpAttributes(attributes));
dispatch(showBgpAttributesModal());
}
}