Github user millayr commented on a diff in the pull request:
https://github.com/apache/couchdb-fauxton/pull/864#discussion_r105748635
--- Diff: app/addons/replication/controller.js ---
@@ -186,25 +208,79 @@ export default class ReplicationController extends
React.Component {
max={600}
startValue={300}
stepSize={60}
- onPoll={Actions.getReplicationActivity}
+ onPoll={this.getAllActivity.bind(this)}
/>
<RefreshBtn
- refresh={Actions.getReplicationActivity}
+ refresh={this.getAllActivity.bind(this)}
/>
</div>
);
}
+ getTabElements () {
+ const {tabSection} = this.state;
+ const elements = [
+ <TabElement
+ key={1}
+ selected={tabSection === 'activity'}
+ text={"Replicator DB Activity"}
+ onChange={this.onTabChange.bind(this, 'activity', '#/replication')}
+ />
+ ];
+
+ if (this.state.supportNewApi) {
+ elements.push(
+ <TabElement
+ key={2}
+ selected={tabSection === '_replicate'}
+ text={"_replicate Activity"}
+ onChange={this.onTabChange.bind(this, '_replicate',
'#/replication/_replicate')}
+ />
+ );
+ }
+
+ return elements;
+ }
+
+ onTabChange (section, url) {
+ Actions.changeTabSection(section, url);
+ }
+
+ getCrumbs () {
+ if (this.state.tabSection === 'new replication') {
+ return [{'name': 'Job Configuration'}];
+ }
+
+ return [];
+ }
+
+ getTabs () {
+ if (this.state.tabSection === 'new replication') {
+ return null;
+ }
+
+ return (
+ <TabElementWrapper>
+ {this.getTabElements()}
+ </TabElementWrapper>
+ );
+ }
+
render () {
+ const { checkingAPI } = this.state;
+
+ if (checkingAPI) {
--- End diff --
Is it worth switching this to `this.state.checkingAPI` to eliminate the
previous line? Doesn't look like we use `checkingAPI` anywhere else later on.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---