Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions library/Icingadb/ProvidedHook/Reporting/SlaReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,15 @@ protected function yieldTimerange(Timerange $timerange, DateInterval $interval,
public function initConfigForm(Form $form)
{
$form->addElement('text', 'filter', [
'label' => t('Filter')
'description' => t('Filter for objects you want to create the report for'),
'label' => t('Filter')
]);

$form->addElement('select', 'breakdown', [
'label' => t('Breakdown'),
'options' => [
'description' => t('Choose breakdown to set the level of detail. '
. 'The shorter the breakdown, the higher the level of detail'),
'label' => t('Breakdown'),
'options' => [
'none' => t('None', 'SLA Report Breakdown'),
'day' => t('Day'),
'week' => t('Week'),
Expand All @@ -175,6 +178,8 @@ public function initConfigForm(Form $form)
]);

$form->addElement('number', 'threshold', [
'description' => t('Percentage of uptime your SLA guarantees. '
. 'SLA over the threshold will be colored in red'),
'label' => t('Threshold'),
'placeholder' => static::DEFAULT_THRESHOLD,
'step' => '0.01',
Expand All @@ -183,6 +188,7 @@ public function initConfigForm(Form $form)
]);

$form->addElement('number', 'sla_precision', [
'description' => t('The SLA precision'),
'label' => t('Amount Decimal Places'),
'placeholder' => static::DEFAULT_REPORT_PRECISION,
'min' => '1',
Expand Down