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"
|
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||||
[baseUrl] = "baseUrl" [showResultCount]=false
|
[baseUrl] = "baseUrl" [showResultCount]=false
|
||||||
(queryChange)="queryChanged($event)"
|
(queryChange)="queryChanged($event)"
|
||||||
[csvParams]="csvParams" csvPath="resources"
|
[csvParams]="csvParams" csvPath="datasources"
|
||||||
[disableForms]="disableForms"
|
[disableForms]="disableForms"
|
||||||
[tableViewLink]="'/search/content-providers-table'"
|
[tableViewLink]="'/search/content-providers-table'"
|
||||||
searchFormClass="compatibleDatasourcesSearchForm">
|
searchFormClass="compatibleDatasourcesSearchForm">
|
||||||
|
@ -48,7 +48,7 @@ export class SearchCompatibleDataprovidersComponent {
|
||||||
"export":[]
|
"export":[]
|
||||||
};
|
};
|
||||||
public CSVDownloaded = false;
|
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 csvParams: string;
|
||||||
public disableForms: boolean = false;
|
public disableForms: boolean = false;
|
||||||
properties:EnvProperties;
|
properties:EnvProperties;
|
||||||
|
@ -82,8 +82,10 @@ properties:EnvProperties;
|
||||||
this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
|
this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
|
||||||
this.filters = this.createFilters();
|
this.filters = this.createFilters();
|
||||||
var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
|
var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
|
||||||
|
var csvParameters = this.searchPage.getQueryParametersFromUrl(params);
|
||||||
|
|
||||||
console.info("|"+queryParameters+"|");
|
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){
|
if(this.subResults){
|
||||||
this.subResults.unsubscribe();
|
this.subResults.unsubscribe();
|
||||||
} }
|
} }
|
||||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
private _getResults(parameters:string, csv_parameters:string, refine:boolean, page: number, size: number){
|
||||||
this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
|
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();
|
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = this.errorCodes.LOADING;
|
this.searchUtils.status = this.errorCodes.LOADING;
|
||||||
|
@ -148,9 +154,11 @@ properties:EnvProperties;
|
||||||
|
|
||||||
public queryChanged($event) {
|
public queryChanged($event) {
|
||||||
var parameters = $event.index;
|
var parameters = $event.index;
|
||||||
|
var csv_parameters = $event.value;
|
||||||
|
|
||||||
console.info("queryChanged: Execute search query "+parameters);
|
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[] {
|
private createFilters():Filter[] {
|
||||||
var filter_names=["Type","Compatibility Level"];
|
var filter_names=["Type","Compatibility Level"];
|
||||||
|
|
|
@ -19,7 +19,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
||||||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||||
[baseUrl] = "baseUrl" [showResultCount]=false
|
[baseUrl] = "baseUrl" [showResultCount]=false
|
||||||
(queryChange)="queryChanged($event)"
|
(queryChange)="queryChanged($event)"
|
||||||
[csvParams]="csvParams" csvPath="resources"
|
[csvParams]="csvParams" csvPath="datasources"
|
||||||
[disableForms]="disableForms"
|
[disableForms]="disableForms"
|
||||||
[tableViewLink]="'/search/entity-registries-table'"
|
[tableViewLink]="'/search/entity-registries-table'"
|
||||||
searchFormClass="entityRegistriesSearchForm">
|
searchFormClass="entityRegistriesSearchForm">
|
||||||
|
@ -52,7 +52,7 @@ export class SearchEntityRegistriesComponent {
|
||||||
public disableForms: boolean = false;
|
public disableForms: boolean = false;
|
||||||
|
|
||||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||||
public resourcesQuery = "&query=((oaftype exact datasource) and(datasourcetypeuiid = other))";
|
public resourcesQuery = "((oaftype exact datasource) and(datasourcetypeuiid = other))";
|
||||||
public csvParams: string;
|
public csvParams: string;
|
||||||
properties:EnvProperties;
|
properties:EnvProperties;
|
||||||
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchDataprovidersService ) {
|
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchDataprovidersService ) {
|
||||||
|
@ -85,7 +85,9 @@ properties:EnvProperties;
|
||||||
this.filters = this.createFilters();
|
this.filters = this.createFilters();
|
||||||
|
|
||||||
var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
|
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){
|
if(this.subResults){
|
||||||
this.subResults.unsubscribe();
|
this.subResults.unsubscribe();
|
||||||
} }
|
} }
|
||||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
private _getResults(parameters:string, csv_parameters:string, refine:boolean, page: number, size: number){
|
||||||
this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
|
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();
|
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = this.errorCodes.LOADING;
|
this.searchUtils.status = this.errorCodes.LOADING;
|
||||||
|
@ -151,7 +157,9 @@ properties:EnvProperties;
|
||||||
public queryChanged($event) {
|
public queryChanged($event) {
|
||||||
var parameters = $event.index;
|
var parameters = $event.index;
|
||||||
console.info("queryChanged: Execute search query "+parameters);
|
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[] {
|
private createFilters():Filter[] {
|
||||||
var filter_names=["Type","Compatibility Level"];
|
var filter_names=["Type","Compatibility Level"];
|
||||||
|
|
|
@ -21,7 +21,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
||||||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||||
[baseUrl] = "baseUrl" [showResultCount]=false
|
[baseUrl] = "baseUrl" [showResultCount]=false
|
||||||
(queryChange)="queryChanged($event)"
|
(queryChange)="queryChanged($event)"
|
||||||
[csvParams]="csvParams" csvPath="resources"
|
[csvParams]="csvParams" csvPath="datasources"
|
||||||
[disableForms]="disableForms"
|
[disableForms]="disableForms"
|
||||||
searchFormClass="journalsSearchForm">
|
searchFormClass="journalsSearchForm">
|
||||||
</search-page>
|
</search-page>
|
||||||
|
@ -49,7 +49,7 @@ export class SearchJournalsComponent {
|
||||||
"export":[]
|
"export":[]
|
||||||
};
|
};
|
||||||
public CSVDownloaded = false;
|
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))";
|
//"&query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other))";
|
||||||
public csvParams: string;
|
public csvParams: string;
|
||||||
public disableForms: boolean = false;
|
public disableForms: boolean = false;
|
||||||
|
@ -85,7 +85,9 @@ properties:EnvProperties;
|
||||||
this.filters = this.createFilters();
|
this.filters = this.createFilters();
|
||||||
var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
|
var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
|
||||||
console.info("|"+queryParameters+"|");
|
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){
|
if(this.subResults){
|
||||||
this.subResults.unsubscribe();
|
this.subResults.unsubscribe();
|
||||||
} }
|
} }
|
||||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
private _getResults(parameters:string, csv_parameters:string, refine:boolean, page: number, size: number){
|
||||||
this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
|
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();
|
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = this.errorCodes.LOADING;
|
this.searchUtils.status = this.errorCodes.LOADING;
|
||||||
|
@ -151,8 +157,9 @@ properties:EnvProperties;
|
||||||
public queryChanged($event) {
|
public queryChanged($event) {
|
||||||
var parameters = $event.index;
|
var parameters = $event.index;
|
||||||
console.info("queryChanged: Execute search query "+parameters);
|
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[] {
|
private createFilters():Filter[] {
|
||||||
var filter_names=["Type","Compatibility Level"];
|
var filter_names=["Type","Compatibility Level"];
|
||||||
|
|
Loading…
Reference in New Issue