couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cml...@apache.org
Subject svn commit: r646734 - in /incubator/couchdb/trunk: ./ share/ share/www/browse/ share/www/image/ share/www/script/ share/www/style/
Date Thu, 10 Apr 2008 10:28:08 GMT
Author: cmlenz
Date: Thu Apr 10 03:27:56 2008
New Revision: 646734

URL: http://svn.apache.org/viewvc?rev=646734&view=rev
Log:
Add DB compaction button to Futon. Closes COUCHDB-38. Thanks to Jim Lindley for the patch!

Added:
    incubator/couchdb/trunk/share/www/browse/_compact_database.html   (with props)
    incubator/couchdb/trunk/share/www/image/compact.gif   (with props)
Modified:
    incubator/couchdb/trunk/THANKS
    incubator/couchdb/trunk/share/Makefile.am
    incubator/couchdb/trunk/share/www/browse/database.html
    incubator/couchdb/trunk/share/www/script/browse.js
    incubator/couchdb/trunk/share/www/script/jquery.dialog.js
    incubator/couchdb/trunk/share/www/style/layout.css

Modified: incubator/couchdb/trunk/THANKS
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/THANKS?rev=646734&r1=646733&r2=646734&view=diff
==============================================================================
--- incubator/couchdb/trunk/THANKS (original)
+++ incubator/couchdb/trunk/THANKS Thu Apr 10 03:27:56 2008
@@ -10,6 +10,7 @@
  * Benoit Chesneau <bchesneau@gmail.com>
  * Till Klampaeckel <till@klampaeckel.de>
  * Roger Leigh <rleigh@debian.org>
+ * Jim Lindley <web@jimlindley.com>
  * Sam Ruby <rubys@intertwingly.net>
  * Dirk Schalge <dirk@epd-me.net>
  * Carlos Valiente <superdupont@gmail.com>

Modified: incubator/couchdb/trunk/share/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/Makefile.am?rev=646734&r1=646733&r2=646734&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/Makefile.am (original)
+++ incubator/couchdb/trunk/share/Makefile.am Thu Apr 10 03:27:56 2008
@@ -14,6 +14,7 @@
 
 nobase_dist_pkgdata_DATA = \
     server/main.js \
+    www/browse/_compact_database.html \
     www/browse/_create_database.html \
     www/browse/_create_document.html \
     www/browse/_delete_database.html \
@@ -28,6 +29,7 @@
     www/image/apply.gif \
     www/image/bg.png \
     www/image/cancel.gif \
+    www/image/compact.gif \
     www/image/delete-mini.gif \
     www/image/delete.gif \
     www/image/grippie.gif \

Added: incubator/couchdb/trunk/share/www/browse/_compact_database.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/browse/_compact_database.html?rev=646734&view=auto
==============================================================================
--- incubator/couchdb/trunk/share/www/browse/_compact_database.html (added)
+++ incubator/couchdb/trunk/share/www/browse/_compact_database.html [utf-8] Thu Apr 10 03:27:56
2008
@@ -0,0 +1,28 @@
+<!--
+
+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 Database</h2>
+  <fieldset>
+    <p class="help">
+      Compacting a database removes deleted documents and previous revisions.
+      It is an <strong>irreversible operation</strong> and my take 
+      a while to complete for large databases.
+    </p>
+  </fieldset>
+  <div class="buttons">
+    <button type="submit">Compact</button>
+    <button type="button" class="cancel">Cancel</button>
+  </div>
+</form>

Propchange: incubator/couchdb/trunk/share/www/browse/_compact_database.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/couchdb/trunk/share/www/browse/_compact_database.html
------------------------------------------------------------------------------
    svn:mime-type = text/html;charset=utf-8

Modified: incubator/couchdb/trunk/share/www/browse/database.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/browse/database.html?rev=646734&r1=646733&r2=646734&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/www/browse/database.html [utf-8] (original)
+++ incubator/couchdb/trunk/share/www/browse/database.html [utf-8] Thu Apr 10 03:27:56 2008
@@ -78,6 +78,7 @@
           $.cookies.set(page.dbName + ".perpage", this.value);
         });
         $("#toolbar button.add").click(page.addDocument);
+        $("#toolbar button.compact").click(page.compactDatabase);
         $("#toolbar button.delete").click(page.deleteDatabase);
       });
     </script>
@@ -98,6 +99,7 @@
       </div>
       <ul id="toolbar">
         <li><button class="add">Create Document …</button></li>
+        <li><button class="compact">Compact Database</button></li>
         <li><button class="delete">Delete Database</button></li>
       </ul>
 

Added: incubator/couchdb/trunk/share/www/image/compact.gif
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/image/compact.gif?rev=646734&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/couchdb/trunk/share/www/image/compact.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Modified: incubator/couchdb/trunk/share/www/script/browse.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/script/browse.js?rev=646734&r1=646733&r2=646734&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/www/script/browse.js [utf-8] (original)
+++ incubator/couchdb/trunk/share/www/script/browse.js [utf-8] Thu Apr 10 03:27:56 2008
@@ -84,6 +84,14 @@
     });
   }
 
+  this.compactDatabase = function() {
+    $.showDialog("_compact_database.html", {
+      submit: function() {
+        db.compact();
+      }
+    });
+  }
+
   this.deleteDatabase = function() {
     $.showDialog("_delete_database.html", {
       submit: function() {

Modified: incubator/couchdb/trunk/share/www/script/jquery.dialog.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/script/jquery.dialog.js?rev=646734&r1=646733&r2=646734&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/www/script/jquery.dialog.js [utf-8] (original)
+++ incubator/couchdb/trunk/share/www/script/jquery.dialog.js [utf-8] Thu Apr 10 03:27:56
2008
@@ -76,7 +76,7 @@
             data[field.name] = field.value;
           });
           var errors = options.submit(data);
-          if (errors == {}) {
+          if (errors == null || errors == {}) {
             dismiss();
           } else {
             for (var name in errors) {

Modified: incubator/couchdb/trunk/share/www/style/layout.css
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/style/layout.css?rev=646734&r1=646733&r2=646734&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/www/style/layout.css (original)
+++ incubator/couchdb/trunk/share/www/style/layout.css Thu Apr 10 03:27:56 2008
@@ -179,6 +179,7 @@
 #toolbar button:hover { background-position: 2px -30px; color: #000; }
 #toolbar button:active { background-position: 2px -62px; color: #000; }
 #toolbar button.add { background-image: url(../image/add.gif); }
+#toolbar button.compact { background-image: url(../image/compact.gif); }
 #toolbar button.delete { background-image: url(../image/delete.gif); }
 #toolbar button.edit { background-image: url(../image/edit.gif); }
 #toolbar button.load { background-image: url(../image/load.gif); }



Mime
View raw message