couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject [44/50] git commit: check stats page and add some styling
Date Fri, 15 Mar 2013 21:50:08 GMT
check stats page and add some styling


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0fc96351
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0fc96351
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0fc96351

Branch: refs/heads/fauxton-rebase
Commit: 0fc96351d1c43c76f427e20167a77483faf48760
Parents: efe0a8f
Author: Garren Smith <garren.smith@gmail.com>
Authored: Wed Mar 13 22:26:40 2013 +0200
Committer: Russell Branca <chewbranca@gmail.com>
Committed: Fri Mar 15 14:37:34 2013 -0700

----------------------------------------------------------------------
 .../app/addons/stats/assets/less/stats.less        |    7 +++++
 .../app/addons/stats/templates/by_method.html      |    2 +-
 .../app/addons/stats/templates/pie_table.html      |   21 ++++++--------
 src/fauxton/app/addons/stats/views.js              |    9 +++---
 4 files changed, 22 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/0fc96351/src/fauxton/app/addons/stats/assets/less/stats.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/assets/less/stats.less b/src/fauxton/app/addons/stats/assets/less/stats.less
new file mode 100644
index 0000000..e7992cb
--- /dev/null
+++ b/src/fauxton/app/addons/stats/assets/less/stats.less
@@ -0,0 +1,7 @@
+.datatypes {
+  border: #d3d3d3 1px solid;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+  padding: 15px;
+}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/0fc96351/src/fauxton/app/addons/stats/templates/by_method.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/templates/by_method.html b/src/fauxton/app/addons/stats/templates/by_method.html
index fa29ee8..099d737 100644
--- a/src/fauxton/app/addons/stats/templates/by_method.html
+++ b/src/fauxton/app/addons/stats/templates/by_method.html
@@ -13,4 +13,4 @@ the License.
 -->
 
 <h2>By Method <small>GET, POST, PUT, DELETE</small></h2>
-<div id="httpd_request_methods"></div>
\ No newline at end of file
+<div id="httpd_request_methods"></div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/0fc96351/src/fauxton/app/addons/stats/templates/pie_table.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/templates/pie_table.html b/src/fauxton/app/addons/stats/templates/pie_table.html
index 17fe7fa..fba4717 100644
--- a/src/fauxton/app/addons/stats/templates/pie_table.html
+++ b/src/fauxton/app/addons/stats/templates/pie_table.html
@@ -12,23 +12,14 @@ License for the specific language governing permissions and limitations
under
 the License.
 -->
 
-<div class="row">
+<div class="row-fluid">
   <div class="span8">
     <h2>  <%= datatype %> </h2>
   </div>
 </div>
 
-<% if (datatype != "couchdb"){%>
-<div class="row">
-  <div class="span8" style="height:430px;">
-    <center>
-      <svg id="<%= datatype %>_graph"></svg>
-    </center>
-  </div>
-</div>
-<% } %>
-<div class="row">
-  <div class="span8">
+<div class="row-fluid">
+  <div class="span8" style="margin-top:70px">
     <table class="table table-condensed table-striped">
       <thead>
         <tr>
@@ -56,4 +47,10 @@ the License.
       <% }}) %>
     </table>
   </div>
+
+  <div class="span4" style="height:430px;min-width: 430px">
+    <center>
+      <svg id="<%= datatype %>_graph"></svg>
+    </center>
+  </div>
 </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/0fc96351/src/fauxton/app/addons/stats/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/views.js b/src/fauxton/app/addons/stats/views.js
index e1581f3..21454f9 100644
--- a/src/fauxton/app/addons/stats/views.js
+++ b/src/fauxton/app/addons/stats/views.js
@@ -45,14 +45,15 @@ function(app, FauxtonAPI,Stats) {
     initialize: function(args){
       this.datatype = args.datatype;
     },
+
     serialize: function() {
       return {
         statistics: this.collection.where({type: this.datatype}),
         datatype: this.datatype
       };
     },
+
     afterRender: function(){
-      if (this.datatypes != 'couchdb'){
         var collection = this.collection,
             chartelem = "#" + this.datatype + '_graph',
             series = _.map(this.collection.where({type: this.datatype}),
@@ -68,9 +69,11 @@ function(app, FauxtonAPI,Stats) {
 
         series = _.filter(series, function(d){return d.y > 0;});
         series = _.sortBy(series, function(d){return -d.y;});
+        console.log('series');
+        console.log(series);
 
         nv.addGraph(function() {
-            var width = 400,
+            var width = 550,
                 height = 400;
 
             var chart = nv.models.pieChart()
@@ -93,7 +96,6 @@ function(app, FauxtonAPI,Stats) {
             return chart;
         });
 
-      }
       this.$el.addClass(this.datatype + '_section');
     }
   });
@@ -134,7 +136,6 @@ function(app, FauxtonAPI,Stats) {
   });
 
   Views.Statistics = FauxtonAPI.View.extend({
-    className: "datatypes",
     template: "addons/stats/templates/stats",
 
     initialize: function (options) {


Mime
View raw message