Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added basic changes view

  • Loading branch information...
commit bf04ab23e761bc97bf481f00ebb0d15d8c8912ce 1 parent 0656e59
@daleharvey authored
View
4 _attachments/css/main.css
@@ -456,6 +456,10 @@ li:last-child .delete {
margin-top:20px;
}
+.grey {
+ color: #999;
+}
+
.replication input[type="text"] {
border: 1px solid #BBB;
}
View
10 _attachments/index.html
@@ -205,6 +205,7 @@ <h1 id="title">Mobile Futon</h1>
<li><span>Document Count: {{doc_count}}</span></li>
<li><span>Update Seq: {{update_seq}}</span></li>
<li><span>Disk Size: {{disk_size}}</span></li>
+ <li><a href="#/db/{{db}}/changes">Changes<span class="arrow right">›</span></a></li>
</ul>
<ul>
@@ -244,6 +245,15 @@ <h1 id="title">Mobile Futon</h1>
</script>
+ <script type="text/html" id="changes_tpl">
+ <ul>
+ {{#results}}
+ <li><span><span class="grey">{{seq}}. </span>{{id}}: {{changes_string}}</span></li>
+ {{/results}}
+ </ul>
+ </script>
+
+
<script type="text/html" id="database_view_tpl">
{{#total}}
<p>{{start}} to {{end}} of {{total}}</p>
View
8 _attachments/js/mobile.futon.js
@@ -376,6 +376,14 @@ var MobileFuton = (function () {
});
});
+ router.get('#/db/:db/changes', function(rtr, db) {
+ $.couch.db(db).getDbProperty('_changes', {since: 0}).then(function(data) {
+ $.each(data.results, function(i) {
+ data.results[i].changes_string = JSON.stringify(data.results[i].changes);
+ });
+ renderer.render('changes_tpl', data, rtr);
+ });
+ });
router.get('#/db/', function(rtr) {
setTitle('Databases');
Please sign in to comment.
Something went wrong with that request. Please try again.