switch to dbStats, only display fileSize if it exists

v1.18.x
barisusakli 9 years ago
parent 5fda800f2b
commit a9fae94e5a

@ -182,7 +182,7 @@
db.command({'serverStatus': 1}, next);
},
stats: function(next) {
db.stats({}, next);
db.command({'dbStats': 1}, next);
},
listCollections: function(next) {
db.listCollections().toArray(function(err, items) {

@ -16,7 +16,9 @@
<span>Data Size</span> <span class="text-right">{mongo.dataSize} mb</span><br/>
<span>Storage Size</span> <span class="text-right">{mongo.storageSize} mb</span><br/>
<span>Index Size</span> <span class="text-right">{mongo.indexSize} mb</span><br/>
<!-- IF mongo.fileSize -->
<span>File Size</span> <span class="text-right">{mongo.fileSize} mb</span><br/>
<!-- ENDIF mongo.fileSize -->
<hr/>
<span>Resident Memory</span> <span class="text-right">{mongo.mem.resident} mb</span><br/>
<span>Virtual Memory</span> <span class="text-right">{mongo.mem.virtual} mb</span><br/>

Loading…
Cancel
Save