From c6b84c171e3a1032bee8e36757723741b9b084ce Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Thu, 14 Feb 2019 10:15:44 +0000 Subject: [PATCH] [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 --- .../claimContextSearchForm.component.ts | 5 --- .../claimProjectSearchForm.component.ts | 5 +-- .../claimResultSearchForm.component.ts | 4 --- .../displayClaims/displayClaims.component.ts | 18 ++++------- claims/claim-utils/service/claims.service.ts | 32 +++++++++---------- .../claim-utils/service/contexts.service.ts | 8 ++--- .../service/searchDatacite.service.ts | 5 +-- .../service/searchOrcid.service.ts | 6 ---- claims/claim-utils/startOver.component.ts | 6 ++-- .../claimsByToken/claimsByToken.component.ts | 29 ++++------------- claims/claimsByToken/claimsByToken.service.ts | 11 ++----- .../directLinking/directLinking.component.ts | 7 ++-- .../linking/bulkClaim/bulkClaim.component.ts | 2 -- .../insertClaim/insertClaim.component.ts | 12 ++----- connect/community/community.service.ts | 4 +-- .../connectAdminLoginGuard.guard.ts | 4 +-- .../communityGuard/connectRIGuard.guard.ts | 2 +- .../communityGuard/connectSubscriber.guard.ts | 2 +- .../mailPrefs.component.ts | 11 ------- deposit/deposit.component.ts | 1 - deposit/depositResult.component.ts | 8 ----- .../dataProvider/dataProvider.service.ts | 1 - landingPages/dataset/dataset.component.ts | 2 -- landingPages/dataset/dataset.service.ts | 2 -- .../htmlProjectReport.service.ts | 1 - .../landing-utils/addThis.component.ts | 2 +- .../landing-utils/availableOn.component.ts | 1 - .../citeThis/citeThis.component.ts | 1 - .../landing-utils/fundedBy.component.ts | 1 - .../landing-utils/publishedIn.component.ts | 1 - .../searchingProjectsInTab.component.ts | 3 +- .../landing-utils/showAuthors.component.ts | 1 - .../showIdentifiers.component.ts | 1 - .../landing-utils/showTitle.component.ts | 2 -- .../organization/organization.component.ts | 6 +--- landingPages/orp/orp.component.ts | 2 -- landingPages/orp/orp.service.ts | 2 -- landingPages/project/project.component.ts | 6 +--- landingPages/project/project.service.ts | 1 - .../publication/publication.component.ts | 4 --- .../publication/publication.service.ts | 1 - landingPages/software/software.component.ts | 4 +-- landingPages/software/software.service.ts | 2 -- login/userMini.component.ts | 2 +- .../advancedSearchDataProviders.component.ts | 10 +++--- .../advancedSearchDatasets.component.ts | 6 ++-- .../advancedSearchOrganizations.component.ts | 6 ++-- .../advanced/advancedSearchOrps.component.ts | 6 ++-- .../advancedSearchProjects.component.ts | 8 ++--- .../advancedSearchPublications.component.ts | 6 ++-- .../advancedSearchSoftware.component.ts | 6 ++-- .../compatibleDataProviders.component.ts | 6 ++-- .../compatibleDataProvidersTable.component.ts | 1 - .../entityRegistries.component.ts | 3 +- .../entityRegistriesTable.component.ts | 1 - .../dataProviders/journals.component.ts | 5 ++- .../dataProviders/journalsTable.component.ts | 1 - searchPages/find/search.component.ts | 5 +-- .../advancedSearchForm.component.ts | 2 +- .../advancedSearchPage.component.ts | 4 +-- .../searchUtils/browseEntities.component.ts | 2 +- .../searchUtils/searchDownload.component.ts | 8 ++--- .../searchUtils/searchFilter.component.ts | 2 +- .../searchFilterModal.component.ts | 2 +- .../searchUtils/searchForm.component.ts | 2 +- .../searchUtils/searchPage.component.ts | 8 ++--- .../searchPageTableView.component.ts | 2 +- .../searchResultsPerPage.component.ts | 4 +-- .../simple/searchDataproviders.component.ts | 4 --- .../simple/searchDatasets.component.ts | 5 ++- .../simple/searchOrganizations.component.ts | 4 +-- searchPages/simple/searchOrps.component.ts | 6 ++-- .../simple/searchProjects.component.ts | 8 ++--- .../simple/searchPublications.component.ts | 10 +++--- .../simple/searchSoftware.component.ts | 6 ++-- services/metrics.service.ts | 2 -- services/organization.service.ts | 4 --- services/searchDataproviders.service.ts | 2 -- services/searchOrganizations.service.ts | 5 --- services/searchOrps.service.ts | 4 --- services/searchProjects.service.ts | 5 --- services/searchPublications.service.ts | 4 --- services/searchSoftware.service.ts | 3 -- sharedComponents/navigationBar.component.ts | 2 +- utils/configuration/configuration.service.ts | 8 ++--- utils/email/email.service.ts | 2 -- utils/email/validator.ts | 4 +-- .../entitiesAutoComplete.component.ts | 4 +-- .../entitySearch.service.ts | 9 +++--- utils/errorMessages.component.ts | 1 - utils/exportCSV.class.ts | 2 -- .../fetchDataproviders.class.ts | 12 +++---- .../fetchDatasets.class.ts | 6 ++-- .../fetchOrganizations.class.ts | 2 +- utils/fetchEntitiesClasses/fetchOrps.class.ts | 7 ++-- .../fetchProjects.class.ts | 14 ++++---- .../fetchPublications.class.ts | 6 ++-- .../fetchSoftware.class.ts | 6 ++-- utils/helper/helper.service.ts | 2 +- utils/iframe.component.ts | 2 +- utils/number-utils.class.ts | 4 +-- utils/pagingFormatterNoLoad.component.ts | 2 +- utils/piwik/piwik.service.ts | 8 ++--- .../environment-specific.service.ts | 6 ++-- .../ISVocabularies.service.ts | 7 ++-- utils/subscribe/subscribe.service.ts | 10 +++--- 106 files changed, 169 insertions(+), 366 deletions(-) diff --git a/claims/claim-utils/claimContextSearchForm.component.ts b/claims/claim-utils/claimContextSearchForm.component.ts index 0710093e..cbe5a67e 100644 --- a/claims/claim-utils/claimContextSearchForm.component.ts +++ b/claims/claim-utils/claimContextSearchForm.component.ts @@ -339,7 +339,6 @@ getCommunities () { data => { this.concepts =data; - console.log(data); for(var i =0 ; i { - console.log(data); for(var i =0 ; i { 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++){ diff --git a/claims/claim-utils/claimProjectSearchForm.component.ts b/claims/claim-utils/claimProjectSearchForm.component.ts index c3c88969..98329510 100644 --- a/claims/claim-utils/claimProjectSearchForm.component.ts +++ b/claims/claim-utils/claimProjectSearchForm.component.ts @@ -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 ); } diff --git a/claims/claim-utils/claimResultSearchForm.component.ts b/claims/claim-utils/claimResultSearchForm.component.ts index 2cab6fc2..e519acd9 100644 --- a/claims/claim-utils/claimResultSearchForm.component.ts +++ b/claims/claim-utils/claimResultSearchForm.component.ts @@ -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; diff --git a/claims/claim-utils/displayClaims/displayClaims.component.ts b/claims/claim-utils/displayClaims/displayClaims.component.ts index dcb152f5..2bcd62b0 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.ts +++ b/claims/claim-utils/displayClaims/displayClaims.component.ts @@ -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;i0?'&':'')+"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){ diff --git a/claims/claim-utils/service/claims.service.ts b/claims/claim-utils/service/claims.service.ts index 101b78d8..34f9d3ee 100644 --- a/claims/claim-utils/service/claims.service.ts +++ b/claims/claim-utils/service/claims.service.ts @@ -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 => 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); } diff --git a/claims/claim-utils/service/contexts.service.ts b/claims/claim-utils/service/contexts.service.ts index 68cef759..31000b8f 100644 --- a/claims/claim-utils/service/contexts.service.ts +++ b/claims/claim-utils/service/contexts.service.ts @@ -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 => 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; diff --git a/claims/claim-utils/service/searchDatacite.service.ts b/claims/claim-utils/service/searchDatacite.service.ts index e4807cd2..595a7c15 100644 --- a/claims/claim-utils/service/searchDatacite.service.ts +++ b/claims/claim-utils/service/searchDatacite.service.ts @@ -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 => 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 => 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)) diff --git a/claims/claim-utils/service/searchOrcid.service.ts b/claims/claim-utils/service/searchOrcid.service.ts index 4eca31b5..172ad5f1 100644 --- a/claims/claim-utils/service/searchOrcid.service.ts +++ b/claims/claim-utils/service/searchOrcid.service.ts @@ -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']); } diff --git a/claims/claim-utils/startOver.component.ts b/claims/claim-utils/startOver.component.ts index d48f564c..ad966445 100644 --- a/claims/claim-utils/startOver.component.ts +++ b/claims/claim-utils/startOver.component.ts @@ -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 ); } } diff --git a/claims/claimsByToken/claimsByToken.component.ts b/claims/claimsByToken/claimsByToken.component.ts index 31e3970b..32aaffc5 100644 --- a/claims/claimsByToken/claimsByToken.component.ts +++ b/claims/claimsByToken/claimsByToken.component.ts @@ -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(); this.dtTrigger[1] = new Subject(); @@ -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 = $('#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(){ diff --git a/claims/claimsByToken/claimsByToken.service.ts b/claims/claimsByToken/claimsByToken.service.ts index 404d85b2..044b9d83 100644 --- a/claims/claimsByToken/claimsByToken.service.ts +++ b/claims/claimsByToken/claimsByToken.service.ts @@ -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); } diff --git a/claims/directLinking/directLinking.component.ts b/claims/directLinking/directLinking.component.ts index ca1df929..25587ef3 100644 --- a/claims/directLinking/directLinking.component.ts +++ b/claims/directLinking/directLinking.component.ts @@ -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{ diff --git a/claims/linking/bulkClaim/bulkClaim.component.ts b/claims/linking/bulkClaim/bulkClaim.component.ts index ec52d410..b3f5bae3 100644 --- a/claims/linking/bulkClaim/bulkClaim.component.ts +++ b/claims/linking/bulkClaim/bulkClaim.component.ts @@ -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]); diff --git a/claims/linking/insertClaim/insertClaim.component.ts b/claims/linking/insertClaim/insertClaim.component.ts index 596a7db0..db2501b6 100644 --- a/claims/linking/insertClaim/insertClaim.component.ts +++ b/claims/linking/insertClaim/insertClaim.component.ts @@ -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+="
The following records couldn't automatically inserted to the Openaire Info space:
    "; for(var i=0; i< this.errorInRecords.length ; i++){ @@ -302,7 +296,7 @@ private errorsInClaimsInsertion(){ text+="
"; } this.errorMessage+="
An error occured:
"+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; diff --git a/connect/community/community.service.ts b/connect/community/community.service.ts index 8920dfa5..6a819634 100644 --- a/connect/community/community.service.ts +++ b/connect/community/community.service.ts @@ -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 { diff --git a/connect/communityGuard/connectAdminLoginGuard.guard.ts b/connect/communityGuard/connectAdminLoginGuard.guard.ts index be31bf68..69e4ea79 100644 --- a/connect/communityGuard/connectAdminLoginGuard.guard.ts +++ b/connect/communityGuard/connectAdminLoginGuard.guard.ts @@ -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 { - 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 { diff --git a/connect/communityGuard/connectRIGuard.guard.ts b/connect/communityGuard/connectRIGuard.guard.ts index 4b80a521..c9fb3e31 100644 --- a/connect/communityGuard/connectRIGuard.guard.ts +++ b/connect/communityGuard/connectRIGuard.guard.ts @@ -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 { - console.log(state.url); + //console.log(state.url); var user; var loggedIn = false; var isAdmin = false; diff --git a/connect/communityGuard/connectSubscriber.guard.ts b/connect/communityGuard/connectSubscriber.guard.ts index f8e38f53..4a8a1794 100644 --- a/connect/communityGuard/connectSubscriber.guard.ts +++ b/connect/communityGuard/connectSubscriber.guard.ts @@ -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 { - console.log(state.url); + //console.log(state.url); var user; var authorized = false; var errorCode = LoginErrorCodes.NOT_SUBSCRIBER; diff --git a/connect/userEmailPreferences/mailPrefs.component.ts b/connect/userEmailPreferences/mailPrefs.component.ts index dc1d7fa7..2a9a0113 100644 --- a/connect/userEmailPreferences/mailPrefs.component.ts +++ b/connect/userEmailPreferences/mailPrefs.component.ts @@ -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 : 'No changes selected for '+this.notifications[index].openaireName+' email preferences', 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; } diff --git a/deposit/deposit.component.ts b/deposit/deposit.component.ts index e71e239f..d3348c85 100644 --- a/deposit/deposit.component.ts +++ b/deposit/deposit.component.ts @@ -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 } } ); diff --git a/deposit/depositResult.component.ts b/deposit/depositResult.component.ts index e296909c..26523c00 100644 --- a/deposit/depositResult.component.ts +++ b/deposit/depositResult.component.ts @@ -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; diff --git a/landingPages/dataProvider/dataProvider.service.ts b/landingPages/dataProvider/dataProvider.service.ts index 0636a206..940bed5d 100644 --- a/landingPages/dataProvider/dataProvider.service.ts +++ b/landingPages/dataProvider/dataProvider.service.ts @@ -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; diff --git a/landingPages/dataset/dataset.component.ts b/landingPages/dataset/dataset.component.ts index 89ff9819..2d13da85 100644 --- a/landingPages/dataset/dataset.component.ts +++ b/landingPages/dataset/dataset.component.ts @@ -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; diff --git a/landingPages/dataset/dataset.service.ts b/landingPages/dataset/dataset.service.ts index 77a41127..97bdcc4c 100644 --- a/landingPages/dataset/dataset.service.ts +++ b/landingPages/dataset/dataset.service.ts @@ -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 => 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'], diff --git a/landingPages/htmlProjectReport/htmlProjectReport.service.ts b/landingPages/htmlProjectReport/htmlProjectReport.service.ts index 8e7303b7..5f5f2d6f 100644 --- a/landingPages/htmlProjectReport/htmlProjectReport.service.ts +++ b/landingPages/htmlProjectReport/htmlProjectReport.service.ts @@ -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; diff --git a/landingPages/landing-utils/addThis.component.ts b/landingPages/landing-utils/addThis.component.ts index bd9d1546..b729d1c1 100644 --- a/landingPages/landing-utils/addThis.component.ts +++ b/landingPages/landing-utils/addThis.component.ts @@ -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(); diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts index 34ea2a8f..ea3c7ac3 100644 --- a/landingPages/landing-utils/availableOn.component.ts +++ b/landingPages/landing-utils/availableOn.component.ts @@ -69,7 +69,6 @@ export class AvailableOnComponent { ngOnInit() {} public scroll() { - console.info("scroll into view"); if (typeof document !== 'undefined') { this.element.nativeElement.scrollIntoView(); } diff --git a/landingPages/landing-utils/citeThis/citeThis.component.ts b/landingPages/landing-utils/citeThis/citeThis.component.ts index 76b10a5a..f6a5eb1c 100644 --- a/landingPages/landing-utils/citeThis/citeThis.component.ts +++ b/landingPages/landing-utils/citeThis/citeThis.component.ts @@ -134,7 +134,6 @@ export class CiteThisComponent { return this.lang; } this.retrieveItem= function(id){ - console.log("retrieve id:" + id); return this.data; } }; diff --git a/landingPages/landing-utils/fundedBy.component.ts b/landingPages/landing-utils/fundedBy.component.ts index a9a55210..c66c6ec0 100644 --- a/landingPages/landing-utils/fundedBy.component.ts +++ b/landingPages/landing-utils/fundedBy.component.ts @@ -124,7 +124,6 @@ export class FundedByComponent { } public scroll() { - console.info("scroll into view"); if (typeof document !== 'undefined') { this.element.nativeElement.scrollIntoView(); } diff --git a/landingPages/landing-utils/publishedIn.component.ts b/landingPages/landing-utils/publishedIn.component.ts index 0f5eed1c..597d38f1 100644 --- a/landingPages/landing-utils/publishedIn.component.ts +++ b/landingPages/landing-utils/publishedIn.component.ts @@ -59,7 +59,6 @@ export class PublishedInComponent { ngOnInit() {} public scroll() { - console.info("scroll into view"); if (typeof document !== 'undefined') { this.element.nativeElement.scrollIntoView(); } diff --git a/landingPages/landing-utils/searchingProjectsInTab.component.ts b/landingPages/landing-utils/searchingProjectsInTab.component.ts index 29290ee2..5ec282cf 100644 --- a/landingPages/landing-utils/searchingProjectsInTab.component.ts +++ b/landingPages/landing-utils/searchingProjectsInTab.component.ts @@ -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); } } diff --git a/landingPages/landing-utils/showAuthors.component.ts b/landingPages/landing-utils/showAuthors.component.ts index 6329cf4b..489e5541 100644 --- a/landingPages/landing-utils/showAuthors.component.ts +++ b/landingPages/landing-utils/showAuthors.component.ts @@ -57,7 +57,6 @@ export class ShowAuthorsComponent { } public scroll() { - console.info("scroll into view"); if (typeof document !== 'undefined') { this.element.nativeElement.scrollIntoView(); } diff --git a/landingPages/landing-utils/showIdentifiers.component.ts b/landingPages/landing-utils/showIdentifiers.component.ts index 7805ab76..d78376bf 100644 --- a/landingPages/landing-utils/showIdentifiers.component.ts +++ b/landingPages/landing-utils/showIdentifiers.component.ts @@ -84,7 +84,6 @@ export class ShowIdentifiersComponent { } public scroll() { - console.info("scroll into view"); if (typeof document !== 'undefined') { this.element.nativeElement.scrollIntoView(); } diff --git a/landingPages/landing-utils/showTitle.component.ts b/landingPages/landing-utils/showTitle.component.ts index df4d95f7..dfb082c6 100644 --- a/landingPages/landing-utils/showTitle.component.ts +++ b/landingPages/landing-utils/showTitle.component.ts @@ -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(); } } diff --git a/landingPages/organization/organization.component.ts b/landingPages/organization/organization.component.ts index 039eceec..b7176334 100644 --- a/landingPages/organization/organization.component.ts +++ b/landingPages/organization/organization.component.ts @@ -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+"'))" diff --git a/landingPages/orp/orp.component.ts b/landingPages/orp/orp.component.ts index faa0c66c..73fd8ae5 100644 --- a/landingPages/orp/orp.component.ts +++ b/landingPages/orp/orp.component.ts @@ -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; diff --git a/landingPages/orp/orp.service.ts b/landingPages/orp/orp.service.ts index f1020778..3db29b91 100644 --- a/landingPages/orp/orp.service.ts +++ b/landingPages/orp/orp.service.ts @@ -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 => 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'], diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts index c75ae479..a52188fd 100644 --- a/landingPages/project/project.component.ts +++ b/landingPages/project/project.component.ts @@ -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(); } diff --git a/landingPages/project/project.service.ts b/landingPages/project/project.service.ts index 1523aa20..15bd2d80 100644 --- a/landingPages/project/project.service.ts +++ b/landingPages/project/project.service.ts @@ -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; diff --git a/landingPages/publication/publication.component.ts b/landingPages/publication/publication.component.ts index 086bc7c7..af0ff6f1 100644 --- a/landingPages/publication/publication.component.ts +++ b/landingPages/publication/publication.component.ts @@ -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; diff --git a/landingPages/publication/publication.service.ts b/landingPages/publication/publication.service.ts index 19f23876..1461d6e6 100644 --- a/landingPages/publication/publication.service.ts +++ b/landingPages/publication/publication.service.ts @@ -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; diff --git a/landingPages/software/software.component.ts b/landingPages/software/software.component.ts index cfa2cc2e..0dd18fd6 100644 --- a/landingPages/software/software.component.ts +++ b/landingPages/software/software.component.ts @@ -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; diff --git a/landingPages/software/software.service.ts b/landingPages/software/software.service.ts index 2f05ba1a..7fcbef32 100644 --- a/landingPages/software/software.service.ts +++ b/landingPages/software/software.service.ts @@ -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 => 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'], diff --git a/login/userMini.component.ts b/login/userMini.component.ts index c9e9ab11..67b372e6 100644 --- a/login/userMini.component.ts +++ b/login/userMini.component.ts @@ -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); diff --git a/searchPages/advanced/advancedSearchDataProviders.component.ts b/searchPages/advanced/advancedSearchDataProviders.component.ts index 64c66cc1..77e58156 100644 --- a/searchPages/advanced/advancedSearchDataProviders.component.ts +++ b/searchPages/advanced/advancedSearchDataProviders.component.ts @@ -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); } diff --git a/searchPages/advanced/advancedSearchDatasets.component.ts b/searchPages/advanced/advancedSearchDatasets.component.ts index cd0ac49b..e158d856 100644 --- a/searchPages/advanced/advancedSearchDatasets.component.ts +++ b/searchPages/advanced/advancedSearchDatasets.component.ts @@ -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); } diff --git a/searchPages/advanced/advancedSearchOrganizations.component.ts b/searchPages/advanced/advancedSearchOrganizations.component.ts index a660388c..9af4e27d 100644 --- a/searchPages/advanced/advancedSearchOrganizations.component.ts +++ b/searchPages/advanced/advancedSearchOrganizations.component.ts @@ -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); } diff --git a/searchPages/advanced/advancedSearchOrps.component.ts b/searchPages/advanced/advancedSearchOrps.component.ts index 913c9b2e..c5ef2ff0 100644 --- a/searchPages/advanced/advancedSearchOrps.component.ts +++ b/searchPages/advanced/advancedSearchOrps.component.ts @@ -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); } diff --git a/searchPages/advanced/advancedSearchProjects.component.ts b/searchPages/advanced/advancedSearchProjects.component.ts index b3c0db43..ef76bb19 100644 --- a/searchPages/advanced/advancedSearchProjects.component.ts +++ b/searchPages/advanced/advancedSearchProjects.component.ts @@ -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); } diff --git a/searchPages/advanced/advancedSearchPublications.component.ts b/searchPages/advanced/advancedSearchPublications.component.ts index 393d8363..022b848c 100644 --- a/searchPages/advanced/advancedSearchPublications.component.ts +++ b/searchPages/advanced/advancedSearchPublications.component.ts @@ -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); } diff --git a/searchPages/advanced/advancedSearchSoftware.component.ts b/searchPages/advanced/advancedSearchSoftware.component.ts index c7c27f6d..812459a4 100644 --- a/searchPages/advanced/advancedSearchSoftware.component.ts +++ b/searchPages/advanced/advancedSearchSoftware.component.ts @@ -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); } diff --git a/searchPages/dataProviders/compatibleDataProviders.component.ts b/searchPages/dataProviders/compatibleDataProviders.component.ts index a1c03680..6b1a375d 100644 --- a/searchPages/dataProviders/compatibleDataProviders.component.ts +++ b/searchPages/dataProviders/compatibleDataProviders.component.ts @@ -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); } diff --git a/searchPages/dataProviders/compatibleDataProvidersTable.component.ts b/searchPages/dataProviders/compatibleDataProvidersTable.component.ts index 9e11aed8..44c24b98 100644 --- a/searchPages/dataProviders/compatibleDataProvidersTable.component.ts +++ b/searchPages/dataProviders/compatibleDataProvidersTable.component.ts @@ -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); diff --git a/searchPages/dataProviders/entityRegistries.component.ts b/searchPages/dataProviders/entityRegistries.component.ts index 4c41cea3..3f6b8a96 100644 --- a/searchPages/dataProviders/entityRegistries.component.ts +++ b/searchPages/dataProviders/entityRegistries.component.ts @@ -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); diff --git a/searchPages/dataProviders/entityRegistriesTable.component.ts b/searchPages/dataProviders/entityRegistriesTable.component.ts index 961a3fd7..20b11124 100644 --- a/searchPages/dataProviders/entityRegistriesTable.component.ts +++ b/searchPages/dataProviders/entityRegistriesTable.component.ts @@ -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); diff --git a/searchPages/dataProviders/journals.component.ts b/searchPages/dataProviders/journals.component.ts index eee53a96..febd962c 100644 --- a/searchPages/dataProviders/journals.component.ts +++ b/searchPages/dataProviders/journals.component.ts @@ -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); diff --git a/searchPages/dataProviders/journalsTable.component.ts b/searchPages/dataProviders/journalsTable.component.ts index f92d4993..7d1359d8 100644 --- a/searchPages/dataProviders/journalsTable.component.ts +++ b/searchPages/dataProviders/journalsTable.component.ts @@ -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); diff --git a/searchPages/find/search.component.ts b/searchPages/find/search.component.ts index 975551a1..bca8e980 100644 --- a/searchPages/find/search.component.ts +++ b/searchPages/find/search.component.ts @@ -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) { diff --git a/searchPages/searchUtils/advancedSearchForm.component.ts b/searchPages/searchUtils/advancedSearchForm.component.ts index 822a39e7..6652f7e2 100644 --- a/searchPages/searchUtils/advancedSearchForm.component.ts +++ b/searchPages/searchUtils/advancedSearchForm.component.ts @@ -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; diff --git a/searchPages/searchUtils/advancedSearchPage.component.ts b/searchPages/searchUtils/advancedSearchPage.component.ts index 9d4be096..8d36ec58 100644 --- a/searchPages/searchUtils/advancedSearchPage.component.ts +++ b/searchPages/searchUtils/advancedSearchPage.component.ts @@ -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')){ diff --git a/searchPages/searchUtils/browseEntities.component.ts b/searchPages/searchUtils/browseEntities.component.ts index 132f9724..83d79f78 100644 --- a/searchPages/searchUtils/browseEntities.component.ts +++ b/searchPages/searchUtils/browseEntities.component.ts @@ -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 ){ diff --git a/searchPages/searchUtils/searchDownload.component.ts b/searchPages/searchUtils/searchDownload.component.ts index 12231bf2..863e5c7f 100644 --- a/searchPages/searchUtils/searchDownload.component.ts +++ b/searchPages/searchUtils/searchDownload.component.ts @@ -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(); diff --git a/searchPages/searchUtils/searchFilter.component.ts b/searchPages/searchUtils/searchFilter.component.ts index c296466d..a998e186 100644 --- a/searchPages/searchUtils/searchFilter.component.ts +++ b/searchPages/searchUtils/searchFilter.component.ts @@ -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(); diff --git a/searchPages/searchUtils/searchFilterModal.component.ts b/searchPages/searchUtils/searchFilterModal.component.ts index 0ed0ed24..4381e76e 100644 --- a/searchPages/searchUtils/searchFilterModal.component.ts +++ b/searchPages/searchUtils/searchFilterModal.component.ts @@ -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 diff --git a/searchPages/searchUtils/searchForm.component.ts b/searchPages/searchUtils/searchForm.component.ts index 15a3dbcc..99832b61 100644 --- a/searchPages/searchUtils/searchForm.component.ts +++ b/searchPages/searchUtils/searchForm.component.ts @@ -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 }); diff --git a/searchPages/searchUtils/searchPage.component.ts b/searchPages/searchUtils/searchPage.component.ts index 4707cfd6..deca29d9 100644 --- a/searchPages/searchUtils/searchPage.component.ts +++ b/searchPages/searchUtils/searchPage.component.ts @@ -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) { diff --git a/searchPages/searchUtils/searchPageTableView.component.ts b/searchPages/searchUtils/searchPageTableView.component.ts index 661d8216..ece87eba 100644 --- a/searchPages/searchUtils/searchPageTableView.component.ts +++ b/searchPages/searchUtils/searchPageTableView.component.ts @@ -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())) diff --git a/searchPages/searchUtils/searchResultsPerPage.component.ts b/searchPages/searchUtils/searchResultsPerPage.component.ts index 5fd2bc9b..6a4803a1 100644 --- a/searchPages/searchUtils/searchResultsPerPage.component.ts +++ b/searchPages/searchUtils/searchResultsPerPage.component.ts @@ -69,9 +69,7 @@ export class SearchResultsPerPageComponent { constructor () {} - ngOnInit() { - console.info("SearchResultsPerPage: onInit"); - } + ngOnInit() {} sizeChanged() { this.sizeChange.emit({ diff --git a/searchPages/simple/searchDataproviders.component.ts b/searchPages/simple/searchDataproviders.component.ts index c0680bfa..77a5ac2b 100644 --- a/searchPages/simple/searchDataproviders.component.ts +++ b/searchPages/simple/searchDataproviders.component.ts @@ -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]; diff --git a/searchPages/simple/searchDatasets.component.ts b/searchPages/simple/searchDatasets.component.ts index d47122ca..0b2167ca 100644 --- a/searchPages/simple/searchDatasets.component.ts +++ b/searchPages/simple/searchDatasets.component.ts @@ -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]; diff --git a/searchPages/simple/searchOrganizations.component.ts b/searchPages/simple/searchOrganizations.component.ts index 6d1cce04..ef0dcf83 100644 --- a/searchPages/simple/searchOrganizations.component.ts +++ b/searchPages/simple/searchOrganizations.component.ts @@ -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); } } diff --git a/searchPages/simple/searchOrps.component.ts b/searchPages/simple/searchOrps.component.ts index 2a3f4989..a839ebee 100644 --- a/searchPages/simple/searchOrps.component.ts +++ b/searchPages/simple/searchOrps.component.ts @@ -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]; diff --git a/searchPages/simple/searchProjects.component.ts b/searchPages/simple/searchProjects.component.ts index 8fee9752..e7d374a2 100644 --- a/searchPages/simple/searchProjects.component.ts +++ b/searchPages/simple/searchProjects.component.ts @@ -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(); diff --git a/searchPages/simple/searchPublications.component.ts b/searchPages/simple/searchPublications.component.ts index 459c6e90..0ef2a443 100644 --- a/searchPages/simple/searchPublications.component.ts +++ b/searchPages/simple/searchPublications.component.ts @@ -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); } diff --git a/searchPages/simple/searchSoftware.component.ts b/searchPages/simple/searchSoftware.component.ts index 9f8b779b..68268d06 100644 --- a/searchPages/simple/searchSoftware.component.ts +++ b/searchPages/simple/searchSoftware.component.ts @@ -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]; diff --git a/services/metrics.service.ts b/services/metrics.service.ts index e30e361c..9e5c0701 100644 --- a/services/metrics.service.ts +++ b/services/metrics.service.ts @@ -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; } diff --git a/services/organization.service.ts b/services/organization.service.ts index a7bf60b7..87791d76 100644 --- a/services/organization.service.ts +++ b/services/organization.service.ts @@ -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) { diff --git a/services/searchDataproviders.service.ts b/services/searchDataproviders.service.ts index e8b540e9..b564fbe2 100644 --- a/services/searchDataproviders.service.ts +++ b/services/searchDataproviders.service.ts @@ -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" ))'; diff --git a/services/searchOrganizations.service.ts b/services/searchOrganizations.service.ts index 1dc0f3f5..9b60812d 100644 --- a/services/searchOrganizations.service.ts +++ b/services/searchOrganizations.service.ts @@ -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 => 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 => res.json()) - //.do(res => console.info(res)) .map(res => [res['meta'].total, this.parseResults(res['results'])]); } diff --git a/services/searchOrps.service.ts b/services/searchOrps.service.ts index 14950f70..11f71e24 100644 --- a/services/searchOrps.service.ts +++ b/services/searchOrps.service.ts @@ -36,7 +36,6 @@ export class SearchOrpsService { return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url) .map(res => 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 => 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 => 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 { diff --git a/services/searchProjects.service.ts b/services/searchProjects.service.ts index 3555dd1d..b4216f26 100644 --- a/services/searchProjects.service.ts +++ b/services/searchProjects.service.ts @@ -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 => 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 => 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 => 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 { diff --git a/services/searchPublications.service.ts b/services/searchPublications.service.ts index b8056f53..9d08d2bd 100644 --- a/services/searchPublications.service.ts +++ b/services/searchPublications.service.ts @@ -37,7 +37,6 @@ export class SearchPublicationsService { return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url) .map(res => 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 => 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 => 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 { diff --git a/services/searchSoftware.service.ts b/services/searchSoftware.service.ts index 094f7908..4a594f0c 100644 --- a/services/searchSoftware.service.ts +++ b/services/searchSoftware.service.ts @@ -35,7 +35,6 @@ export class SearchSoftwareService { return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url) .map(res => 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 => 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 => 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 { diff --git a/sharedComponents/navigationBar.component.ts b/sharedComponents/navigationBar.component.ts index ea12f273..a66fa0c7 100644 --- a/sharedComponents/navigationBar.component.ts +++ b/sharedComponents/navigationBar.component.ts @@ -39,7 +39,7 @@ export class NavigationBarComponent { } ngOnInit() { - console.log(this.menuItems); + //console.log(this.menuItems); if (typeof document !== 'undefined') { try{ this.isClient = true; diff --git a/utils/configuration/configuration.service.ts b/utils/configuration/configuration.service.ts index ec920f6f..6e406efc 100644 --- a/utils/configuration/configuration.service.ts +++ b/utils/configuration/configuration.service.ts @@ -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,){ diff --git a/utils/email/email.service.ts b/utils/email/email.service.ts index 83d0d772..93f9ed99 100644 --- a/utils/email/email.service.ts +++ b/utils/email/email.service.ts @@ -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()); } diff --git a/utils/email/validator.ts b/utils/email/validator.ts index 3fbb74eb..cbca3e3f 100644 --- a/utils/email/validator.ts +++ b/utils/email/validator.ts @@ -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; } diff --git a/utils/entitiesAutoComplete/entitiesAutoComplete.component.ts b/utils/entitiesAutoComplete/entitiesAutoComplete.component.ts index da5fb21e..6044fc57 100644 --- a/utils/entitiesAutoComplete/entitiesAutoComplete.component.ts +++ b/utils/entitiesAutoComplete/entitiesAutoComplete.component.ts @@ -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 diff --git a/utils/entitiesAutoComplete/entitySearch.service.ts b/utils/entitiesAutoComplete/entitySearch.service.ts index 8de8806c..4d64901d 100644 --- a/utils/entitiesAutoComplete/entitySearch.service.ts +++ b/utils/entitiesAutoComplete/entitySearch.service.ts @@ -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; } diff --git a/utils/errorMessages.component.ts b/utils/errorMessages.component.ts index 57619e4a..b2de10b5 100644 --- a/utils/errorMessages.component.ts +++ b/utils/errorMessages.component.ts @@ -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]; } diff --git a/utils/exportCSV.class.ts b/utils/exportCSV.class.ts index c5e39a33..ea28bde1 100644 --- a/utils/exportCSV.class.ts +++ b/utils/exportCSV.class.ts @@ -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; diff --git a/utils/fetchEntitiesClasses/fetchDataproviders.class.ts b/utils/fetchEntitiesClasses/fetchDataproviders.class.ts index cbc2f3d5..415a2503 100644 --- a/utils/fetchEntitiesClasses/fetchDataproviders.class.ts +++ b/utils/fetchEntitiesClasses/fetchDataproviders.class.ts @@ -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(); diff --git a/utils/fetchEntitiesClasses/fetchDatasets.class.ts b/utils/fetchEntitiesClasses/fetchDatasets.class.ts index 6ed3a491..84d8028d 100644 --- a/utils/fetchEntitiesClasses/fetchDatasets.class.ts +++ b/utils/fetchEntitiesClasses/fetchDatasets.class.ts @@ -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(); diff --git a/utils/fetchEntitiesClasses/fetchOrganizations.class.ts b/utils/fetchEntitiesClasses/fetchOrganizations.class.ts index 1fc47014..97bdb4fb 100644 --- a/utils/fetchEntitiesClasses/fetchOrganizations.class.ts +++ b/utils/fetchEntitiesClasses/fetchOrganizations.class.ts @@ -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(); diff --git a/utils/fetchEntitiesClasses/fetchOrps.class.ts b/utils/fetchEntitiesClasses/fetchOrps.class.ts index 9c1673da..1967930c 100644 --- a/utils/fetchEntitiesClasses/fetchOrps.class.ts +++ b/utils/fetchEntitiesClasses/fetchOrps.class.ts @@ -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; diff --git a/utils/fetchEntitiesClasses/fetchProjects.class.ts b/utils/fetchEntitiesClasses/fetchProjects.class.ts index ad596ce7..f01e59a6 100644 --- a/utils/fetchEntitiesClasses/fetchProjects.class.ts +++ b/utils/fetchEntitiesClasses/fetchProjects.class.ts @@ -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(); diff --git a/utils/fetchEntitiesClasses/fetchPublications.class.ts b/utils/fetchEntitiesClasses/fetchPublications.class.ts index 9d76f91d..7bd68dab 100644 --- a/utils/fetchEntitiesClasses/fetchPublications.class.ts +++ b/utils/fetchEntitiesClasses/fetchPublications.class.ts @@ -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(); diff --git a/utils/fetchEntitiesClasses/fetchSoftware.class.ts b/utils/fetchEntitiesClasses/fetchSoftware.class.ts index 804d4539..30d0df7f 100644 --- a/utils/fetchEntitiesClasses/fetchSoftware.class.ts +++ b/utils/fetchEntitiesClasses/fetchSoftware.class.ts @@ -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(); diff --git a/utils/helper/helper.service.ts b/utils/helper/helper.service.ts index 454a66b1..781db651 100644 --- a/utils/helper/helper.service.ts +++ b/utils/helper/helper.service.ts @@ -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) { diff --git a/utils/iframe.component.ts b/utils/iframe.component.ts index 302f6431..b35fabb9 100644 --- a/utils/iframe.component.ts +++ b/utils/iframe.component.ts @@ -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); } } diff --git a/utils/number-utils.class.ts b/utils/number-utils.class.ts index 5881ca47..9626fb97 100644 --- a/utils/number-utils.class.ts +++ b/utils/number-utils.class.ts @@ -4,7 +4,7 @@ export class NumberUtils{ public static roundNumber(num: number):any { - console.log("Trying to round number: "+ num); + //console.log("Trying to round number: "+ num); var roundNum = null; var initialNum = num; if(num >= 1000000){ @@ -23,7 +23,7 @@ export class NumberUtils{ }else{ roundNum = { "number": num, "size": "" , count: initialNum}; } - console.log("Rounded number: "+ roundNum.number + " "+ roundNum.size); + //console.log("Rounded number: "+ roundNum.number + " "+ roundNum.size); return roundNum; } diff --git a/utils/pagingFormatterNoLoad.component.ts b/utils/pagingFormatterNoLoad.component.ts index 0783b704..2899f9b3 100644 --- a/utils/pagingFormatterNoLoad.component.ts +++ b/utils/pagingFormatterNoLoad.component.ts @@ -50,7 +50,7 @@ export class pagingFormatterNoLoad { } ngOnInit() { - console.info("In paging -- CurrentPage:"+this.currentPage+" "+"total Pages = "+this.getTotalPages() +" Results num:"+this.totalResults); + //console.info("In paging -- CurrentPage:"+this.currentPage+" "+"total Pages = "+this.getTotalPages() +" Results num:"+this.totalResults); this.route.data .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; diff --git a/utils/piwik/piwik.service.ts b/utils/piwik/piwik.service.ts index 589c53ef..50ecd851 100644 --- a/utils/piwik/piwik.service.ts +++ b/utils/piwik/piwik.service.ts @@ -23,7 +23,7 @@ export class PiwikService { var url = properties.piwikBaseUrl+((siteId!=null)?siteId:properties.piwikSiteId)+"&rec=1&url="+StringUtils.URIEncode(location.href)+"&action_name="+StringUtils.URIEncode(title)+ ((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+ ((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):''); - console.log("Piwik - View: " + url); + //console.log("Piwik - View: " + url); // return Observable.of(new Object()).mapTo(true); // for testing return this.http.get( url); // .do(request => console.info("Piwik request completed" )); @@ -36,7 +36,7 @@ export class PiwikService { var url = properties.piwikBaseUrl+((siteId!=null)?siteId:properties.piwikSiteId)+"&rec=1&url="+StringUtils.URIEncode(downloadURL)+"&download="+StringUtils.URIEncode(downloadURL)+ ((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+ ((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):''); - console.log("Piwik - trackDownload: "+url); + //console.log("Piwik - trackDownload: "+url); return this.http.get( url) .do(request => console.info("Piwik request completed" )); @@ -44,7 +44,7 @@ export class PiwikService { } private getUserAgent(){ if (typeof navigator !== 'undefined') { - console.log("navigator.userAgent:" + navigator.userAgent); + //console.log("navigator.userAgent:" + navigator.userAgent); return navigator.userAgent; }else{ @@ -54,7 +54,7 @@ export class PiwikService { private getReferrer(){ var referrer = ""; if (typeof document !== 'undefined') { - console.log("document.referrer:" + document.referrer); + //console.log("document.referrer:" + document.referrer); referrer = document.referrer; } diff --git a/utils/properties/environment-specific.service.ts b/utils/properties/environment-specific.service.ts index a321e4f1..51ca6cb4 100644 --- a/utils/properties/environment-specific.service.ts +++ b/utils/properties/environment-specific.service.ts @@ -41,7 +41,7 @@ export class EnvironmentSpecificService { }else{ location = document.location.protocol +"//" + document.location.host+this.propertiesUrl; } - console.log('Loading '+ location); + //console.log('Loading '+ location); return this.http.get(location) .map((data) => data.json()) .toPromise(); @@ -52,7 +52,7 @@ export class EnvironmentSpecificService { public subscribeEnvironment() { // Only want to do this once - if root page is revisited, it calls this again. if (this.envSpecific === null || this.envSpecific === undefined) { - console.log('Loading env-properties.json'); + //console.log('Loading env-properties.json'); return this.http.get(this.propertiesUrl) .map((data) => data.json()); @@ -70,7 +70,7 @@ export class EnvironmentSpecificService { } this.envSpecific = es; - console.log(this.envSpecific); + //console.log(this.envSpecific); if (this.envSpecificSubject) { this.envSpecificSubject.next(this.envSpecific); diff --git a/utils/staticAutoComplete/ISVocabularies.service.ts b/utils/staticAutoComplete/ISVocabularies.service.ts index 8f22c9a2..4d542007 100644 --- a/utils/staticAutoComplete/ISVocabularies.service.ts +++ b/utils/staticAutoComplete/ISVocabularies.service.ts @@ -13,7 +13,7 @@ export class ISVocabulariesService { constructor(private http: Http ) {} getVocabularyByType(field:string,entity:string, properties:EnvProperties):any{ - console.log("getVocabulary field: "+ field + " for entity: "+ entity); + //console.log("getVocabulary field: "+ field + " for entity: "+ entity); var file = ""; var vocabulary = ""; if( field == "lang"){ @@ -70,7 +70,7 @@ export class ISVocabulariesService { // } getVocabularyFromService (vocabularyName:string, properties:EnvProperties):any { let url = properties.vocabulariesAPI + vocabularyName; - console.log(url); + //console.log(url); // return this.http.get(url).toPromise() // .then(request => @@ -81,12 +81,9 @@ export class ISVocabulariesService { // return results; // }); return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url) - .do(res => console.log(res)) .map(res => res.json()) .map(res => res['terms']) - .do(res => console.log(res)) .map(res => this.parse(res)) - .do(res => console.log(res)) .catch(this.handleError); } diff --git a/utils/subscribe/subscribe.service.ts b/utils/subscribe/subscribe.service.ts index 41c8f9ef..08e7e84f 100644 --- a/utils/subscribe/subscribe.service.ts +++ b/utils/subscribe/subscribe.service.ts @@ -11,7 +11,7 @@ export class SubscribeService { } getCommunitySubscribers(pid:string, url:string){ return this.http.get(url+"/community/"+pid+"/subscribers") - .map(res => res.json()).do(res => {console.log(res)}).do(res => {console.log(res)}); + .map(res => res.json()); } isSubscribedToCommunity(pid:string, email:string, url:string){ @@ -32,19 +32,17 @@ export class SubscribeService { } return false; - }).do(res => {console.log("Response is "+res)}); + }); } subscribeToCommunity(pid:string, email:string, url:string){ var subscriber = {"email":email}; return this.http.post(url+"/community/"+pid+"/subscribers", JSON.stringify(subscriber), this.getAuthOptionsWithBody()) - .map(res => res.json()) - .do(res => {console.log("Response is "+res)}); + .map(res => res.json()); } unSubscribeToCommunity(pid:string, email:string, url:string){ return this.http.post(url+"/community/"+pid+"/subscribers/delete", JSON.stringify([email]), this.getAuthOptionsWithBody()) - .map(res => res.json()) - .do(res => {console.log("Response is "+res)}); + .map(res => res.json()); } public getAuthOptionsWithBody():RequestOptions{