Guest User

Untitled

a guest
Apr 22nd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. case dahsboardActions.FETCH_LATEST_PIPELINES.SUCCESS: {
  2.  
  3. const { rows } = action.payload;
  4.  
  5. const xAxis = [];
  6. const yAxis = [];
  7.  
  8. rows.forEach(pipeline => {
  9. const { data, creationDate } = pipeline;
  10. xAxis.push(moment(creationDate).format("h:mm:ss"));
  11. yAxis.push(data);
  12. });
  13.  
  14. return { ...state, xAxis, yAxis };
  15.  
  16. }
  17.  
  18.  
  19. case dahsboardActions.FETCH_LATEST_PIPELINES_UPDATE.FAIL: {
  20. return state;
  21. }
Add Comment
Please, Sign In to add comment