You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Filipe Manana (JIRA)" <ji...@apache.org> on 2011/01/04 12:07:45 UTC

[jira] Created: (COUCHDB-1011) Add replication by doc-IDs to Futon

Add replication by doc-IDs to Futon
-----------------------------------

                 Key: COUCHDB-1011
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
             Project: CouchDB
          Issue Type: New Feature
          Components: Futon
            Reporter: Filipe Manana
            Priority: Minor


Currently Futon doesn't allow users to trigger replications by doc-IDs.
This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982645#action_12982645 ] 

Filipe Manana commented on COUCHDB-1011:
----------------------------------------

Hi Nikolai,

I'm not very familiar with Futon neither I am an expert on UIs, but:

1) For error messages, displaying them under the 'Event' table with a gray/black textcolor gets unnoticed. Perhaps adding the message under or above the input textbox, in red, would be better;

2) Replication by document IDs can now be continuous in 1.1, so the following change doesn't make sense anymore:

+                $("#records tbody.footer td")
+                  .text((resp._local_id)? "Continuous replication" :
+                 

(Note that resp.history will always be defined as well)

Lets see if someone more familiar/expert with Futon can comment on this and review it :)

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>         Attachments: COUCHDB-1011.patch
>
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikolai Teofilov updated COUCHDB-1011:
--------------------------------------

    Attachment: COUCHDB-1011.patch

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>         Attachments: COUCHDB-1011.patch
>
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikolai Teofilov updated COUCHDB-1011:
--------------------------------------

    Attachment: 2-COUCHDB-1011.patch
                1-COUCHDB-1011.patch

Filipe,
 
I have attached two ready for review patches. Please make your comments and suggestions.

Regards,
Nikolai  

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>         Attachments: 1-COUCHDB-1011.patch, 2-COUCHDB-1011.patch
>
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by Filipe David Manana <fd...@apache.org>.
Thanks Nikolai.

