diff --git a/package.json b/package.json index ce4a382..62b166d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "monex", - "version": "0.9.18", + "version": "3.0.3-SNAPSHOT", "description": "Monitoring Application for eXist-db", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", diff --git a/pom.xml b/pom.xml index f15fef1..64e861e 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.exist-db.apps monex - 3.0.4 + 3.0.3-SNAPSHOT Monex An application for monitoring, profiling and inspecting a running eXist-db instance. @@ -35,8 +35,8 @@ https://github.com/eXist-db/monex.git scm:git:https://github.com/eXist-db/monex.git scm:git:https://github.com/eXist-db/monex.git - HEAD - + HEAD + GitHub @@ -68,6 +68,8 @@ 2.12.3 1.1 + 1.0.2 + 0.9.1 http://exist-db.org/apps/monex diff --git a/src/main/xar-resources/error-page.html b/src/main/xar-resources/error-page.html index 236071b..658590a 100644 --- a/src/main/xar-resources/error-page.html +++ b/src/main/xar-resources/error-page.html @@ -1,9 +1,6 @@ -
+

An error has occurred

An error has been generated by the application.

-
-    
+    
 
\ No newline at end of file diff --git a/src/main/xar-resources/modules/app.xql b/src/main/xar-resources/modules/app.xql index 29eb66e..7dafc26 100644 --- a/src/main/xar-resources/modules/app.xql +++ b/src/main/xar-resources/modules/app.xql @@ -11,7 +11,7 @@ declare namespace json="http://www.json.org"; (: import module namespace console="http://exist-db.org/xquery/console" at "java:org.exist.console.xquery.ConsoleModule"; :) import module namespace scheduler="http://exist-db.org/xquery/scheduler" at "java:org.exist.xquery.modules.scheduler.SchedulerModule"; -import module namespace templates="http://exist-db.org/xquery/templates" ; +import module namespace templates="http://exist-db.org/xquery/html-templating"; import module namespace config="http://exist-db.org/apps/admin/config" at "config.xqm"; declare variable $app:OPTIMIZATIONS := @@ -626,7 +626,7 @@ declare function app:milliseconds-to-time($timestamp as xs:long) as xs:dateTime declare function app:edit-source($node as node(), $model as map(*), $instance as xs:string, $timestamp as xs:long) as node()* { let $date := app:milliseconds-to-time($timestamp) let $doc := collection($config:data-root || "/" || $instance)/jmx:jmx[jmx:timestamp = xs:dateTime($date)] - let $link := templates:link-to-app("http://exist-db.org/apps/eXide", "index.html?open=" || document-uri(root($doc))) + let $link := $model?eXide || "/index.html?open=" || document-uri(root($doc)) return element { node-name($node) } { attribute href { $link }, diff --git a/src/main/xar-resources/modules/config.xqm b/src/main/xar-resources/modules/config.xqm index b936c35..122144c 100644 --- a/src/main/xar-resources/modules/config.xqm +++ b/src/main/xar-resources/modules/config.xqm @@ -6,7 +6,7 @@ xquery version "3.0"; :) module namespace config="http://exist-db.org/apps/admin/config"; -declare namespace templates="http://exist-db.org/xquery/templates"; +import module namespace templates="http://exist-db.org/xquery/html-templating"; declare namespace repo="http://exist-db.org/xquery/repo"; declare namespace expath="http://expath.org/ns/pkg"; diff --git a/src/main/xar-resources/modules/indexes.xqm b/src/main/xar-resources/modules/indexes.xqm index 430956e..36b6827 100644 --- a/src/main/xar-resources/modules/indexes.xqm +++ b/src/main/xar-resources/modules/indexes.xqm @@ -13,7 +13,7 @@ declare namespace cc="http://exist-db.org/collection-config/1.0"; declare namespace range="http://exist-db.org/xquery/range"; (:import module namespace console="http://exist-db.org/xquery/console";:) -import module namespace templates="http://exist-db.org/xquery/templates"; +import module namespace templates="http://exist-db.org/xquery/html-templating"; (: Global variables - derived from URL parameters @@ -147,7 +147,7 @@ declare function indexes:xconf-to-table($node as node(), $model as map(*)) as it let $xconf-collection-name := concat('/db/system/config', $data-collection-name) let $xconf := collection('/db/system/config')/cc:collection[util:collection-name(.) = $xconf-collection-name] let $resource := $xconf-collection-name || '/' || xmldb:get-child-resources($xconf-collection-name)[ends-with(., '.xconf')] - let $link := templates:link-to-app("http://exist-db.org/apps/eXide", "index.html?open=" || $resource) + let $link := $model?eXide || "/index.html?open=" || $resource return

diff --git a/src/main/xar-resources/modules/test-timeline-prof.xql b/src/main/xar-resources/modules/test-timeline-prof.xql index 34e6f36..e305006 100644 --- a/src/main/xar-resources/modules/test-timeline-prof.xql +++ b/src/main/xar-resources/modules/test-timeline-prof.xql @@ -4,7 +4,7 @@ import module namespace app="http://exist-db.org/apps/admin/templates" at "app.x declare namespace jmx="http://exist-db.org/jmx"; -import module namespace templates="http://exist-db.org/xquery/templates" ; +import module namespace templates="http://exist-db.org/xquery/html-templating"; import module namespace config="http://exist-db.org/apps/admin/config" at "config.xqm"; import module namespace console="http://exist-db.org/xquery/console"; diff --git a/src/main/xar-resources/modules/test-timeline.xql b/src/main/xar-resources/modules/test-timeline.xql index 1fd765e..54645c3 100644 --- a/src/main/xar-resources/modules/test-timeline.xql +++ b/src/main/xar-resources/modules/test-timeline.xql @@ -4,7 +4,7 @@ import module namespace app="http://exist-db.org/apps/admin/templates" at "app.x declare namespace jmx="http://exist-db.org/jmx"; -import module namespace templates="http://exist-db.org/xquery/templates" ; +import module namespace templates="http://exist-db.org/xquery/html-templating"; import module namespace config="http://exist-db.org/apps/admin/config" at "config.xqm"; import module namespace console="http://exist-db.org/xquery/console"; diff --git a/src/main/xar-resources/modules/update-timeline.xql b/src/main/xar-resources/modules/update-timeline.xql index 818943f..29c65c4 100644 --- a/src/main/xar-resources/modules/update-timeline.xql +++ b/src/main/xar-resources/modules/update-timeline.xql @@ -8,7 +8,7 @@ declare namespace json="http://www.json.org"; import module namespace app="http://exist-db.org/apps/admin/templates" at "app.xql"; import module namespace scheduler="http://exist-db.org/xquery/scheduler" at "java:org.exist.xquery.modules.scheduler.SchedulerModule"; -import module namespace templates="http://exist-db.org/xquery/templates" ; +import module namespace templates="http://exist-db.org/xquery/html-templating"; import module namespace config="http://exist-db.org/apps/admin/config" at "config.xqm"; declare option exist:serialize "method=json media-type=text/javascript"; diff --git a/src/main/xar-resources/modules/view.xql b/src/main/xar-resources/modules/view.xql index 955f58d..b05a2bc 100644 --- a/src/main/xar-resources/modules/view.xql +++ b/src/main/xar-resources/modules/view.xql @@ -5,8 +5,8 @@ :) xquery version "3.0"; -import module namespace templates="http://exist-db.org/xquery/templates" ; - +import module namespace templates="http://exist-db.org/xquery/html-templating"; +import module namespace lib="http://exist-db.org/xquery/html-templating/lib"; (: : The following modules provide functions which will be called by the : templating. diff --git a/src/main/xar-resources/remotes.html b/src/main/xar-resources/remotes.html index f953232..c6c4eb5 100644 --- a/src/main/xar-resources/remotes.html +++ b/src/main/xar-resources/remotes.html @@ -70,9 +70,9 @@

Information

responsiveness of the system. Response Time is the elapsed time until the client received the response.

Configuration

-

To monitor remote eXist-db instances, edit the XML file instances.xml in the root collection of +

To monitor remote eXist-db instances, edit the XML file instances.xml in the root collection of the monex application. Monex pings each server at configurable times or - intervals. You can also set up email alerts in notifications.xml.

+ intervals. You can also set up email alerts in notifications.xml.

The configuration for monitoring a remote instance looks as follows:

<instance name="my.server.com" url="http://my.server.com" token="0ade4ba1-cebb-4085-b12c-0ef87f6f032b" cron="0 0/5 * * * ?">
     <poll cron="0 0/2 * * * ?" store="true">
diff --git a/src/main/xar-resources/templates/page.html b/src/main/xar-resources/templates/page.html
index c2a2864..ead173a 100644
--- a/src/main/xar-resources/templates/page.html
+++ b/src/main/xar-resources/templates/page.html
@@ -1,5 +1,5 @@
 
-
+
     
         App Title
         
diff --git a/xar-assembly.xml b/xar-assembly.xml
index af9c11f..2f43868 100644
--- a/xar-assembly.xml
+++ b/xar-assembly.xml
@@ -19,7 +19,8 @@
     Applications
 
     
-    
+    
+    
 
     
     ${package-abbrev}