<commit_before># --
# Kernel/Modules/SystemStats.pm - show stats of otrs
# Copyright (C) 2001-2004 <NAME> <<EMAIL>>
# --
# $Id: SystemStats.pm,v 1.13 2004-08-03 13:07:52 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --

package Kernel::Modules::SystemStats;

use strict;

use vars qw($VERSION);
$VERSION = '$Revision: 1.13 $ ';
$VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;

# --
sub new {
    my $Type = shift;
    my %Param = @_;

    # allocate new hash for object
    my $Self = {};
    bless ($Self, $Type);

    # get common opjects
    foreach (keys %Param) {
        $Self->{$_} = $Param{$_};
    }

    # check all needed objects
    foreach (qw(ParamObject DBObject LayoutObject ConfigObject LogObject UserObject)) {
        die "Got no $_" if (!$Self->{$_});
    }

    return $Self;
}
# --
sub Run {
    my $Self = shift;
    my %Param = @_;
    if ($Self->{Subaction} eq '' || !$Self->{Subaction}) {
        # print page ...
        my $Output = $Self->{LayoutObject}->Header(Area => 'Stats',Title => 'Overview');
        my %LockedData = $Self->{TicketObject}->GetLockedCount(UserID => $Self->{UserID});
        $Output .= $Self->{LayoutObject}->NavigationBar(LockData => \%LockedData);

        my %Config = %{$Self->{ConfigObject}->Get('SystemStatsMap')};
        foreach my $Stats (sort keys %Config) {
          if (eval "require $Config{$Stats}->{Module}") {
            my $StatsModule = $Config{$Stats}->{Module}->new(
                DBObject => $Self->{DBObject},
                ConfigObject => $Self->{ConfigObject},
                LogObject => $Self->{LogObject},<commit_msg>updated NavigationBar()<commit_after># --
# Kernel/Modules/SystemStats.pm - show stats of otrs
# Copyright (C) 2001-2004 <NAME> <<EMAIL>>
# --
# $Id: SystemStats.pm,v 1.14 2004-09-20 19:22:41 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --

package Kernel::Modules::SystemStats;

use strict;

use vars qw($VERSION);
$VERSION = '$Revision: 1.14 $ ';
$VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;

# --
sub new {
    my $Type = shift;
    my %Param = @_;

    # allocate new hash for object
    my $Self = {};
    bless ($Self, $Type);

    # get common opjects
    foreach (keys %Param) {
        $Self->{$_} = $Param{$_};
    }

    # check all needed objects
    foreach (qw(ParamObject DBObject LayoutObject ConfigObject LogObject UserObject)) {
        die "Got no $_" if (!$Self->{$_});
    }

    return $Self;
}
# --
sub Run {
    my $Self = shift;
    my %Param = @_;
    if ($Self->{Subaction} eq '' || !$Self->{Subaction}) {
        # print page ...
        my $Output = $Self->{LayoutObject}->Header(Area => 'Stats', Title => 'Overview');
        $Output .= $Self->{LayoutObject}->NavigationBar();

        my %Config = %{$Self->{ConfigObject}->Get('SystemStatsMap')};
        foreach my $Stats (sort keys %Config) {
          if (eval "require $Config{$Stats}->{Module}") {
            my $StatsModule = $Config{$Stats}->{Module}->new(
                DBObject => $Self->{DBObject},
                ConfigObject => $Self->{ConfigObject},
                LogObject => $Self->{LogObject},
{'fraction_non_alphanumeric': 0.18459302325581395, 'fraction_numerical': 0.01686046511627907, 'mean_word_length': 2.6802139037433155, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 56, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '216642', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1123, 'n_words': 290}