On Wed, Jan 5, 2011 at 4:26 PM, Nikolai Teofilov <n....@gmail.com> wrote:
> Filipe, I will try to see what I can do.
>
> On 05.01.2011, at 11:13, Filipe Manana (JIRA) wrote:
>
>>
>>    [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977711#action_12977711 ]
>>
>> Filipe Manana commented on COUCHDB-1011:
>> ----------------------------------------
>>
>> Nikolai, I think to start out, a text box where the user types in a JSON array of strings (doc IDs) is a good way to start. If it's not empty, a replication with the "doc_ids" field set to that JSON array is triggered.
>>
>>> Add replication by doc-IDs to Futon
>>> -----------------------------------
>>>
>>>                Key: COUCHDB-1011
>>>                URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>>>            Project: CouchDB
>>>         Issue Type: New Feature
>>>         Components: Futon
>>>           Reporter: Filipe Manana
>>>           Priority: Minor
>>>
>>> Currently Futon doesn't allow users to trigger replications by doc-IDs.
>>> This would be a nice addition and a good starting point for new contributors.
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>
>



-- 
Filipe David Manana,
fdmanana@gmail.com, fdmanana@apache.org

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

Re: [jira] Commented: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by Nikolai Teofilov <n....@gmail.com>.
Filipe, I will try to see what I can do.

On 05.01.2011, at 11:13, Filipe Manana (JIRA) wrote:

> 
>    [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977711#action_12977711 ] 
> 
> Filipe Manana commented on COUCHDB-1011:
> ----------------------------------------
> 
> Nikolai, I think to start out, a text box where the user types in a JSON array of strings (doc IDs) is a good way to start. If it's not empty, a replication with the "doc_ids" field set to that JSON array is triggered.
> 
>> Add replication by doc-IDs to Futon
>> -----------------------------------
>> 
>>                Key: COUCHDB-1011
>>                URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>>            Project: CouchDB
>>         Issue Type: New Feature
>>         Components: Futon
>>           Reporter: Filipe Manana
>>           Priority: Minor
>> 
>> Currently Futon doesn't allow users to trigger replications by doc-IDs.
>> This would be a nice addition and a good starting point for new contributors.
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 


[jira] Commented: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977711#action_12977711 ] 

Filipe Manana commented on COUCHDB-1011:
----------------------------------------

Nikolai, I think to start out, a text box where the user types in a JSON array of strings (doc IDs) is a good way to start. If it's not empty, a replication with the "doc_ids" field set to that JSON array is triggered.

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikolai Teofilov updated COUCHDB-1011:
--------------------------------------

    Attachment:     (was: 1-COUCHDB-1011.patch)

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikolai Teofilov updated COUCHDB-1011:
--------------------------------------

    Attachment: COUCHDB-1011.patch

Thanks for the comments.
I modify the patch accordingly to code style convention and correct the typo.
The point behind the line + if ( resp.history == null || resp._local_id) { is to distinguish between the replication by doc ids and continuos  replication and display the the type of the triggered replication on the footer in the event table:
+                  .text((resp._local_id)? "Continuous replication" :
+                                          "Named document replication");
You can try this next week and if you don't like it i can change it. I think the event messages are a bit more consistent in this way.

I am somehow not quite sure about the error messages so if you have better idea let me know. I also tried to use the input placeholder for the validation and error messages but this involve  more code and somewhat strange user experience.

  


 

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>         Attachments: COUCHDB-1011.patch
>
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikolai Teofilov updated COUCHDB-1011:
--------------------------------------

    Comment: was deleted

(was: This is kind of quick and dirty prototype and still need some work and more tests but tips are welcome!
)

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikolai Teofilov updated COUCHDB-1011:
--------------------------------------

    Attachment:     (was: COUCHDB-1011.patch)

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikolai Teofilov updated COUCHDB-1011:
--------------------------------------

    Attachment:     (was: COUCHDB-1011-2.patch)

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>         Attachments: COUCHDB-1011.patch
>
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977398#action_12977398 ] 

Nikolai Teofilov commented on COUCHDB-1011:
-------------------------------------------

Filipe, this sounds interesting.
Any thoughts on how the interface should looks like?

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikolai Teofilov updated COUCHDB-1011:
--------------------------------------

    Attachment:     (was: 2-COUCHDB-1011.patch)

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979127#action_12979127 ] 

Filipe Manana commented on COUCHDB-1011:
----------------------------------------

Also keep lines up to 80 characters wide, this is part of our convention.

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>         Attachments: COUCHDB-1011.patch
>
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983365#action_12983365 ] 

Nikolai Teofilov commented on COUCHDB-1011:
-------------------------------------------

Hi Filipe,

1) I will try your suggestions this days.  

2) I have implemented this on CouchDBX 1.1 trunk 102936 and the replication with doc IDs did not work 
simultaneously with the continuos replication and this was the reason to put separated messages. 

I did following test:

1. Create two local dbs "test1" and "test2".
2. In database "test1" created three documents "a", "b", "c"
3. Started a continuous replication from the new Futon interface:
  
 The post http header was:  {"source":"test1","target":"test2","continuous":true,"doc_ids":["a"]}
 The status message was:    "Replication2  db9fb: test1 -> test2<0.1280.0>Starting"

5. Then I changes the document  "test1/a" by appending a new filed.

What I expected was to see this change replicated to the "test2/a" but nothing happened. 

I also tried between my local 1.1 couchdb and my couchone account 1.0.1 continuous replication + doc ID did not work as well.


One point still is unclear to me: after replication is done the replication session appears under the 'Event' table otherwise 
the default label is shown "No replication". I think there should be new message that indicate the start of continuous replication or 
completing of a replication by doc IDs or the combination of both. 

The question is whether something should be shown under the 'Event' table by triggering the continuous replication or 
replication by doc IDs and if yes what will be the message? 

The _local_id is already shown in the event table and will be redundant to display this twice (as a replication session). 
By triggering the replication by doc ID only, there is no similar information like session ID 
to be shown and the whole response appears in the event table like: 

{"ok":true,"start_time":"Tue, 18 Jan 2011 20:02:01 GMT","end_time":"Tue, 18 Jan 2011 20:02:02 GMT","docs_read":1,"docs_written":1,"doc_write_failures":0}. 

It is also strange to show the default message "No replication" since there was one triggered or completed.

This is why I came up with two messages showing the status of completed replication ("Named document replication" or "Continuous replication")  instead the "No replication" message. 

Cheers,
Nikolai






> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>         Attachments: COUCHDB-1011.patch
>
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979126#action_12979126 ] 

Filipe Manana commented on COUCHDB-1011:
----------------------------------------

Hi Nikolai,

thanks, good work.

Just by looking at the diff:

1) You have a typo in the error messages: "Invavalid" 

