Skip to content

Commit

Permalink
fixes #2556 (#2557)
Browse files Browse the repository at this point in the history
* fixes #2556

* slight cleanup
  • Loading branch information
nathandunn committed Jan 28, 2021
1 parent 632cbe7 commit 99188e5
Show file tree
Hide file tree
Showing 3 changed files with 1,750 additions and 1,720 deletions.
1 change: 1 addition & 0 deletions grails-app/conf/UrlMappings.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class UrlMappings {
"/"(redirect: '/annotator/index')
"500"(view: '/error')
"/menu"(view: '/menu')
"/system"(controller: "annotator", action: "system")
"/${clientToken}/version.jsp"(controller: 'annotator', view: "version")
"/about"(controller: 'annotator', view: "about")
"/${clientToken}/about"(controller: 'annotator', view: "about")
Expand Down
19 changes: 14 additions & 5 deletions grails-app/controllers/org/bbop/apollo/AnnotatorController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -724,12 +724,21 @@ class AnnotatorController {
/**
* This is a public passthrough to version
*/
def version() {
println "version "
}

@RestApiMethod(description = "Get system info", path = "/system", verb = RestApiVerb.GET)
@RestApiParams(params = [])
def system() {
def jsonObject = new JSONObject()
jsonObject.apollo_version = grails.util.Metadata.current['app.version']
jsonObject.grails_version = GroovySystem.getVersion()
jsonObject.jvm_version = System.getProperty("java.version")
jsonObject.serverInfo = servletContext.getServerInfo()
jsonObject.jbrowse_branch = grailsApplication.config?.jbrowse?.git
jsonObject.jbrowse_url = grailsApplication.config?.jbrowse?.git?.url
render jsonObject as JSON
}

// used in the view
def about() {
println "about . . . . "
}
/**
* This is a very specific method for the GWT interface.
Expand Down

0 comments on commit 99188e5

Please sign in to comment.