garrensmith commented on a change in pull request #1045: Migrate couchdb setup 
to Redux
URL: https://github.com/apache/couchdb-fauxton/pull/1045#discussion_r164365764
 
 

 ##########
 File path: app/addons/setup/components/MultipleNodeController.js
 ##########
 @@ -0,0 +1,163 @@
+import {
+  addNode,
+  alterBindAddressAdditionalNode,
+  alterPortAdditionalNode,
+  alterRemoteAddressAdditionalNode,
+  finishClusterSetup,
+  setBindAddressForSetupNode,
+  setNodeCount,
+  setPassword,
+  setPortForSetupNode,
+  setUsername
+} from "../actions";
+import React from 'react';
+import PropTypes from 'prop-types';
+import ReactComponents from "../../components/react-components";
+import CurrentAdminPassword from "./CurrentAdminPassword";
+import OptionalSettings from "./OptionalSettings";
+import NodeCountSetting from "./NodeCountSetting";
+
+import {getIsAdminParty} from '../reducers';
+
+
+const ConfirmButton = ReactComponents.ConfirmButton;
+
+export default class MultipleNodesController extends React.Component {
+
+  componentDidMount() {
+    this.isAdminParty = getIsAdminParty();
+  }
+
+  getNodeList = () => {
+    return this.props.nodeList.map(function (el, i) {
+      return (
+        <div key={i} className="node-item">
+          {el.remoteAddress}:{el.port}
+        </div>
+      );
+    }, this);
+  };
+
+  _addNode = () => {
+    const {username, password} = this.props;
+    this.props.dispatch(addNode(
+      this.isAdminParty,
+      {username, password},
+      this.props.setupNode,
+      this.props.additionalNode
+    ));
+  };
+
+  _alterPortAdditionalNode = (e) => {
 
 Review comment:
   Instead of these. Can you create a `mapToDispatch` function in your 
container file. 
https://github.com/apache/couchdb-fauxton/blob/master/app/addons/documents/rev-browser/container.js#L55-L77

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to