[Library|Trunk]

properties: remove reading properties from route data

Aggregator: add aggregator checks in navbar, entities selection and as adminToolsPortalType



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59899 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-11-18 16:06:27 +00:00
parent 71e98983e1
commit 8d9420e4a1
24 changed files with 143 additions and 149 deletions

View File

@ -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'];

View File

@ -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")){

View File

@ -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);
}
});
});
);
}
});
}

View File

@ -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"]:'';

View File

@ -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 {

View File

@ -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";
}
}
});
}
}

View File

@ -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() {

View File

@ -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'];

View File

@ -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;

View File

@ -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");

View File

@ -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;

View File

@ -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;

View File

@ -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 => {

View File

@ -74,19 +74,19 @@
<search-research-results *ngIf="activeEntity == 'result'" resultType="result" [includeOnlyResultsAndFilter]="true"
(searchPageUpdates)="activeEntityUpdate($event)" [showSwitchSearchLink]="false"
simpleSearchLink="/search/find"></search-research-results>
simpleSearchLink="/search/find" [customFilter]="customFilter"></search-research-results>
<search-projects *ngIf="activeEntity == 'projects'" [includeOnlyResultsAndFilter]="true" [showSwitchSearchLink]="false"
(searchPageUpdates)="activeEntityUpdate($event)"
simpleSearchLink="/search/find">
simpleSearchLink="/search/find" [customFilter]="customFilter">
</search-projects>
<search-organizations *ngIf="activeEntity == 'organizations'" [includeOnlyResultsAndFilter]="true" [showSwitchSearchLink]="false"
(searchPageUpdates)="activeEntityUpdate($event)"
simpleSearchLink="/search/find">
simpleSearchLink="/search/find" [customFilter]="customFilter">
</search-organizations>
<search-dataproviders *ngIf="activeEntity == 'datasources'" [includeOnlyResultsAndFilter]="true" [showSwitchSearchLink]="false"
(searchPageUpdates)="activeEntityUpdate($event)"
simpleSearchLink="/search/find">
simpleSearchLink="/search/find" [customFilter]="customFilter">
</search-dataproviders>

View File

@ -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() {

View File

@ -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]]=[];
}

View File

@ -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;

View File

@ -293,7 +293,7 @@
class="uk-alert uk-animation-slide-top-small">
Do you want to see results only for {{customFilter.valueName}}? <a
(click)="addCustomFilter();">Click
here {{customFilterEnabled}}</a>.
here</a>.
</div>
<div *ngIf="openaireLink && (searchUtils.totalResults > 0 || !loadPaging )"><a
class="uk-margin-top uk-button uk-button-text"

View File

@ -9,6 +9,7 @@ import {ErrorCodes} from '../../utils/properties/errorCodes';
import 'rxjs';
import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
@Component({
selector: 'search-download',
@ -53,13 +54,12 @@ export class SearchDownloadComponent {
}
ngOnInit() {
this.subscriptions.push(this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
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() {

View File

@ -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,

View File

@ -50,7 +50,8 @@
<div>
<div class="uk-panel" id="module-0">
<ul class="uk-nav uk-nav-default">
<li *ngIf="(['explore','connect','monitor','provide','develop']).indexOf(portal)!=-1" class="uk-nav-header uk-parent">
<li *ngIf="(['explore','connect','monitor','provide','develop','aggregator']).indexOf(portal)!=-1"
class="uk-nav-header uk-parent">
Dashboards
<ul class="uk-nav-sub">
<li *ngIf="portal!='explore'"><a
@ -119,7 +120,7 @@
</div>
</div>
</div>
<div *ngIf="(['explore','connect','monitor','provide','develop']).indexOf(portal)!=-1"
<div *ngIf="(['explore','connect','monitor','provide','develop', 'aggregator']).indexOf(portal)!=-1"
class="tm-toolbar custom-{{portal}}-toolbar uk-visible@m">
<div class="uk-container uk-flex uk-flex-middle uk-container-expand">
<div class="uk-margin-auto-left">

View File

@ -4,6 +4,7 @@ import {DomSanitizer} from '@angular/platform-browser';
//Usage Example <paging [currentPage]="page" [totalResults]="resultsNum" [term]="keyword"> </paging>
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;

View File

@ -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 <paging [currentPage]="page" [totalResults]="resultsNum" [term]="keyword"> </paging>
@ -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;

View File

@ -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;