Commit 510dba6c authored by Jacob Hansson's avatar Jacob Hansson Committed by Chris Gioran
Browse files

Fixed issue with cache hits showing up as "undefined" in webadmin.

parent 11248430
Showing with 2 additions and 16 deletions
+2 -16
......@@ -47,7 +47,6 @@ define(
dashboardState : @getDashboardState()
primitives : @getServerPrimitives()
diskUsage : @getDiskUsage()
cacheUsage : @getCacheUsage()
statistics : @getServerStatistics()
kernelBean : @getKernelBean()
......@@ -59,9 +58,6 @@ define(
getDiskUsage : =>
@diskUsage ?= new DiskUsage( server : @appState.getServer(), pollingInterval : 5000 )
getCacheUsage : =>
@cacheUsage ?= new CacheUsage( server : @appState.getServer(), pollingInterval : 5000 )
getServerStatistics : =>
@serverStatistics ?= new ServerStatistics( server : @appState.getServer() )
......
......@@ -32,23 +32,19 @@ define(
initialize : (opts) =>
@primitives = opts.primitives
@diskUsage = opts.diskUsage
@cacheUsage = opts.cacheUsage
@primitives.bind("change",@render)
@diskUsage.bind("change",@render)
@cacheUsage.bind("change",@render)
render : =>
$(@el).html @template
primitives : @primitives
diskUsage : @diskUsage
cacheUsage : @cacheUsage
fancyNumber : NumberFormatter.fancy
return this
remove : =>
@primitives.unbind("change",@render)
@diskUsage.unbind("change",@render)
@cacheUsage.unbind("change",@render)
super()
)
......@@ -20,16 +20,9 @@
.value= htmlEscape(fancyNumber(primitives.get("primitives").NumberOfRelationshipTypeIdsInUse))
.title relationship types
:if cacheUsage.isDataAvailable() && diskUsage.isDataAvailable()
:if diskUsage.isDataAvailable()
%tr
%td
.box
.value= htmlEscape(fancyNumber(cacheUsage.get("node").NumberOfCachedElements))
.title cached nodes
%td
.box
.value= htmlEscape(fancyNumber(cacheUsage.get("relationship").NumberOfCachedElements))
.title cached relationships
%td
.box
.value= htmlEscape(fancyNumber(Math.round( diskUsage.getDatabaseSize() / (1024 * 1024))) + " MB")
......@@ -38,5 +31,6 @@
.box
.value= htmlEscape(fancyNumber(Math.round( diskUsage.getLogicalLogSize() / (1024 * 1024))) + " MB")
.title logical log disk usage
%td
.break
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment