Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  The ymnesia appmod

tobbe
Posted: Wed Sep 06, 2006 11:27 am Reply with quote
User Joined: 19 Jan 2005 Posts: 274 Location: Stockholm, Sweden
I have added a (IMHO) very useful appmod to the Yaws CVS.

ymnesia.erl makes it easy to browse and search in your
Mnesia tables.

To set it up, add it as an appmod:

appmods = [{"showdb", ymnesia}],

Then point your borwser to:

http://<host>/showdb/

You will see a table with all your Mnesia tables
and their fields. You can now perform searches
and view only certain fields if you so whish.

Cheers, Tobbe


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
View user's profile Send private message Send e-mail Visit poster's website
Ke Han
Posted: Wed Sep 20, 2006 4:18 am Reply with quote
User Joined: 02 Mar 2005 Posts: 107 Location: Shanghai
Tobbe,
I am testing ymnesia. The appmod works, but the form it outputs does
not seem to work.
When looking at the html output by ymnesia, I see the following:
<form action="table.yaws" method="post" name="my_table_name">

so where is this table.yaws file? I would expect to at least get an
error from yaws since table.yaws does not exist in my docroot. No
error when I press enter from one of the input fields on the form.
So it looks as if its two problems: no table.yaws and the form
doesn't seem to be executing the submit action.
I have just tested this under Firefox 1.5.07 on OS X and Windows XP.
There is no HTTP request generated when I press enter in any of the
input fields.

thanks, ke han

On Sep 6, 2006, at 7:25 PM, Torbjorn Tornkvist wrote:

> I have added a (IMHO) very useful appmod to the Yaws CVS.
>
> ymnesia.erl makes it easy to browse and search in your
> Mnesia tables.
>
> To set it up, add it as an appmod:
>
> appmods = [{"showdb", ymnesia}],
>
> Then point your borwser to:
>
> http://<host>/showdb/
>
> You will see a table with all your Mnesia tables
> and their fields. You can now perform searches
> and view only certain fields if you so whish.
>
> Cheers, Tobbe
>
>
> ----------------------------------------------------------------------
> ---
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
View user's profile Send private message
tobbe
Posted: Wed Sep 20, 2006 7:18 am Reply with quote
User Joined: 19 Jan 2005 Posts: 274 Location: Stockholm, Sweden
ke han wrote:
> Tobbe,
> I am testing ymnesia. The appmod works, but the form it outputs does
> not seem to work.

Hm....did you really type in the URL as in the example ?

http://<host>/showdb/

(i.e with the last '/')


> When looking at the html output by ymnesia, I see the following:
> <form action="table.yaws" method="post" name="my_table_name">
>
> so where is this table.yaws file?

