<commit_before># --
# Kernel/Modules/AdminPerformanceLog.pm - provides a log view for admins
# Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
# --
# $Id: AdminPerformanceLog.pm,v 1.18 2010-05-05 10:25:50 mg Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

package Kernel::Modules::AdminPerformanceLog;

use strict;
use warnings;

use vars qw($VERSION);
$VERSION = qw($Revision: 1.18 $) [1];

sub new {
    my ( $Type, %Param ) = @_;

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

    # check needed objects
    for (qw(ParamObject LayoutObject LogObject ConfigObject)) {
        if ( !$Self->{$_} ) {
            $Self->{LayoutObject}->FatalError( Message => "Got no $_!" );
        }
    }

    return $Self;
}

sub Run {
    my ( $Self, %Param ) = @_;

    # performance log is enabled
    if ( $Self->{ConfigObject}->Get('PerformanceLog') ) {
        $Self->{LayoutObject}->Block(
            Name => 'Enabled',
            Data => { %Param, },
        );
    }

    # performance log is disabled
    else {
        $Self->{LayoutObject}->Block(
            Name => 'Disabled',
            Data => { %Param, },
        );
    }

    # reset log file
    if ( $Self->{Subaction} eq 'Reset' ) {
        if ( !$Self->_DatabaseReset() ) {
            $Self->{LayoutObject}->FatalError();
        }
        else {

            # redirect
            return $Self->{LayoutObject}->Redirect( OP => "Action=$Self->{Action}", );<commit_msg>Change for display gradient if feature is disable<commit_after># --
# Kernel/Modules/AdminPerformanceLog.pm - provides a log view for admins
# Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
# --
# $Id: AdminPerformanceLog.pm,v 1.19 2010-05-12 17:18:33 mp Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

package Kernel::Modules::AdminPerformanceLog;

use strict;
use warnings;

use vars qw($VERSION);
$VERSION = qw($Revision: 1.19 $) [1];

sub new {
    my ( $Type, %Param ) = @_;

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

    # check needed objects
    for (qw(ParamObject LayoutObject LogObject ConfigObject)) {
        if ( !$Self->{$_} ) {
            $Self->{LayoutObject}->FatalError( Message => "Got no $_!" );
        }
    }

    return $Self;
}

sub Run {
    my ( $Self, %Param ) = @_;

    # performance log is enabled
    if ( $Self->{ConfigObject}->Get('PerformanceLog') ) {
        $Self->{LayoutObject}->Block(
            Name => 'Enabled',
            Data => { %Param, },
        );
    }

    # performance log is disabled
    else {
        $Self->{LayoutObject}->Block(
            Name => 'Disabled',
            Data => { %Param, },
        );
        $Self->{LayoutObject}->Block(
            Name => 'OverviewDisabled',
        );
    }

    # reset log file
    if ( $Self->{Subaction} eq 'Reset' ) {
        if ( !$Self->_DatabaseReset() ) {
            $Self->{LayoutObject}->FatalError();
        }
        else {

            # redirect
            return $Self->{LayoutObject}->Redirect( OP => "Action=$Self->{Action}", );
{'fraction_non_alphanumeric': 0.15942873797726612, 'fraction_numerical': 0.016904692509472456, 'mean_word_length': 2.2842105263157895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 50, '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': '4652852', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1066, 'n_words': 280}