Ignore:
Timestamp:
06/05/19 20:20:19 (5 years ago)
Author:
nanardon
Message:

Allow to set in config monitored attributes

Location:
trunk/LATMOS-Accounts/lib/LATMOS
Files:
2 edited

Legend:

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

    r2243 r2260  
    156156        map { $_ => ($self->val('_defattr_', $_)) } 
    157157        $self->Parameters('_defattr_'); 
     158 
     159    $params{monitored} = {}; 
     160    foreach my $item ($self->val($section, 'monitored')) { 
     161        $params{monitored}{lc($item)} = 1; 
     162    } 
    158163 
    159164    my $base = LATMOS::Accounts::Bases->new( 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Attributes.pm

    r2175 r2260  
    3737        $attributes->{_name} = $attributes->{name}; 
    3838        $attributes->{_otype} = $otype; 
     39        $attributes->{monitored} ||= $base->config('monitored')->{ lc( $otype . '.' . $attributes->{name} ) }; 
     40 
    3941        return bless($attributes, $class); 
    4042    } else { 
     
    4547        $attr_info->{_name} = $attributes; 
    4648        $attr_info->{_otype} = $otype; 
     49        $attr_info->{monitored} ||= $base->config('monitored')->{ lc( $otype . '.' . $attributes ) }; 
    4750 
    4851        return bless($attr_info, $class); 
Note: See TracChangeset for help on using the changeset viewer.