It is nowhere since it is taken care of by the ymnesia appmod itself.
>From the code:
------
out(A) ->
case string:tokens(A#arg.appmoddata, "/.") of

["table" | _] ->
.....
------
So, it works for me. Has anyone else tried it ?

Cheers, Tobbe

I would expect to at least get an
> error from yaws since table.yaws does not exist in my docroot. No
> error when I press enter from one of the input fields on the form.
> So it looks as if its two problems: no table.yaws and the form
> doesn't seem to be executing the submit action.
> I have just tested this under Firefox 1.5.07 on OS X and Windows XP.
> There is no HTTP request generated when I press enter in any of the
> input fields.
>
> thanks, ke han
>
> On Sep 6, 2006, at 7:25 PM, Torbjorn Tornkvist wrote:
>
>> I have added a (IMHO) very useful appmod to the Yaws CVS.
>>
>> ymnesia.erl makes it easy to browse and search in your
>> Mnesia tables.
>>
>> To set it up, add it as an appmod:
>>
>> appmods = [{"showdb", ymnesia}],
>>
>> Then point your borwser to:
>>
>> http://<host>/showdb/
>>
>> You will see a table with all your Mnesia tables
>> and their fields. You can now perform searches
>> and view only certain fields if you so whish.
>>
>> Cheers, Tobbe
>>
>>
>> ----------------------------------------------------------------------
>> ---
>> Using Tomcat but need to do more? Need to support web services,
>> security?
>> Get stuff done quickly with pre-integrated technology to make your
>> job easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?
>> cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Erlyaws-list mailing list
>> Erlyaws-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
View user's profile Send private message Send e-mail Visit poster's website
Ke Han
Posted: Wed Sep 20, 2006 1:38 pm Reply with quote
User Joined: 02 Mar 2005 Posts: 107 Location: Shanghai
On Sep 20, 2006, at 3:17 PM, Torbjorn Tornkvist wrote:

> ke han wrote:
>> Tobbe,
>> I am testing ymnesia. The appmod works, but the form it outputs does
>> not seem to work.
>
> Hm....did you really type in the URL as in the example ?
>
> http://<host>/showdb/
>
> (i.e with the last '/')

I have tried it with and without slash, both return the same page.

my relevant parts of the server config in yaws.conf is:
appmods = <"ymnesia", ymnesia>
<auth>
realm = foobar
dir = /ymnesia
user = foo:bar
</auth>

I have also used your exact exmaple and had the appmod as:
appmods = <"showdb", ymnesia>
Same effect.

The page loads. The HTML source looks ok, although I don't know what
it should look like.
I can enter a search value in a field, but I cannot seem to get the
form submit to trigger. I have used an HTTP analysis tool and can
definitely say nothing gets trigger by pressing enter in any of the
input fields. I have tried fields with quoted string values and
boolean terms, tried the checkboxes, but nothing.

Here is the page it generates (I mod-ed this to change the real table
name to "my_table", but the rest is the same):

<head><META HTTP-EQUIV="EXPIRES" CONTENT="Sun, 16 Oct 2004 11:12:01
GMT">
<style type="text/css">table {border-collapse: collapse; border:
solid black 1px;}
p {padding: 5px; font-weight: bold;}
input[type=text] {vertical-align: bottom; width: 100%; font-size: 80%;}
input[type=checkbox] {vertical-align: top; font-size: 80%;}
span.attribute {vertical-align: top; font-size: 80%;}
th {padding: 5px; border: solid black 1px;}
td {padding: 5px; border: solid black 1px;}
</style></head>
<body>
<div>
<table>
<tr>
<form action="table.yaws" method="post" name="my_table">
<td><a href="#" onclick="my_table.submit();">my_table<input
type="hidden" name="tablename" value="my_table"></input></a></td>
<td><input type="checkbox" name="cbox_email"></input><span
class="attribute">email</span><input type="text" name="email"></
input></td>
<td><input type="checkbox" name="cbox_js_active"></input><span
class="attribute">js_active</span><input type="text"
name="js_active"></input></td>
<td><input type="checkbox" name="cbox_ip"></input><span
class="attribute">ip</span><input type="text" name="ip"></input></td>

<td><input type="checkbox" name="cbox_created_at"></input><span
class="attribute">created_at</span><input type="text"
name="created_at"></input></td></form></tr></table></div></body>

thanks for your help, ke han


>
>
>> When looking at the html output by ymnesia, I see the following:
>> <form action="table.yaws" method="post" name="my_table_name">
>>
>> so where is this table.yaws file?
>
> It is nowhere since it is taken care of by the ymnesia appmod itself.
>> From the code:
> ------
> out(A) ->
> case string:tokens(A#arg.appmoddata, "/.") of
>
> ["table" | _] ->
> .....
> ------
> So, it works for me. Has anyone else tried it ?
>
> Cheers, Tobbe
>
> I would expect to at least get an
>> error from yaws since table.yaws does not exist in my docroot. No
>> error when I press enter from one of the input fields on the form.
>> So it looks as if its two problems: no table.yaws and the form
>> doesn't seem to be executing the submit action.
>> I have just tested this under Firefox 1.5.07 on OS X and Windows XP.
>> There is no HTTP request generated when I press enter in any of the
>> input fields.
>>
>> thanks, ke han
>>
>> On Sep 6, 2006, at 7:25 PM, Torbjorn Tornkvist wrote:
>>
>>> I have added a (IMHO) very useful appmod to the Yaws CVS.
>>>
>>> ymnesia.erl makes it easy to browse and search in your
>>> Mnesia tables.
>>>
>>> To set it up, add it as an appmod:
>>>
>>> appmods = [{"showdb", ymnesia}],
>>>
>>> Then point your borwser to:
>>>
>>> http://<host>/showdb/
>>>
>>> You will see a table with all your Mnesia tables
>>> and their fields. You can now perform searches
>>> and view only certain fields if you so whish.
>>>
>>> Cheers, Tobbe
>>>
>>>
>>> --------------------------------------------------------------------
>>> --
>>> ---
>>> Using Tomcat but need to do more? Need to support web services,
>>> security?
>>> Get stuff done quickly with pre-integrated technology to make your
>>> job easier
>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>>> Geronimo
>>> http://sel.as-us.falkag.net/sel?
>>> cmd=lnk&kid=120709&bid=263057&dat=121642
>>> _______________________________________________
>>> Erlyaws-list mailing list
>>> Erlyaws-list@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>>
>>
>> ---------------------------------------------------------------------
>> ----
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to
>> share your
>> opinions on IT & business topics through brief surveys -- and earn
>> cash
>> http://www.techsay.com/default.php?
>> page=join.php&p=sourceforge&CID=DEVDEV
>
>
> ----------------------------------------------------------------------
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> opinions on IT & business topics through brief surveys -- and earn
> cash
> http://www.techsay.com/default.php?
> page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
View user's profile Send private message
tobbe
Posted: Wed Sep 20, 2006 7:30 pm Reply with quote
User Joined: 19 Jan 2005 Posts: 274 Location: Stockholm, Sweden
ke han wrote:
> On Sep 20, 2006, at 3:17 PM, Torbjorn Tornkvist wrote:
>
>> ke han wrote:
>>> Tobbe,
>>> I am testing ymnesia. The appmod works, but the form it outputs does
>>> not seem to work.
>> Hm....did you really type in the URL as in the example ?
>>
>> http://<host>/showdb/
>>
>> (i.e with the last '/')
>
> I have tried it with and without slash, both return the same page.
>
> my relevant parts of the server config in yaws.conf is:
> appmods = <"ymnesia", ymnesia>
> <auth>
> realm = foobar
> dir = /ymnesia
> user = foo:bar
> </auth>
>
> I have also used your exact exmaple and had the appmod as:
> appmods = <"showdb", ymnesia>
> Same effect.
>
> The page loads. The HTML source looks ok, although I don't know what
> it should look like.
> I can enter a search value in a field, but I cannot seem to get the
> form submit to trigger. I have used an HTTP analysis tool and can
> definitely say nothing gets trigger by pressing enter in any of the
> input fields.

Hm...strange.

You are supposed to click om the link with the table name
in the leftmost column. If you have entered any value in any input
field, the value(s) will be used in a mnesia:match operation. And if
you have checked any checkboxes, only those fields will be returned,
otherwise all fields will be shown.

Which web browser are you using, and on what OS ?

Perhaps I only have tested it on Firefox/Linux (I don't
remmeber).

--Tobbe

> I have tried fields with quoted string values and
> boolean terms, tried the checkboxes, but nothing.
>
> Here is the page it generates (I mod-ed this to change the real table
> name to "my_table", but the rest is the same):
>
> <head><META HTTP-EQUIV="EXPIRES" CONTENT="Sun, 16 Oct 2004 11:12:01
> GMT">
> <style type="text/css">table {border-collapse: collapse; border:
> solid black 1px;}
> p {padding: 5px; font-weight: bold;}
> input[type=text] {vertical-align: bottom; width: 100%; font-size: 80%;}
> input[type=checkbox] {vertical-align: top; font-size: 80%;}
> span.attribute {vertical-align: top; font-size: 80%;}
> th {padding: 5px; border: solid black 1px;}
> td {padding: 5px; border: solid black 1px;}
> </style></head>
> <body>
> <div>
> <table>
> <tr>
> <form action="table.yaws" method="post" name="my_table">
> <td><a href="#" onclick="my_table.submit();">my_table<input
> type="hidden" name="tablename" value="my_table"></input></a></td>
> <td><input type="checkbox" name="cbox_email"></input><span
> class="attribute">email</span><input type="text" name="email"></
> input></td>
> <td><input type="checkbox" name="cbox_js_active"></input><span
> class="attribute">js_active</span><input type="text"
> name="js_active"></input></td>
> <td><input type="checkbox" name="cbox_ip"></input><span
> class="attribute">ip</span><input type="text" name="ip"></input></td>
>
> <td><input type="checkbox" name="cbox_created_at"></input><span
> class="attribute">created_at</span><input type="text"
> name="created_at"></input></td></form></tr></table></div></body>
>
> thanks for your help, ke han
>
>
>>
>>> When looking at the html output by ymnesia, I see the following:
>>> <form action="table.yaws" method="post" name="my_table_name">
>>>
>>> so where is this table.yaws file?
>> It is nowhere since it is taken care of by the ymnesia appmod itself.
>>> From the code:
>> ------
>> out(A) ->
>> case string:tokens(A#arg.appmoddata, "/.") of
>>
>> ["table" | _] ->
>> .....
>> ------
>> So, it works for me. Has anyone else tried it ?
>>
>> Cheers, Tobbe
>>
>> I would expect to at least get an
>>> error from yaws since table.yaws does not exist in my docroot. No
>>> error when I press enter from one of the input fields on the form.
>>> So it looks as if its two problems: no table.yaws and the form
>>> doesn't seem to be executing the submit action.
>>> I have just tested this under Firefox 1.5.07 on OS X and Windows XP.
>>> There is no HTTP request generated when I press enter in any of the
>>> input fields.
>>>
>>> thanks, ke han
>>>
>>> On Sep 6, 2006, at 7:25 PM, Torbjorn Tornkvist wrote:
>>>
>>>> I have added a (IMHO) very useful appmod to the Yaws CVS.
>>>>
>>>> ymnesia.erl makes it easy to browse and search in your
>>>> Mnesia tables.
>>>>
>>>> To set it up, add it as an appmod:
>>>>
>>>> appmods = [{"showdb", ymnesia}],
>>>>
>>>> Then point your borwser to:
>>>>
>>>> http://<host>/showdb/
>>>>
>>>> You will see a table with all your Mnesia tables
>>>> and their fields. You can now perform searches
>>>> and view only certain fields if you so whish.
>>>>
>>>> Cheers, Tobbe
>>>>
>>>>
>>>> --------------------------------------------------------------------
>>>> --
>>>> ---
>>>> Using Tomcat but need to do more? Need to support web services,
>>>> security?
>>>> Get stuff done quickly with pre-integrated technology to make your
>>>> job easier
>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>>>> Geronimo
>>>> http://sel.as-us.falkag.net/sel?
>>>> cmd=lnk&kid=120709&bid=263057&dat=121642
>>>> _______________________________________________
>>>> Erlyaws-list mailing list
>>>> Erlyaws-list@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>>>
>>> ---------------------------------------------------------------------
>>> ----
>>> Take Surveys. Earn Cash. Influence the Future of IT
>>> Join SourceForge.net's Techsay panel and you'll get the chance to
>>> share your
>>> opinions on IT & business topics through brief surveys -- and earn
>>> cash
>>> http://www.techsay.com/default.php?
>>> page=join.php&p=sourceforge&CID=DEVDEV
>>
>> ----------------------------------------------------------------------
>> ---
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to
>> share your
>> opinions on IT & business topics through brief surveys -- and earn
>> cash
>> http://www.techsay.com/default.php?
>> page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Erlyaws-list mailing list
>> Erlyaws-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
View user's profile Send private message Send e-mail Visit poster's website

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum