compatibleDataProviders.component, entityRegistries.component, journals.component: fix url for csv download button.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@53438 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
eb8e06a7c0
commit
0304e7fffc
|
@ -20,7 +20,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||
[baseUrl] = "baseUrl" [showResultCount]=false
|
||||
(queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="resources"
|
||||
[csvParams]="csvParams" csvPath="datasources"
|
||||
[disableForms]="disableForms"
|
||||
[tableViewLink]="'/search/content-providers-table'"
|
||||
searchFormClass="compatibleDatasourcesSearchForm">
|
||||
|
@ -48,7 +48,7 @@ export class SearchCompatibleDataprovidersComponent {
|
|||
"export":[]
|
||||
};
|
||||
public CSVDownloaded = false;
|
||||
public resourcesQuery = '&query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other) not(datasourcetypeuiid exact "pubsrepository::journal") not(datasourcetypeuiid exact "aggregator::pubsrepository::journals"))';
|
||||
public resourcesQuery = '((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other) not(datasourcetypeuiid exact "pubsrepository::journal") not(datasourcetypeuiid exact "aggregator::pubsrepository::journals"))';
|
||||
public csvParams: string;
|
||||
public disableForms: boolean = false;
|
||||
properties:EnvProperties;
|
||||
|
@ -82,8 +82,10 @@ properties:EnvProperties;
|
|||
this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
|
||||
this.filters = this.createFilters();
|
||||
var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
|
||||
var csvParameters = this.searchPage.getQueryParametersFromUrl(params);
|
||||
|
||||
console.info("|"+queryParameters+"|");
|
||||
this._getResults(queryParameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
this._getResults(queryParameters, csvParameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -94,8 +96,12 @@ properties:EnvProperties;
|
|||
if(this.subResults){
|
||||
this.subResults.unsubscribe();
|
||||
} }
|
||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
||||
this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
|
||||
private _getResults(parameters:string, csv_parameters:string, refine:boolean, page: number, size: number){
|
||||
if(csv_parameters.indexOf("fq=") != -1) {
|
||||
this.csvParams = csv_parameters+" and "+this.resourcesQuery;
|
||||
} else {
|
||||
this.csvParams = csv_parameters+"&fq="+this.resourcesQuery;
|
||||
}
|
||||
|
||||
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
|
@ -148,9 +154,11 @@ properties:EnvProperties;
|
|||
|
||||
public queryChanged($event) {
|
||||
var parameters = $event.index;
|
||||
var csv_parameters = $event.value;
|
||||
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
|
||||
this._getResults(parameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
this._getResults(parameters, csv_parameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
}
|
||||
private createFilters():Filter[] {
|
||||
var filter_names=["Type","Compatibility Level"];
|
||||
|
|
|
@ -19,7 +19,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||
[baseUrl] = "baseUrl" [showResultCount]=false
|
||||
(queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="resources"
|
||||
[csvParams]="csvParams" csvPath="datasources"
|
||||
[disableForms]="disableForms"
|
||||
[tableViewLink]="'/search/entity-registries-table'"
|
||||
searchFormClass="entityRegistriesSearchForm">
|
||||
|
@ -52,7 +52,7 @@ export class SearchEntityRegistriesComponent {
|
|||
public disableForms: boolean = false;
|
||||
|
||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||
public resourcesQuery = "&query=((oaftype exact datasource) and(datasourcetypeuiid = other))";
|
||||
public resourcesQuery = "((oaftype exact datasource) and(datasourcetypeuiid = other))";
|
||||
public csvParams: string;
|
||||
properties:EnvProperties;
|
||||
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchDataprovidersService ) {
|
||||
|
@ -85,7 +85,9 @@ properties:EnvProperties;
|
|||
this.filters = this.createFilters();
|
||||
|
||||
var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
|
||||
this._getResults(queryParameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
var csvParameters = this.searchPage.getQueryParametersFromUrl(params);
|
||||
|
||||
this._getResults(queryParameters, csvParameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -96,8 +98,12 @@ properties:EnvProperties;
|
|||
if(this.subResults){
|
||||
this.subResults.unsubscribe();
|
||||
} }
|
||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
||||
this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
|
||||
private _getResults(parameters:string, csv_parameters:string, refine:boolean, page: number, size: number){
|
||||
if(csv_parameters.indexOf("fq=") != -1) {
|
||||
this.csvParams = csv_parameters+" and "+this.resourcesQuery;
|
||||
} else {
|
||||
this.csvParams = csv_parameters+"&fq="+this.resourcesQuery;
|
||||
}
|
||||
|
||||
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
|
@ -151,7 +157,9 @@ properties:EnvProperties;
|
|||
public queryChanged($event) {
|
||||
var parameters = $event.index;
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
this._getResults(parameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
var csv_parameters = $event.value;
|
||||
|
||||
this._getResults(parameters, csv_parameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
}
|
||||
private createFilters():Filter[] {
|
||||
var filter_names=["Type","Compatibility Level"];
|
||||
|
|
|
@ -21,7 +21,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||
[baseUrl] = "baseUrl" [showResultCount]=false
|
||||
(queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="resources"
|
||||
[csvParams]="csvParams" csvPath="datasources"
|
||||
[disableForms]="disableForms"
|
||||
searchFormClass="journalsSearchForm">
|
||||
</search-page>
|
||||
|
@ -49,7 +49,7 @@ export class SearchJournalsComponent {
|
|||
"export":[]
|
||||
};
|
||||
public CSVDownloaded = false;
|
||||
public resourcesQuery = '&query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ))';
|
||||
public resourcesQuery = '((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ))';
|
||||
//"&query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other))";
|
||||
public csvParams: string;
|
||||
public disableForms: boolean = false;
|
||||
|
@ -85,7 +85,9 @@ properties:EnvProperties;
|
|||
this.filters = this.createFilters();
|
||||
var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
|
||||
console.info("|"+queryParameters+"|");
|
||||
this._getResults(queryParameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
var csvParameters = this.searchPage.getQueryParametersFromUrl(params);
|
||||
|
||||
this._getResults(queryParameters, csvParameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -96,8 +98,12 @@ properties:EnvProperties;
|
|||
if(this.subResults){
|
||||
this.subResults.unsubscribe();
|
||||
} }
|
||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
||||
this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
|
||||
private _getResults(parameters:string, csv_parameters:string, refine:boolean, page: number, size: number){
|
||||
if(csv_parameters.indexOf("fq=") != -1) {
|
||||
this.csvParams = csv_parameters+" and "+this.resourcesQuery;
|
||||
} else {
|
||||
this.csvParams = csv_parameters+"&fq="+this.resourcesQuery;
|
||||
}
|
||||
|
||||
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
|
@ -151,8 +157,9 @@ properties:EnvProperties;
|
|||
public queryChanged($event) {
|
||||
var parameters = $event.index;
|
||||
console.info("queryChanged: Execute search query "+parameters);
|
||||
var csv_parameters = $event.value;
|
||||
|
||||
this._getResults(parameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
this._getResults(parameters,csv_parameters, false, this.searchUtils.page, this.searchUtils.size);
|
||||
}
|
||||
private createFilters():Filter[] {
|
||||
var filter_names=["Type","Compatibility Level"];
|
||||
|
|
Loading…
Reference in New Issue