StatsReports plugins : error in javascript

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

StatsReports plugins : error in javascript

Bruno Friedmann-2
When we try to get the result there's an error coming from javascript

Updating GUI for plugin StatsReports
Error: An error occured in Plugins StatsReports
Error: Message:

ReferenceError:
toggleGeneratedResult is not defined

in file:
http://mycw/statsReports/js/statsReports.js

on line:
34


toggleGeneratedResult('hide');


Did someone has already a working installation ?



--

     Bruno Friedmann

_______________________________________________
Cartoweb-users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/cartoweb-users
Reply | Threaded
Open this post in threaded view
|

Re: StatsReports plugins : error in javascript

Oliver Christen
Hi Bruno

indeed, I just had the same error a moment ago as im also installing that
plugin in a new project

it seems that plugin has not been used much since it was added...

there is a missing javascript function and also some missing template
elements.

here is the missing function:

function toggleGeneratedResult(action) {
    if (action == 'show') {
        $('generated_result').innerHTML = '';
        $('generated_result').show();
    } else {
        $('generated_result').hide();
    }
}

and the missing template elements (to put into the cartoclient.tpl):

<div id="generated_result" name="generated_result" style="display:
none"></div>
and
<div id="statscvslink"></div>

I will complet the documentation and add the missing elements into cvs after
a few tests

regards
Oliver

----- Original Message -----
From: "Bruno Friedmann" <[hidden email]>
To: <[hidden email]>
Sent: Monday, May 18, 2009 11:42 AM
Subject: [Cartoweb-users] StatsReports plugins : error in javascript


> When we try to get the result there's an error coming from javascript
>
> Updating GUI for plugin StatsReports
> Error: An error occured in Plugins StatsReports
> Error: Message:
>
> ReferenceError:
> toggleGeneratedResult is not defined
>
> in file:
> http://mycw/statsReports/js/statsReports.js
>
> on line:
> 34
>
>
> toggleGeneratedResult('hide');
>
>
> Did someone has already a working installation ?
>
>
>
> --
>
>     Bruno Friedmann
>
> _______________________________________________
> Cartoweb-users mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>

_______________________________________________
Cartoweb-users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/cartoweb-users
Reply | Threaded
Open this post in threaded view
|

Re: StatsReports plugins : error in javascript

Bruno Friedmann-2
Thank you Oliver.

I've also seen that this plugin doesn't support the traditionnale {if}statsReports|default ...
to activate css/js div only if the plugin is active.

I should hack it but if you goes to a review, I prefer let you done this.


Oliver Christen wrote:

> Hi Bruno
>
> indeed, I just had the same error a moment ago as im also installing
> that plugin in a new project
>
> it seems that plugin has not been used much since it was added...
>
> there is a missing javascript function and also some missing template
> elements.
>
> here is the missing function:
>
> function toggleGeneratedResult(action) {
>    if (action == 'show') {
>        $('generated_result').innerHTML = '';
>        $('generated_result').show();
>    } else {
>        $('generated_result').hide();
>    }
> }
>
> and the missing template elements (to put into the cartoclient.tpl):
>
> <div id="generated_result" name="generated_result" style="display:
> none"></div>
> and
> <div id="statscvslink"></div>
>
> I will complet the documentation and add the missing elements into cvs
> after a few tests
>
> regards
> Oliver
>
> ----- Original Message ----- From: "Bruno Friedmann" <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, May 18, 2009 11:42 AM
> Subject: [Cartoweb-users] StatsReports plugins : error in javascript
>
>
>> When we try to get the result there's an error coming from javascript
>>
>> Updating GUI for plugin StatsReports
>> Error: An error occured in Plugins StatsReports
>> Error: Message:
>>
>> ReferenceError:
>> toggleGeneratedResult is not defined
>>
>> in file:
>> http://mycw/statsReports/js/statsReports.js
>>
>> on line:
>> 34
>>
>>
>> toggleGeneratedResult('hide');
>>
>>
>> Did someone has already a working installation ?
>>
>>
>>
>> --
>>
>>     Bruno Friedmann
>>
>> _______________________________________________
>> Cartoweb-users mailing list
>> [hidden email]
>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>
>


--

     Bruno Friedmann

Ioda-Net Sàrl
  2830 Vellerat - Switzerland

  Tél : ++41 32 435 7171
  Fax : ++41 32 435 7172
  gsm : ++41 78 802 6760
  www.ioda-net.ch

 Centre de Formation et de Coaching En Ligne
 www.cfcel.com
_______________________________________________
Cartoweb-users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/cartoweb-users
Reply | Threaded
Open this post in threaded view
|

Re: StatsReports plugins : error in javascript

Oliver Christen
I commited into cvs the missing js and template header elements and also
completed the documentation. the elements in the body of the template still
need to be added by hand, but thats explained in the doc.

regards
Oliver


