From 6452385620e9d07ce1b29dc92e0febaabc7700ce Mon Sep 17 00:00:00 2001 From: Elijah Oyekunle Date: Fri, 2 Aug 2019 07:31:51 +0100 Subject: [PATCH] Implemented CRD Objects Events (#4155) --- src/app/frontend/crd/crdobject/component.ts | 7 +++++++ src/app/frontend/crd/crdobject/template.html | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/app/frontend/crd/crdobject/component.ts b/src/app/frontend/crd/crdobject/component.ts index ad275ab49888..11f2c129651f 100644 --- a/src/app/frontend/crd/crdobject/component.ts +++ b/src/app/frontend/crd/crdobject/component.ts @@ -43,6 +43,7 @@ export class CRDObjectDetailComponent implements OnInit, OnDestroy { isInitialized = false; selectedMode = Modes.YAML; objectRaw: {[s: string]: string} = {}; + eventListEndpoint: string; constructor( private readonly object_: NamespacedResourceService, @@ -55,6 +56,12 @@ export class CRDObjectDetailComponent implements OnInit, OnDestroy { ngOnInit(): void { const {crdName, namespace, objectName} = this.activatedRoute_.snapshot.params; + this.eventListEndpoint = this.endpoint_.child( + `${crdName}/${objectName}`, + Resource.event, + namespace, + ); + this.objectSubscription_ = this.object_ .get(this.endpoint_.child(crdName, objectName, namespace)) .subscribe((d: CRDObjectDetail) => { diff --git a/src/app/frontend/crd/crdobject/template.html b/src/app/frontend/crd/crdobject/template.html index ea6fc9cacaab..00a7be952251 100644 --- a/src/app/frontend/crd/crdobject/template.html +++ b/src/app/frontend/crd/crdobject/template.html @@ -32,3 +32,5 @@ #code> + +