Using Picas CouchDB from the web interface

In this page you will learn how to use Picas CouchDB from the web interface to carry out following tasks:

  • create a token

  • update a token

  • query a simple view

  • query an advanced view with reduce functions

First of all, login to the Picas CouchDB web interface with your Picas username and password.

Create a token

After logging in, choose your Picas database by clicking on the database name:

../_images/picas_create_a_token_1.png

Next. click on the ‘+’ button next to ‘All Documents’ and add a new doc:

../_images/picas_create_a_token_2.png

For creating a new token, a few key-value pair needs to be defined. You can use the following template

{
 "_id": "token_xx",
 "type": "token",
 "lock": 0,
 "done": 0,
 "hostname": "",
 "scrub_count": 0,
 "input": "",
 "exit_code": ""
}

Adjust the _id and if necessary input:

../_images/picas_create_a_token_3.png

Click on create document and you will find the newly created token in the todo view:

../_images/picas_create_a_token_4.png

Update a token

You may want to update a token, for example moving a token from locked to todo.

Token_7 is in the locked view:

../_images/picas_update_a_token_1.png

Click on the token and adjust the value of key “lock” to 0:

../_images/picas_update_a_token_2.png

Save the changes and you will find the token in the todo view:

../_images/picas_update_a_token_3.png

Query a simple view

There are some standard views already available, such as done, error, locked, overview_total, todo. You can find these views under Monitor > Views.

../_images/picas_query_a_view_1.png

If you click on one view, you will see all the tokens which belong to this view:

../_images/picas_query_a_view_2.png

Query an advanced view with reduce functions

Additionaly, you can query the reduce function for a certain view. Click on the view you want to query:

../_images/picas_reduce_function_1.png

Next, click on options on the top right corner. Select reduce in the query options and run query:

../_images/picas_reduce_function_2.png

Then you can see the overview of the tokens.