2007/10/4, Alvaro Lopez Ortega <[EMAIL PROTECTED]>:
>
> [email protected] wrote, On 04/10/07 03:08:
>
> > Author: arc
> > New Revision: 926
> > Log:
> > 2007-10-04  Alberto Ruiz <[EMAIL PROTECTED]>
> >       * created branches and trunk directories
> >       * initial trunk commit for the new administration interface
>
> Alberto, *GREAT* stuff!!! You have just made my day :-)


Np, in fact, I should give a little explanation on how it works.

We're using cherokee-pyscgi and pycherokeeconf to run the service, so you
need to install cherokee 0.6 and both modules as well in order to run the
service. The SCGI is started on the 4000 port and the web server on the 8080
port.

To get the sources, svn co svn://www.cherokee-
project.com/cherokee-admin/trunk cherokee-admin

The web interface is based on ExtJS[0], a JavaScript toolkit (based on Yahoo
UI and prototype) to build user interfaces with AJAX sugar on top :) Before
to test the server, make sure you run the download_extjs.sh bash script (I
thought including the whole JS in the repository was a bad idea).

There are two main ways that ExtJS can retrieve information asynchronously
using the default ajax calls, XML and JSON. I've chosen to write a JSON API.
The API works this way, since the cherokee configuration can be represented
by a tree, you can browse the tree simply using the URL (if you run the
run_admin.sh bash script, you will be al:

http://localhost:8080/config/  will give you the configuartion root, usually
server and vserver and includes.
Returns something like this:
[ "vserver", {"include": /usr/local/etc/cherokee/sites-enabled}, "server" ]

Note that include has value, that means that is a leaf of the tree, and
therefor it's returned as a JSON object ( {"key": value} )

Everything under /config, returns a JSON list. If some of the elements of
that configuration path is a leaf. For some special cases, I'm parsing
request options, such as
http://localhost:8080/config/vserver/?widget=gridto return the Grid
widget record list as the JS API expects it.

The interface itself can be browsed on /admin,
http://localhost:8080/admin/(I think I will change this to the /
directory at some point). So far it
only only returns the vserver list.

Help and/or any comments are welcome and very appreciated!

[0] http://extjs.com/

-- 
Un saludo,
Alberto Ruiz
_______________________________________________
Cherokee mailing list
[email protected]
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee

Reply via email to