% var applications = application.sharedGlobals.get('com.threecrickets.prudence.applications') var version = application.sharedGlobals.get('com.threecrickets.prudence.version') var component = application.component var action = conversation.query.get('action') var item = conversation.query.get('item') var index = conversation.query.get('index') if (null !== index) { if (item == 'host') { item = component.hosts.get(index) } else if (item == 'server') { item = component.servers.get(index) } else if (item == 'application') { item = applications.get(index) } else { item = null } if (null !== item) { if (action == 'stop') { item.stop() } else if (action == 'start') { item.start() } conversation.response.locationRef = conversation.request.resourceRef.baseRef conversation.statusCode = 303 conversation.stop() } } function findRoutes(app) { var routes = [] for (var i = component.hosts.iterator(), index = 0; i.hasNext(); index++) { var host = i.next(); for (var ii = host.routes.iterator(); ii.hasNext(); ) { var route = ii.next(); if (route.next === app) { routes.push({route: route, host: host}) } } } return routes } %>
Prudence AdministrationWelcome! Here you'll be able to control an instance of Prudence, its applications, virtual hosts and servers. Note that live changes you make here will be lost when you restart Prudence. Running on Prudence version <%= version %>. |
|
|