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:
Next. click on the ‘+’ button next to ‘All Documents’ and add a new doc:
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:
Click on create document and you will find the newly created token in the todo view:
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:
Click on the token and adjust the value of key “lock” to 0:
Save the changes and you will find the token in the todo view:
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.
If you click on one view, you will see all the tokens which belong to this view:
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:
Next, click on options on the top right corner. Select reduce in the query options and run query:
Then you can see the overview of the tokens.