You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/10/09 16:42:18 UTC

[GitHub] Antonio-Maranhao commented on a change in pull request #1133: update cluster module to redux

Antonio-Maranhao commented on a change in pull request #1133: update cluster module to redux
URL: https://github.com/apache/couchdb-fauxton/pull/1133#discussion_r223774632
 
 

 ##########
 File path: app/addons/cluster/actions.js
 ##########
 @@ -11,35 +11,31 @@
 // the License.
 
 import FauxtonAPI from "../../core/api";
-import ClusterResources from "./resources";
-import ActionTypes from "./cluster.actiontypes";
+import getNodes from "./api";
+import ActionTypes from "./actiontypes";
 
 export default {
-  fetchNodes: function () {
-    var memberships = new ClusterResources.ClusterNodes();
-
-    memberships.fetch().then(() => {
+  fetchNodes () {
+    getNodes().then((nodes) => {
       this.updateNodes({
-        nodes: memberships.get('nodes_mapped')
+        nodes: nodes.nodes_mapped
       });
     });
 
 Review comment:
   Catch errors here:
   ```
   }).catch(err => {
         FauxtonAPI.addNotification({
           type: 'error',
           msg: err.message,
           clear: true
         });
       });
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services