diff --git a/portal-2/src/app/landingPages/project/project.component.html b/portal-2/src/app/landingPages/project/project.component.html
index 014da05f..f725ec8a 100644
--- a/portal-2/src/app/landingPages/project/project.component.html
+++ b/portal-2/src/app/landingPages/project/project.component.html
@@ -140,13 +140,13 @@
-
Loading...
diff --git a/portal-2/src/app/searchPages/dataProviders/compatibleDataProviders.component.ts b/portal-2/src/app/searchPages/dataProviders/compatibleDataProviders.component.ts
index 4120b092..d54c9b83 100644
--- a/portal-2/src/app/searchPages/dataProviders/compatibleDataProviders.component.ts
+++ b/portal-2/src/app/searchPages/dataProviders/compatibleDataProviders.component.ts
@@ -144,11 +144,17 @@ export class SearchCompatibleDataprovidersComponent {
var searchFields = new SearchFields();
var filter_original_ids = searchFields.COMPATIBLE_DATAPROVIDER_FIELDS;
var value_names=[
- [
+ /*[
"Institutional Publication Repository","Thematic Publication Repository", "Other Publication Repository",
"Institutional Repositories Aggregators",
"Thematic Repositories Aggregators", "Other Repositories Aggregators",
"Data Repositories", "Data Repositories Aggregators", "Journals", "Journals Aggregators", "CRIS Systems", "Publication Catalogues"],
+ */
+ [
+ "Institutional Repository", "Thematic Repository", "Publication Repository",
+ "Institutional Repository Aggregator",
+ "Thematic Repositories Aggregators", "Publication Repository Aggregator",
+ "Data Repository", "Data Repository Aggregator", "Journal", "Journal Aggregator\/Publisher", "CRIS Systems", "Publication Catalogue"],
["OpenAIRE Basic (DRIVER OA)","OpenAIRE 2.0 (EC funding)", "OpenAIRE 2.0+ (DRIVER OA, EC funding)", "OpenAIRE 3.0 (OA, funding)","OpenAIRE Data (funded, referenced datasets)"]];
var value_original_ids=[
diff --git a/portal-2/src/app/searchPages/dataProviders/compatibleDataProvidersTable.component.ts b/portal-2/src/app/searchPages/dataProviders/compatibleDataProvidersTable.component.ts
index eaa898c5..043ac071 100644
--- a/portal-2/src/app/searchPages/dataProviders/compatibleDataProvidersTable.component.ts
+++ b/portal-2/src/app/searchPages/dataProviders/compatibleDataProvidersTable.component.ts
@@ -15,18 +15,13 @@ import {ExportCSVComponent} from '../../utils/exportCSV.class';
selector: 'search-content-providers-table',
template: `
-
-
-
`
})
@@ -39,17 +34,14 @@ export class SearchCompatibleDataprovidersTableComponent {
public _location:Location;
public searchFields:SearchFields = new SearchFields();
public refineFields: string[] = this.searchFields.COMPATIBLE_DATAPROVIDER_FIELDS;
- public fieldIdsMap= this.searchFields.DATASOURCE_FIELDS;
- public _prefixQueryFields: {field:string,opName:string,opValue:string,values:string[]}[] =[{field:"compatibility",opName:"cm",opValue:"not", values:["UNKNOWN","hostedBy","notCompatible"]},{field:"type",opName:"tp",opValue:"not",values: ["other"]}];
- // ["entityregistry","entityregistry::projects","entityregistry::repositories"]}];
- public _prefixQuery: string = "";
- public CSV: any = { "columnNames": [ "Title", "Type", "Coutries", "Compatibility" ],
+ /*public CSV: any = { "columnNames": [ "Title", "Type", "Coutries", "Compatibility" ],
"export":[]
};
public CSVDownloaded = false;
- public resourcesQuery = "&query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other))";
public csvParams: string;
+ public resourcesQuery = "&query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other))";*/
+
public disableForms: boolean = false;
@ViewChild (SearchPageTableViewComponent) searchPage : SearchPageTableViewComponent ;
@@ -58,25 +50,16 @@ export class SearchCompatibleDataprovidersTableComponent {
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status =errorCodes.LOADING;
this.baseUrl = OpenaireProperties.getLinkToSearchCompatibleDataProvidersTable();
- for(var i = 0; i < this._prefixQueryFields.length; i++ ){
- for(var j =0; j < this._prefixQueryFields[i].values.length; j++){
- this._prefixQuery+="&" + this._prefixQueryFields[i].field + "="
- + this._prefixQueryFields[i].values[j] + "&" +
- this._prefixQueryFields[i].opName + "=" + this._prefixQueryFields[i].opValue;
- }
- }
- this._prefixQuery+="&";
}
public ngOnInit() {
this.searchPage.refineFields = this.refineFields;
- this.searchPage.fieldIdsMap = this.fieldIdsMap;
this.sub = this.route.queryParams.subscribe(params => {
this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
- this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
+ //this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
this.filters = this.createFilters();
- var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
- this._getResults(queryParameters, false, this.searchUtils.page);
+ this.searchPage.getParametersFromUrl(params);
+ this._getResults();
});
}
@@ -87,36 +70,34 @@ export class SearchCompatibleDataprovidersTableComponent {
if(this.subResults){
this.subResults.unsubscribe();
} }
- private _getResults(parameters:string,refine:boolean, page: number){
- this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
+ private _getResults(){
+ //this.csvParams = this.resourcesQuery+"&type=datasources";
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.LOADING;
- //this.searchPage.openLoading();
this.disableForms = true;
this.results = [];
this.searchUtils.totalResults = 0;
let size: number = 0;
- this.subResults = this._searchDataprovidersService.searchCompatibleDataprovidersTable(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null).subscribe(
+ this.subResults = this._searchDataprovidersService.searchCompatibleDataprovidersTable().subscribe(
data => {
size = data;
if(size > 0) {
- this.subResults = this._searchDataprovidersService.searchCompatibleDataproviders(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, []).subscribe(
+ this.subResults = this._searchDataprovidersService.searchCompatibleDataproviders("", null, 1, size, []).subscribe(
data => {
this.searchUtils.totalResults = data[0];
- console.info("search Data Providers: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
+ console.info("search Data Providers [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
+
this.searchPage.checkSelectedFilters(this.filters);
- this.searchPage.updateBaseUrlWithParameters(this.filters);
+
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.DONE;
if(this.searchUtils.totalResults == 0 ){
this.searchUtils.status = errorCodes.NONE;
}
- //this.searchPage.closeLoading();
this.disableForms = false;
-
},
err => {
console.log(err);
@@ -126,14 +107,12 @@ export class SearchCompatibleDataprovidersTableComponent {
// }
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.ERROR;
- //this.searchPage.closeLoading();
this.disableForms = false;
}
);
} else {
this.searchPage.checkSelectedFilters(this.filters);
- this.searchPage.updateBaseUrlWithParameters(this.filters);
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.NONE;
@@ -148,7 +127,6 @@ export class SearchCompatibleDataprovidersTableComponent {
// }
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.ERROR;
- //this.searchPage.closeLoading();
}
);
@@ -157,26 +135,31 @@ export class SearchCompatibleDataprovidersTableComponent {
//TODO set filters from
}
- public queryChanged($event) {
- var parameters = $event.index;
- console.info("queryChanged: Execute search query "+parameters);
- this._getResults(parameters, false, this.searchUtils.page);
- }
private createFilters():Filter[] {
var filter_names=["Type","Compatibility Level"];
var filter_ids=["datasourcetypeuiid","datasourcecompatibilityname"];
var searchFields = new SearchFields();
var filter_original_ids = searchFields.COMPATIBLE_DATAPROVIDER_FIELDS;
var value_names=[
- [
+ /*[
"Institutional Publication Repository","Thematic Publication Repository", "Other Publication Repository",
"Institutional Repositories Aggregators",
"Thematic Repositories Aggregators", "Other Repositories Aggregators",
"Data Repositories", "Data Repositories Aggregators", "Journals", "Journals Aggregators", "CRIS Systems", "Publication Catalogues"],
+ */
+ [
+ "Institutional Repository", "Thematic Repository", "Publication Repository",
+ "Institutional Repository Aggregator",
+ "Thematic Repositories Aggregators", "Publication Repository Aggregator",
+ "Data Repository", "Data Repository Aggregator", "Journal", "Journal Aggregator\/Publisher", "CRIS Systems", "Publication Catalogue"],
+
+
+
+
["OpenAIRE Basic (DRIVER OA)","OpenAIRE 2.0 (EC funding)", "OpenAIRE 2.0+ (DRIVER OA, EC funding)", "OpenAIRE 3.0 (OA, funding)","OpenAIRE Data (funded, referenced datasets)"]];
var value_original_ids=[
- ["pubsrepository::institutional","pubsrepository::thematic", "pubsrepository::unknown", "aggregator::pubsrepository::thematic","aggregator::pubsrepository::institutional","aggregator::pubsrepository::unknown",
+ ["pubsrepository::institutional","pubsrepository::thematic", "pubsrepository::unknown", "aggregator::pubsrepository::institutional","aggregator::pubsrepository::thematic","aggregator::pubsrepository::unknown",
"datarepository::unknown", "aggregator::datarepository", "pubsrepository::journal", "aggregator::pubsrepository::journals", "cris", "pubscatalogue::unknown"],
//["driver","openaire2.0", "driver-openaire2.0", "openaire3.0","openaire2.0_data"]
["OpenAIRE Basic (DRIVER OA)","OpenAIRE 2.0 (EC funding)", "OpenAIRE 2.0+ (DRIVER OA, EC funding)", "OpenAIRE 3.0 (OA, funding)","OpenAIRE Data (funded, referenced datasets)"]];
@@ -192,15 +175,13 @@ export class SearchCompatibleDataprovidersTableComponent {
}
return filters;
}
-
+/*
public downloadClicked($event) {
if(!this.CSVDownloaded) {
this.CSVDownloaded = false;
var parameters = $event.value;
- //this.getResultsCSV(parameters, false, 1, 1000);
-
this._searchDataprovidersService.searchCompatibleDataprovidersCSV(parameters,this.searchPage.getRefineFieldsQuery(), 1, 1000).subscribe(
data => {
this.CSV.export = data;
@@ -221,5 +202,5 @@ export class SearchCompatibleDataprovidersTableComponent {
);
}
}
-
+*/
}
diff --git a/portal-2/src/app/searchPages/dataProviders/entityRegistriesTable.component.ts b/portal-2/src/app/searchPages/dataProviders/entityRegistriesTable.component.ts
index 22943d16..3d40dbc6 100644
--- a/portal-2/src/app/searchPages/dataProviders/entityRegistriesTable.component.ts
+++ b/portal-2/src/app/searchPages/dataProviders/entityRegistriesTable.component.ts
@@ -18,10 +18,7 @@ import {ExportCSVComponent} from '../../utils/exportCSV.class';
@@ -38,46 +35,32 @@ export class SearchEntityRegistriesTableComponent {
public _location:Location;
public searchFields:SearchFields = new SearchFields();
public refineFields: string[] = this.searchFields.ENTITY_REGISTRIES_FIELDS;
- public fieldIdsMap= this.searchFields.DATASOURCE_FIELDS;
- public _prefixQueryFields: {field:string,opName:string,opValue:string,values:string[]}[] =[
- {field:"type",opName:"tp",opValue:"and",values: ["other"]}];
- // ["entityregistry","entityregistry::projects","entityregistry::repositories"]}];
- public _prefixQuery: string = "";
- public CSV: any = { "columnNames": [ "Title", "Type", "Coutries", "Compatibility" ],
+ /*public CSV: any = { "columnNames": [ "Title", "Type", "Coutries", "Compatibility" ],
"export":[]
};
public CSVDownloaded = false;
+ public resourcesQuery = "&query=((oaftype exact datasource) and(datasourcetypeuiid = other))";
+ public csvParams: string;
+ */
public disableForms: boolean = false;
@ViewChild (SearchPageTableViewComponent) searchPage : SearchPageTableViewComponent ;
- public resourcesQuery = "&query=((oaftype exact datasource) and(datasourcetypeuiid = other))";
- public csvParams: string;
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchDataprovidersService ) {
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status =errorCodes.LOADING;
- this.baseUrl = OpenaireProperties.getLinkToSearchEntityRegistriesTable();
- for(var i = 0; i < this._prefixQueryFields.length; i++ ){
- for(var j =0; j < this._prefixQueryFields[i].values.length; j++){
- this._prefixQuery+="&" + this._prefixQueryFields[i].field + "="
- + this._prefixQueryFields[i].values[j] + "&" +
- this._prefixQueryFields[i].opName + "=" + this._prefixQueryFields[i].opValue;
- }
- }
- this._prefixQuery+="&";
}
public ngOnInit() {
this.searchPage.refineFields = this.refineFields;
- this.searchPage.fieldIdsMap = this.fieldIdsMap;
this.sub = this.route.queryParams.subscribe(params => {
this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
- this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
+ //this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
this.filters = this.createFilters();
- var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
- this._getResults(queryParameters, false, this.searchUtils.page);
+ this.searchPage.getParametersFromUrl(params);
+ this._getResults("", false, this.searchUtils.page);
});
}
@@ -89,33 +72,31 @@ export class SearchEntityRegistriesTableComponent {
this.subResults.unsubscribe();
} }
private _getResults(parameters:string,refine:boolean, page: number){
- this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
+ //this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.LOADING;
- //this.searchPage.openLoading();
this.disableForms = true;
this.results = [];
this.searchUtils.totalResults = 0;
let size: number = 0;
- this.subResults = this._searchDataprovidersService.searchEntityRegistriesTable(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null).subscribe(
+ this.subResults = this._searchDataprovidersService.searchEntityRegistriesTable().subscribe(
data => {
size = data;
if(size > 0) {
- this.subResults = this._searchDataprovidersService.searchEntityRegistries(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, []).subscribe(
+ this.subResults = this._searchDataprovidersService.searchEntityRegistries("",null, page, size, []).subscribe(
data => {
this.searchUtils.totalResults = data[0];
- console.info("search Entity Registries: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
+ console.info("search Entity Registries [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchPage.checkSelectedFilters(this.filters);
- this.searchPage.updateBaseUrlWithParameters(this.filters);
+
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.DONE;
if(this.searchUtils.totalResults == 0 ){
this.searchUtils.status = errorCodes.NONE;
}
- //this.searchPage.closeLoading();
this.disableForms = false;
},
@@ -127,14 +108,12 @@ export class SearchEntityRegistriesTableComponent {
// }
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.ERROR;
- //this.searchPage.closeLoading();
this.disableForms = false;
}
);
} else {
this.searchPage.checkSelectedFilters(this.filters);
- this.searchPage.updateBaseUrlWithParameters(this.filters);
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.NONE;
@@ -149,7 +128,6 @@ export class SearchEntityRegistriesTableComponent {
// }
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.ERROR;
- //this.searchPage.closeLoading();
}
);
/*
@@ -188,11 +166,7 @@ export class SearchEntityRegistriesTableComponent {
//TODO set filters from
}
- public queryChanged($event) {
- var parameters = $event.index;
- console.info("queryChanged: Execute search query "+parameters);
- this._getResults(parameters, false, this.searchUtils.page);
- }
+
private createFilters():Filter[] {
var filter_names=["Type","Compatibility Level"];
var filter_ids=["datasourcetypename","datasourcecompatibilityname"];
@@ -223,7 +197,7 @@ export class SearchEntityRegistriesTableComponent {
}
-
+/*
public downloadClicked($event) {
if(!this.CSVDownloaded) {
this.CSVDownloaded = false;
@@ -252,4 +226,5 @@ export class SearchEntityRegistriesTableComponent {
);
}
}
+*/
}
diff --git a/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts b/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts
index abee881f..3e6ed698 100644
--- a/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts
+++ b/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts
@@ -59,7 +59,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
- Show results in table view
+ Show results in table view
-