> Thank you Oliver.
>
> I've also seen that this plugin doesn't support the traditionnale
> {if}statsReports|default ...
> to activate css/js div only if the plugin is active.
>
> I should hack it but if you goes to a review, I prefer let you done this.
>
>
> Oliver Christen wrote:
>> Hi Bruno
>>
>> indeed, I just had the same error a moment ago as im also installing
>> that plugin in a new project
>>
>> it seems that plugin has not been used much since it was added...
>>
>> there is a missing javascript function and also some missing template
>> elements.
>>
>> here is the missing function:
>>
>> function toggleGeneratedResult(action) {
>>    if (action == 'show') {
>>        $('generated_result').innerHTML = '';
>>        $('generated_result').show();
>>    } else {
>>        $('generated_result').hide();
>>    }
>> }
>>
>> and the missing template elements (to put into the cartoclient.tpl):
>>
>> <div id="generated_result" name="generated_result" style="display:
>> none"></div>
>> and
>> <div id="statscvslink"></div>
>>
>> I will complet the documentation and add the missing elements into cvs
>> after a few tests
>>
>> regards
>> Oliver
>>
>> ----- Original Message ----- From: "Bruno Friedmann" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Monday, May 18, 2009 11:42 AM
>> Subject: [Cartoweb-users] StatsReports plugins : error in javascript
>>
>>
>>> When we try to get the result there's an error coming from javascript
>>>
>>> Updating GUI for plugin StatsReports
>>> Error: An error occured in Plugins StatsReports
>>> Error: Message:
>>>
>>> ReferenceError:
>>> toggleGeneratedResult is not defined
>>>
>>> in file:
>>> http://mycw/statsReports/js/statsReports.js
>>>
>>> on line:
>>> 34
>>>
>>>
>>> toggleGeneratedResult('hide');
>>>
>>>
>>> Did someone has already a working installation ?
>>>
>>>
>>>
>>> --
>>>
>>>     Bruno Friedmann
>>>
>>> _______________________________________________
>>> Cartoweb-users mailing list
>>> [hidden email]
>>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>>
>>
>
>
> --
>
>     Bruno Friedmann
>
> Ioda-Net Sàrl
>  2830 Vellerat - Switzerland
>
>  Tél : ++41 32 435 7171
>  Fax : ++41 32 435 7172
>  gsm : ++41 78 802 6760
>  www.ioda-net.ch
>
> Centre de Formation et de Coaching En Ligne
> www.cfcel.com
> _______________________________________________
> Cartoweb-users mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>

_______________________________________________
Cartoweb-users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/cartoweb-users
Reply | Threaded
Open this post in threaded view
|

Re: StatsReports plugins : error in javascript

Bruno Friedmann-2
Thank you Oliver, I will give it a try in some days.

As I'm reading, and understanding how it works, a question has emerged.

Do you think it would be a good idea to store all accounting inside a dedicated db
with one table for each project doing accounting.
I've a simple storage engine as file doing this (or as the db stats are made)
use the stats scripts against this db to populate the different project.

and after that, build a special project dedicated to have the reports
choosing them project by project ?



Oliver Christen wrote:

> I commited into cvs the missing js and template header elements and also
> completed the documentation. the elements in the body of the template
> still need to be added by hand, but thats explained in the doc.
>
> regards
> Oliver
>
>
>> Thank you Oliver.
>>
>> I've also seen that this plugin doesn't support the traditionnale
>> {if}statsReports|default ...
>> to activate css/js div only if the plugin is active.
>>
>> I should hack it but if you goes to a review, I prefer let you done this.
>>
>>
>> Oliver Christen wrote:
>>> Hi Bruno
>>>
>>> indeed, I just had the same error a moment ago as im also installing
>>> that plugin in a new project
>>>
>>> it seems that plugin has not been used much since it was added...
>>>
>>> there is a missing javascript function and also some missing template
>>> elements.
>>>
>>> here is the missing function:
>>>
>>> function toggleGeneratedResult(action) {
>>>    if (action == 'show') {
>>>        $('generated_result').innerHTML = '';
>>>        $('generated_result').show();
>>>    } else {
>>>        $('generated_result').hide();
>>>    }
>>> }
>>>
>>> and the missing template elements (to put into the cartoclient.tpl):
>>>
>>> <div id="generated_result" name="generated_result" style="display:
>>> none"></div>
>>> and
>>> <div id="statscvslink"></div>
>>>
>>> I will complet the documentation and add the missing elements into cvs
>>> after a few tests
>>>
>>> regards
>>> Oliver
>>>
>>> ----- Original Message ----- From: "Bruno Friedmann" <[hidden email]>
>>> To: <[hidden email]>
>>> Sent: Monday, May 18, 2009 11:42 AM
>>> Subject: [Cartoweb-users] StatsReports plugins : error in javascript
>>>
>>>
>>>> When we try to get the result there's an error coming from javascript
>>>>
>>>> Updating GUI for plugin StatsReports
>>>> Error: An error occured in Plugins StatsReports
>>>> Error: Message:
>>>>
>>>> ReferenceError:
>>>> toggleGeneratedResult is not defined
>>>>
>>>> in file:
>>>> http://mycw/statsReports/js/statsReports.js
>>>>
>>>> on line:
>>>> 34
>>>>
>>>>
>>>> toggleGeneratedResult('hide');
>>>>
>>>>
>>>> Did someone has already a working installation ?
>>>>
>>>>
>>>>


