[plugins-functionality | WIP] content providers: update methods, add options to select for deposit and add deposition message
This commit is contained in:
parent
c011c9b38c
commit
9ad2da0fd3
|
@ -6,13 +6,13 @@ import {map} from "rxjs/operators";
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SearchCommunityDataprovidersService {
|
export class SearchCommunityDataprovidersService {
|
||||||
constructor(private http: HttpClient ) {}
|
constructor(private http: HttpClient ) {}
|
||||||
searchDataproviders (properties:EnvProperties, pid: string):any {
|
searchDataproviders (properties:EnvProperties, pid: string, deposit = false):any {
|
||||||
let url = properties.communityAPI+pid+"/contentproviders";
|
let url = properties.communityAPI+pid+"/datasources" + (deposit?'?deposit=true':'');
|
||||||
|
|
||||||
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
||||||
}
|
}
|
||||||
countTotalDataproviders(properties:EnvProperties,pid:string) {
|
countTotalDataproviders(properties:EnvProperties,pid:string) {
|
||||||
let url = properties.communityAPI+pid+"/contentproviders";
|
let url = properties.communityAPI+pid+"/datasources";
|
||||||
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||||
.pipe(map(res => res['length']));
|
.pipe(map(res => res['length']));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,8 @@ export class ContentProvider {
|
||||||
name: string;
|
name: string;
|
||||||
officialname: string;
|
officialname: string;
|
||||||
selectioncriteria: SelectionCriteria;
|
selectioncriteria: SelectionCriteria;
|
||||||
|
deposit: boolean;
|
||||||
|
message: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SelectionCriteria {
|
export class SelectionCriteria {
|
||||||
|
|
Loading…
Reference in New Issue