table.php
6 years ago
table_map_no_dimension.php
6 years ago
table_no_data.php
6 years ago
table_no_dimension.php
6 years ago
table_map_no_dimension.php
39 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Matomo - free/libre analytics platform |
| 4 | * |
| 5 | * @link https://matomo.org |
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 7 | * @package matomo |
| 8 | */ |
| 9 | |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | exit; // if accessed directly |
| 12 | } |
| 13 | |
| 14 | /** @var array $report */ |
| 15 | /** @var array $report_meta */ |
| 16 | /** @var string $first_metric_name */ |
| 17 | ?> |
| 18 | <div class="table"> |
| 19 | <table class="widefat matomo-table"> |
| 20 | |
| 21 | <tbody> |
| 22 | <?php |
| 23 | $matomo_report_metadata = $report['reportMetadata']; |
| 24 | $matomo_tables = $report['reportData']->getDataTables(); |
| 25 | foreach (array_reverse($matomo_tables) as $matomo_report_date => $matomo_report_table ) { |
| 26 | /** @var \Piwik\DataTable\Simple $matomo_report_table */ |
| 27 | echo '<tr><td width="75%">' . esc_html( $matomo_report_date ) . '</td><td width="25%">'; |
| 28 | if ($matomo_report_table->getFirstRow()) { |
| 29 | echo esc_html( $matomo_report_table->getFirstRow()->getColumn( $first_metric_name ) ); |
| 30 | } else { |
| 31 | echo '-'; |
| 32 | } |
| 33 | echo '</td></tr>'; |
| 34 | } |
| 35 | ?> |
| 36 | </tbody> |
| 37 | </table> |
| 38 | </div> |
| 39 |