2) Here:

+ if ( resp.history == null || resp._local_id) {

I think just checking for "resp.ok === true" is enough and covers success for all types of replications (continuous, by doc IDs, filtered)


I'll try out the patch next week.

regards


> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>         Attachments: COUCHDB-1011.patch
>
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikolai Teofilov updated COUCHDB-1011:
--------------------------------------

    Attachment: COUCHDB-1011.patch

Initial implementation. The document IDs separators are , and ; . Example:  a, b, c   or  a,b,c  or a;b;c   

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>         Attachments: COUCHDB-1011.patch
>
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikolai Teofilov updated COUCHDB-1011:
--------------------------------------

    Attachment:     (was: COUCHDB-1011.patch)

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Nikolai Teofilov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikolai Teofilov updated COUCHDB-1011:
--------------------------------------

    Attachment: COUCHDB-1011-2.patch

This is kind of quick and dirty prototype and still need some work and more tests but tips are welcome!


> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>         Attachments: COUCHDB-1011-2.patch, COUCHDB-1011.patch
>
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by Nikolai Teofilov <n....@gmail.com>.
Okay I will send a new patch this evening. 
 
  

On 06.01.2011, at 13:18, Filipe Manana (JIRA) wrote:

> 
>    [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978295#action_12978295 ] 
> 
> Filipe Manana commented on COUCHDB-1011:
> ----------------------------------------
> 
> Thanks Nikolai.
> 
> You should really expect the input to be a JSON array, because commas (",") and semi-colons (";") are valid characters for a document ID. So splitting the input string by some character is not the way to go.
> 
> Just grab the textbox input, try to JSON.parse() it and if an exception is thrown (or error returned) display an error message, otherwise check the result of JSON.parse() is an array of strings and use it as the value for "repOpts.doc_ids".
> 
> I don't know on top of my head how error reporting is done all over Futon (dunno if it's consistent everywhere), you'll have to check that.
> 
> regards
> 
>> Add replication by doc-IDs to Futon
>> -----------------------------------
>> 
>>                Key: COUCHDB-1011
>>                URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>>            Project: CouchDB
>>         Issue Type: New Feature
>>         Components: Futon
>>           Reporter: Filipe Manana
>>           Priority: Minor
>>        Attachments: COUCHDB-1011.patch
>> 
>> 
>> Currently Futon doesn't allow users to trigger replications by doc-IDs.
>> This would be a nice addition and a good starting point for new contributors.
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 


[jira] Commented: (COUCHDB-1011) Add replication by doc-IDs to Futon

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978295#action_12978295 ] 

Filipe Manana commented on COUCHDB-1011:
----------------------------------------

Thanks Nikolai.

You should really expect the input to be a JSON array, because commas (",") and semi-colons (";") are valid characters for a document ID. So splitting the input string by some character is not the way to go.

Just grab the textbox input, try to JSON.parse() it and if an exception is thrown (or error returned) display an error message, otherwise check the result of JSON.parse() is an array of strings and use it as the value for "repOpts.doc_ids".

I don't know on top of my head how error reporting is done all over Futon (dunno if it's consistent everywhere), you'll have to check that.

regards

> Add replication by doc-IDs to Futon
> -----------------------------------
>
>                 Key: COUCHDB-1011
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1011
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Futon
>            Reporter: Filipe Manana
>            Priority: Minor
>         Attachments: COUCHDB-1011.patch
>
>
> Currently Futon doesn't allow users to trigger replications by doc-IDs.
> This would be a nice addition and a good starting point for new contributors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.