Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Sep 17, 2024
1 parent 239dd71 commit a2fd03b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
11 changes: 9 additions & 2 deletions library/Reporting/Web/Forms/ReportForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

use Icinga\Authentication\Auth;
use Icinga\Module\Reporting\Database;
use Icinga\Module\Reporting\Model\Timeframe;
use Icinga\Module\Reporting\ProvidedReports;
use ipl\Html\Form;
use ipl\Html\HtmlDocument;
use ipl\Stdlib\Filter;
use ipl\Validator\CallbackValidator;
use ipl\Web\Compat\CompatForm;

Expand Down Expand Up @@ -148,8 +150,13 @@ protected function assemble()
$values = $this->getValues();

if (isset($values['reportlet'])) {
$config = new Form();
// $config->populate($this->getValues());
$config = (new Form())
->populate([
'timeframe_instance' => Timeframe::on(Database::get())
->columns(['start', 'end'])
->filter(Filter::equal('id', $values['timeframe']))
->first()
]);

/** @var \Icinga\Module\Reporting\Hook\ReportHook $reportlet */
$reportlet = new $values['reportlet']();
Expand Down
26 changes: 26 additions & 0 deletions public/css/module.less
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,29 @@ form.icinga-form {
}

/* Form fallback styles end */

.sla-chart-table {
width: 100%;

thead .legend {
display: flex;
justify-content: center;
gap: 5em;

span {
display: flex;
align-items: center;
gap: 1em;
}
}

tbody > tr > td {
display: flex;
flex-wrap: wrap;

.sla-chart-wrapper {
display: block;
width: 100%;
}
}
}

0 comments on commit a2fd03b

Please sign in to comment.