Github user michellephung commented on a diff in the pull request:
https://github.com/apache/couchdb-fauxton/pull/386#discussion_r30864085
--- Diff: app/addons/activetasks/components.react.jsx ---
@@ -453,17 +384,75 @@ define([
<td>{startedOnMsg}</td>
<td>{updatedOnMsg}</td>
<td>{rowData.pid}</td>
- <td>{progressMsg}</td>
+ <td>{progressMsg}<ActiveTasksViewSourceSequence
item={this.props.item}/></td>
</tr>
);
}
});
+ var ActiveTasksViewSourceSequence = React.createClass({
+ onTrayToggle: function (e) {
+ e.preventDefault();
+ this.refs.view_source_sequence_btn.toggle(function (shown) {
+ if (shown) {
+ this.refs.view_source_sequence_btn.getDOMNode().focus();
+ }
+ }.bind(this));
+ },
+
+ sequences: function (item) {
+ if (_.isNumber(item) || _.isString(item)) {
+ return (
+ <ComponentsReact.ClipboardWithTextField textToCopy={item}
uniqueKey={item}>
+ </ComponentsReact.ClipboardWithTextField>
+ );
+ } else if (_.isArray(item)) {
+ return (
+ _.map(item, function (seq, i) {
+ return (
+ <ComponentsReact.ClipboardWithTextField textToCopy={seq}
uniqueKey={i + Math.random(100)} key={i}>
+ </ComponentsReact.ClipboardWithTextField>
+ );
+ })
+ );
+ } else {
+ return (
+ <ComponentsReact.ClipboardWithTextField textToCopy="???"
uniqueKey={item}>
+ </ComponentsReact.ClipboardWithTextField>
+ );
+ }
+ },
+
--- End diff --
I changed this, but some back story: I was surprised that the source_seq
could return an array at all, I believe the first number in the array (if an
array is returned) is the number of documents it has replicated, and the second
number is the sequence number. ( Originally it was concatenated together! )
I'm not sure what I should do here.
---
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.
---