From 91e9141a01583e77d95a262bb318fc5603dde0b9 Mon Sep 17 00:00:00 2001 From: andsandv Date: Thu, 23 Oct 2014 15:30:38 +0200 Subject: [PATCH] Its now autopolling --- unleash-server/public/js/unleash.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/unleash-server/public/js/unleash.jsx b/unleash-server/public/js/unleash.jsx index 9cc7c0317a..519a41ac16 100644 --- a/unleash-server/public/js/unleash.jsx +++ b/unleash-server/public/js/unleash.jsx @@ -166,6 +166,11 @@ var FeatureList = React.createClass({ }, componentDidMount: function () { + this.loadFeaturesFromServer(); + setInterval(this.loadFeaturesFromServer, this.props.pollInterval); + }, + + loadFeaturesFromServer: function () { reqwest('/features').then(this.setFeatures); }, @@ -230,6 +235,6 @@ var FeatureList = React.createClass({ }); React.renderComponent( - new FeatureList(null), + , document.getElementById('content') ); \ No newline at end of file