Files
redash/client/app/components/dynamic-table/dynamic-table.html
Gabriel Dutra cfe12c5a5d Add DB Seed to Cypress and setup Percy (#3155)
* Update Cypress element selectors

* Add seed data function to Cypress

* Change Cypress setup to be part of db-seed

* Add DatabaseSource selector to Create Data Source spec

* Add getElement command to Cypress

* Fix eslint issues

* Change Cypress getElement to getByTestId

* Add Percy and test it with the CI

* Change Percy dependency for CI to Cypress' Dockerfile

* Change Percy's execution to the docker container
- add --no-save to avoid errors on Dockerfile.cypress
 - pass PERCY_TOKEN from the CI to docker container

* Fix missed char on CircleCI config file

* Move Percy execution back to host on the CI

* Test adding PERCY_TOKEN to frontend-e2e-tests on CI config

* Undo add PERCY_TOKEN to config.yml

* Add Percy token and .git folder to Cypress

* Remove Percy install from config.yml

* Ignore .git folder again and use Percy env vars instead

* Update PERCY_PULL_REQUEST to be CIRCLE_PR_NUMBER

* Update cypress-server.js to handle other cypress commands
- cypress-server.js -> cypress.js
- new commands added to cypress.js
- CircleCI config updated accordingly
- added a Homepage screenshot

* Remove trailing spaces

* Add Create Query spec

* Disable Cypress videos

* Update run browser to Chrome

* Add missing --browser chrome
2018-12-10 22:29:36 +02:00

47 lines
1.9 KiB
HTML

<div class="dynamic-table-container">
<table class="table table-condensed table-hover" data-test="DynamicTable">
<thead>
<tr>
<th ng-repeat="column in $ctrl.columns" ng-click="$ctrl.onColumnHeaderClick($event, column)"
class="sortable-column" ng-class="'content-align-' + column.alignContent + ' display-as-' + column.displayAs">
<span ng-if="($ctrl.orderBy.length > 1) && ($ctrl.orderByColumnsIndex[column.name] > 0)"
class="sort-order-indicator">{{ $ctrl.orderByColumnsIndex[column.name] }}</span>
<span>{{column.title}}</span>
<i ng-if="$ctrl.orderByColumnsIndex[column.name] > 0"
ng-class="{
'fa': true,
'fa-caret-down': $ctrl.orderByColumnsDirection[column.name] > 0,
'fa-caret-up': $ctrl.orderByColumnsDirection[column.name] < 0
}"></i>
</th>
<th class="dynamic-table-spacer"></th>
</tr>
</thead>
<thead ng-if="$ctrl.searchColumns.length > 0">
<th class="p-t-10 p-b-10 p-l-15 p-r-15" colspan="{{ $ctrl.columns.length + 1 }}">
<input type="text" class="form-control" placeholder="Search..."
ng-model="$ctrl.searchTerm" ng-model-options="{ allowInvalid: true, debounce: 200 }"
ng-change="$ctrl.onSearchTermChanged()">
</th>
</thead>
<tbody>
<tr ng-repeat="row in $ctrl.rowsToDisplay"
dynamic-table-row columns="$ctrl.columns" row="row"
render="$ctrl.renderSingleRow"
></tr>
</tbody>
</table>
</div>
<div class="paginator-container" ng-if="$ctrl.preparedRows.length > $ctrl.itemsPerPage">
<ul uib-pagination total-items="$ctrl.preparedRows.length"
items-per-page="$ctrl.itemsPerPage"
ng-model="$ctrl.currentPage"
max-size="6"
class="pagination"
boundary-link-numbers="true"
rotate="false"
next-text='&#8594;'
previous-text='&#8592;'
ng-change="$ctrl.onPageChanged()"></ul>
</div>