Skip to content

Commit

Permalink
imported futon2 as couchapp work
Browse files Browse the repository at this point in the history
Originally this work was tangled up with the rest
of CouchDB at http://github.com/BigBlueHat/couchdb
I have untangled it for faster iteration.
  • Loading branch information
BigBlueHat committed Jun 22, 2012
0 parents commit 71db432
Show file tree
Hide file tree
Showing 176 changed files with 37,663 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.couchapprc
34 changes: 34 additions & 0 deletions README
@@ -0,0 +1,34 @@
Apache CouchDB Futon (_utils) as a CouchApp
===========================================

Futon 2 is a Sammy-based UI for CouchDB. The hope is that
it will eventually replace the current Futon in CouchDB.

One of the current limitations to Futon is that hacking on
it is slowed by the setup time of compiling CouchDB, or
symlinking Futon 2 into an existing CouchDB repo, or some
other similar setup.

By providing this CouchApp directory, the hope is that
anyone with client-side web UI experience can contribute
to the further development of Futon 2.

Installation
------------

First you will need to install CouchApp:

http://couchapp.org/page/installing

Next, create a DB with any name you like ('futon2' seems
reasonable enough).

Then, within this directory, type:

couchapp push . http://localhost:5984/futon2

Last, visit your CouchApp Futon 2 at:

http://localhost:5984/futon2/_design/futon/index.html

Really last, enjoy!
33 changes: 33 additions & 0 deletions _attachments/dialog/_admin_party.html
@@ -0,0 +1,33 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<form action="" method="post">
<h2>Admin Party!</h2>
<fieldset>
<p class="help">
The test suite requires CouchDB to be in <em>Admin Party</em> mode. This
mode give all users admin capabilities. This is the least secure mode of
operation. Do not run the tests on production servers, as you'll impact
both performance and security.
</p>
<p class="help">
Clicking “Remove Admins” will remove all admins from the configuration. You will
have to recreate any admins by hand after the tests have finished.
</p>
</fieldset>
<div class="buttons">
<button type="submit">Remove Admins</button>
<button type="button" class="cancel">Cancel</button>
</div>
</form>
31 changes: 31 additions & 0 deletions _attachments/dialog/_change_password.html
@@ -0,0 +1,31 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<form action="" method="post">
<h2>Change Password</h2>
<fieldset>
<table summary=""><tbody><tr>
<th><label>New Password:</label></th>
<td><input type="password" name="password" size="24" /></td>
</tr><tr>
<th><label>Verify New Password:</label></th>
<td><input type="password" name="verify_password" size="24" /></td>
</tr>
</tbody></table>
</fieldset>
<div class="buttons">
<button type="submit">Login</button>
<button type="button" class="cancel">Cancel</button>
</div>
</form>
51 changes: 51 additions & 0 deletions _attachments/dialog/_compact_cleanup.html
@@ -0,0 +1,51 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<form action="" method="post">
<h2>Compact &amp; Cleanup</h2>
<fieldset class="radiogroup">
<label>
<input type="radio" name="action" value="compact_database" checked>
Compact Database
</label>
<p class="help">
Compacting a database removes deleted documents and previous revisions.
It is an <strong>irreversible operation</strong> and may take
a while to complete for large databases.
</p>
<hr>
<label>
<input type="radio" name="action" value="compact_views">
Compact Views
</label>
<p class="help">
View compaction will affect all views in this design document. This
operation may take some time to complete. Your views will still operate
normally during compaction.
</p>
<hr>
<label>
<input type="radio" name="action" value="view_cleanup">
Cleanup Views
</label>
<p class="help">
Cleaning up views in a database removes old view files still stored
on the filesystem. It is an <strong>irreversible operation</strong>.
</p>
</fieldset>
<div class="buttons">
<button type="submit">Run</button>
<button type="button" class="cancel">Cancel</button>
</div>
</form>
50 changes: 50 additions & 0 deletions _attachments/dialog/_create_admin.html
@@ -0,0 +1,50 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<form action="" method="post">
<h2>Create Server Admin</h2>
<fieldset>
<p class="help">
Before a server admin is configured, all clients have admin privileges.
This is fine when HTTP access is restricted
to trusted users. <strong>If end-users will be accessing this CouchDB, you must
create an admin account to prevent accidental (or malicious) data loss.</strong>
</p>
<p class="help">Server admins can create and destroy databases, install
and update _design documents, run the test suite, and edit all aspects of CouchDB
configuration.
</p>
<table summary=""><tbody><tr>
<th><label>Username:</label></th>
<td><input type="text" name="name" size="24"></td>
</tr><tr>
<th><label>Password:</label></th>
<td><input type="password" name="password" size="24"></td>
</tr>
</tbody></table>
<p class="help">Non-admin users have read and write access to all databases, which
are controlled by validation functions. CouchDB can be configured to block all
access to anonymous users.
</p>
<h3>About Authentication</h3>
<p class="help">
Couch has a pluggable authentication mechanism. Futon exposes a user friendly cookie-auth which handles login and logout, so app developers can relax. Just use <tt>$.couch.session()</tt> to load the current user's info.
</p>

