Skip to content

Commit

Permalink
Use modals for creating host/service reports
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab authored and nilmerg committed Aug 11, 2023
1 parent 7e9020a commit ee7fa6e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion library/Icingadb/ProvidedHook/CreateHostSlaReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ public function getActionsForObject(Host $host): array
return [
new Link(
$this->translate('Create Host SLA Report'),
Url::fromPath('reporting/reports/new')->addParams(['filter' => $filter, 'report' => 'host'])
Url::fromPath('reporting/reports/new')->addParams(['filter' => $filter, 'report' => 'host']),
[
'data-icinga-modal' => true,
'data-no-icinga-ajax' => true
]
)
];
}
Expand Down
6 changes: 5 additions & 1 deletion library/Icingadb/ProvidedHook/CreateHostsSlaReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ public function getHtmlForObjects(Query $hosts): ValidHtml
->addHTML(Html::tag('h2', $this->translate('Reporting')))
->addHtml(new Link(
$this->translate('Create Host SLA Report'),
Url::fromPath('reporting/reports/new')->addParams(['filter' => $filter, 'report' => 'host'])
Url::fromPath('reporting/reports/new')->addParams(['filter' => $filter, 'report' => 'host']),
[
'data-icinga-modal' => true,
'data-no-icinga-ajax' => true
]
));
}

Expand Down
6 changes: 5 additions & 1 deletion library/Icingadb/ProvidedHook/CreateServiceSlaReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ public function getActionsForObject(Service $service): array
return [
new Link(
$this->translate('Create Service SLA Report'),
Url::fromPath('reporting/reports/new')->addParams(['filter' => $filter, 'report' => 'service'])
Url::fromPath('reporting/reports/new')->addParams(['filter' => $filter, 'report' => 'service']),
[
'data-icinga-modal' => true,
'data-no-icinga-ajax' => true
]
)
];
}
Expand Down
6 changes: 5 additions & 1 deletion library/Icingadb/ProvidedHook/CreateServicesSlaReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ public function getHtmlForObjects(Query $services): ValidHtml
->addHTML(Html::tag('h2', $this->translate('Reporting')))
->addHtml(new Link(
$this->translate('Create Service SLA Report'),
Url::fromPath('reporting/reports/new')->addParams(['filter' => $filter, 'report' => 'service'])
Url::fromPath('reporting/reports/new')->addParams(['filter' => $filter, 'report' => 'service']),
[
'data-icinga-modal' => true,
'data-no-icinga-ajax' => true
]
));
}

Expand Down

0 comments on commit ee7fa6e

Please sign in to comment.