[trunk]: Remove unnecessary logs from library.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54775 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2019-02-14 10:15:44 +00:00
parent 19877b3295
commit c6b84c171e
106 changed files with 169 additions and 366 deletions

View File

@ -339,7 +339,6 @@ getCommunities () {
data => {
this.concepts =data;
console.log(data);
for(var i =0 ; i<data.length; i++){
if(data[i].hasSubConcept == true){
this.getSubConcepts(data[i].id);
@ -372,7 +371,6 @@ getCommunities () {
}else{
this._contextService.getSubConcepts(conceptId, "",true, this.properties.contextsAPI).subscribe(
data => {
console.log(data);
for(var i =0 ; i<data.length; i++){
this.concepts.push(data[i]);
}
@ -443,11 +441,9 @@ getCommunities () {
data => {
var concepts = data[0];
this.conceptsClass[categoryId].push(concepts)
console.log("Data"+concepts);
console.log(this.conceptsClass[categoryId]);
this.conceptsCategoryLoading[categoryId] = false;
},
err => {
@ -459,7 +455,6 @@ getCommunities () {
}
communityChanged(){
console.log(this.selectedCommunityId +" ");
this.warningMessage = "";
this.infoMessage = "";
for(var i = 0; i< this.communities.length; i++){

View File

@ -117,7 +117,6 @@ select(item){
project.jurisdiction = item.jurisdiction;
project.fundingLevel0 = item.fundingLevel0;
console.log(item);
// this._service.getProjectDates(project.projectId).subscribe(
@ -185,11 +184,9 @@ handleClick(event){
}
getFunders () {
console.info("Getting Funders....");
this._projectService.getFunders(this.properties).subscribe(
data => {
this.funders = data[1];
console.log("this.funders");
},
err => console.log(err)
);
@ -203,7 +200,7 @@ getFunders () {
funderChanged(funderId:string, funderName:string){
this.selectedFunderId = funderId;
this.selectedFunderName = funderName;
console.info("Selected funder:"+this.selectedFunderId+ ' name:'+funderName );
//console.info("Selected funder:"+this.selectedFunderId+ ' name:'+funderName );
}

View File

@ -31,8 +31,6 @@ export class ClaimResultSearchFormComponent {
}
ngOnInit() {
console.log("Init of ClaimResultSearchFormComponent");
console.log(this.properties);
if(this.keyword !=null && this.keyword.length > 0){
this.search(false);
}
@ -473,7 +471,6 @@ private remove(item){
private crossrefPageChange($event) {
this.crossrefPage=$event.value;
this.crossrefResults=[];
console.log("Crossref chaenged "+this.crossrefPage);
this.getCrossrefResults(this.keyword,this.size,this.crossrefPage);
}
private orcidPageChange($event) {
@ -686,7 +683,6 @@ openaireORPPageChange($event) {
}
private getDataciteResults (term: string, size : number, page : number) {
console.log("getDataciteResults + "+this.properties.searchDataciteAPIURL)
this._searchDataciteService.searchDataciteResults(term, size, page, this.properties, true).subscribe(
data => {
this.dataciteResults = data;

View File

@ -61,7 +61,6 @@ private seoService: SEOService) {
this.searchTermStream
.debounceTime(300).distinctUntilChanged()
.subscribe((term: string) => {
console.log("change!")
this.keyword = this.inputkeyword;
//console.log("keyword: "+this.keyword + " VS inputkeyword: "+this.inputkeyword);
this.page = 1;
@ -192,7 +191,6 @@ manageAPIData(data){
var d = new Date();
var dateTomillis = d.getTime();
var millis24h:number = 24*3600000;
console.log("Date is:"+dateTomillis);
// if(this.showLatestClaims && this.recentClaims.length == 0){
// this.recentClaims = [];
// for(var i=0;i<data.data.length;i++){
@ -261,7 +259,6 @@ handleErrors(err){
}
params+=(this. getSortby()=='datedesc'?"":(params.length>0?'&':'')+"sort="+this. getSortby());
params+=(this.keyword==''?"":(params.length>0?'&':'')+"keyword="+this.keyword);
console.log("AAAA"+this.communityId)
if(this.communityId !=null){
params+="&communityId="+this.communityId;
}
@ -387,7 +384,6 @@ handleErrors(err){
}
}
changekeyword(){
console.log("changekeyword")
if(this.inputkeyword.length >= 3 || this.inputkeyword.length == 0 ){
this.searchTermStream.next(this.inputkeyword);
@ -475,12 +471,12 @@ handleErrors(err){
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}else{
console.log("Deleting claim with id:"+id);
//console.log("Deleting claim with id:"+id);
// this._claimService.deleteClaimById(id);
this._claimService.deleteClaimById(id, this.properties.claimsAPIURL).subscribe(
res => {
console.log('Delete response'+res.code );
console.log("Deleted claim with id:"+ id);
//console.log('Delete response'+res.code );
//console.log("Deleted claim with id:"+ id);
//remove this claim from the
let newClaims=this.claims;
for (var _i = 0; _i < this.claims.length; _i++) {
@ -507,12 +503,12 @@ handleErrors(err){
this.userValidMessage = "User session has expired. Please login again.";
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}else{
console.warn("Deleting claim with ids:"+ids);
//console.warn("Deleting claim with ids:"+ids);
this._claimService.deleteBulk(ids,this.properties.claimsAPIURL).subscribe(
res => {
console.info('Delete response'+res.code );
console.warn("Deleted ids:"+ res.deletedIds);
console.warn("Not found ids:"+ res.notFoundIds);
//console.info('Delete response'+res.code );
//console.warn("Deleted ids:"+ res.deletedIds);
//console.warn("Not found ids:"+ res.notFoundIds);
//remove this claim from the
let newClaims=this.claims;
for(var id of res.deletedIds){

View File

@ -13,7 +13,7 @@ export class ClaimsService {
}
private getClaimRequest(size : number, page : number, url :string, fromCache:boolean):any {
console.info('ClaimsService: Claims request: '+url);
//console.info('ClaimsService: Claims request: '+url);
let key = url;
return this.http.get(url, CustomOptions.getAuthOptions())
.map(request => <any> request.json())
@ -21,38 +21,36 @@ export class ClaimsService {
.catch(this.handleError);
}
getClaims( size : number, page : number, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string):any {
console.info('ClaimsService: getClaims ' );
console.info('ClaimsService: Types : '+types );
let url = apiUrl +"claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+"&"+types;
return this.getClaimRequest(size,page,url,true);
}
getClaimsByUser( size : number, page : number, user:string, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string):any {
console.info('ClaimsService: getClaims for user : '+user);
//console.info('ClaimsService: getClaims for user : '+user);
let url = apiUrl +"users/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+"&"+types;
return this.getClaimRequest(size,page,url,false);
}
getClaimsBycontext( size : number, page : number, contextId:string, keyword:string, sortby: string, descending: boolean, types: string , apiUrl:string):any {
console.info('ClaimsService: getClaims for context : '+contextId);
//console.info('ClaimsService: getClaims for context : '+contextId);
let url = apiUrl +"contexts/"+contextId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+"&"+types;
return this.getClaimRequest(size,page,url,true);
}
getClaimsByResult( size : number, page : number, resultId:string, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string ):any {
console.info('ClaimsService: getClaims for result : '+resultId);
//console.info('ClaimsService: getClaims for result : '+resultId);
let url = apiUrl +"results/"+resultId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+"&"+types;
return this.getClaimRequest(size,page,url,true);
}
getClaimsByProject( size : number, page : number, projectId:string, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string ):any {
console.info('ClaimsService: getClaims for project : '+projectId);
//console.info('ClaimsService: getClaims for project : '+projectId);
let url = apiUrl +"projects/"+projectId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+"&"+types;
return this.getClaimRequest(size,page,url,true);
}
deleteClaimById(claimId:string , apiUrl:string):any{
console.warn('Trying to delete claim with id : '+claimId);
//console.warn('Trying to delete claim with id : '+claimId);
let url = apiUrl +"claims/"+claimId;
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
@ -63,7 +61,7 @@ export class ClaimsService {
}
deleteBulk(claimIds:string[], apiUrl:string):any{
console.warn('Trying to delete claims with ids : '+claimIds);
//console.warn('Trying to delete claims with ids : '+claimIds);
var url = "";
for(var claimId of claimIds){
@ -79,40 +77,40 @@ export class ClaimsService {
}
insertBulkClaims(claims, apiUrl:string):any{
console.warn('Trying toinsert claims : '+claims);
//console.warn('Trying toinsert claims : '+claims);
let url = apiUrl +"claims/bulk";
let body = JSON.stringify( claims );
console.warn('Json body: : '+body);
//console.warn('Json body: : '+body);
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
.map(res => res.json())
.do(request => console.info("Insert Response:"+request.status) )
//.do(request => console.info("Insert Response:"+request.status) )
.catch(this.handleError);
}
insertClaim(claim, apiUrl:string):any{
console.warn('Trying toinsert claim : '+claim);
//console.warn('Trying toinsert claim : '+claim);
let url = apiUrl +"claims";
let body = JSON.stringify( claim );
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
.map(res => res.json())
.do(request => console.info("Insert Response:"+request.status) )
//.do(request => console.info("Insert Response:"+request.status) )
.catch(this.handleError);
}
insertDirectRecords(records, apiUrl:string):any{
console.warn('Trying to feedrecords : '+records);
//console.warn('Trying to feedrecords : '+records);
let url = apiUrl +"feed/bulk";
let body = JSON.stringify( records );
console.warn('Json body: : '+body);
//console.warn('Json body: : '+body);
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
.map(res => res.json())
.do(request => console.info("Insert Response:"+request) )
//.do(request => console.info("Insert Response:"+request) )
.catch(this.handleError);
}

View File

@ -17,7 +17,7 @@ export class ContextsService {
let url = apiUrl + 's/';
let key = url;
console.info('ContextsService: request communities '+url);
//console.info('ContextsService: request communities '+url);
return this.http.get(url)
.map(res => <any> res.json()).map(res => this.parseCommunities(res) )
// .do(request => console.info("Get claims: offset = "))
@ -34,7 +34,7 @@ export class ContextsService {
return communities;
}
public getCategories(communityId :string, apiUrl:string):any {
console.info('ContextsService: request categories for community with id '+communityId);
//console.info('ContextsService: request categories for community with id '+communityId);
let url= apiUrl + '/' + communityId ;
let key = url;
@ -45,7 +45,7 @@ export class ContextsService {
.catch(this.handleError);;
}
public getConcepts(categoryId :string, keyword: string, parsing:boolean, apiUrl:string):any {
console.info('ContextsService: request concept for category with id '+categoryId + ' and keyword '+ keyword);
//console.info('ContextsService: request concept for category with id '+categoryId + ' and keyword '+ keyword);
let url= apiUrl + '/category/' + categoryId;
let key = url+"_parsing="+parsing;
@ -57,7 +57,7 @@ export class ContextsService {
// .do(res => console.info("Result is "+ res.length ));
}
public getSubConcepts(subConceptID :string, keyword: string, parsing:boolean, apiUrl:string):any {
console.info('ContextsService: request sub concept for concept with id '+subConceptID + ' and keyword '+ keyword);
//console.info('ContextsService: request sub concept for concept with id '+subConceptID + ' and keyword '+ keyword);
let url= apiUrl + '/category/concept/' + subConceptID;
let key = url+"_parsing="+parsing;

View File

@ -12,25 +12,22 @@ export class SearchDataciteService {
constructor(private http: Http ) {}
searchDataciteResults (term: string, size : number, page : number, properties:EnvProperties, parse:boolean = false):any {
console.info("In search datacite results "+term+ " "+properties.searchDataciteAPIURL);
//console.info("In search datacite results "+term+ " "+properties.searchDataciteAPIURL);
let url = properties.searchDataciteAPIURL+'?query='+term+'&rows='+size+'&start='+(size*(page-1));
let key = url;
return this.http.get( ( properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(request => <any> request.json())
.map(request => (parse?this.parse(request.data):request))
.do(items => console.info(items))
//.catch(this.handleError);
}
getDataciteResultByDOI (doi: string, properties:EnvProperties, parse:boolean = false):any {
console.info("Fetch datacite resultt by DOI: "+doi);
let url = properties.searchDataciteAPIURL+'/'+doi;
let key = url;
return this.http.get( (properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(request => <any> request.json())
.map(request => (parse?this.parse(request.data):request))
.do(items => console.info(items));
// .do(items => console.log("Datacite Results: total results = "+items.meta.total+" doi = "+doi))

View File

@ -15,7 +15,6 @@ export class SearchOrcidService {
searchOrcidAuthor (term: string, authorIds: string[], authors, properties:EnvProperties, addId):any {
console.info("In searchOrcidAuthor: "+term);
var headers = new Headers();
headers.append('Accept', 'application/orcid+json');
@ -25,17 +24,14 @@ export class SearchOrcidService {
return this.http.get(url, { headers: headers })
.map(res => res.json()['person'])
.do(res => console.log(res))
.map(res => [res['name']['given-names'],
res['name']['family-name'],
res['name']])
.do(res => console.log(res))
.map(res => this.parseOrcidAuthor(res, authorIds, authors, addId));
}
searchOrcidAuthors (term: string, authorIds: string[],
properties:EnvProperties):any {
console.info("In search Orcid authors for keyword: "+term);
var headers = new Headers();
headers.append('Accept', 'application/orcid+json');
@ -50,7 +46,6 @@ export class SearchOrcidService {
}
searchOrcidPublications (id: string, properties:EnvProperties, parse:boolean = false):any {
console.info("In search Orcid publications for author: "+id);
var headers = new Headers();
headers.append('Accept', 'application/orcid+json');
@ -60,7 +55,6 @@ export class SearchOrcidService {
return this.http.get(url, { headers: headers })
.map(res => res.json()['group'])
.do(res => console.log(res))
.map(request => (parse?this.parse(id, request):request));
//.map(res => res['orcid-work']);
}

View File

@ -52,7 +52,7 @@ export class StartOverComponent {
}
startOver(){
if(this.type != null && this.linkTo != null){
console.log("inline");
//console.log("inline");
if(this.linkTo == "project"){
this.projects.splice(0, this.projects.length);
}else if(this.linkTo == "context"){
@ -61,7 +61,7 @@ export class StartOverComponent {
this.results.splice(0, this.results.length);
}
}else{
console.log("generic");
//console.log("generic");
this.results.splice(0, this.results.length);
this.projects.splice(0, this.projects.length);
this.contexts.splice(0, this.contexts.length);
@ -69,7 +69,7 @@ export class StartOverComponent {
localStorage.removeItem(this.localStoragePrefix + "projects");
localStorage.removeItem(this.localStoragePrefix + "contexts");
localStorage.removeItem(this.localStoragePrefix + "results");
console.log("projects:"+this.projects.length +" contexts:"+this.contexts.length + " results:"+this.results.length );
//console.log("projects:"+this.projects.length +" contexts:"+this.contexts.length + " results:"+this.results.length );
}
}

View File

@ -128,7 +128,6 @@ export class ClaimsByTokenComponent {
"searchPlaceholder": "Search projects..."
}*/
};
console.info("configure dtOptions1: ",this.dtOptions[0]);
this.dtOptions[1] = {
"pageLength": this.rowsOnPage,
@ -139,7 +138,6 @@ console.info("configure dtOptions1: ",this.dtOptions[0]);
"order": [[ 4, 'desc' ]]
};
console.info("configure dtOptions2: ",this.dtOptions[1]);
this.dtTrigger[0] = new Subject<any>();
this.dtTrigger[1] = new Subject<any>();
@ -173,7 +171,7 @@ console.info("configure dtOptions2: ",this.dtOptions[1]);
*/
triggerInitialLoad(){
this.triggered = true;
console.info("triggerInitialLoad");
//console.info("triggerInitialLoad");
setTimeout(function(){
/*var table1 = <any>$('#table1').DataTable();
table1.page( 0 ).draw( false );
@ -189,7 +187,7 @@ console.info("configure dtOptions2: ",this.dtOptions[1]);
}
rerender(): void {
console.info("RERENDER");
//console.info("RERENDER");
this.dtElements.forEach((dtElement: DataTableDirective, index: number) => {
dtElement.dtInstance.then((dtInstance: any) => {
// Destroy the table first
@ -203,7 +201,6 @@ console.info("configure dtOptions2: ",this.dtOptions[1]);
filterData(row: any, query: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
let returnValue: boolean = false;
@ -236,7 +233,6 @@ console.info("configure dtOptions2: ",this.dtOptions[1]);
refreshTable(page:number, whichTable: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if(whichTable == "pending") {
@ -244,7 +240,6 @@ refreshTable(page:number, whichTable: string) {
table.page( page - 1 ).draw( false );
var info = table.page.info();
console.info("records: "+info.recordsDisplay);
this.activePendingPage.page = page;//$event.value;
this.totalPendingResults.count = info.recordsDisplay;
@ -253,7 +248,6 @@ refreshTable(page:number, whichTable: string) {
table.page( page - 1 ).draw( false );
var info = table.page.info();
console.info("records: "+info.recordsDisplay);
this.activeCuratedPage.page = page;//$event.value;
this.totalCuratedResults.count = info.recordsDisplay;
@ -266,7 +260,6 @@ refreshTable(page:number, whichTable: string) {
validateJWTandToken() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if(this.openaireId) {
@ -286,7 +279,6 @@ refreshTable(page:number, whichTable: string) {
data => {
//this.closeLoading();
this.accessStatus = "valid";
//console.info(data);
this.claims = data.data;
for(let claim of this.claims) {
if(claim.targetType == "project") {
@ -310,10 +302,10 @@ refreshTable(page:number, whichTable: string) {
this.showTables = true;
if(!this.triggered) {
console.info("initial load");
//console.info("initial load");
this.triggerInitialLoad();
} else {
console.info("rerender");
//console.info("rerender");
var table1 = $('#table1').DataTable();
table1.clear();
@ -363,7 +355,6 @@ refreshTable(page:number, whichTable: string) {
selectApprove(id:string, event, mode: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
var value = event.currentTarget.checked;
@ -389,7 +380,6 @@ refreshTable(page:number, whichTable: string) {
selectDisapprove(id:string, event, mode: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
var value = event.currentTarget.checked;
@ -443,10 +433,8 @@ refreshTable(page:number, whichTable: string) {
cancelEditOfCuration(claim: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("cancelEditOfCuration - approved:"+claim.approved);
if(claim.approved) {
//this.selectedRight_CuratedMode.add(claim.id);
this.selectedWrong_CuratedMode.delete(claim.id);
@ -459,7 +447,6 @@ refreshTable(page:number, whichTable: string) {
saveEdited(claim: any, editable_index: number) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.curated_status = this.errorCodes.LOADING;
@ -477,7 +464,6 @@ refreshTable(page:number, whichTable: string) {
this.claimsByTokenService.updateClaimCuration(claimCurationInfo, this.properties.claimsAPIURL).subscribe(
data => {
console.info(data);
this.selectedRight_CuratedMode.delete(claim.id);
this.selectedWrong_CuratedMode.delete(claim.id);
this.editable.delete(editable_index);
@ -495,16 +481,14 @@ refreshTable(page:number, whichTable: string) {
saveChanges() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.pending_status = this.errorCodes.LOADING;
//this.openLoading();
console.info("Changes Saved!, right-wrong", this.selectedRight_PendingMode, this.selectedWrong_PendingMode);
//console.info("Changes Saved!, right-wrong", this.selectedRight_PendingMode, this.selectedWrong_PendingMode);
this.claimsByTokenService.updateClaimsCuration(this.selectedRight_PendingMode, this.selectedWrong_PendingMode, this.properties.claimsAPIURL).subscribe(
data => {
//this.closeLoading();
console.info(data);
this.mode = "curated";
this.clearCheckboxes();
this.validateJWTandToken();
@ -520,7 +504,6 @@ refreshTable(page:number, whichTable: string) {
clearCheckboxes() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.pending_status = this.errorCodes.LOADING;
@ -542,7 +525,7 @@ refreshTable(page:number, whichTable: string) {
}
curatorSelected(selected: string) {
console.info("selected curator: "+selected);
//console.info("selected curator: "+selected);
}
public openSelect(){

View File

@ -12,7 +12,6 @@ export class ClaimsByTokenService {
constructor(private http: Http ) {}
getClaims(openaireId: string, apiURL:string):any {
console.info("getClaims in service");
//let url = apiURL+"project/claims?projectToken="+token;
let url = apiURL+"projects/"+openaireId+"/all_claims";
@ -55,16 +54,14 @@ export class ClaimsByTokenService {
claimsCurationInfo.push(claimCurationInfo);
});
console.info(claimsCurationInfo);
let body = JSON.stringify( claimsCurationInfo );
console.warn('Json body: : '+body);
//console.warn('Json body: : '+body);
let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
.map(res => res.json())
.do(request => console.info("Insert Response:"+request.status) )
//.do(request => console.info("Insert Response:"+request.status) )
.catch(this.handleError);
}
@ -74,15 +71,13 @@ export class ClaimsByTokenService {
let claimsCurationInfo: any = []; //e.g.: [{"id":"2","approved":true},{"id":"1","approved":true}]
claimsCurationInfo.push(claimCurationInfo);
console.info(claimsCurationInfo);
let body = JSON.stringify( claimsCurationInfo );
console.warn('Json body: : '+body);
//console.warn('Json body: : '+body);
let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
.map(res => res.json())
.do(request => console.info("Insert Response:"+request.status) )
.catch(this.handleError);
}

View File

@ -76,7 +76,7 @@ export class DirectLinkingComponent {
isInlineResult = true;
}
this.localStoragePrefix = this.type.substr(0,3)+"_"+this.linkTo.substr(0,3)+"_";
console.log("\n\n"+this.localStoragePrefix+"\n\n");
//console.log("\n\n"+this.localStoragePrefix+"\n\n");
if(localStorage.getItem(this.localStoragePrefix + "projects")){
this.projects = JSON.parse(localStorage.getItem(this.localStoragePrefix + "projects"));
}
@ -86,7 +86,7 @@ export class DirectLinkingComponent {
if(localStorage.getItem(this.localStoragePrefix + "results")){
this.results = JSON.parse(localStorage.getItem(this.localStoragePrefix + "results"));
}
console.log("\n\nGetting inline entity "+this.type+"\n\n");
//console.log("\n\nGetting inline entity "+this.type+"\n\n");
if(this.type == "project"){
this.linkType = "project";
this.getProjectById(this.id);
@ -125,7 +125,6 @@ export class DirectLinkingComponent {
getProjectById(id:string){
this.sub = this.entitySearch.fetchByType(id,"project", this.properties).subscribe(
data => {
console.log(data);
var item =data[0];
var project: ClaimProject = new ClaimProject();
project.funderId = item.funderId;
@ -232,7 +231,6 @@ export class DirectLinkingComponent {
getOrpById(id:string, isInlineResult:boolean){
this.sub = this.ORPSearch.searchOrpById(id,this.properties).subscribe(
data => {
console.log(data)
var item =data[0];
var result: ClaimResult = new ClaimResult();
result.id=id;
@ -245,7 +243,6 @@ getOrpById(id:string, isInlineResult:boolean){
result.embargoEndDate ="";
result.date = item.year;
this.displayedResult = result;
console.log(item)
if(isInlineResult){
this.inlineResult = result;
}else{

View File

@ -110,7 +110,6 @@ export class BulkClaimComponent {
this.makeFileRequest(this.properties.uploadService, [], this.filesToUpload).then((result) => {
var rows = (result as any).split('\n'); // I have used space, you can use any thing.
console.log("Rows:" + rows.length);
this.exceedsLimit = false;
var i = 0;
var invalid_rows = 0;
@ -133,7 +132,6 @@ export class BulkClaimComponent {
}
for(i=0;i<((rows.length>this.limit-this.results.length)?(this.limit-this.results.length):rows.length);i++){
if(rows[i] && rows[i] != null ){
console.log("Row is:" + rows[i]);
var values = rows[i].split(',');
var id=this.removeDoubleQuotes(values[0]);

View File

@ -100,7 +100,6 @@ private insertActions(){
var claims = [];
var directclaims = [];
if(this.results ){
console.info("results: "+this.results.length);
for (var i = 0; i < this.results.length; i++) {
var result=this.results[i];
@ -146,7 +145,6 @@ private insertActions(){
}
}
//first call direct index service - when call is done (success or error) call isertBulkClaims method to insert claims in DB
console.info("\n\ndirectclaims: "+directclaims.length+"\n\n");
if(directclaims.length > 0){
this.claimService.insertDirectRecords(directclaims,this.properties.claimsAPIURL).subscribe(
data => {
@ -174,7 +172,6 @@ private insertActions(){
}
private isertBulkClaims(claims){
console.info("try to insert "+claims.length+" claims");
this.claimService.insertBulkClaims(claims,this.properties.claimsAPIURL).subscribe(
data => {
this.insertedClaims = data.insertedIds;
@ -222,12 +219,10 @@ private validateDates(){
if(this.projects){
for (var k = 0; k < this.projects.length; k++) {
var project = this.projects[k];
console.info(project.startDate+" "+project.endDate + " "+project.projectAcronym);
if(this.results){
for (var i = 0; i < this.results.length; i++) {
var result = this.results[i];
if(result.date && result.date != null){
console.info("Date :"+ result.date + " & embargoEndDate :" +result.embargoEndDate );
if((project.startDate && result.date < project.startDate) || ( project.endDate && result.date > (project.endDate+5)) ){
this.confirmOpen();
return false;
@ -243,7 +238,6 @@ private validateDates(){
for (var i = 0; i < this.results.length; i++) {
var result = this.results[i];
if(result.date && result.date != null){
console.info("Date :"+ result.date + " & embargoEndDate :" +result.embargoEndDate );
if((result.embargoEndDate && result.embargoEndDate != null) && result.date >result.embargoEndDate ){
this.confirmOpen();
return false;
@ -278,7 +272,7 @@ private errorsInClaimsInsertion(){
this.claiming = false;
this.showButton = false;
var text =""
console.log("Errors: this.errorInRecords.length: "+this.errorInRecords.length+" - this.errorInClaims.length: "+this.errorInClaims.length);
//console.log("Errors: this.errorInRecords.length: "+this.errorInRecords.length+" - this.errorInClaims.length: "+this.errorInClaims.length);
if(this.errorInRecords.length>0){
text+="<div>The following records couldn't automatically inserted to the Openaire Info space: <ul>";
for(var i=0; i< this.errorInRecords.length ; i++){
@ -302,7 +296,7 @@ private errorsInClaimsInsertion(){
text+="</ul></div>";
}
this.errorMessage+="<div>An error occured:</div>"+text;
console.log(text);
//console.log(text);
// if(this.inline){
// this.show = "error";
// this.showChange.emit({
@ -392,7 +386,7 @@ createDirectClaim(result, projects, contexts){
}
}
var json = JSON.stringify(entity);
console.log("\nJSON:\n"+json);
//console.log("\nJSON:\n"+json);
return entity;

View File

@ -23,11 +23,9 @@ export class CommunityService {
let body = JSON.stringify(community);
console.log(body);
return this.http.post(url, body, options)
/*.map(res => res.json())*/
.do(request => console.log("Insert Response:"+request.status));
}
iscommunityManager(properties:EnvProperties, url: string, manager:string){
@ -53,7 +51,7 @@ export class CommunityService {
}
return false;
}).do(res => {console.log("Response is "+res)});
});
}
parseCommunity(data:any): CommunityInfo {

View File

@ -12,7 +12,7 @@ export class ConnectAdminLoginGuard implements CanActivate {
constructor(private router: Router, private communityService: CommunityService, private propertiesService:EnvironmentSpecificService ) {}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean {
console.log(state.url);
//console.log(state.url);
var user;
var loggedIn = false;
var isAdmin = false;
@ -28,7 +28,7 @@ export class ConnectAdminLoginGuard implements CanActivate {
return false;
}else if(Session.isPortalAdministrator() || Session.isCommunityCurator()) {
console.log("is Admin");
//console.log("is Admin");
isAdmin = true;
return true;
}else {

View File

@ -12,7 +12,7 @@ export class ConnectRIGuard implements CanActivate {
constructor(private router: Router, private communityService: CommunityService, private propertiesService:EnvironmentSpecificService ) {}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean {
console.log(state.url);
//console.log(state.url);
var user;
var loggedIn = false;
var isAdmin = false;

View File

@ -13,7 +13,7 @@ export class ConnectSubscriberGuard implements CanActivate {
constructor(private router: Router, private communityService: CommunityService, private propertiesService:EnvironmentSpecificService ) {}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean {
console.log(state.url);
//console.log(state.url);
var user;
var authorized = false;
var errorCode = LoginErrorCodes.NOT_SUBSCRIBER;

View File

@ -59,8 +59,6 @@ export class MailPrefsComponent {
}
this.fetchId = Session.getUserEmail();
console.info("email: "+this.fetchId);
console.info("communityId: " + this.communityId);
this.getEmailPreferences();
@ -98,12 +96,10 @@ export class MailPrefsComponent {
this.preferencesFor = "project";
this._mailPrefsService.getUserEmailPreferencesForOpenaire(this.properties.claimsAPIURL).subscribe(
data => {
console.info("email prefs returned");
if(data.code == "204") {
this.status = this.errorCodes.NONE;
} else {
console.info(data);
this.initialNotifications = data.data;
this.notifications = JSON.parse(JSON.stringify( this.initialNotifications ));
@ -163,11 +159,9 @@ export class MailPrefsComponent {
this.status = this.errorCodes.LOADING;
this.savedMessage = "";
console.info("Send notification to db: ", this.notifications[index]);
this._mailPrefsService.saveUserEmailPreferences(this.notifications[index], this.properties.claimsAPIURL).subscribe(
data => {
console.info("Notification saved successfully");
this.initialNotifications[index] = JSON.parse(JSON.stringify( this.notifications[index] ));
this.status = this.errorCodes.DONE;
@ -187,7 +181,6 @@ export class MailPrefsComponent {
);
}
else {
console.info("Notification not changed: ", this.notifications[index]);
/*UIkit.notification({
message : '<strong>No changes selected for '+this.notifications[index].openaireName+' email preferences<strong>',
status : 'primary',
@ -210,10 +203,7 @@ export class MailPrefsComponent {
if(this.notifications.length > 0 && this.initialNotifications.length > 0) {
this.status = this.errorCodes.LOADING;
this.savedMessage = "";
console.info("Restore Notification");
console.info(this.notifications[index]);
this.notifications[index] = JSON.parse(JSON.stringify( this.initialNotifications[index] ));
console.info(this.initialNotifications[index]);
this.status = this.errorCodes.DONE;
this.prefsChanged[index] = false;
}
@ -245,7 +235,6 @@ export class MailPrefsComponent {
} else {
code = err.status;
}
console.info(code);
if(code == "403") {
this.status = this.errorCodes.FORBIDDEN;
}

View File

@ -81,7 +81,6 @@ export class DepositComponent {
}
public organizationSelected(id: string) {
console.info("organization selected");
if(id && id.length > 0){
if(this.requestFor == "Publications") {
this._router.navigate( ['participate/deposit-publications-result'], { queryParams: { "organizationId": id } } );

View File

@ -294,8 +294,6 @@ export class DepositResultComponent {
}
});
console.info('depositResult init');
this.sub = this.route.queryParams.subscribe(params => {
this.fetchDataproviders.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
@ -318,7 +316,6 @@ export class DepositResultComponent {
this.parameterNames.push('organizationId');
this.parameterValues.push(this.organizationId);
console.info("Id is :"+this.organizationId);
if(this.organizationId){
this.getOrganizationInfo();
}
@ -367,7 +364,6 @@ export class DepositResultComponent {
}
private getOrganizationInfo () {
console.info("inside getOrganizationInfo of component");
this.fetchDataproviders.oldTotalResults = 0;
this.fetchDataproviders.searchUtils.totalResults = 0;
@ -388,13 +384,10 @@ export class DepositResultComponent {
this.fetchDataproviders.searchUtils.status = this.errorCodes.NONE;
if(err.status == '404') {
this.status = this.errorCodes.NOT_FOUND;
console.info("not found");
} else if(err.status == '500') {
this.status = this.errorCodes.ERROR;
console.info("error");
} else {
this.status = this.errorCodes.NOT_AVAILABLE;
console.info("not available");
}
}
);
@ -413,7 +406,6 @@ export class DepositResultComponent {
}
public organizationSelected(id: string) {
console.info("organization selected");
if(id && id.length > 0 && id != this.organizationId){
this.organization = null;
this.status = this.errorCodes.LOADING;

View File

@ -16,7 +16,6 @@ export class DataProviderService {
dataProviderInfo: DataProviderInfo;
getDataproviderInfo (id: string, properties:EnvProperties):any {
console.info("getDataProviderInfo in service");
let url = properties.searchAPIURLLAst + 'datasources/' +id +"?format=json";
let key = url;

View File

@ -78,7 +78,6 @@ export class DatasetComponent {
this.updateDescription("");
this.datasetId = params['datasetId'];
console.info("Id is :"+this.datasetId);
if(this.datasetId){
this.getDatasetInfo(this.datasetId);
@ -154,7 +153,6 @@ export class DatasetComponent {
},
err => {
console.log(err)
console.info("error");
this.errorMessage = 'No research data found';
this.showLoading = false;

View File

@ -20,7 +20,6 @@ export class DatasetService {
datasetInfo: DatasetInfo;
getDatasetInfo (id: string, properties:EnvProperties):any {
console.info("getDatasetInfo in service");
let url = properties.searchAPIURLLAst+'datasets/'+id+"?format=json";
let key = url;
@ -28,7 +27,6 @@ export class DatasetService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
.do(res => console.info(res['result']['metadata']['oaf:entity']))
.map(res => [res['result']['header']['dri:status'], res['result']['metadata']['oaf:entity']['oaf:result'],res])
.map(res => [res[1],
res[1]['title'],

View File

@ -9,7 +9,6 @@ export class HtmlProjectReportService {
constructor(private http: Http ) {}
getHTML(id: string, size: number, type:string, csvAPIURL: string ):any {
console.info("getHTML in service");
let resultTypeId: string;
let requestType: string;

View File

@ -31,7 +31,7 @@ export class AddThisComponent {
if (typeof document !== 'undefined' && typeof addthis !== 'undefined') {
try{
console.log("AddThis: try load");
//console.log("AddThis: try load");
// addthis.toolbox();
// addthis.init();
addthis.layers.refresh();

View File

@ -69,7 +69,6 @@ export class AvailableOnComponent {
ngOnInit() {}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -134,7 +134,6 @@ export class CiteThisComponent {
return this.lang;
}
this.retrieveItem= function(id){
console.log("retrieve id:" + id);
return this.data;
}
};

View File

@ -124,7 +124,6 @@ export class FundedByComponent {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -59,7 +59,6 @@ export class PublishedInComponent {
ngOnInit() {}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -88,7 +88,6 @@ export class SearchingProjectsTabComponent {
}
public filterChange($event) {
console.log("Filter Changed");
this.updateFilters();
//this.search(true, this.filterQuery);
this.search(false, this.filterQuery);
@ -111,7 +110,7 @@ export class SearchingProjectsTabComponent {
}
}
console.log("Filter Changed"+this.filterQuery);
//console.log("Filter Changed"+this.filterQuery);
}
}

View File

@ -57,7 +57,6 @@ export class ShowAuthorsComponent {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -84,7 +84,6 @@ export class ShowIdentifiersComponent {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -49,13 +49,11 @@ export class ShowTitleComponent {
ngOnInit() {
this.sub = this.route.queryParams.subscribe(
params => {
console.info("onInit showTitle");
}
);
}
ngOnDestroy() {
console.info("onDestroy showTitle");
this.sub.unsubscribe();
}
}

View File

@ -126,7 +126,6 @@ export class OrganizationComponent {
this.updateUrl(data.envSpecific.baseLink+this._router.url);
this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this._router.url);
});
console.info('organization init');
this.sub = this.route.queryParams.subscribe(params => {
this.organizationInfo=null;
this.updateTitle("Organization");
@ -134,7 +133,6 @@ export class OrganizationComponent {
this.projectsClicked = false;
this.organizationId = params['organizationId'];
console.info("Id is :"+this.organizationId);
if(this.organizationId){
this.getOrganizationInfo();
@ -317,7 +315,6 @@ export class OrganizationComponent {
}
public downloadFile(url:string, filename: string){
console.log("Downloading file: "+ url);
this.openLoading();
this.setMessageLoading("Downloading CSV file");
@ -350,7 +347,6 @@ export class OrganizationComponent {
}
private downloadPublicationsFile(funder: string, funderId:string, count:number){
console.log("Downloading publications file");
this.openLoading();
this.setMessageLoading("Downloading CSV file");
@ -377,7 +373,7 @@ export class OrganizationComponent {
if(!title) {
//url = this.downloadURLAPI+"projects/"+projects[index].id+"?type=publications&format=csv-special";//&size="+data;
url = this.downloadURLAPI+"?format=csv-special&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact '"+projects[index].id+"'))"
console.info(url);
//console.info(url);
} else {
//url = this.downloadURLAPI+"projects/"+projects[index].id+"/publications?format=csv-special-notitle";//&size="+data;
url = this.downloadURLAPI+"?format=csv-special-notitle&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact '"+projects[index].id+"'))"

View File

@ -77,7 +77,6 @@ export class OrpComponent {
this.updateTitle("Other Research Product");
this.updateDescription("");
this.orpId = params['orpId'];
console.info("Id is :"+this.orpId);
if(this.orpId){
this.getOrpInfo(this.orpId);
@ -144,7 +143,6 @@ export class OrpComponent {
},
err => {
console.log(err)
console.info("error");
this.errorMessage = 'No research product found';
this.showLoading = false;

View File

@ -20,14 +20,12 @@ export class OrpService {
orpInfo: OrpInfo;
getOrpInfo (id: string, properties:EnvProperties):any {
console.info("getOrpInfo in service");
let url = properties.searchAPIURLLAst+'other/'+id+"?format=json";
let key = url;
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
.do(res => console.info(res['result']['metadata']['oaf:entity']))
.map(res => [res['result']['header']['dri:status'], res['result']['metadata']['oaf:entity']['oaf:result'],res])
.map(res => [res[1],
res[1]['title'],

View File

@ -135,7 +135,7 @@ properties:EnvProperties;
var description = "";
this.updateTitle(title);
this.updateDescription(description);
this.updateDescription(description);
this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this._router.url);
this.projectId = params['projectId'];
var grantId = params['grantId'];
@ -275,7 +275,6 @@ actionsAfterLoadId(){
}
public searchPublicationsInit() {
console.info("searchPublicationsInit");
if(this.reloadPublications && this.fetchPublications.searchUtils.totalResults > 0) {
this.searchPublications();
} else if(this.fetchPublications.searchUtils.totalResults == 0) {
@ -285,7 +284,6 @@ actionsAfterLoadId(){
}
public searchDatasetsInit() {
console.info("searchDatasetsInit");
if(this.reloadDatasets && this.fetchDatasets.searchUtils.totalResults > 0) {
this.searchDatasets();
} else if(this.fetchDatasets.searchUtils.totalResults == 0) {
@ -295,14 +293,12 @@ actionsAfterLoadId(){
}
public searchSoftwareInit() {
console.info("searchSoftwareInit");
if(this.reloadSoftware && this.fetchSoftware.searchUtils.totalResults > 0) {
this.searchSoftware();
}
}
public searchOrpsInit() {
console.info("searchOrpsInit");
if(this.reloadOrps && this.fetchOrps.searchUtils.totalResults > 0) {
this.searchOrps();
}

View File

@ -20,7 +20,6 @@ export class ProjectService {
projectInfo: ProjectInfo;
getProjectInfo (id: string, properties:EnvProperties):any {
console.info("getProjectInfo in service");
let url = properties.searchAPIURLLAst + 'projects/'+id+"?format=json";
let key = url;

View File

@ -93,7 +93,6 @@ export class PublicationComponent {
this.updateDescription("");
this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this._router.url);
this.articleId = data['articleId'];
console.info("Article id is :"+this.articleId);
this.metricsClicked = false;
@ -133,7 +132,6 @@ export class PublicationComponent {
private getOpenCitations(id: string) {
this._publicationService.getOpenCitations(this.articleId, this.properties).subscribe(
data => {
console.info("OpenCitations: "+data[0]);
this.publicationInfo.openCitations = data[1];
},
err => {
@ -212,11 +210,9 @@ export class PublicationComponent {
this.activeTab = "Metrics";
this.metricsClicked = true;
}
console.info("activeTab is "+this.activeTab);
},
err => {
console.log(err);
console.info("error");
this.errorMessage = 'No publication found';
this.showLoading = false;

View File

@ -23,7 +23,6 @@ export class PublicationService {
publicationInfo: PublicationInfo;
getPublicationInfo (id: string, properties:EnvProperties):any {
console.info("getPublicationInfo in service");
let url = properties.searchAPIURLLAst + 'publications/' +id+"?format=json";
let key = url;

View File

@ -75,9 +75,8 @@ export class SoftwareComponent {
this.softwareInfo = null;
this.updateTitle("Software");
this.updateDescription("Software, search, open access");
this.softwareId = params['softwareId'];
console.info("Id is :"+this.softwareId);
if(this.softwareId){
this.getSoftwareInfo(this.softwareId);
@ -151,7 +150,6 @@ export class SoftwareComponent {
},
err => {
console.log(err)
console.info("error");
this.errorMessage = 'No software found';
this.showLoading = false;

View File

@ -20,7 +20,6 @@ export class SoftwareService {
softwareInfo: SoftwareInfo;
getSoftwareInfo (id: string, properties:EnvProperties):any {
console.info("getSoftwareInfo in service");
let url = properties.searchAPIURLLAst+'software/'+id+"?format=json";
let key = url;
@ -28,7 +27,6 @@ export class SoftwareService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
.do(res => console.info(res['result']['metadata']['oaf:entity']))
.map(res => [res['result']['header']['dri:status'], res['result']['metadata']['oaf:entity']['oaf:result'], res])
.map(res => [res[1],
res[1]['title'],

View File

@ -132,7 +132,7 @@ export class UserMiniComponent {
logOut(){
if(Session.isLoggedIn()){
Session.removeUser();
console.log("Try to Logout!");
//console.log("Try to Logout!");
// console.log("Redirect to "+location.href);
window.location.href = this.logOutUrl + StringUtils.URIEncode(location.href);

View File

@ -58,7 +58,7 @@ export class AdvancedSearchDataProvidersComponent {
this.errorCodes = new ErrorCodes();
this.searchUtils.status = this.errorCodes.LOADING;
console.info("Con -base url:"+this.searchUtils.baseUrl );
//console.info("Con -base url:"+this.searchUtils.baseUrl );
}
ngOnInit() {
@ -80,7 +80,7 @@ export class AdvancedSearchDataProvidersComponent {
let page = (params['page']=== undefined)?0:+params['page'];
this.searchUtils.page = ( page < 1 ) ? 1 : page;
this.searchUtils.size = (params['size']=== undefined)?10:+params['size'];
if(this.searchUtils.size != 5 && this.searchUtils.size != 10 && this.searchUtils.size != 20 && this.searchUtils.size != 50) {
this.searchUtils.size = 10;
@ -116,11 +116,10 @@ export class AdvancedSearchDataProvidersComponent {
this.results = [];
this.searchUtils.totalResults = 0;
console.info("Advanced Search for Content Providers: Execute search query "+parameters);
//console.info("Advanced Search for Content Providers: Execute search query "+parameters);
this._searchDataProvidersService.advancedSearchDataproviders(parameters, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("Adv Search Content Providers total="+this.searchUtils.totalResults);
this.results = data[1];
this.searchPage.updateBaseUrlWithParameters();
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -145,7 +144,6 @@ export class AdvancedSearchDataProvidersComponent {
},
err => {
console.log(err);
console.info("error");
//TODO check erros (service not available, bad request)
// if( ){
// this.searchUtils.status = errorCodes.ERROR;
@ -171,7 +169,7 @@ export class AdvancedSearchDataProvidersComponent {
var parameters = $event.value;
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
console.info("queryChanged: Execute search query "+parameters);
//console.info("queryChanged: Execute search query "+parameters);
}

View File

@ -124,11 +124,10 @@ export class AdvancedSearchDatasetsComponent {
this.results = [];
this.searchUtils.totalResults = 0;
console.info("Advanced Search for Research Data: Execute search query "+parameters);
//console.info("Advanced Search for Research Data: Execute search query "+parameters);
this._searchDatasetsService.advancedSearchDatasets(parameters, page, size, sortBy, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Research Data total="+this.searchUtils.totalResults);
this.results = data[1];
this.searchPage.updateBaseUrlWithParameters();
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -153,7 +152,6 @@ export class AdvancedSearchDatasetsComponent {
},
err => {
console.log(err);
console.info("error");
//TODO check erros (service not available, bad request)
// if( ){
// this.searchUtils.status = errorCodes.ERROR;
@ -183,7 +181,7 @@ export class AdvancedSearchDatasetsComponent {
var parameters = $event.value;
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
console.info("queryChanged: Execute search query "+parameters);
//console.info("queryChanged: Execute search query "+parameters);
}

View File

@ -117,11 +117,10 @@ public resourcesQuery = "(oaftype exact organization)";
this.results = [];
this.searchUtils.totalResults = 0;
console.info("Advanced Search for Organizations: Execute search query "+parameters);
//console.info("Advanced Search for Organizations: Execute search query "+parameters);
this._searchOrganizationsService.advancedSearchOrganizations(parameters, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Organizations total="+this.searchUtils.totalResults);
this.results = data[1];
this.searchPage.updateBaseUrlWithParameters();
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -146,7 +145,6 @@ public resourcesQuery = "(oaftype exact organization)";
},
err => {
console.log(err);
console.info("error");
//TODO check erros (service not available, bad request)
// if( ){
// this.searchUtils.status = errorCodes.ERROR;
@ -176,7 +174,7 @@ public resourcesQuery = "(oaftype exact organization)";
var parameters = $event.value;
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
console.info("queryChanged: Execute search query "+parameters);
//console.info("queryChanged: Execute search query "+parameters);
}

View File

@ -122,11 +122,10 @@ export class AdvancedSearchOrpsComponent {
this.results = [];
this.searchUtils.totalResults = 0;
console.info("Advanced Search for Other Research Products: Execute search query "+parameters);
//console.info("Advanced Search for Other Research Products: Execute search query "+parameters);
this._searchOrpsService.advancedSearchOrps(parameters, page, size, sortBy, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Other Research Products total="+this.searchUtils.totalResults);
this.results = data[1];
this.searchPage.updateBaseUrlWithParameters();
@ -150,7 +149,6 @@ export class AdvancedSearchOrpsComponent {
},
err => {
console.log(err);
console.info("error");
//TODO check erros (service not available, bad request)
if(err.status == '404') {
this.searchUtils.status = this.errorCodes.NOT_FOUND;
@ -174,7 +172,7 @@ export class AdvancedSearchOrpsComponent {
var parameters = $event.value;
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
console.info("queryChanged: Execute search query "+parameters);
//console.info("queryChanged: Execute search query "+parameters);
}

View File

@ -86,7 +86,7 @@ export class AdvancedSearchProjectsComponent {
if(this.searchUtils.size != 5 && this.searchUtils.size != 10 && this.searchUtils.size != 20 && this.searchUtils.size != 50) {
this.searchUtils.size = 10;
}
this.searchPage.fieldIds = this.fieldIds;
this.selectedFields =[];
this.searchPage.selectedFields = this.selectedFields;
@ -118,11 +118,10 @@ export class AdvancedSearchProjectsComponent {
this.results = [];
this.searchUtils.totalResults = 0;
console.info("Advanced Search for Publications: Execute search query "+parameters);
//console.info("Advanced Search for Publications: Execute search query "+parameters);
this._searchProjectsService.advancedSearchProjects(parameters, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("Advanced Search for Projects total="+this.searchUtils.totalResults);
this.results = data[1];
this.searchPage.updateBaseUrlWithParameters();
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -147,7 +146,6 @@ export class AdvancedSearchProjectsComponent {
},
err => {
console.log(err);
console.info("error");
//TODO check erros (service not available, bad request)
// if( ){
// this.searchUtils.status = errorCodes.ERROR;
@ -178,7 +176,7 @@ export class AdvancedSearchProjectsComponent {
var parameters = $event.value;
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
console.info("queryChanged: Execute search query "+parameters);
//console.info("queryChanged: Execute search query "+parameters);
}

View File

@ -128,11 +128,10 @@ export class AdvancedSearchPublicationsComponent {
this.results = [];
this.searchUtils.totalResults = 0;
console.info("Advanced Search for Publications: Execute search query "+parameters);
//console.info("Advanced Search for Publications: Execute search query "+parameters);
this._searchPublicationsService.advancedSearchPublications(parameters, page, size, sortBy, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("searchPubl total="+this.searchUtils.totalResults);
this.results = data[1];
this.searchPage.updateBaseUrlWithParameters();
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -157,7 +156,6 @@ export class AdvancedSearchPublicationsComponent {
},
err => {
console.log(err);
console.info("error");
//TODO check erros (service not available, bad request)
// if( ){
// this.searchUtils.status = ErrorCodes.ERROR;
@ -185,7 +183,7 @@ export class AdvancedSearchPublicationsComponent {
var parameters = $event.value;
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
console.info("queryChanged: Execute search query "+parameters);
//console.info("queryChanged: Execute search query "+parameters);
}

View File

@ -125,11 +125,10 @@ export class AdvancedSearchSoftwareComponent {
this.results = [];
this.searchUtils.totalResults = 0;
console.info("Advanced Search for Software: Execute search query "+parameters);
//console.info("Advanced Search for Software: Execute search query "+parameters);
this._searchSoftwareService.advancedSearchSoftware(parameters, page, size, sortBy, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Software total="+this.searchUtils.totalResults);
this.results = data[1];
this.searchPage.updateBaseUrlWithParameters();
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -154,7 +153,6 @@ export class AdvancedSearchSoftwareComponent {
},
err => {
console.log(err);
console.info("error");
//TODO check erros (service not available, bad request)
// if( ){
// this.searchUtils.status = errorCodes.ERROR;
@ -184,7 +182,7 @@ export class AdvancedSearchSoftwareComponent {
var parameters = $event.value;
this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
console.info("queryChanged: Execute search query "+parameters);
//console.info("queryChanged: Execute search query "+parameters);
}

View File

@ -87,7 +87,7 @@ properties:EnvProperties;
var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
var csvParameters = this.searchPage.getQueryParametersFromUrl(params);
console.info("|"+queryParameters+"|");
//console.info("|"+queryParameters+"|");
this._getResults(queryParameters, csvParameters, false, this.searchUtils.page, this.searchUtils.size);
});
}
@ -116,7 +116,7 @@ properties:EnvProperties;
this.subResults = this._searchDataprovidersService.searchCompatibleDataproviders(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, [],this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Content Providers: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Content Providers: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchPage.checkSelectedFilters(this.filters);
this.searchPage.updateBaseUrlWithParameters(this.filters);
@ -159,7 +159,7 @@ properties:EnvProperties;
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, csv_parameters, false, this.searchUtils.page, this.searchUtils.size);
}

View File

@ -105,7 +105,6 @@ properties:EnvProperties;
this.filters = this.createFilters(data[1], params);
this.searchUtils.totalResults = data[0];
console.info("search Content Providers [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchPage.checkSelectedFilters(this.filters);

View File

@ -118,7 +118,6 @@ properties:EnvProperties;
this.subResults = this._searchDataprovidersService.searchEntityRegistries(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, [],this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Entity Registries: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchPage.checkSelectedFilters(this.filters);
this.searchPage.updateBaseUrlWithParameters(this.filters);
@ -159,7 +158,7 @@ properties:EnvProperties;
public queryChanged($event) {
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, csv_parameters, false, this.searchUtils.page, this.searchUtils.size);

View File

@ -96,7 +96,6 @@ properties:EnvProperties;
this.filters = this.createFilters(data[1], params);
this.searchUtils.totalResults = data[0];
console.info("search Entity Registries [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchPage.checkSelectedFilters(this.filters);

View File

@ -87,7 +87,7 @@ properties:EnvProperties;
this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
this.filters = this.createFilters();
var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
console.info("|"+queryParameters+"|");
//console.info("|"+queryParameters+"|");
var csvParameters = this.searchPage.getQueryParametersFromUrl(params);
this._getResults(queryParameters, csvParameters, false, this.searchUtils.page, this.searchUtils.size);
@ -118,7 +118,6 @@ properties:EnvProperties;
this.subResults = this._searchDataprovidersService.searchJournals(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, [],this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Journals: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchPage.checkSelectedFilters(this.filters);
this.searchPage.updateBaseUrlWithParameters(this.filters);
@ -159,7 +158,7 @@ properties:EnvProperties;
public queryChanged($event) {
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,csv_parameters, false, this.searchUtils.page, this.searchUtils.size);

View File

@ -104,7 +104,6 @@ properties:EnvProperties;
this.subResults = this._searchDataprovidersService.searchJournals("", null, 1, size, [],this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Journals [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchPage.checkSelectedFilters(this.filters);

View File

@ -265,7 +265,6 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
}
}
public searchSoftware() {
console.info("searchOrps: reload: "+ this.reloadSoftware, this.fetchSoftware.searchUtils.status);
this.activeTab = "software";
this.advancedSearchLink ="/search/advanced/software";
@ -279,7 +278,6 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
}
}
public searchOrps() {
console.info("searchOrps: reload: "+ this.reloadOrps, this.fetchOrps.searchUtils.status);
this.activeTab = "other research products";
this.advancedSearchLink ="/search/advanced/other";
if(this.reloadOrps &&
@ -328,7 +326,7 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
public keywordChanged($event){
this.keyword = $event.value;
console.info("Search Find: search with keyword \"" + this.keyword + "\"" );
//console.info("Search Find: search with keyword \"" + this.keyword + "\"" );
this.location.go(location.pathname,"?keyword=" + this.keyword);
this.reloadTabs();
if(this.activeTab == "publications") {
@ -364,7 +362,6 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
this.subPub = this._searchPublicationsService.numOfSearchPublications(this.keyword,this.properties, refineParams).subscribe(
data => {
console.log("Count results: "+data);
this.fetchPublications.searchUtils.totalResults = data;
this.fetchPublications.searchUtils.status = this.errorCodes.DONE;
if(this.fetchPublications.searchUtils.totalResults == 0) {

View File

@ -76,7 +76,7 @@ properties:EnvProperties;
}
fieldIdsChanged(index: number, fieldId:string ) {
console.log("Field index::"+index + " " + this.selectedFields[index].id + " function id:" +fieldId);
//console.log("Field index::"+index + " " + this.selectedFields[index].id + " function id:" +fieldId);
var id= this.fieldIds[0];
this.selectedFields[index].name = this.fieldIdsMap[id].name;

View File

@ -229,7 +229,7 @@ export class AdvancedSearchPageComponent {
var countParams = 0;
for(var i = 0; i< this.selectedFields.length; i++){
if(this.fieldIdsMap[this.selectedFields[i].id] != undefined && (this.selectedFields[i].value != "" ||this.selectedFields[i].type == "date")){
console.log("createQueryParameters::"+this.selectedFields[i].type);
//console.log("createQueryParameters::"+this.selectedFields[i].type);
if(this.selectedFields[i].type == "date"){
if(this.selectedFields[i].dateValue.type != "any"){
params += (countParams == 0 ? "" : this.selectedFields[i].operatorId) + " " + this.selectedFields[i].id + this.fieldIdsMap[this.selectedFields[i].id].equalityOperator+ '"' + StringUtils.URIEncode(Dates.getDateToString(this.selectedFields[i].dateValue.from)) + " "
@ -271,7 +271,7 @@ export class AdvancedSearchPageComponent {
});
/* Code For Piwik*/
if (typeof localStorage !== 'undefined') {
console.log("In PreviousRouteRecorder : "+this.router.url );
//console.log("In PreviousRouteRecorder : "+this.router.url );
localStorage.setItem('previousRoute', this.router.url);
}
if(this.isPiwikEnabled && (typeof document !== 'undefined')){

View File

@ -75,7 +75,7 @@ private getStats(){
this.sub = this._refineFieldsService.getRefineFieldsResultsByEntityName(this.refineFields,this.entityName, this.properties,refineParams).subscribe(
data => {
console.info("Get Stats for "+this.entityName+ ": [Total:"+data[0]+" ] [fields: "+data[1].length+"]");
//console.info("Get Stats for "+this.entityName+ ": [Total:"+data[0]+" ] [fields: "+data[1].length+"]");
this.filters = data[1];
this.status = this.errorCodes.DONE;
if(data[0] == 0 ){

View File

@ -85,13 +85,13 @@ export class SearchDownloadComponent {
this.alertApplyAll.message = "Sorry, but the results are too many! Use the api instead!";
this.alertApplyAll.cancelButtonText = "Ok";
console.info("denial of Download");
console.error("denial of Download");
}
downloadfile(url:string,filename:string){
//var newWindow = window.open("", "_parent");
//var newWindow = window.open();
console.log("Downloading file: "+ url);
//console.log("Downloading file: "+ url);
this.openLoading();
this.setMessageLoading("Downloading CSV file");
@ -99,7 +99,7 @@ export class SearchDownloadComponent {
data => {
this.closeLoading();
//window.open(window.URL.createObjectURL(data),filename+".csv");
console.info("Fill window with data for csv");
//console.info("Fill window with data for csv");
var url = window.URL.createObjectURL(data);
var a = window.document.createElement('a');
@ -120,7 +120,7 @@ export class SearchDownloadComponent {
}
},
error => {
console.log("Error downloading the file.");
console.error("Error downloading the file.");
//newWindow.close();
this.closeLoading();
this.confirmOpenCsvError();

View File

@ -66,7 +66,7 @@ export class SearchFilterComponent {
return true;
}
filterChange(selected:boolean){
console.info("filter change: "+selected);
//console.info("filter change: "+selected);
if(selected){
this.filter.countSelectedValues++;
// this.reorderFilterValues();

View File

@ -51,7 +51,7 @@ export class SearchFilterModalComponent{
constructor( public _elementRef: ElementRef){}
filterModalChange(selected:boolean) {
console.info("Modal Changed");
//console.info("Modal Changed");
this.filterChange(selected);
this.modalChange.emit({
value: selected

View File

@ -37,7 +37,7 @@ export class SearchFormComponent {
}
keywordChanged() {
console.info("inside form: "+this.keyword);
//console.info("inside form: "+this.keyword);
this.keywordChange.emit({
value: this.keyword
});

View File

@ -279,7 +279,6 @@ export class SearchPageComponent {
if(filter.filterId.indexOf("funder")!=-1 && this.queryParameters.get(filter.filterId) != undefined) {
let funders = (decodeURIComponent(this.queryParameters.get(filter.filterId))).split(/,(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,-1);
for(let funder of funders) {
console.log(funder);
funder_prefix.push(StringUtils.unquote(funder).split("____")[0]);
}
// console.log(funder_prefix );
@ -295,7 +294,6 @@ export class SearchPageComponent {
}
}
console.log("From " +filter.values.length+ "to "+filteredValues.length);
if(filteredValues.length > 0){
filter.values = filteredValues;
}
@ -518,12 +516,11 @@ export class SearchPageComponent {
}
goTo(page:number = 1){
this.searchUtils.page = page;
console.info("searchUtils.page goto = "+this.searchUtils.page);
var urlParameters = this.createUrlParameters(this.filters,true);
console.info("urlParams : "+urlParameters);
//console.info("urlParams : "+urlParameters);
this.updateBaseUrlWithParameters(this.filters);
var queryParameters = this.createSearchQueryParameters(this.filters);
console.info("queryParams : "+queryParameters);
//console.info("queryParams : "+queryParameters);
var indexQuery = this.createIndexQueryParameters(this.filters);
this.location.go(location.pathname,urlParameters);
@ -545,7 +542,6 @@ export class SearchPageComponent {
}
}
filterChanged($event){
console.info("filter Changed");
this.goTo(1);
}
keywordChanged($event) {

View File

@ -460,7 +460,7 @@ Transform initial - not filtered results to get the filtered number
field = "countries";
}
//console.info(row);
console.info("|"+row[field]+"|"+" "+"|"+value.name+"|");
//console.info("|"+row[field]+"|"+" "+"|"+value.name+"|");
//if(row[field] == value.name) {
if(row[field] &&
((filter.valueIsExact && (row[field].trim() == value.name.trim()))

View File

@ -69,9 +69,7 @@ export class SearchResultsPerPageComponent {
constructor () {}
ngOnInit() {
console.info("SearchResultsPerPage: onInit");
}
ngOnInit() {}
sizeChanged() {
this.sizeChange.emit({

View File

@ -187,7 +187,6 @@ public getResultsForDeposit(id:string, type:string, page: number, size: number)
this._searchDataprovidersService.searchDataprovidersForDeposit(id,type, page, size,this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Dataproviders forDeposit: [id:"+id+", type:"+type+" ] [total results:"+this.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -227,7 +226,6 @@ public getResultsForDeposit(id:string, type:string, page: number, size: number)
this._searchDataprovidersService.searchDataprovidersForEntity(parameters, page, size,this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Dataproviders for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -261,7 +259,6 @@ public getResultsForDeposit(id:string, type:string, page: number, size: number)
this._searchDataprovidersService.getDataProvidersforEntityRegistry(id, page, size,this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Dataproviders for Entity Registry: [Id:"+id+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -313,7 +310,6 @@ public getResultsForDeposit(id:string, type:string, page: number, size: number)
this.subResults = this._searchDataprovidersService.searchDataproviders(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, this.searchPage.getFields(),this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Content Providers: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
if(refine){
this.filters = data[2];

View File

@ -134,7 +134,6 @@ public getResultsForEntity(entity:string, id:string, page: number, size: number)
this._searchDatasetsService.searchDatasetsForEntity(parameters, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Research Data for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -176,7 +175,7 @@ public getResultsForDataproviders(id:string, resultsFrom:string, page: number, s
this._searchDatasetsService.searchDatasetsForDataproviders(parameters, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Research Data for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Research Data for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -237,7 +236,7 @@ private _getResults(parameters:string,refine:boolean, page: number, size: number
this.subResults = this._searchDatasetsService.searchDatasets(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, sortBy, this.searchPage.getFields(), this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Research Data: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Research Data: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
if(refine){
this.filters = data[2];

View File

@ -128,7 +128,7 @@ properties: EnvProperties;
this.subResults = this._searchOrganizationsService.searchOrganizations(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, this.searchPage.getFields(), this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Organizations: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Organizations: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
if(refine){
this.filters = data[2];
@ -183,7 +183,7 @@ properties: EnvProperties;
this.loadPaging = true;
var parameters = $event.value;
console.info("queryChanged: Execute search query "+parameters);
//console.info("queryChanged: Execute search query "+parameters);
this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
}
}

View File

@ -131,7 +131,7 @@ public getResultsForEntity(entity:string, id:string, page: number, size: number)
this._searchOrpsService.searchOrpsForEntity(parameters, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Other Research Products for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Other Research Products for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchUtils.status = this.errorCodes.DONE;
@ -167,7 +167,7 @@ public getResultsForDataproviders(id:string, resultsFrom:string, page: number, s
this._searchOrpsService.searchOrpsForDataproviders(parameters, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Other Research Products for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Other Research Products for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchUtils.status = this.errorCodes.DONE;
@ -221,7 +221,7 @@ private _getResults(parameters:string,refine:boolean, page: number, size: number
this.subResults = this._searchOrpsService.searchOrps(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, sortBy, this.searchPage.getFields(), this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Other Research Products: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Other Research Products: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
if(refine){
this.filters = data[2];

View File

@ -53,7 +53,6 @@ properties: EnvProperties;
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
constructor (private route: ActivatedRoute, private _searchProjectsService: SearchProjectsService) {
console.info(" constructor SearchProjectsComponent "+this.refineFields.length);
this.errorCodes = new ErrorCodes();
this.searchUtils.status = this.errorCodes.LOADING;
@ -71,7 +70,6 @@ properties: EnvProperties;
});
this.searchPage.refineFields = this.refineFields;
this.searchPage.fieldIdsMap = this.fieldIdsMap;
console.info(" ngOnInit SearchProjectsComponent "+this.refineFields.length);
//get refine field filters from url parameters
var firstLoad = true;
this.sub = this.route.queryParams.subscribe(params => {
@ -94,7 +92,7 @@ properties: EnvProperties;
if(this.searchUtils.size != 5 && this.searchUtils.size != 10 && this.searchUtils.size != 20 && this.searchUtils.size != 50) {
this.searchUtils.size = 10;
}
var queryParameters = this.searchPage.getQueryParametersFromUrl(params);
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size);
});
@ -132,7 +130,7 @@ properties: EnvProperties;
this.subResults = this._searchProjectsService.searchProjects(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, this.searchPage.getFields(), this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Projects: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Projects: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
if(refine){
this.filters = data[2];
@ -188,7 +186,7 @@ properties: EnvProperties;
this._searchProjectsService.getProjectsforDataProvider(id, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Projects for Dataproviders: [Id:"+id+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Projects for Dataproviders: [Id:"+id+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();

View File

@ -141,7 +141,7 @@ public getResultsForEntity(entity:string, id:string, page: number, size: number)
this._searchPublicationsService.searchPublicationsForEntity(parameters, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Publications for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Publications for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -183,7 +183,7 @@ public getResultsForDataproviders(id:string, resultsFrom:string, page: number, s
this._searchPublicationsService.searchPublicationsForDataproviders(parameters, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Publications for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Publications for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -244,9 +244,8 @@ private _getResults(parameters:string,refine:boolean, page: number, size: number
this.subResults = this._searchPublicationsService.searchPublications(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, sortBy, this.searchPage.getFields(), this.properties).subscribe(
data => {
console.info(data);
this.searchUtils.totalResults = data[0];
console.info("search Publications: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Publications: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
if(refine){
this.filters = data[2];
@ -326,8 +325,7 @@ public getAggregatorResults(id:string, page: number, size: number){
this.loadPaging = true;
var parameters = $event.value;
console.info("queryChanged: Execute search query "+parameters);
console.info("Search Pubs::page "+this.searchUtils.page);
//console.info("queryChanged: Execute search query "+parameters);
this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
}

View File

@ -133,7 +133,7 @@ public getResultsForEntity(entity:string, id:string, page: number, size: number)
this._searchSoftwareService.searchSoftwareForEntity(parameters, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Software for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Software for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -175,7 +175,7 @@ public getResultsForDataproviders(id:string, resultsFrom:string, page: number, s
this._searchSoftwareService.searchSoftwareForDataproviders(parameters, page, size, this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Software for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Software for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -236,7 +236,7 @@ private _getResults(parameters:string,refine:boolean, page: number, size: number
this.subResults = this._searchSoftwareService.searchSoftware(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, sortBy, this.searchPage.getFields(), this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Software: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Software: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
if(refine){
this.filters = data[2];

View File

@ -12,7 +12,6 @@ export class MetricsService {
constructor(private http: Http ) {}
getMetrics (id: string, entityType: string, properties:EnvProperties):any {
console.info("getMetrics in service");
let url = properties.metricsAPIURL+entityType+"/"+id+"/clicks";
let key = url;
@ -74,7 +73,6 @@ export class MetricsService {
this.metrics.infos.set(id, info);
}
}
console.info("Metrics : "+this.metrics.infos.size);
return this.metrics;
}

View File

@ -15,7 +15,6 @@ export class OrganizationService {
organizationInfo: OrganizationInfo;
getOrganizationInfo (id: string, properties:EnvProperties):any {
console.info("getOrganizationInfo in service");
let url = properties.searchAPIURLLAst+'resources?format=json&query=( (oaftype exact organization) and (reldatasourcecompatibilityid=driver or reldatasourcecompatibilityid=driver-openaire2.0 or reldatasourcecompatibilityid=openaire2.0 or reldatasourcecompatibilityid=openaire3.0 or reldatasourcecompatibilityid=openaire2.0_data or reldatasourcecompatibilityid=hostedBy or relprojectid=* or reldatasourcecompatibilityid = native)) and ( objIdentifier ='+id+')';
return this.http.get((properties.useCache)? (properties.cacheUrl +encodeURIComponent(url)): url)
@ -29,7 +28,6 @@ export class OrganizationService {
}
getOrganizationNameAndUrlById(id: string, properties: EnvProperties): any {
console.info("getOrganizationNameById service");
let url = properties.searchAPIURLLAst+"organizations/"+id+"?format=json";
return this.http.get((properties.useCache) ? (properties.cacheUrl+encodeURIComponent(url)): url)
@ -46,7 +44,6 @@ export class OrganizationService {
}
parseOrganizationInfo (data: any):any {
console.info("parseOrganizationInfo");
this.organizationInfo = new OrganizationInfo();
let organization;
@ -174,7 +171,6 @@ export class OrganizationService {
}
parseOrganizationNameAndUrl(organization: any): any {
console.info("parseOrganizationNameAndUrl");
let title: {"name": string, "url": string} = {"name": "", "url": ""};
if(organization != null) {

View File

@ -66,7 +66,6 @@ export class SearchDataprovidersService {
}
searchCompatibleDataproviders (params: string,refineParams:string, page: number, size: number, refineFields:string[], properties:EnvProperties ):any {
console.info("in search Compatible Dataproviders service function");
let url: string = properties.searchResourcesAPIURL;
url += '?query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other) not(datasourcetypeuiid exact "pubsrepository::journal") not(datasourcetypeuiid exact "aggregator::pubsrepository::journals"))';
if(params!= null && params != '' ) {
@ -123,7 +122,6 @@ export class SearchDataprovidersService {
}
searchJournals (params: string,refineParams:string, page: number, size: number, refineFields:string[] , properties:EnvProperties):any {
console.info("in search Journals service function");
let url: string = properties.searchResourcesAPIURL;
//url += "?query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other))"
url += '?query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ))';

View File

@ -32,13 +32,11 @@ export class SearchOrganizationsService {
results.push({"name": name, "id": id});
}
console.info(results);
return results;
}
searchOrganizations (params: string, refineParams:string, page: number, size: number, refineFields:string[] , properties:EnvProperties):any {
console.info("In searchOrganizations");
let link = properties.searchAPIURLLAst+"organizations";
@ -54,8 +52,6 @@ export class SearchOrganizationsService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "organization")]);
}
advancedSearchOrganizations (params: string, page: number, size: number, properties:EnvProperties ):any {
@ -77,7 +73,6 @@ export class SearchOrganizationsService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results'])]);
}

View File

@ -36,7 +36,6 @@ export class SearchOrpsService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "other")]);
}
searchOrpById (id: string , properties:EnvProperties):any {
@ -89,8 +88,6 @@ export class SearchOrpsService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "other")]);
}
advancedSearchOrps (params: string, page: number, size: number, sortBy: string, properties:EnvProperties ):any {
@ -114,7 +111,6 @@ export class SearchOrpsService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results'])]);
}
searchOrpsForEntity (params: string, page: number, size: number, properties:EnvProperties):any {

View File

@ -16,8 +16,6 @@ export class SearchProjectsService {
searchProjects (params: string, refineParams:string, page: number, size: number, refineFields:string[] , properties:EnvProperties ):any {
console.info("In searchProjects");
let link = properties.searchAPIURLLAst+"projects";
let url = link+"?";
@ -32,7 +30,6 @@ export class SearchProjectsService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "project")]);
}
getProjectsforDataProvider (datasourceId: string, page: number, size: number, properties:EnvProperties ):any {
@ -66,7 +63,6 @@ export class SearchProjectsService {
url += "&format=json";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results'])]);
}
getProjectsForOrganizations (organizationId: string, filterquery: string, page: number, size: number, refineFields:string[] , properties:EnvProperties ):any {
@ -89,7 +85,6 @@ export class SearchProjectsService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "project")]);
}
getFunders(properties:EnvProperties ):any {

View File

@ -37,7 +37,6 @@ export class SearchPublicationsService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
// .do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "publication")]);
}
searchPublicationById (id: string, properties:EnvProperties ):any {
@ -90,7 +89,6 @@ export class SearchPublicationsService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "publication")]);
}
@ -114,8 +112,6 @@ export class SearchPublicationsService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results'])]);
}
searchPublicationsForEntity (params: string, page: number, size: number, properties:EnvProperties):any {

View File

@ -35,7 +35,6 @@ export class SearchSoftwareService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "software")]);
}
searchSoftwareById (id: string, properties:EnvProperties ):any {
@ -87,7 +86,6 @@ export class SearchSoftwareService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "software")]);
}
advancedSearchSoftware (params: string, page: number, size: number, sortBy: string, properties:EnvProperties ):any {
@ -110,7 +108,6 @@ export class SearchSoftwareService {
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
.map(res => <any> res.json())
//.do(res => console.info(res))
.map(res => [res['meta'].total, this.parseResults(res['results'])]);
}
searchSoftwareForEntity (params: string, page: number, size: number, properties:EnvProperties):any {

View File

@ -39,7 +39,7 @@ export class NavigationBarComponent {
}
ngOnInit() {
console.log(this.menuItems);
//console.log(this.menuItems);
if (typeof document !== 'undefined') {
try{
this.isClient = true;

View File

@ -9,16 +9,16 @@ import { mapTo } from 'rxjs/operators';
@Injectable()
export class ConfigurationService {
constructor(private http: Http ) {}
getCommunityInformation(APIUrl:string, community:string){
return this.http.get(APIUrl + "/communityFull/" + community)
.map(res => res.json()).do(res => {console.log(res)});
.map(res => res.json());
}
isEntityEnabled(APIUrl:string, community:string,entity: string){
console.log("isEntityEnabled: "+entity);
//console.log("isEntityEnabled: "+entity);
let url = "isEntityEnabled-"+entity;
// if(entity == "publication" || entity == "dataset" || entity == "datasource"){
@ -38,7 +38,7 @@ export class ConfigurationService {
}
return result;
}).do(res => {console.log("Route "+router +" is "+res)});
});//.do(res => {console.log("Route "+router +" is "+res)});
}
getMainPageContent(APIUrl:string, community:string,){

View File

@ -11,10 +11,8 @@ export class EmailService {
sendEmail(url: string, email: Email) {
let body = JSON.stringify(email);
console.log(body);
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
.do(request => console.log("Insert Response:"+request.status))
.map(request => request.json());
}

View File

@ -14,12 +14,12 @@ export class Validator {
for(let i = 0; i < data.length; i++) {
if (!this.emailValidator(data[i])) {
// TODO remove console message after final testing
console.log("INVALID EMAIL: "+data[i]);
//console.log("INVALID EMAIL: "+data[i]);
return false;
}
}
// TODO remove console message after final testing
console.log("ALL EMAILS ARE VALID");
//console.log("ALL EMAILS ARE VALID");
return true;
}

View File

@ -103,7 +103,7 @@ export class EntitiesAutocompleteComponent {
this.filtered = this.searchTermStream
.debounceTime(300).distinctUntilChanged()
.switchMap((term: string) => {
console.log("funder"+this.funderId);
//console.log("funder"+this.funderId);
var results = this._search.searchProjectsByFunder(term, (this.funderId == "0"?"":encodeURIComponent(this.funderId)), this.properties);
this.showLoading = false;
this.results = results.length;
@ -235,7 +235,7 @@ export class EntitiesAutocompleteComponent {
}
showItem(item:any):string{
console.log(item);
//console.log(item);
if (item.projectName || item.projectAcronym || item.code){ //project
return ((item.projectAcronym)?"["+item.projectAcronym+"] ":"")+item.projectName+((item.code)?" ("+item.code+")":"");
}else if (item.name){ //search

View File

@ -16,7 +16,7 @@ export class EntitiesSearchService {
searchProjectsByFunder(keyword:string, funderId:string, properties:EnvProperties ):any {
this.ready = false;
let url = properties.searchResourcesAPIURL;
console.log("Funder is " + funderId);
//console.log("Funder is " + funderId);
url = url+"?query=(oaftype exact project and deletedbyinference=false) ";
if(keyword!= null && keyword != '' ) {
url += 'and ((projectcode_nt exact "'+keyword+'" )or('+keyword+')) ' ;
@ -25,7 +25,7 @@ export class EntitiesSearchService {
url += "&page=0&size=10";
url += "&format=json";
console.log("URL " + url);
//console.log("URL " + url);
// let url = properties.searchAPIURLLAst+"projects?"+((keyword && keyword.length > 0)?("q=" +keyword):"")+((funderId && funderId.length > 0 )?"&fq=funder exact " + '"'+funderId+ '"':"")+"&size=10&page=0&format=json";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url).toPromise()
.then(request =>
@ -40,7 +40,6 @@ export class EntitiesSearchService {
}
searchByDepositType(keyword:string, DepositType:string, properties:EnvProperties ):any {
this.ready = false;
console.info("In searchOrganizationsforDeposit");
let link = properties.searchResourcesAPIURL;
@ -73,7 +72,7 @@ export class EntitiesSearchService {
.then(request =>
{
request = request.json().results;
console.log(request);
//console.log(request);
this.ready = true;
return this.parse(request,"oaf:organization","organization");
}).catch((ex) => {
@ -262,7 +261,7 @@ private fetch (link,id,oafEntityType,type, properties:EnvProperties ){
if(array.length == 0){
array.push({id:'-1',label:'No results found'});
}
console.info("Parsing results.... Size:"+array.length);
//console.info("Parsing results.... Size:"+array.length);
return array;
}

View File

@ -46,7 +46,6 @@ import {ErrorCodes} from './properties/errorCodes';
ngOnInit() {
this.errorCodes = new ErrorCodes();
console.info("ngOnInit");
if(!this.status) {
this.status = [this.errorCodes.LOADING];
}

View File

@ -61,7 +61,6 @@ export class ExportCSVComponent {
}
public static convertArrayOfObjectsToCSV(args) {
console.info("convertArrayOfObjectsToCSV");
var result, ctr, keys, columnDelimiter, lineDelimiter, data;
@ -106,7 +105,6 @@ export class ExportCSVComponent {
}
public static downloadCSV(data: any, filenameArg: string) {
console.info("downloadCSV");
var encodedData, filename, link;

View File

@ -45,7 +45,7 @@ export class FetchDataproviders {
this.subResults = this._searchDataprovidersService.searchDataproviders(parameters,null, page, size,[], properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Content Providers: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Content Providers: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//ar errorCodes:ErrorCodes = new ErrorCodes();
@ -82,7 +82,7 @@ export class FetchDataproviders {
this.subResults = this._searchDataprovidersService.searchDataproviders(parameters,null, page, size,[], properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Content Providers: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Content Providers: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchUtils.status = this.errorCodes.DONE;
@ -184,7 +184,7 @@ public getResultsForDeposit(id:string, type:string, page: number, size: number,
this._searchDataprovidersService.searchDataprovidersForDeposit(id,type, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Dataproviders forDeposit: [id:"+id+", type:"+type+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Dataproviders forDeposit: [id:"+id+", type:"+type+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -239,7 +239,7 @@ public getResultsBySubjectsForDeposit(subject:string, type:string, page: number,
this._searchDataprovidersService.searchDataProvidersBySubjects(subject,type, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Dataproviders forDeposit: [subject:"+subject+", type:"+type+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Dataproviders forDeposit: [subject:"+subject+", type:"+type+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -297,7 +297,7 @@ public getResultsBySubjectsForDeposit(subject:string, type:string, page: number,
this._searchDataprovidersService.searchDataprovidersForEntity(parameters, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Dataproviders for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Dataproviders for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -333,7 +333,7 @@ public getResultsBySubjectsForDeposit(subject:string, type:string, page: number,
this._searchDataprovidersService.getDataProvidersforEntityRegistry(id, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Dataproviders for Entity Registry: [Id:"+id+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Dataproviders for Entity Registry: [Id:"+id+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();

View File

@ -60,7 +60,7 @@ export class FetchDatasets{
this.subResults = this._searchDatasetsService.searchDatasets(parameters,refineParams, page, size, "", [], properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Research Data: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Research Data: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -141,7 +141,7 @@ public getResultsForEntity(entity:string, id:string, page: number, size: number,
this._searchDatasetsService.searchDatasetsForEntity(parameters, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Research Data for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Research Data for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -186,7 +186,7 @@ public getResultsForDataproviders(id:string, resultsFrom:string, page: number, s
this._searchDatasetsService.searchDatasetsForDataproviders(parameters, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Research Data for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Research Data for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();

View File

@ -44,7 +44,7 @@ export class FetchOrganizations {
this.subResults = this._searchOrganizationsService.searchOrganizations(parameters, null, page, size, [], properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Organizations: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Organizations: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();

View File

@ -39,7 +39,6 @@ export class FetchOrps{
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null){
console.info("orps: getResultsByKeyword");
var parameters = "";
if(keyword.length > 0){
var DOIs:string[] = DOI.getDOIsFromString(keyword);
@ -60,7 +59,7 @@ export class FetchOrps{
this.subResults = this._searchOrpsService.searchOrps(parameters,refineParams, page, size, "", [], properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Other Research Products: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Other Research Products: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchUtils.status = this.errorCodes.DONE;
@ -125,7 +124,7 @@ public getResultsForEntity(entity:string, id:string, page: number, size: number,
this._searchOrpsService.searchOrpsForEntity(parameters, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Other Research Products for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Other Research Products for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchUtils.status = this.errorCodes.DONE;
@ -164,7 +163,7 @@ public getResultsForDataproviders(id:string, resultsFrom:string, page: number, s
this._searchOrpsService.searchOrpsForDataproviders(parameters, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Other Research Products for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Other Research Products for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
this.searchUtils.status = this.errorCodes.DONE;

View File

@ -43,7 +43,7 @@ export class FetchProjects{
this.subResults = this._searchProjectsService.searchProjects(parameters, null, page, size, [], properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Projects: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Projects: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -78,7 +78,7 @@ export class FetchProjects{
this._searchProjectsService.getProjectsforDataProvider(id, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Projects for Dataproviders: [Id:"+id+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Projects for Dataproviders: [Id:"+id+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -150,16 +150,16 @@ export class FetchProjects{
this._searchProjectsService.getProjectsForOrganizations(organizationId,filterquery, page, size,refineFields, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0]; // the results can be filtered so this number can be no total results
console.info("search Projects for Organization: [Id:"+organizationId+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Projects for Organization: [Id:"+organizationId+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
if(refineFields && refineFields.length > 0){
this.filters = data[2];
filterquery = decodeURIComponent(filterquery);
for(var i = 0; i < this.filters.length; i++){
if(filterquery.indexOf(this.filters[i].filterId) !== -1){
console.log("this.filters[i].filterId:"+this.filters[i].filterId);
//console.log("this.filters[i].filterId:"+this.filters[i].filterId);
for(var j = 0; j < this.filters[i].values.length; j++){
console.log("this.filters[i].values[j].id:"+this.filters[i].values[j].id);
//console.log("this.filters[i].values[j].id:"+this.filters[i].values[j].id);
if(filterquery.indexOf(this.filters[i].values[j].id) !== -1){
this.filters[i].values[j].selected = true;
}
@ -172,13 +172,13 @@ export class FetchProjects{
this.searchUtils.totalResultsNoFilters = this.searchUtils.totalResults;
this.funders = [];
for(var i = 0; i < this.filters.length; i++){
console.log("this.filters[i].filterId:"+this.filters[i].filterId);
//console.log("this.filters[i].filterId:"+this.filters[i].filterId);
if(this.filters[i].filterId == "funder"){
this.funders = (this.filters[i].values);
}
}
console.log(" this.funders:"+ this.funders);
//console.log(" this.funders:"+ this.funders);
}
//var errorCodes:ErrorCodes = new ErrorCodes();

View File

@ -72,7 +72,7 @@ export class FetchPublications {
this.subResults = this._searchPublicationsService.searchPublications(parameters,refineParams, page, size, "", [], properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Publications: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Publications: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -152,7 +152,7 @@ public getResultsForEntity(entity:string, id:string, page: number, size: number,
data => {
this.searchUtils.totalResults = data[0];
console.info("search Publications for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Publications for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -198,7 +198,7 @@ public getResultsForDataproviders(id:string, resultsFrom:string, page: number, s
this._searchPublicationsService.searchPublicationsForDataproviders(parameters, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Publications for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Publications for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();

View File

@ -61,7 +61,7 @@ export class FetchSoftware{
this.subResults = this._searchSoftwareService.searchSoftware(parameters,refineParams, page, size, "", [], properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Software: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Software: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -140,7 +140,7 @@ public getResultsForEntity(entity:string, id:string, page: number, size: number,
this._searchSoftwareService.searchSoftwareForEntity(parameters, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Software for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Software for "+entity+": [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();
@ -185,7 +185,7 @@ public getResultsForDataproviders(id:string, resultsFrom:string, page: number, s
this._searchSoftwareService.searchSoftwareForDataproviders(parameters, page, size, properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Software for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
//console.info("search Software for Dataproviders: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]");
this.results = data[1];
//var errorCodes:ErrorCodes = new ErrorCodes();

View File

@ -11,7 +11,7 @@ export class HelperService {
constructor(private http: Http) {}
getHelper (router: string, position: string, before: boolean, div: string, properties:EnvProperties,communityId:string ):any {
console.info("get router helpText for : "+router+" - position="+position+" - before="+before + " - div="+div);
//console.info("get router helpText for : "+router+" - position="+position+" - before="+before + " - div="+div);
let url = properties.adminToolsAPIURL;
if(div) {

View File

@ -16,6 +16,6 @@ export class IFrameComponent {
}
ngOnInit() {
this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.url);
console.info("URL:" + this.safeUrl);
//console.info("URL:" + this.safeUrl);
}
}

Some files were not shown because too many files have changed in this diff Show More