Changeset 1933 for trunk


Ignore:
Timestamp:
01/17/17 13:27:52 (7 years ago)
Author:
nanardon
Message:

Add documentation about statistics

Location:
trunk/LATMOS-Accounts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Stat.pm

    r1902 r1933  
    3232    $class->SUPER::_get_attr_schema($base, 
    3333        { 
    34             name   => { ro => 1, inline => 1, }, 
    3534            cn     => { ro => 1, inline => 1, iname => 'name' }, 
    36             date   => { ro => 1, inline => 1, }, 
    37             create => { ro => 1, inline => 1, }, 
     35            description => { }, 
     36            otype  => { }, 
    3837            filter => { multiple => 1 }, 
     38            attribute => { }, 
    3939            refFilter => { multiple => 1 }, 
    4040            refall => { }, 
    41             otype  => { }, 
    42             attribute => { }, 
    43             description => { }, 
    44             delay => { }, 
    45             lastStatId => { }, 
     41            nullValue => { }, 
    4642            aggregateFunction => { 
    4743                can_values => sub { qw(sum avg count) }, 
    4844            }, 
    49             nullValue => { }, 
    5045            display => { }, 
     46            delay => { }, 
     47            lastStatId => { }, 
    5148            needRun => { 
    5249                ro => 1, 
  • trunk/LATMOS-Accounts/man/man8/latmos-accounts-base-sql.pod

    r1884 r1933  
    259259The C<forward> attributes is automatically set with email address of selected 
    260260user, user w/o email address are ignored. 
     261 
     262=head2 Statistics 
     263 
     264The application provide some statitics tools but they are only based on the 
     265current data inside the database and are unable to track delete data. 
     266 
     267To keep some mesurement you must use C<stat> objects to describe the data you 
     268want to track, and enable in L<la-sync-manager.ini> the C<Stats> module. 
     269 
     270Each attribute of C<Stat> object describe how data must but compute before being 
     271stored. 
     272 
     273=head3 Stat object Attributes 
     274 
     275=head4 description 
     276 
     277A label about this statistics object 
     278 
     279=head4 display 
     280 
     281IF set the statistic appear in the menu of the web interface 
     282 
     283=head4 otype 
     284 
     285The object type this stat is tracking, must be a supported object type 
     286 
     287=head4 filter 
     288 
     289One or multiple filter to limit the objects taking into account 
     290 
     291=head4 attribute 
     292 
     293The attribute fetch to compute data 
     294 
     295=head4 refFilter 
     296 
     297When the attribute reference another type of object this setting allow to 
     298filter to the matching referenced object. 
     299 
     300=head4 refAll 
     301 
     302When the attribute reference another type of object non exiting objects in 
     303the results appear as 0, otherwise they are ignored. 
     304 
     305=head4 
     306 
     307=head4 aggregateFunction 
     308 
     309An optionnal operation to do on the data: 
     310 
     311=over 4 
     312 
     313=item sum 
     314 
     315Make the sum of the result per item 
     316 
     317=item avg 
     318 
     319Make the average of the result per item 
     320 
     321=item count 
     322 
     323Count the number of item return 
     324 
     325=back 
     326 
     327=head4 delay 
     328 
     329The number of day between two run 
     330 
Note: See TracChangeset for help on using the changeset viewer.