diff --git a/claims/directLinking/directLinking.component.ts b/claims/directLinking/directLinking.component.ts index 8ffbd085..667229ad 100644 --- a/claims/directLinking/directLinking.component.ts +++ b/claims/directLinking/directLinking.component.ts @@ -7,6 +7,7 @@ import {SearchResearchResultsService} from '../../services/searchResearchResults import {LinkingGenericComponent} from "../linking/linkingGeneric.component"; import {ClaimResultSearchFormComponent} from "../claim-utils/claimResultSearchForm.component"; import {Subscriber} from "rxjs"; +import {properties} from "../../../../environments/environment"; @Component({ @@ -45,10 +46,7 @@ export class DirectLinkingComponent { }); } ngOnInit() { - this.subscriptions.push(this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - })); + this.properties = properties; this.subscriptions.push(this.route.queryParams.subscribe(params => { this.id = params['id']; diff --git a/claims/linking/linkingGeneric.component.ts b/claims/linking/linkingGeneric.component.ts index fc8b5d8f..1dea9e4e 100644 --- a/claims/linking/linkingGeneric.component.ts +++ b/claims/linking/linkingGeneric.component.ts @@ -10,6 +10,7 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class"; import {HelperService} from "../../utils/helper/helper.service"; import {PiwikService} from "../../utils/piwik/piwik.service"; import {Subscriber} from "rxjs"; +import {properties} from "../../../../environments/environment"; declare var UIkit:any; @@ -57,10 +58,9 @@ export class LinkingGenericComponent { this.showOptions.basketShowLinksTo = true; this.showOptions.show = this.showOptions.linkTo; } - this.subscriptions.push(this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - this.url = this.properties.domain + this.properties.baseLink+this._router.url; + + this.properties = properties; + this.url = this.properties.domain + this.properties.baseLink+this._router.url; var description = "Linking is a functionality provided by OpenAIRE, in order to link research results with a project, a research community or other research results."; this.updateTitle(this.pageTitle); @@ -77,7 +77,7 @@ export class LinkingGenericComponent { this.pageContents = contents; }) - })); + if( typeof localStorage !== 'undefined') { this.localStoragePrefix +=(this.communityId?this.communityId+"_":""); if(localStorage.getItem(this.localStoragePrefix + "results")){ diff --git a/connect/approvedByCommunity/approved.component.ts b/connect/approvedByCommunity/approved.component.ts index 470978ab..d293dcca 100644 --- a/connect/approvedByCommunity/approved.component.ts +++ b/connect/approvedByCommunity/approved.component.ts @@ -4,6 +4,7 @@ import { EnvProperties} from '../../utils/properties/env-properties'; import {ConnectHelper} from '../connectHelper'; import {SearchCommunityDataprovidersService} from '../contentProviders/searchDataproviders.service'; +import {properties} from "../../../../environments/environment"; @Component({ selector: 'approved-by-community', @@ -24,30 +25,27 @@ export class ApprovedByCommunityComponent { constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchCommunityDataprovidersService) {} public ngOnInit() { - this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; + this.properties =properties; + this.route.queryParams.subscribe( + communityId => { + this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain); + if(!this.communityId) { + this.communityId = communityId['communityId']; + } - this.route.queryParams.subscribe( - communityId => { - this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain); - if(!this.communityId) { - this.communityId = communityId['communityId']; - } - - if(this.communityId && this.communityId != "openaire") { - this._searchDataprovidersService.searchDataproviders(this.properties, this.communityId).subscribe ( - contentproviders => { - this.communityContentProviders = contentproviders; - this.approved = this.checkApproval(); - }, - error => { - this.handleError("Error getting content providers for community with id: "+this.communityId, error); - } - ); + if(this.communityId && this.communityId != "openaire") { + this._searchDataprovidersService.searchDataproviders(this.properties, this.communityId).subscribe ( + contentproviders => { + this.communityContentProviders = contentproviders; + this.approved = this.checkApproval(); + }, + error => { + this.handleError("Error getting content providers for community with id: "+this.communityId, error); } - }); - }); + ); + } + }); + } diff --git a/deposit/searchDataprovidersToDeposit.component.ts b/deposit/searchDataprovidersToDeposit.component.ts index bdd71273..e8bb0d2c 100644 --- a/deposit/searchDataprovidersToDeposit.component.ts +++ b/deposit/searchDataprovidersToDeposit.component.ts @@ -11,6 +11,7 @@ import {EnvProperties} from '../utils/properties/env-properties'; import {ZenodoInformationClass} from "./utils/zenodoInformation.class"; import {RouterHelper} from "../utils/routerHelper.class"; import {Breadcrumb} from "../utils/breadcrumbs/breadcrumbs.component"; +import {properties} from "../../../environments/environment"; @Component({ selector: 'deposit-search-dataproviders', @@ -106,9 +107,8 @@ export class SearchDataprovidersToDepositComponent { public ngOnInit() { - this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; + + this.properties = properties; this.depositLearnHowPage = this.properties.depositLearnHowPage; this.baseUrl = this.properties.depositSearchPage; this.pagingLimit = this.properties.pagingLimit; @@ -116,7 +116,7 @@ export class SearchDataprovidersToDepositComponent { name: "Deposit", route: this.depositLearnHowPage }, {name: "Browse repositories", route: null}); - }); + this.sub = this.route.queryParams.subscribe(params => { this.parameters = Object.assign({}, params); this.keyword = params["fv0"]?params["fv0"]:''; diff --git a/deposit/searchResultsInDeposit.component.ts b/deposit/searchResultsInDeposit.component.ts index 74dc7b30..cfe75527 100644 --- a/deposit/searchResultsInDeposit.component.ts +++ b/deposit/searchResultsInDeposit.component.ts @@ -7,6 +7,7 @@ import {ZenodoInformationClass} from "./utils/zenodoInformation.class"; import {ActivatedRoute} from "@angular/router"; import {ResultPreview} from "../utils/result-preview/result-preview"; import {Subscriber} from "rxjs"; +import {properties} from "../../../environments/environment"; @Component({ selector: 'deposit-result', @@ -58,9 +59,7 @@ export class SearchResultsInDepositComponent { this.urlParam = "datasourceId"; } - this.sub = this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; + this.properties = properties; if (!this.zenodoInformation) { this.zenodoInformation = new ZenodoInformationClass(); @@ -71,7 +70,7 @@ export class SearchResultsInDepositComponent { if (!this.zenodoInformation.name) { this.zenodoInformation.name = "Zenodo"; } - }); + } public quote(params: string):string { diff --git a/error/errorPage.component.ts b/error/errorPage.component.ts index fe312959..5cedac67 100644 --- a/error/errorPage.component.ts +++ b/error/errorPage.component.ts @@ -60,43 +60,39 @@ export class ErrorPageComponent { this.response.statusCode = 404; this.response.statusMessage = '404 - Page not found'; } - //this.route.data - //.subscribe((data: { envSpecific: EnvProperties }) => { - //let properties = data.envSpecific; - this.seoService.createLinkForCanonicalURL(properties.domain + properties.baseLink + "/error"); + this.seoService.createLinkForCanonicalURL(properties.domain + properties.baseLink + "/error"); - this.route.queryParams.subscribe(data => { - this.page = data['page']; - if (!this.page) { - this.page = this._location.path(true); - } + this.route.queryParams.subscribe(data => { + this.page = data['page']; + if (!this.page) { + this.page = this._location.path(true); + } - this.page_type = data['page_type']; - if(this.page_type) { - if (this.page_type == "publication") { - this.searchPage = properties.searchLinkToPublications; - this.page_type_name = "publication"; - } else if (this.page_type == "software") { - this.searchPage = properties.searchLinkToSoftware; - this.page_type_name = "software"; - } else if (this.page_type == "dataset") { - this.searchPage = properties.searchLinkToDatasets; - this.page_type_name = "dataset"; - } else if (this.page_type == "orp") { - this.searchPage = properties.searchLinkToOrps; - this.page_type_name = "research product"; - } else if (this.page_type == "organization") { - this.searchPage = properties.searchLinkToOrganizations; - this.page_type_name = "organization"; - } else if (this.page_type == "project") { - this.searchPage = properties.searchLinkToProjects; - this.page_type_name = "project"; - } else if (this.page_type == "dataprovider") { - this.searchPage = properties.searchLinkToDataProviders; - this.page_type_name = "content provider"; - } - } - }); - //}); + this.page_type = data['page_type']; + if(this.page_type) { + if (this.page_type == "publication") { + this.searchPage = properties.searchLinkToPublications; + this.page_type_name = "publication"; + } else if (this.page_type == "software") { + this.searchPage = properties.searchLinkToSoftware; + this.page_type_name = "software"; + } else if (this.page_type == "dataset") { + this.searchPage = properties.searchLinkToDatasets; + this.page_type_name = "dataset"; + } else if (this.page_type == "orp") { + this.searchPage = properties.searchLinkToOrps; + this.page_type_name = "research product"; + } else if (this.page_type == "organization") { + this.searchPage = properties.searchLinkToOrganizations; + this.page_type_name = "organization"; + } else if (this.page_type == "project") { + this.searchPage = properties.searchLinkToProjects; + this.page_type_name = "project"; + } else if (this.page_type == "dataprovider") { + this.searchPage = properties.searchLinkToDataProviders; + this.page_type_name = "content provider"; + } + } + }); } } diff --git a/landingPages/dataProvider/statisticsTab.component.ts b/landingPages/dataProvider/statisticsTab.component.ts index e8512a26..cc358d6f 100644 --- a/landingPages/dataProvider/statisticsTab.component.ts +++ b/landingPages/dataProvider/statisticsTab.component.ts @@ -5,6 +5,7 @@ import {ErrorCodes} from '../../utils/properties/errorCodes'; import {EnvProperties} from '../../utils/properties/env-properties'; import {StringUtils} from "../../utils/string-utils.class"; import {Subscriber} from "rxjs"; +import {properties} from "../../../../environments/environment"; @Component({ selector: 'statisticsTab', @@ -72,9 +73,8 @@ export class StatisticsTabComponent { constructor (private route: ActivatedRoute) {} ngOnInit() { - this.sub = this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; + + this.properties = properties; if (this.properties.useNewStatistisTool) { this.docsTimelineUrl = this.properties.statisticsFrameNewAPIURL + @@ -94,7 +94,7 @@ export class StatisticsTabComponent { this.dataProjectsUrl = this.properties.statisticsFrameAPIURL + 'chart.php?com=query&persistent=false&data={"query":"dtsrcProjData","dtsrcName":"' + this.datasourceId + '", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Data"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%'; this.pubsProjectsUrl = this.properties.statisticsFrameAPIURL + 'chart.php?com=query&persistent=false&data={"query":"dtsrcProjPubs","dtsrcName":"' + this.datasourceId + '", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%'; } - }); + } ngOnDestroy() { diff --git a/landingPages/htmlProjectReport/htmlProjectReport.component.ts b/landingPages/htmlProjectReport/htmlProjectReport.component.ts index c2e3f3e4..664c1dde 100644 --- a/landingPages/htmlProjectReport/htmlProjectReport.component.ts +++ b/landingPages/htmlProjectReport/htmlProjectReport.component.ts @@ -10,6 +10,7 @@ import {PiwikService} from '../../utils/piwik/piwik.service'; import {SEOService} from '../../sharedComponents/SEO/SEO.service'; import {HelperService} from "../../utils/helper/helper.service"; import {Subscriber} from "rxjs"; +import {properties} from "../../../../environments/environment"; declare var UIkit: any; @@ -84,15 +85,14 @@ export class HtmlProjectReportComponent { } ngOnInit() { - this.subscriptions.push(this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; + + this.properties = properties; //this.getDivContents(); this.getPageContents(); this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url); this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this._router.url); - })); + this.subscriptions.push(this.route.queryParams.subscribe(params => { this.projectId = params['projectId']; diff --git a/landingPages/organization/deletedByInference/deletedByInference.component.ts b/landingPages/organization/deletedByInference/deletedByInference.component.ts index fd5f1b73..38fc971b 100644 --- a/landingPages/organization/deletedByInference/deletedByInference.component.ts +++ b/landingPages/organization/deletedByInference/deletedByInference.component.ts @@ -11,6 +11,7 @@ import {OrganizationsDeletedByInferenceService} from './deletedByInference.se import {ResultPreview} from "../../../utils/result-preview/result-preview"; import {AlertModal} from "../../../utils/modal/alert"; import {Subscriber} from "rxjs"; +import {properties} from "../../../../../environments/environment"; @Component({ selector: 'organizationsDeletedByInference', @@ -57,11 +58,9 @@ export class OrganizationsDeletedByInferenceComponent { } ngOnInit() { - this.subscriptions.push(this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - })); + this.properties = properties; + this.subscriptions.push(this.route.queryParams.subscribe(data => { this.errorCodes = new ErrorCodes(); this.status = this.errorCodes.LOADING; diff --git a/landingPages/organization/organization.component.ts b/landingPages/organization/organization.component.ts index f9714445..8cc3ec2a 100644 --- a/landingPages/organization/organization.component.ts +++ b/landingPages/organization/organization.component.ts @@ -23,6 +23,7 @@ import {FetchResearchResults} from "../../utils/fetchEntitiesClasses/fetchResear import {FetchDataproviders} from "../../utils/fetchEntitiesClasses/fetchDataproviders.class"; import {IndexInfoService} from "../../utils/indexInfo.service"; import {Subscriber} from "rxjs"; +import {properties} from "../../../../environments/environment"; @Component({ selector: 'organization', @@ -125,9 +126,8 @@ export class OrganizationComponent { } ngOnInit() { - this.subscriptions.push(this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; + + this.properties = properties; if (typeof document !== 'undefined') { this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => { if (lastIndexUpdate) { @@ -138,7 +138,7 @@ export class OrganizationComponent { //this.getDivContents(); this.getPageContents(); this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url); - })); + this.subscriptions.push(this.route.queryParams.subscribe(params => { this.organizationInfo = null; this.updateTitle("Organization"); diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts index 8623e90f..50b2e286 100644 --- a/landingPages/project/project.component.ts +++ b/landingPages/project/project.component.ts @@ -26,6 +26,7 @@ import {ResultPreview} from "../../utils/result-preview/result-preview"; import {SearchResult} from "../../utils/entities/searchResult"; import {IndexInfoService} from "../../utils/indexInfo.service"; import {Subscriber} from "rxjs"; +import {properties} from "../../../../environments/environment"; @Component({ selector: 'project', @@ -138,9 +139,8 @@ export class ProjectComponent { private indexInfoService: IndexInfoService) {} ngOnInit() { - this.subscriptions.push(this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; + + this.properties = properties; if (typeof document !== 'undefined') { this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => { if (lastIndexUpdate) { @@ -152,7 +152,7 @@ export class ProjectComponent { this.getPageContents(); this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url); - })); + this.subscriptions.push(this.route.queryParams.subscribe(params => { this.metricsClicked = false; this.statsClicked = false; diff --git a/landingPages/result/deletedByInference/deletedByInference.component.ts b/landingPages/result/deletedByInference/deletedByInference.component.ts index 581292db..1981153b 100644 --- a/landingPages/result/deletedByInference/deletedByInference.component.ts +++ b/landingPages/result/deletedByInference/deletedByInference.component.ts @@ -11,6 +11,7 @@ import {DeletedByInferenceService} from './deletedByInference.service'; import {ResultPreview} from "../../../utils/result-preview/result-preview"; import {AlertModal} from "../../../utils/modal/alert"; import {Subscriber} from "rxjs"; +import {properties} from "../../../../../environments/environment"; @Component({ selector: 'deletedByInference', @@ -54,16 +55,14 @@ export class DeletedByInferenceComponent { constructor(private element: ElementRef, private _deletedByInferenceService: DeletedByInferenceService, - private route: ActivatedRoute, - private _router: Router) { + private route: ActivatedRoute) { } ngOnInit() { - this.subscriptions.push(this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; + + this.properties = properties; - })); + this.subscriptions.push(this.route.queryParams.subscribe(data => { this.errorCodes = new ErrorCodes(); this.status = this.errorCodes.LOADING; diff --git a/login/user.component.ts b/login/user.component.ts index 0b38317f..bd972602 100644 --- a/login/user.component.ts +++ b/login/user.component.ts @@ -41,12 +41,10 @@ export class UserComponent { } ngOnInit() { - this.subscriptions.push(this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - this.loginUrl = this.properties.loginUrl; - })); + this.properties = properties; + this.loginUrl = this.properties.loginUrl; + if (typeof document !== 'undefined') { this.server = false; this.subscriptions.push(this.userManagementsService.getUserInfo().subscribe(user => { diff --git a/searchPages/find/searchAll.component.html b/searchPages/find/searchAll.component.html index 4dbd81c6..ca67d2b3 100644 --- a/searchPages/find/searchAll.component.html +++ b/searchPages/find/searchAll.component.html @@ -74,19 +74,19 @@ + simpleSearchLink="/search/find" [customFilter]="customFilter"> + simpleSearchLink="/search/find" [customFilter]="customFilter"> + simpleSearchLink="/search/find" [customFilter]="customFilter"> + simpleSearchLink="/search/find" [customFilter]="customFilter"> diff --git a/searchPages/find/searchAll.component.ts b/searchPages/find/searchAll.component.ts index e558884c..25949481 100644 --- a/searchPages/find/searchAll.component.ts +++ b/searchPages/find/searchAll.component.ts @@ -32,6 +32,7 @@ import {SearchProjectsComponent} from "../searchProjects.component"; import {SearchOrganizationsComponent} from "../searchOrganizations.component"; import {SearchDataProvidersComponent} from "../searchDataProviders.component"; import {NewSearchPageComponent} from "../searchUtils/newSearchPage.component"; +import {properties} from "../../../../environments/environment"; @Component({ changeDetection: ChangeDetectionStrategy.Default, @@ -141,12 +142,11 @@ export class SearchAllComponent { } public ngOnInit() { - this.subs.push(this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { + var description = "Search for research outcomes (publications, datasets, software, other research products), projects, organizations, content providers in the OpenAIRE Research Graph. "; var title = "OpenAIRE |Search for research outcomes, projects, content providers & organizations"; - this.properties = data.envSpecific; + this.properties = properties; var url = this.properties.domain + this.properties.baseLink + this._router.url; this._title.setTitle(title); this._meta.updateTag({content: description}, "name='description'"); @@ -197,7 +197,7 @@ export class SearchAllComponent { } } this.loadAll(); - })); + } loadAll() { diff --git a/searchPages/searchUtils/advancedSearchForm.component.ts b/searchPages/searchUtils/advancedSearchForm.component.ts index b8cbd44e..86666ce6 100644 --- a/searchPages/searchUtils/advancedSearchForm.component.ts +++ b/searchPages/searchUtils/advancedSearchForm.component.ts @@ -7,6 +7,7 @@ import {Dates} from '../../utils/string-utils.class'; import {EnvProperties} from '../../utils/properties/env-properties'; import {SearchCustomFilter} from "./searchUtils.class"; import {Subscriber} from "rxjs"; +import {properties} from "../../../../environments/environment"; @Component({ selector: 'advanced-search-form', @@ -52,11 +53,9 @@ export class AdvancedSearchFormComponent { } ngOnInit() { this.selectedEntity = this.entityType; - this.sub = this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - }); + this.properties = properties; + for(var i = 0; i < this.fieldIds.length; i++){ this.fieldList[this.fieldIds[i]]=[]; } diff --git a/searchPages/searchUtils/entitiesSelection.component.ts b/searchPages/searchUtils/entitiesSelection.component.ts index 8544623f..a34588b8 100644 --- a/searchPages/searchUtils/entitiesSelection.component.ts +++ b/searchPages/searchUtils/entitiesSelection.component.ts @@ -103,7 +103,7 @@ export class EntitiesSelectionComponent { ngOnInit() { this.show = 0; if (this.properties) { - if((this.customFilter && this.customFilter.queryFieldName == "communityId") || this.properties.adminToolsCommunity !== "monitor") { + if((this.customFilter && this.customFilter.queryFieldName == "communityId") || (this.properties.adminToolsCommunity !== "monitor" && this.properties.adminToolsPortalType !=='aggregator')) { //this.config.getCommunityInformation(this.properties, (this.customFilter && this.customFilter.queryFieldName == "communityId") ? this.customFilter.valueId : this.properties.adminToolsCommunity).subscribe(data => { this.subs.push(this.config.communityInformationState.subscribe(data => { if(data) { @@ -176,6 +176,17 @@ export class EntitiesSelectionComponent { this.show = 3;*/ this.show = 1; this.disableSelect = true; + }else if(this.properties.adminToolsPortalType =='aggregator'){ + this.showResearchOutcomes = true; + this.showPublications = true; + this.showDatasets = true; + this.showSoftware = true; + this.showOther = true; + this.showProjects = true; + this.showOrganizations = true; + this.showDataProviders = true; + this.showAll = true; + this.show = 5; } else { this.showResearchOutcomes = true; this.showPublications = true; diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index 4332e95e..091fe308 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -293,7 +293,7 @@ class="uk-alert uk-animation-slide-top-small"> Do you want to see results only for {{customFilter.valueName}}? Click - here {{customFilterEnabled}}. + here.
{ - this.properties = data.envSpecific; - this.csvLimit = data.envSpecific.csvLimit; - this.downloadURLAPI = data.envSpecific.csvAPIURL; - this.isPiwikEnabled = data.envSpecific.enablePiwikTrack; - })); + + this.properties = properties; + this.csvLimit = this.properties.csvLimit; + this.downloadURLAPI = this.properties.csvAPIURL; + this.isPiwikEnabled = this.properties.enablePiwikTrack; + } ngOnDestroy() { diff --git a/searchPages/searchUtils/searchPageTableView.component.ts b/searchPages/searchUtils/searchPageTableView.component.ts index faea5cb6..324e59be 100644 --- a/searchPages/searchUtils/searchPageTableView.component.ts +++ b/searchPages/searchUtils/searchPageTableView.component.ts @@ -19,6 +19,7 @@ import {PiwikService} from '../../utils/piwik/piwik.service' import { SEOService } from '../../sharedComponents/SEO/SEO.service'; import {HelperService} from "../../utils/helper/helper.service"; import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component"; +import {properties} from "../../../../environments/environment"; @Component({ selector: 'search-page-table', @@ -92,19 +93,18 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit { private helper: HelperService) { } ngOnInit() { - this.subscriptions.push(this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; + + this.properties = properties; this.getPageContents(); - this.isPiwikEnabled = data.envSpecific.enablePiwikTrack; + this.isPiwikEnabled =this.properties.enablePiwikTrack; if(typeof window !== 'undefined') { this.updateUrl(this.properties.domain+this.properties.baseLink+location.pathname); this.url =this.properties.domain+this.properties.baseLink+location.pathname; } if(typeof document !== 'undefined' && this.isPiwikEnabled){ - this.subscriptions.push(this._piwikService.trackView(data.envSpecific, this.pageTitle, this.piwikSiteId).subscribe()); + this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe()); } - })); + this.dtOptions = { "paging": true, "searching": false, diff --git a/sharedComponents/navigationBar.component.html b/sharedComponents/navigationBar.component.html index 692705f9..8c0df456 100644 --- a/sharedComponents/navigationBar.component.html +++ b/sharedComponents/navigationBar.component.html @@ -50,7 +50,8 @@
-
diff --git a/utils/pagingFormatter.component.ts b/utils/pagingFormatter.component.ts index 6f15ef22..38568a10 100644 --- a/utils/pagingFormatter.component.ts +++ b/utils/pagingFormatter.component.ts @@ -4,6 +4,7 @@ import {DomSanitizer} from '@angular/platform-browser'; //Usage Example import {RouterHelper} from './routerHelper.class'; import {EnvProperties} from './properties/env-properties'; +import {properties} from "../../../environments/environment"; @Component({ selector: 'paging', template: ` @@ -51,16 +52,12 @@ export class PagingFormatter { public routerHelper:RouterHelper = new RouterHelper(); - constructor (private route: ActivatedRoute, private _router: Router, private sanitizer:DomSanitizer) { + constructor () { } ngOnInit() { - this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - this.limit = this.properties.pagingLimit; - } - ); + this.properties = properties; + this.limit = this.properties.pagingLimit; } getTotalPages(){ let total: number = 0; diff --git a/utils/pagingFormatterNoLoad.component.ts b/utils/pagingFormatterNoLoad.component.ts index ad3518c5..c94b7346 100644 --- a/utils/pagingFormatterNoLoad.component.ts +++ b/utils/pagingFormatterNoLoad.component.ts @@ -1,6 +1,7 @@ import {Component, Input, Output, EventEmitter} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import{EnvProperties} from './properties/env-properties'; +import {properties} from "../../../environments/environment"; //Usage Example @@ -56,12 +57,10 @@ export class pagingFormatterNoLoad { ngOnInit() { //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; - this.limit = this.properties.pagingLimit; - } - ); + + this.properties = properties; + this.limit = this.properties.pagingLimit; + } getTotalPages(){ let total: number = 0; diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts index 2ef687f1..1c81bf14 100644 --- a/utils/properties/env-properties.ts +++ b/utils/properties/env-properties.ts @@ -1,6 +1,6 @@ export type Environment = "development" | "test" | "beta" | "production"; export type Dashboard = "explore" | "connect" | "monitor"; -export type PortalType = "explore" | "connect" | "community" | "monitor"; +export type PortalType = "explore" | "connect" | "community" | "monitor" | "aggregator"; export interface EnvProperties { environment?: Environment;