<table ng-if="rows" class="table agg-table-group" ng-repeat="table in rows">
  <thead>
    <tr>
      <th ng-if="table.tables" scope="col">
        <span class="agg-table-group-header">{{ table.title }}</span>
      </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <kbn-agg-table-group
          ng-if="table.tables"
          group="table"
          per-page="perPage"
          sort="sort"
          show-total="showTotal"
          total-func="totalFunc"></kbn-agg-table-group>
        <kbn-agg-table
          ng-if="table.rows"
          table="table"
          export-title="exportTitle"
          per-page="perPage"
          sort="sort"
          show-total="showTotal"
          total-func="totalFunc">
        </kbn-agg-table>
      </td>
    </tr>
  </tbody>
</table>

<table ng-if="columns" class="table agg-table-group">
  <thead>
    <tr>
      <th ng-repeat="table in columns" ng-if="table.tables" scope="col">
        <span class="agg-table-group-header">{{ table.title }}</span>
      </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td ng-repeat="table in columns">
        <kbn-agg-table-group
          ng-if="table.tables"
          group="table"
          per-page="perPage"
          sort="sort"
          show-total="showTotal"
          total-func="totalFunc"></kbn-agg-table-group>
        <kbn-agg-table
          ng-if="table.rows"
          table="table"
          export-title="exportTitle"
          per-page="perPage"
          sort="sort"
          show-total="showTotal"
          total-func="totalFunc">
        </kbn-agg-table>
      </td>
    </tr>
  </tbody>
</table>
