mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-16 03:49:52 +00:00
24 lines
482 B
JavaScript
24 lines
482 B
JavaScript
import _ from 'lodash';
|
|
import { clickNode } from '../actions/app-actions';
|
|
|
|
const INTERVAL = 3000;
|
|
|
|
function openNodeDetails(getState, dispatch) {
|
|
const action = clickNode();
|
|
if (typeof action === 'function') {
|
|
return action(dispatch, getState);
|
|
}
|
|
|
|
return dispatch(action);
|
|
}
|
|
|
|
const actions = [openNodeDetails];
|
|
|
|
export default function runDemo(getState) {
|
|
setInterval(() => {
|
|
const state = getState().toJS();
|
|
const fn = _.sample(actions);
|
|
|
|
}, INTERVAL);
|
|
}
|