-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
258 additions
and
9 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...c/app/components/protected-pages/protected-pages-list/protected-pages-list.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<app-collection-list [collection]="protectedArticles"></app-collection-list> | ||
<app-collection-list [collection]="protectedCapabilities"></app-collection-list> | ||
<app-collection-list [collection]="protectedCaseStudies"></app-collection-list> | ||
<app-collection-list [collection]="protectedEquipment"></app-collection-list> | ||
<app-collection-list [collection]="protectedEvents"></app-collection-list> | ||
<app-collection-list [collection]="protectedFunding"></app-collection-list> | ||
<app-collection-list [collection]="protectedServices"></app-collection-list> | ||
<app-collection-list [collection]="protectedSoftware"></app-collection-list> | ||
<app-collection-list [collection]="protectedSubHub"></app-collection-list> |
Empty file.
138 changes: 138 additions & 0 deletions
138
...src/app/components/protected-pages/protected-pages-list/protected-pages-list.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
import { Component, OnDestroy, OnInit } from '@angular/core'; | ||
import { AllProtectedArticlesGQL, ArticleCollection, | ||
AllProtectedCapabilitiesGQL, CapabilityCollection, | ||
AllProtectedCaseStudiesGQL, CaseStudyCollection, | ||
AllProtectedEquipmentGQL, EquipmentCollection, | ||
AllProtectedEventsGQL, EventCollection, | ||
AllProtectedFundingGQL,FundingCollection, | ||
AllProtectedServicesGQL, ServiceCollection, | ||
AllProtectedSoftwareGQL, SoftwareCollection, | ||
AllProtectedSubHubGQL, SubHubCollection | ||
} from '@app/graphql/schema'; | ||
import { Observable, Subscription } from 'rxjs'; | ||
import { map } from 'rxjs/operators'; | ||
import { PageTitleService } from '@services/page-title.service'; | ||
|
||
@Component({ | ||
selector: 'app-protected-pages-list', | ||
templateUrl: './protected-pages-list.component.html', | ||
styleUrls: ['./protected-pages-list.component.scss'] | ||
}) | ||
export class ProtectedPagesListComponent implements OnInit, OnDestroy { | ||
public protectedPages: any; | ||
public protectedArticles: any; | ||
public protectedCapabilities: any; | ||
public protectedCaseStudies: any; | ||
public protectedEquipment: any; | ||
public protectedEvents: any; | ||
public protectedFunding: any; | ||
public protectedServices: any; | ||
public protectedSoftware: any; | ||
public protectedSubHub: any; | ||
public title: string = 'Protected Pages Collection'; | ||
|
||
private subscription = new Subscription(); | ||
|
||
constructor( | ||
private allProtectedArticlesGQL: AllProtectedArticlesGQL, | ||
private allProtectedCapabilitiesGQL: AllProtectedCapabilitiesGQL, | ||
private allProtectedCaseStudiesGQL: AllProtectedCaseStudiesGQL, | ||
private allProtectedEquipmentGQL: AllProtectedEquipmentGQL, | ||
private allProtectedEventsGQL: AllProtectedEventsGQL, | ||
private allProtectedFundingGQL: AllProtectedFundingGQL, | ||
private allProtectedServicesGQL: AllProtectedServicesGQL, | ||
private allProtectedSoftwareGQL: AllProtectedSoftwareGQL, | ||
private allProtectedSubHubGQL: AllProtectedSubHubGQL, | ||
public pageTitleService: PageTitleService | ||
) { } | ||
|
||
ngOnInit(): void { | ||
this.pageTitleService.title = this.title; | ||
this.subscription.add( | ||
this.loadArticles().subscribe((collection) => this.protectedArticles = collection) | ||
); | ||
this.subscription.add( | ||
this.loadCapabilities().subscribe((collection) => this.protectedCapabilities = collection) | ||
); | ||
this.subscription.add( | ||
this.loadCaseStudies().subscribe((collection) => this.protectedCaseStudies = collection) | ||
); | ||
this.subscription.add( | ||
this.loadEquipment().subscribe((collection) => this.protectedEquipment = collection) | ||
); | ||
this.subscription.add( | ||
this.loadEvents().subscribe((collection) => this.protectedEvents = collection) | ||
); | ||
this.subscription.add( | ||
this.loadFunding().subscribe((collection) => this.protectedFunding = collection) | ||
); | ||
this.subscription.add( | ||
this.loadServices().subscribe((collection) => this.protectedServices = collection) | ||
); | ||
this.subscription.add( | ||
this.loadSoftware().subscribe((collection) => this.protectedSoftware = collection) | ||
); | ||
this.subscription.add( | ||
this.loadSubHub().subscribe((collection) => this.protectedSubHub = collection) | ||
); | ||
} | ||
|
||
public loadArticles(): Observable<ArticleCollection> { | ||
return this.allProtectedArticlesGQL.fetch().pipe( | ||
map((result) => result.data.articleCollection as ArticleCollection) | ||
) | ||
} | ||
|
||
public loadCapabilities(): Observable<CapabilityCollection> { | ||
return this.allProtectedCapabilitiesGQL.fetch().pipe( | ||
map((result) => result.data.capabilityCollection as CapabilityCollection) | ||
) | ||
} | ||
|
||
public loadCaseStudies(): Observable<CaseStudyCollection> { | ||
return this.allProtectedCaseStudiesGQL.fetch().pipe( | ||
map((result) => result.data.caseStudyCollection as CaseStudyCollection) | ||
) | ||
} | ||
|
||
public loadEquipment(): Observable<EquipmentCollection> { | ||
return this.allProtectedEquipmentGQL.fetch().pipe( | ||
map((result) => result.data.equipmentCollection as EquipmentCollection) | ||
) | ||
} | ||
|
||
public loadEvents(): Observable<EventCollection> { | ||
return this.allProtectedEventsGQL.fetch().pipe( | ||
map((result) => result.data.eventCollection as EventCollection) | ||
) | ||
} | ||
|
||
public loadFunding(): Observable<FundingCollection> { | ||
return this.allProtectedFundingGQL.fetch().pipe( | ||
map((result) => result.data.fundingCollection as FundingCollection) | ||
) | ||
} | ||
|
||
public loadServices(): Observable<ServiceCollection> { | ||
return this.allProtectedServicesGQL.fetch().pipe( | ||
map((result) => result.data.serviceCollection as ServiceCollection) | ||
) | ||
} | ||
|
||
public loadSoftware(): Observable<SoftwareCollection> { | ||
return this.allProtectedSoftwareGQL.fetch().pipe( | ||
map((result) => result.data.softwareCollection as SoftwareCollection) | ||
) | ||
} | ||
|
||
public loadSubHub(): Observable<SubHubCollection> { | ||
return this.allProtectedSubHubGQL.fetch().pipe( | ||
map((result) => result.data.subHubCollection as SubHubCollection) | ||
) | ||
} | ||
|
||
ngOnDestroy(): void { | ||
this.subscription.unsubscribe(); | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
research-hub-web/src/app/components/protected-pages/protected-pages-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
import { ProtectedPagesListComponent } from './protected-pages-list/protected-pages-list.component'; | ||
|
||
const routes: Routes = [ | ||
{ path: 'list', component: ProtectedPagesListComponent } | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class ProtectedPagesRoutingModule { } |
22 changes: 22 additions & 0 deletions
22
research-hub-web/src/app/components/protected-pages/protected-pages.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { ProtectedPagesRoutingModule } from './protected-pages-routing.module'; | ||
import { SharedModule } from '@components/shared/app.shared.module'; | ||
import { NgxContentfulRichTextModule } from 'ngx-contentful-rich-text'; | ||
import { ProtectedPagesListComponent } from './protected-pages-list/protected-pages-list.component'; | ||
import { CardsModule } from '../cards/cards.module'; | ||
|
||
|
||
@NgModule({ | ||
declarations: [ | ||
ProtectedPagesListComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
ProtectedPagesRoutingModule, | ||
SharedModule, | ||
NgxContentfulRichTextModule, | ||
CardsModule | ||
] | ||
}) | ||
export class ProtectedPagesModule { } |
2 changes: 1 addition & 1 deletion
2
research-hub-web/src/app/graphql/queries/all-articles.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
query AllArticles { | ||
articleCollection(limit: 250) { | ||
articleCollection(limit: 1000) { | ||
items { | ||
...PublicFields | ||
} | ||
|
2 changes: 1 addition & 1 deletion
2
research-hub-web/src/app/graphql/queries/all-capabilities.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
research-hub-web/src/app/graphql/queries/all-case-studies.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
research-hub-web/src/app/graphql/queries/all-equipment.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
research-hub-web/src/app/graphql/queries/all-events.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
query AllEvents { | ||
eventCollection(limit: 250) { | ||
eventCollection(limit: 1000) { | ||
items { | ||
...PublicFields | ||
} | ||
|
2 changes: 1 addition & 1 deletion
2
research-hub-web/src/app/graphql/queries/all-funding.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
query AllFunding { | ||
fundingCollection(limit: 250) { | ||
fundingCollection(limit: 1000) { | ||
items { | ||
...PublicFields | ||
} | ||
|
7 changes: 7 additions & 0 deletions
7
research-hub-web/src/app/graphql/queries/all-protected-articles.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query AllProtectedArticles { | ||
articleCollection(limit: 1000, where: {ssoProtected: true}) { | ||
items { | ||
...PublicFields | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
research-hub-web/src/app/graphql/queries/all-protected-capabilities.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query AllProtectedCapabilities { | ||
capabilityCollection(limit: 1000, where: {ssoProtected: true}) { | ||
items { | ||
...PublicFields | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
research-hub-web/src/app/graphql/queries/all-protected-case-studies.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query AllProtectedCaseStudies { | ||
caseStudyCollection(limit: 1000, where: {ssoProtected: true}) { | ||
items { | ||
...PublicFields | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
research-hub-web/src/app/graphql/queries/all-protected-equipment.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query AllProtectedEquipment { | ||
equipmentCollection(limit: 1000, where: {ssoProtected: true}) { | ||
items { | ||
...PublicFields | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
research-hub-web/src/app/graphql/queries/all-protected-events.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query AllProtectedEvents { | ||
eventCollection(limit: 1000, where: {ssoProtected: true}) { | ||
items { | ||
...PublicFields | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
research-hub-web/src/app/graphql/queries/all-protected-funding.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query AllProtectedFunding { | ||
fundingCollection(limit: 1000, where: {ssoProtected: true}) { | ||
items { | ||
...PublicFields | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
research-hub-web/src/app/graphql/queries/all-protected-services.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query AllProtectedServices { | ||
serviceCollection(limit: 1000, where: {ssoProtected: true}) { | ||
items { | ||
...PublicFields | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
research-hub-web/src/app/graphql/queries/all-protected-software.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query AllProtectedSoftware { | ||
softwareCollection(limit: 1000, where: {ssoProtected: true}) { | ||
items { | ||
...PublicFields | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
research-hub-web/src/app/graphql/queries/all-protected-subhub.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query AllProtectedSubHub { | ||
subHubCollection(limit: 1000, where: {ssoProtected: true}) { | ||
items { | ||
...PublicFields | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
research-hub-web/src/app/graphql/queries/all-services.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
query AllServices { | ||
serviceCollection(limit: 250) { | ||
serviceCollection(limit: 1000) { | ||
items { | ||
...PublicFields | ||
} | ||
|
2 changes: 1 addition & 1 deletion
2
research-hub-web/src/app/graphql/queries/all-software.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
research-hub-web/src/app/graphql/queries/all-subhubs.query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
query AllSubHub { | ||
subHubCollection(limit: 250) { | ||
subHubCollection(limit: 1000) { | ||
items { | ||
...PublicFields | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters