This commit was generated by cvs2svn to compensate for changes in r2155,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
stefanp 2002-03-11 13:49:50 +00:00
parent 72d15e11ab
commit 4a7616d5a0
51 changed files with 1885 additions and 0 deletions

46
Root/main.hac Normal file
View file

@ -0,0 +1,46 @@
/**
* main action, show server-stats
* perform start, stop, restart and flush-action
*
*/
if ( checkAddress()==false ) return;
if ( req.data.app!=null && req.data.app!="" && req.data.action!=null && req.data.action!="" ) {
var appObj = root.getApp(req.data.app);
// check access for application. md5-encoded uname/pwd can also be put in
// app.properties to limit access to a single app
if ( checkAuth(appObj)==false ) return;
if ( req.data.action=="start" ) {
this.startApplication(req.data.app);
res.redirect ( appObj.href("main") );
} else if ( req.data.action=="stop" ) {
if ( checkAuth()==false ) return;
this.stopApplication(req.data.app);
res.redirect ( root.href("main") );
} else if ( req.data.action=="restart" ) {
this.stopApplication(req.data.app);
this.startApplication(req.data.app);
res.redirect ( appObj.href("main") );
} else if ( req.data.action=="flush" ) {
appObj.clearAppCache();
res.redirect ( appObj.href("main") );
}
}
// output only to root
if ( checkAuth()==false ) return;
res.skin = "global";
res.title = "Helma Object Publisher - Serverinfo";
res.body = this.renderSkinAsString("main");