10/22/2003 Stefan Vogel
I just wanted to get familar with metakits. So I build up a very simply but still useful (at least for me) Webadministration-Interface for MetaKit.
This webadministration Metakit@Web works with Tclhttpd.
With Metakit@Web (Version 0.2) you can:
Installation is quite simple (as always with Tclhttpd):
Attention
This Webadmin-interface was developed only for me and my local installation of Tclhttpd.
Next steps/Missing features:
You've been warned. But now ... have fun:
... '''Script removed''' ...
10/23/2003 Stefan Vogel O.k. even though the complete Webadministration of Metakits was only about 600 LoC, it's a little bit to much for the Wiki. You can download the script "mkweb.tcl" (currently Version 0.2) from:
http://www.freewebs.com/vogel-nest/tcl/
Wow! -jcw
rmax - This looks very nice indeed!
But I keep getting the following error whenever I invoke a link, that changes anything (creating/deleting databases, modifying views, adding rows, etc.):
can't read "::env(sock)": no such variable while executing "Httpd_RedirectSelf /$aConfig(prefix)/$redirect $::env(sock)" (procedure "ReturnResult" line 4) invoked from within "ReturnResult $result $redirect" (procedure "metakit::web::execute/listdb" line 51) invoked from within "metakit::web::execute/listdb mode delete db test" invoked from within "catch $cmd result" invoked from within "DirectRespond $sock $code $result $type" (procedure "DirectDomain" line 29) invoked from within "DirectDomain metakit::web::execute sock8 /listdb" ("eval" body line 1) invoked from within "eval $Url(command,$prefix) [list $sock $suffix]"
And may I suggest to remove the actual code from this page and just leave a link to the Tcl file on your page. To me it feels a bit too large for a wiki page. This would also save you the work of updating the wiki page every time you improve the script.
One way of doing that could be to turn it into a starkit and submit it to SDarchive (on this same server - [L1 ]). -jcw
Do you have an actual version of tclhttpd? (3.4.2). This script relies on a call to Cgi_SetEnvAll (which is called from cgi.tcl#Cgi_SetEnv which is called everytime when a direct-url is called (from direct.tcl#DirectDomain)). If there is a better way to retrieve the current "sock"-value in a direct domain please tell me. (See also comp.lang.tcl http://groups.google.de/groups?dq=&hl=de&lr=&ie=UTF-8&threadm=e50b2925.0310192200.306530e0%40posting.google.com&prev=/groups%3Fdq%3D%26num%3D25%26hl%3Dde%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.lang.tcl%26start%3D75 ) Unfortunately there is a bug in "direct.tcl" which does not allow to issue a redirect by simply generating an error with code 302.