</fieldset>
<div class="buttons">
<button type="submit">Create</button>
<button type="button" class="cancel">Cancel</button>
</div>
</form>
42 changes: 42 additions & 0 deletions _attachments/dialog/_create_config.html
@@ -0,0 +1,42 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<form action="" method="post">
<h2>Create New Config Option</h2>
<fieldset>
<p class="help">
Please enter the section, option, and value.
</p>
<table summary="">
<tbody>
<tr>
<th><label>section:</label></th>
<td><input type="text" name="section" size="24"></td>
</tr>
<tr>
<th><label>option:</label></th>
<td><input type="text" name="option" size="24"></td>
</tr>
<tr>
<th><label>value:</label></th>
<td><input type="text" name="val" size="24"></td>
</tr>
</tbody>
</table>
</fieldset>
<div class="buttons">
<button type="submit">Create</button>
<button type="button" class="cancel">Cancel</button>
</div>
</form>
50 changes: 50 additions & 0 deletions _attachments/dialog/_database_security.html
@@ -0,0 +1,50 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<form action="" method="post">
<h2>Security</h2>
<fieldset>
<p class="help">
Each database contains lists of admins and readers.
Admins and readers are each defined by <tt>names</tt> and <tt>roles</tt>, which are lists of strings.
</p>

<h3>Admins</h3>
<p class="help">Database admins can update design documents and edit the readers list.</p>
<table summary=""><tbody><tr>
<th><label>Names:</label></th>
<td><input type="text" name="admin_names" size="40"></td>
</tr><tr>
<th><label>Roles:</label></th>
<td><input type="text" name="admin_roles" size="40"></td>
</tr>
</tbody></table>

<h3>Readers</h3>
<p class="help">Database readers can access the database. If no readers are defined, the database is public.</p>
<table summary=""><tbody><tr>
<th><label>Names:</label></th>
<td><input type="text" name="reader_names" size="40"></td>
</tr><tr>
<th><label>Roles:</label></th>
<td><input type="text" name="reader_roles" size="40"></td>
</tr>
</tbody></table>

</fieldset>
<div class="buttons">
<button type="submit">Update</button>
<button type="button" class="cancel">Cancel</button>
</div>
</form>
27 changes: 27 additions & 0 deletions _attachments/dialog/_delete_database.html
@@ -0,0 +1,27 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<form action="" method="post">
<h2>Delete Database</h2>
<fieldset>
<p class="help">
Are you sure you want to delete this database? Note that this is an
<strong>irreversible operation</strong>!
</p>
</fieldset>
<div class="buttons">
<button type="submit">Delete</button>
<button type="button" class="cancel">Cancel</button>
</div>
</form>
26 changes: 26 additions & 0 deletions _attachments/dialog/_delete_document.html
@@ -0,0 +1,26 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<form action="" method="post">
<h2>Delete Document</h2>
<fieldset>
<p class="help">
Are you sure you want to delete this document?
</p>
</fieldset>
<div class="buttons">
<button type="submit">Delete</button>
<button type="button" class="cancel">Cancel</button>
</div>
</form>
34 changes: 34 additions & 0 deletions _attachments/dialog/_login.html
@@ -0,0 +1,34 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<form action="" method="post">
<h2>Login</h2>
<fieldset>
<p class="help">
Login to CouchDB with your name and password.
</p>
<table summary=""><tbody><tr>
<th><label>Username:</label></th>
<td><input type="text" name="name" size="24"></td>
</tr><tr>
<th><label>Password:</label></th>
<td><input type="password" name="password" size="24"></td>
</tr>
</tbody></table>
</fieldset>
<div class="buttons">
<button type="submit">Login</button>
<button type="button" class="cancel">Cancel</button>
</div>
</form>

0 comments on commit 71db432

Please sign in to comment.