--

     Bruno Friedmann


_______________________________________________
Cartoweb-users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/cartoweb-users
Reply | Threaded
Open this post in threaded view
|

Re: StatsReports plugins : error in javascript

Oliver Christen
Hi Bruno

I would advice you to NOT use database storage for accounting, because there
is at the moment no simple way to use the logs in db directly with the
statsReport plugin (direct db usage was simply not implemented as nobody
paid for it)
you certainly can use it but you will need to make your own "DB to text
file" export script to be able to use the logs

the logs contain the project info, so once the logs are imported using the
java's commands explained in the documentation and the reports configured
and initiated (also using the java's commands explained in the
documentation ), the list of projects are listed as a dropdown option in the
report visualisation interface in cartoweb.

if you only want to allow the user to see the stats for one projects, you
can certainly do so by extending a bit the way the projects dropdown option
is populated, using the auth plugin.

but you can also differenciate the logs before import and use a different
table namespace (using --tableName when importing) , but then you will need
to set up as many cartoweb project as you have of different logs to
visualize, as the database access dsn will be different (the statsReport
only accept one dsn at the moment, but then you can always modify the plugin
to suit your needs). in my opinion this would be more work than the first
option.

I hope i wasnt too confusing

regards
Oliver

> Thank you Oliver, I will give it a try in some days.
>
> As I'm reading, and understanding how it works, a question has emerged.
>
> Do you think it would be a good idea to store all accounting inside a
> dedicated db
> with one table for each project doing accounting.
> I've a simple storage engine as file doing this (or as the db stats are
> made)
> use the stats scripts against this db to populate the different project.
>
> and after that, build a special project dedicated to have the reports
> choosing them project by project ?
>
>
>
> Oliver Christen wrote:
>> I commited into cvs the missing js and template header elements and also
>> completed the documentation. the elements in the body of the template
>> still need to be added by hand, but thats explained in the doc.
>>
>> regards
>> Oliver
>>
>>
>>> Thank you Oliver.
>>>
>>> I've also seen that this plugin doesn't support the traditionnale
>>> {if}statsReports|default ...
>>> to activate css/js div only if the plugin is active.
>>>
>>> I should hack it but if you goes to a review, I prefer let you done
>>> this.
>>>
>>>
>>> Oliver Christen wrote:
>>>> Hi Bruno
>>>>
>>>> indeed, I just had the same error a moment ago as im also installing
>>>> that plugin in a new project
>>>>
>>>> it seems that plugin has not been used much since it was added...
>>>>
>>>> there is a missing javascript function and also some missing template
>>>> elements.
>>>>
>>>> here is the missing function:
>>>>
>>>> function toggleGeneratedResult(action) {
>>>>    if (action == 'show') {
>>>>        $('generated_result').innerHTML = '';
>>>>        $('generated_result').show();
>>>>    } else {
>>>>        $('generated_result').hide();
>>>>    }
>>>> }
>>>>
>>>> and the missing template elements (to put into the cartoclient.tpl):
>>>>
>>>> <div id="generated_result" name="generated_result" style="display:
>>>> none"></div>
>>>> and
>>>> <div id="statscvslink"></div>
>>>>
>>>> I will complet the documentation and add the missing elements into cvs
>>>> after a few tests
>>>>
>>>> regards
>>>> Oliver
>>>>
>>>> ----- Original Message ----- From: "Bruno Friedmann"
>>>> <[hidden email]>
>>>> To: <[hidden email]>
>>>> Sent: Monday, May 18, 2009 11:42 AM
>>>> Subject: [Cartoweb-users] StatsReports plugins : error in javascript
>>>>
>>>>
>>>>> When we try to get the result there's an error coming from javascript
>>>>>
>>>>> Updating GUI for plugin StatsReports
>>>>> Error: An error occured in Plugins StatsReports
>>>>> Error: Message:
>>>>>
>>>>> ReferenceError:
>>>>> toggleGeneratedResult is not defined
>>>>>
>>>>> in file:
>>>>> http://mycw/statsReports/js/statsReports.js
>>>>>
>>>>> on line:
>>>>> 34
>>>>>
>>>>>
>>>>> toggleGeneratedResult('hide');
>>>>>
>>>>>
>>>>> Did someone has already a working installation ?
>>>>>
>>>>>
>>>>>
>
>
> --
>
>     Bruno Friedmann
>
>
>

_______________________________________________
Cartoweb-users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/cartoweb-users