This file contains hidden or 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
build_frontend: | |
stage: build | |
image: buildkite/puppeteer | |
script: | |
- npm run build — — prod | |
- npm run scully | |
artifacts: | |
expose_as: static_site | |
paths: | |
- dist/static |
This file contains hidden or 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
@Injectable({ providedIn: ‘root’ }) | |
export class CockpitService { | |
private readonly baseApiUrl = environment.cockpit.apiUrl; | |
constructor( | |
private readonly http: HttpClient, | |
private readonly transferStateService: TransferStateService | |
) {} | |
requestCockpitData<T>( | |
path: string, | |
queryParams: HttpParams = new HttpParams() |
This file contains hidden or 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
<ng-container *ngIf=”content”> | |
<div class=”default-text”> | |
<h1 class=”large-title”>{{ content.title }}</h1> | |
<div [innerHtml]=”content.info | safeHtml”></div> | |
</div> | |
</ng-container> |
This file contains hidden or 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
export class HomeComponent implements OnInit { | |
content?: HomeContent; | |
constructor( | |
private readonly cockpitService: CockpitService, | |
private readonly cdr: ChangeDetectorRef | |
) {} | |
ngOnInit(): void { | |
this.cockpitService | |
.getSingleton('home') | |
.pipe(first()) |
This file contains hidden or 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
export class HomeComponent implements OnInit { | |
content?: HomeContent; | |
constructor( | |
private readonly cockpitService: CockpitService, | |
private readonly cdr: ChangeDetectorRef | |
) {} | |
ngOnInit(): void { | |
this.cockpitService | |
.getSingleton('home') | |
.pipe(first()) |
This file contains hidden or 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
@Injectable({ providedIn: 'root' }) | |
export class CockpitService { | |
private readonly baseApiUrl = environment.cockpit.apiUrl; | |
constructor(private readonly http: HttpClient) {} | |
requestCockpitData<T>( | |
path: string, | |
queryParams: HttpParams = new HttpParams() | |
): Observable<T> { | |
const url = mergePaths(this.baseApiUrl, path); | |
const headers = new HttpHeaders( |
This file contains hidden or 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
const routes: Routes = [ | |
{ | |
path: ‘’, | |
loadChildren: () => import(‘./home/home.module’).then((m) => m.HomeModule) | |
} | |
]; |