NAME
Kernel::System::Stats::Utils – statistic Utils backend.
DESCRIPTION
The Utils backend for statistics.
PUBLIC INTERFACE
ValidateStatisticConfiguration()
Validates the configuration of a given statistic.
my $StatisticConfigurationCheck = $StatisticUtilsObject->ValidateStatisticConfiguration(
StatisticID => 123,
);
Returns a hash indicating if the statistic configuration is valid or not.
my %Result = (
Valid => 1|0,
ErrorCode => '',
);
GetStatisticConfiguredExecutionParams()
Get the user configuration for the given statistic.
my $StatisticUserConfiguration = $StatisticUtilsObject->GetStatisticConfiguredExecutionParams(
StatisticID => 123,
ConfiguredExecutionParams => $UserConfigHashRef,
Preview => 1,
);
Returns a hash containing the whole statistic configuration which is needed to execute the statistic. In former times, this was StatsParamsGet
.
ValidateStatisticConfiguredExecutionParams()
Validates the user configuration for the given statistic.
my $StatisticUserConfigurationCheck = $StatisticUtilsObject->ValidateStatisticConfiguredExecutionParams(
StatisticType => 'dynamic',
ConfiguredExecutionParams => $ConfigHashRef, # result of C<GetStatisticConfiguredExecutionParams()>
Preview => 1, # optional
);
Returns a hash indicating if the statistic user configuration is valid or not.
my %Result = (
Valid => 1|0,
Errors => $ErrorArrayRef,
);
TimeScale()
Holds the current time scale list and provides a special list, for the y-axis time field.
my $TimeScale = $StatisticUtilsObject->TimeScale(
SelectedXAxisValue => 'Day', # optional
);
Returns the current time scale list.
my $TimeScale = [
{
id => 'Second',
label => Translatable('second(s)'),
},
{
id => 'Minute',
label => Translatable('minute(s)'),
},
{
id => 'Hour',
label => Translatable('hour(s)'),
},
{
id => 'Day',
label => Translatable('day(s)'),
},
{
id => 'Week',
label => Translatable('week(s)'),
},
{
id => 'Month',
label => Translatable('month(s)'),
},
{
id => 'Quarter',
label => Translatable('quarter(s)'),
},
{
id => 'HalfYear',
label => Translatable('half-year(s)'),
},
{
id => 'Year',
label => Translatable('year(s)'),
},
],
GetObjectNames()
Returns the object names of the statistics (or a specified object type).
my $ObjectNames = $StatisticUtilsObject->GetObjectNames(
UserID => 123,
ObjectType => 'DynamicMatrix', # optional, possible values: DynamicMatrix, DynamicList, Static
);
Returns
{
DynamicMatrix => {
'Kernel::System::Stats::Dynamic::TicketAccountedTime' => 'TicketAccountedTime',
'Kernel::System::Stats::Dynamic::Ticket' => 'TicketAccumulation',
'Kernel::System::Stats::Dynamic::TicketSolutionResponseTime' => 'TicketSolutionResponseTime',
},
DynamicList => {
'Kernel::System::Stats::Dynamic::TicketList' => 'Ticketlist',
},
Static => {
'Kernel::System::Stats::Static::FAQAccess' => 'FAQAccess',
},
}
PRIVATE INTERFACE
_TimeScaleYAxis()
Holds the current time scale value for the y-axis for the given x-axis value.
_TimeScaleYAxisOnXAxis()
Holds the current time scale values for the y axis what is shown on the x-axis.