Changeset 331 for trunk/ddt


Ignore:
Timestamp:
Aug 28, 2018, 12:32:00 PM (6 years ago)
Author:
g7moreau
Message:
  • Add Category in domainset show
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ddt/ddt

    r330 r331  
    21602160     {align  => 'left',   align_title => 'left',   title => 'Date'},
    21612161     {align  => 'left',   align_title => 'left',   title => 'Comment'},
     2162     {align  => 'left',   align_title => 'left',   title => 'Category'},
    21622163     );
    21632164
    21642165   LOOP_ON_DOMAIN:
    2165    for my $domainset_current (keys %{$computer_db}) {
     2166   for my $domainset_current (sort keys %{$computer_db}) {
    21662167      next if $domainset_current eq 'dset';
    21672168      next if $domainset_current eq 'pool';
     
    21772178      my $date = sprintf '%04i-%02i-%02i', $year, $mon, $mday;
    21782179
     2180      my $category;
    21792181      my $comment = $computer_db->{'dset'}{$domainset_current}{'comment'};
    21802182      $comment =~ s/^\d\d\d\d-\d\d-\d\d\s//;
    2181          
     2183      $comment =~ s/\s+(\(\w+\))$// and $category = $1;
     2184
    21822185      $tb_computer->add($domainset_current,
    21832186         $computer_db->{'dset'}{$domainset_current}{'dns_extension'},
    21842187         $date,
    21852188         $comment,
     2189         $category,
    21862190         );
    21872191      }
Note: See TracChangeset for help on using the changeset viewer.