<div *ngIf="false">
    <h2 i18n="Application List Page Loading|A message to indicate that the application list data is still loading">
        Loading execution data
    </h2>
</div>
<div>
    <div class="header-bar">
        <h2 i18n="Heading|Application List">Applications</h2>
        <div class="search-and-create">
            <wu-search [(searchValue)]="searchText" (searchValueChange)="updateSearch()"></wu-search>
        </div>
    </div>

    <wu-all-data-filtered-message [dataFilteredOut]="filtering.dataFilteredOut" (clearFilter)="clearSearch()">
        <wu-table [items]="execution?.filterApplications"
                  (dataFilteredOut)="filtering.dataFilteredOut = $event"
                  [filter]="filtering.filterCallback"
                  [rowTemplate]="rowTemplate"
                  [tableHeaders]="[
                { title: 'Application', isSortable: true, sortBy: 'fileName' },
                { title: 'Tags', isSortable: false },
                { title: 'Points', isSortable: true, sortBy: sorting.getStoryPointsCallback }
            ]">
            <ng-template #rowTemplate let-item>
                <tr>
                    <td>
                        <a [routerLink]="['/projects', projectID, 'reports', execID, 'applications', item.id, 'application-index']">{{item.fileName}}</a>
                    </td>
                    <td>
                    <span *ngIf="tagsByApplication.get(item.id) == null">
                        Loading...
                    </span>
                        <span *ngIf="tagsByApplication.get(item.id) != null">
                        <wu-technology-tag *ngFor="let tag of tagsByApplication.get(item.id)" [tag]="tag"></wu-technology-tag>
                    </span>
                    </td>
                    <td>
                        {{pointsByApplication.get(item.id) != null ? pointsByApplication.get(item.id) : 'Loading...' }}
                    </td>
                </tr>
            </ng-template>
        </wu-table>
    </wu-all-data-filtered-message>
</div>
