Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/agora/app/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ API_DOCS_URL="http://localhost:8000/api-docs"
APP_VERSION="local"
CSR_API_URL="http://localhost:8000/api/v1"
SSR_API_URL="http://agora-api:3333/v1"
ROLLBAR_TOKEN="e788198867474855a996485580b08d03"
TAG_NAME="local"
GOOGLE_TAG_MANAGER_ID=""
GOOGLE_TAG_MANAGER_ID=""
17 changes: 14 additions & 3 deletions apps/agora/app/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AGORA_LOADING_ICON_COLORS, ConfigService } from '@sagebionetworks/agora
import { SearchInputComponent } from '@sagebionetworks/agora/ui';
import { footerLinks, headerLinks } from '@sagebionetworks/agora/util';
import { LOADING_ICON_COLORS } from '@sagebionetworks/explorers/constants';
import { MetaTagService, VersionService } from '@sagebionetworks/explorers/services';
import { LoggerService, MetaTagService, VersionService } from '@sagebionetworks/explorers/services';
import {
ErrorOverlayComponent,
FooterComponent,
Expand Down Expand Up @@ -47,6 +47,7 @@ import { ToastModule } from 'primeng/toast';
})
export class AppComponent implements OnInit {
private readonly destroyRef = inject(DestroyRef);
private readonly logger = inject(LoggerService);

configService = inject(ConfigService);
dataVersionService = inject(DataVersionService);
Expand Down Expand Up @@ -75,22 +76,32 @@ export class AppComponent implements OnInit {
}

getDataVersion() {
this.logger.log('AppComponent: Loading data version');

this.versionService
.getDataVersion$(this.dataVersionService)
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe({
next: (v) => (this.dataVersion = v),
error: () => (this.dataVersion = 'unknown'),
error: () => {
this.dataVersion = 'unknown';
this.logger.error('Failed to get data version');
},
});
}

getSiteVersion() {
this.logger.log('AppComponent: Loading site version');

this.versionService
.getSiteVersion$(this.configService.config)
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe({
next: (v) => (this.siteVersion = v),
error: () => (this.siteVersion = 'unknown'),
error: () => {
this.siteVersion = 'unknown';
this.logger.error('Failed to get site version');
},
});
}
}
21 changes: 19 additions & 2 deletions apps/agora/app/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
ROUTE_PATHS,
SUPPORT_EMAIL,
} from '@sagebionetworks/agora/config';
import { SynapseWikiParams } from '@sagebionetworks/explorers/models';

export const routes: Route[] = [
{
Expand All @@ -17,19 +18,35 @@ export const routes: Route[] = [
},
{
path: ROUTE_PATHS.ABOUT,
loadChildren: () => import('@sagebionetworks/agora/about').then((routes) => routes.routes),
loadChildren: () =>
import('@sagebionetworks/explorers/shared').then((routes) => routes.wikiHeroRoute),
data: {
title: 'About Agora',
description:
'Agora is funded by the National Institute on Aging, and is developed and maintained by Sage Bionetworks.',
heroTitle: 'About',
heroBackgroundImagePath: DEFAULT_HERO_BACKGROUND_IMAGE_PATH,
className: 'about-page-content',
wikiParams: {
ownerId: 'syn25913473',
wikiId: '612058',
} as SynapseWikiParams,
},
},
{
path: ROUTE_PATHS.NEWS,
loadChildren: () => import('@sagebionetworks/agora/news').then((routes) => routes.routes),
loadChildren: () =>
import('@sagebionetworks/explorers/shared').then((routes) => routes.wikiHeroRoute),
data: {
title: 'News | Agora Releases',
description: "See what's new in Agora, from new features to our latest data updates.",
heroTitle: 'Agora News',
heroBackgroundImagePath: DEFAULT_HERO_BACKGROUND_IMAGE_PATH,
className: 'news-page-content',
wikiParams: {
ownerId: 'syn25913473',
wikiId: '611426',
} as SynapseWikiParams,
},
},
{
Expand Down
17 changes: 14 additions & 3 deletions apps/model-ad/app/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, DestroyRef, inject, OnInit } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { RouterModule } from '@angular/router';
import { LOADING_ICON_COLORS } from '@sagebionetworks/explorers/constants';
import { MetaTagService, VersionService } from '@sagebionetworks/explorers/services';
import { LoggerService, MetaTagService, VersionService } from '@sagebionetworks/explorers/services';
import {
ErrorOverlayComponent,
FooterComponent,
Expand Down Expand Up @@ -47,6 +47,7 @@ import { ToastModule } from 'primeng/toast';
})
export class AppComponent implements OnInit {
private readonly destroyRef = inject(DestroyRef);
private readonly logger = inject(LoggerService);

configService = inject(ConfigService);
dataVersionService = inject(DataVersionService);
Expand Down Expand Up @@ -75,22 +76,32 @@ export class AppComponent implements OnInit {
}

getDataVersion() {
this.logger.log('AppComponent: Loading data version');

this.versionService
.getDataVersion$(this.dataVersionService)
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe({
next: (v) => (this.dataVersion = v),
error: () => (this.dataVersion = 'unknown'),
error: () => {
this.dataVersion = 'unknown';
this.logger.error('Failed to get data version');
},
});
}

getSiteVersion() {
this.logger.log('AppComponent: Loading site version');

this.versionService
.getSiteVersion$(this.configService.config)
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe({
next: (v) => (this.siteVersion = v),
error: () => (this.siteVersion = 'unknown'),
error: () => {
this.siteVersion = 'unknown';
this.logger.error('Failed to get site version');
},
});
}
}
10 changes: 0 additions & 10 deletions docs/products/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,6 @@ This library was generated with Nx.
- **Available Tasks**: test, lint
- **Documentation**: [README](https://github.com/Sage-Bionetworks/sage-monorepo/blob/main/libs/agora/services/README.md)

#### agora-shared

This library was generated with Nx.

- **Type**: feature
- **Language**: typescript
- **Location**: `libs/agora/shared`
- **Available Tasks**: test, lint, lint-fix
- **Documentation**: [README](https://github.com/Sage-Bionetworks/sage-monorepo/blob/main/libs/agora/shared/README.md)

#### agora-storybook

This library was generated with Nx.
Expand Down
41 changes: 0 additions & 41 deletions libs/agora/about/.eslintrc.json

This file was deleted.

7 changes: 0 additions & 7 deletions libs/agora/about/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions libs/agora/about/jest.config.ts

This file was deleted.

27 changes: 0 additions & 27 deletions libs/agora/about/project.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/agora/about/src/index.ts

This file was deleted.

15 changes: 0 additions & 15 deletions libs/agora/about/src/lib/about.component.html

This file was deleted.

Empty file.
13 changes: 0 additions & 13 deletions libs/agora/about/src/lib/about.component.spec.ts

This file was deleted.

24 changes: 0 additions & 24 deletions libs/agora/about/src/lib/about.component.stories.ts

This file was deleted.

16 changes: 0 additions & 16 deletions libs/agora/about/src/lib/about.component.ts

This file was deleted.

4 changes: 0 additions & 4 deletions libs/agora/about/src/lib/about.routes.ts

This file was deleted.

2 changes: 0 additions & 2 deletions libs/agora/about/src/test-setup.ts

This file was deleted.

28 changes: 0 additions & 28 deletions libs/agora/about/tsconfig.json

This file was deleted.

Loading
Loading