mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-25 02:47:39 +02:00
list/importrun: render stats
This commit is contained in:
parent
1b13d15070
commit
f300bdca89
@ -48,10 +48,10 @@ class Director_ListController extends ActionController
|
||||
{
|
||||
$this->setImportTabs()->activate('importrun');
|
||||
$this->view->title = $this->translate('Import runs');
|
||||
$this->view->stats = $this->db()->fetchImportStatistics();
|
||||
$this->view->table = $this->applyPaginationLimits(
|
||||
$this->loadTable('importrun')->setConnection($this->db())
|
||||
);
|
||||
$this->render('table');
|
||||
}
|
||||
|
||||
public function syncruleAction()
|
||||
|
38
application/views/scripts/list/importrun.phtml
Normal file
38
application/views/scripts/list/importrun.phtml
Normal file
@ -0,0 +1,38 @@
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<?php
|
||||
|
||||
$loc = localeconv();
|
||||
$pt = $loc['thousands_sep'];
|
||||
|
||||
?><h1><?= $this->escape($this->title) ?></h1>
|
||||
<table class="tinystats">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Rows</th>
|
||||
<th>Props</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Imported</th>
|
||||
<td><?= number_format($this->stats['imported_rows'], 0, null, $pt) ?></td>
|
||||
<td><?= number_format($this->stats['imported_properties'], 0, null, $pt) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Unique</th>
|
||||
<td><?= number_format($this->stats['unique_rows'], 0, null, $pt) ?></td>
|
||||
<td><?= number_format($this->stats['unique_properties'], 0, null, $pt) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<span data-base-target="_next">
|
||||
<?= $this->addLink ?>
|
||||
</span><br />
|
||||
<?= $this->table->getPaginator() ?>
|
||||
</div>
|
||||
|
||||
<div class="content" data-base-target="_next">
|
||||
<?= $this->table->render() ?>
|
||||
</div>
|
@ -85,6 +85,29 @@ p.error {
|
||||
}
|
||||
}
|
||||
|
||||
table.tinystats {
|
||||
font-size: 0.7em;
|
||||
float: right;
|
||||
width: 16em;
|
||||
|
||||
thead {
|
||||
th {
|
||||
width: 7em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th:first-child {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
th, td {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Simple table, test */
|
||||
|
||||
table.simple {
|
||||
|
Loading…
x
Reference in New Issue
Block a user