Update of /cvsroot/wpdev/xmlscripts/web
In directory sc8-pr-cvs1:/tmp/cvs-serv26638
Modified Files:
console.py
Log Message:
Added some more console commands to the web interface
Index: console.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/web/console.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** console.py 6 Jan 2004 12:55:44 -0000 1.4
--- console.py 14 Jan 2004 02:42:19 -0000 1.5
***************
*** 31,34 ****
--- 31,45 ----
wolfpack.queueaction( RELOAD_SCRIPTS )
sys.exit()
+ elif action == 2:
+ print "Content-type: text/html\n\n"
+ print "Server is reloading Python scripts, you will have to re-login after reloading is done"
+ wolfpack.queueaction( RELOAD_PYTHON )
+ sys.exit()
+ elif action == 3:
+ wolfpack.queueaction( RELOAD_ACCOUNTS )
+ elif action == 4:
+ wolfpack.queueaction( RELOAD_CONFIGURATION )
+ elif action == 5:
+ wolfpack.queueaction( SAVE_WORLD )
content = """
***************
*** 60,63 ****
--- 71,79 ----
"""
content += '<input type="submit" value="Reload Scripts" onClick="window.location.href=\'console.py?session=%s&action=1\';"/>' % session_id
+ content += '<input type="submit" value="Reload Python" onClick="window.location.href=\'console.py?session=%s&action=2\';"/>' % session_id
+ content += '<input type="submit" value="Reload Accounts" onClick="window.location.href=\'console.py?session=%s&action=3\';"/>' % session_id
+ content += '<input type="submit" value="Reload Configuration" onClick="window.location.href=\'console.py?session=%s&action=4\';"/>' % session_id
+ content += '<input type="submit" value="Save world" onClick="window.location.href=\'console.py?session=%s&action=5\';"/>' % session_id
+
web.template.output( '> <a href="console.py?session=%(session)s" class="header">Console</a>' % { 'session': session_id },
|