Skip to content

Commit

Permalink
Implemented CRD Objects Events (#4155)
Browse files Browse the repository at this point in the history
  • Loading branch information
eloyekunle authored and k8s-ci-robot committed Aug 2, 2019
1 parent 827048a commit 6452385
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/frontend/crd/crdobject/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<CRDObjectDetail>,
Expand All @@ -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) => {
Expand Down
2 changes: 2 additions & 0 deletions src/app/frontend/crd/crdobject/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@
#code></div>
</div>
</kd-card>

<kd-event-list [endpoint]="eventListEndpoint"></kd-event-list>

0 comments on commit 6452385

Please sign in to comment.