2017-12-19 13:53:46 +01:00
|
|
|
import {Component, Input} from '@angular/core';
|
|
|
|
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
|
|
|
|
|
2018-02-15 11:36:12 +01:00
|
|
|
import {ErrorCodes} from '../../utils/properties/errorCodes';
|
2018-02-05 14:14:59 +01:00
|
|
|
import{EnvProperties} from '../../utils/properties/env-properties';
|
2017-12-19 13:53:46 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'datasourcesTab',
|
|
|
|
template: `
|
2018-06-08 13:21:42 +02:00
|
|
|
<errorMessages [status]="[fetchDataproviders.searchUtils.status]" [type]="'content providers'" tab_error_class=true></errorMessages>
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2018-06-11 01:25:33 +02:00
|
|
|
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.DONE">
|
2017-12-19 13:53:46 +01:00
|
|
|
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10">
|
|
|
|
<a [queryParams]="paramsForSearchLink"
|
|
|
|
routerLinkActive="router-link-active" [routerLink]="linkToSearchDataproviders" class="uk-button uk-button-text">
|
2019-02-12 12:15:21 +01:00
|
|
|
View all compatible results
|
2017-12-19 13:53:46 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<tab-result [(results)]="fetchDataproviders.results"
|
|
|
|
[(status)]= "fetchDataproviders.status"
|
|
|
|
type="dataprovider" urlParam="datasourceId"
|
|
|
|
lazy=false>
|
|
|
|
</tab-result>
|
|
|
|
</div>
|
|
|
|
`
|
|
|
|
})
|
|
|
|
|
|
|
|
export class DatasourcesTabComponent {
|
|
|
|
|
|
|
|
@Input() paramsForSearchLink = {};
|
|
|
|
@Input() fetchDataproviders : FetchDataproviders;
|
2018-02-05 14:14:59 +01:00
|
|
|
@Input() properties:EnvProperties ;
|
|
|
|
|
2017-12-19 13:53:46 +01:00
|
|
|
public linkToSearchDataproviders = "";
|
|
|
|
public errorCodes:ErrorCodes = new ErrorCodes();
|
|
|
|
|
|
|
|
constructor () {}
|
|
|
|
|
|
|
|
ngOnInit() {
|
2018-02-05 14:14:59 +01:00
|
|
|
this.linkToSearchDataproviders = this.properties.searchLinkToAdvancedDataProviders;
|
2017-12-19 13:53:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
ngOnDestroy() {}
|
|
|
|
}
|