Skip to content

Commit

Permalink
Merge branch 'master' of github.com:neo4j/server
Browse files Browse the repository at this point in the history
  • Loading branch information
nawroth committed Mar 29, 2011
2 parents 84de315 + e4d5b1d commit d62c440
Show file tree
Hide file tree
Showing 161 changed files with 158 additions and 8,036 deletions.
34 changes: 34 additions & 0 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,40 @@
</build>
</profile>

<profile>
<!-- Temporarily disconnected from the rest of the build
because "brew" is not in maven central. To use this, mvn install
-->
<id>webadmin-build</id>
<build>
<plugins>
<plugin>
<groupId>com.voltvoodoo</groupId>
<artifactId>brew</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<id>build-webadmin</id>
<goals>
<goal>compile-haml</goal>
<goal>compile-coffeescript</goal>
<goal>optimize</goal>
</goals>
</execution>
</executions>

<configuration>
<module>webadmin</module>
<coffeeOutputDir>${basedir}/src/main/resources/webadmin-html/js</coffeeOutputDir>
<hamlOutputDir>${basedir}/src/main/resources/webadmin-html/js</hamlOutputDir>
<optimizeSourceDir>${basedir}/src/main/resources/webadmin-html/js</optimizeSourceDir>
<optimizeOutputDir>${basedir}/src/main/resources/webadmin-html/js</optimizeOutputDir>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<!-- Firefox is default implementation, set in properties at the top of this file. -->
<profile>
<id>htmlunit</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ define(
'./models/CacheUsage'
'./models/ServerStatistics'
'./models/DashboardState'
'./models/KernelBean'
'lib/backbone'],
(DashboardView, ServerPrimitives, DiskUsage, CacheUsage, ServerStatistics, DashboardState) ->
(DashboardView, ServerPrimitives, DiskUsage, CacheUsage, ServerStatistics, DashboardState, KernelBean) ->

class DashboardController extends Backbone.Controller
routes :
Expand All @@ -46,10 +47,14 @@ define(
diskUsage : @getDiskUsage()
cacheUsage : @getCacheUsage()
statistics : @getServerStatistics()
kernelBean : @getKernelBean()

getServerPrimitives : =>
@serverPrimitives ?= new ServerPrimitives( server : @appState.getServer(), pollingInterval : 5000 )

getKernelBean : =>
@kernelBean ?= new KernelBean( server : @appState.getServer(), pollingInterval : 10000 )

getDiskUsage : =>
@diskUsage ?= new DiskUsage( server : @appState.getServer(), pollingInterval : 5000 )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ define(
['neo4j/webadmin/data/QueuedSearch',
'./views/DataBrowserView',
'./models/DataBrowserState',
'./models/DataItem', 'lib/backbone'],
(QueuedSearch, DataBrowserView, DataBrowserState, DataItem) ->
'lib/backbone'],
(QueuedSearch, DataBrowserView, DataBrowserState) ->

class DataBrowserController extends Backbone.Controller
routes :
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
###
Copyright (c) 2002-2011 "Neo Technology,"
Network Engine for Objects in Lund AB [http://neotechnology.com]
This file is part of Neo4j.
Neo4j is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
###

define ['./JmxBackedModel','lib/backbone'], (JmxBackedModel) ->

class KernelBean extends JmxBackedModel

beans :
version : { domain : 'neo4j', name:'Kernel' }
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%h1.pad Neo4j web administration
%ul.info_list
%li
%h3 Data url
%h3 Server url
%p= server.url
%li
%h3 Kernel version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,31 @@ define(

initialize : (@opts) =>
@appState = opts.state
@server = @appState.getServer()
@kernelBean = opts.kernelBean

@kernelBean.bind "change", @render

render : =>
$(@el).html @template(
server : { url : "someurl", version : "someversion" } )
server : { url : @server.url, version : @kernelBean.get "KernelVersion" } )

if @infoView?
@infoView.remove()
if @chartsView?
@chartsView.remove()

@infoView = new DashboardInfoView(@opts)
@chartsView = new DashboardChartsView(@opts)

$("#dashboard-info", @el).append(@infoView.el)
$("#dashboard-charts", @el).append(@chartsView.el)

@infoView.attach $("#dashboard-info", @el)
@chartsView.attach $("#dashboard-charts", @el)
@infoView.render()
@chartsView.render()

return this

remove : =>
@kernelBean.unbind("change",@render)
@infoView.remove()
@chartsView.remove()
super()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ Graph.Layout.Ordered.prototype = {
};

/*
* usefull JavaScript extensions,
* useful JavaScript extensions
*/

function log(a) {console.log&&console.log(a);}
Expand Down

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d62c440

Please sign in to comment.