Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yesnault/playstatus1
Display Play Framework 1.x Status in a view (Plugin Jquery)
https://github.com/yesnault/playstatus1
Last synced: about 1 month ago
JSON representation
Display Play Framework 1.x Status in a view (Plugin Jquery)
- Host: GitHub
- URL: https://github.com/yesnault/playstatus1
- Owner: yesnault
- License: other
- Created: 2012-03-05T21:45:16.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-03-06T12:02:16.000Z (over 12 years ago)
- Last Synced: 2024-04-30T23:52:03.636Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 129 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Plugin JQuery
-------------A simple JQuery Plugin to display HTML with a JSON Play Framework Status in input.
/!\ Play Framework 1.x (not 2.0)Use
---### The Controller (example : Application.java)
```
package controllers;import play.CorePlugin;
import play.mvc.Controller;public class Application extends Controller {
public static void index() {
render();
}public static void json() {
String json = CorePlugin.computeApplicationStatus(true);
renderJSON(json);
}}
```### The view (example : index.phtml) :
```
#{extends 'main.html' /}
#{set title:'Play Application Status' /}#{set 'moreScripts'}
$(document).ready(function() {
var listAction = #{jsAction @json() /}
$.getJSON(listAction(), function(data) {
$('#status').status2html(data);
});
});
#{/set}
```### The HTML Output
```
Java :
Version : 1.6.0_29
Free memory : 57577200
Max memory : 99024896
Total memory: 65470464
Application :
Path : /Users/yvonnickesnault/Projets/repositories/playStatus1
Uptime : 1716873ms
Started at : 1716873
Pool :
Active count : 1
Queue size : 0
Scheduled task count : 935
Pool size : 1
Monitors :
N°nameavghitsmaxmin
0Application.index(), ms.7.5477707006369431577011
[...]
```### Licence
LGPL v3