Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Show node events in node details #285

Merged
merged 1 commit into from
Apr 21, 2020
Merged
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: 3 additions & 0 deletions dashboard/client/components/+events/event.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export class EventStore extends KubeObjectStore<KubeEvent> {

getEventsByObject(obj: KubeObject): KubeEvent[] {
return this.items.filter(evt => {
if(obj.kind == "Node") {
return obj.getName() == evt.involvedObject.uid && evt.involvedObject.kind == "Node";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node events have node name as uid.

}
return obj.getId() == evt.involvedObject.uid;
});
}
Expand Down
2 changes: 2 additions & 0 deletions dashboard/client/components/+nodes/node-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { reaction } from "mobx";
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
import { apiManager } from "../../api/api-manager";
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
import { KubeEventDetails } from "../+events/kube-event-details";

interface Props extends KubeObjectDetailsProps<Node> {
}
Expand Down Expand Up @@ -148,6 +149,7 @@ export class NodeDetails extends React.Component<Props> {
maxCpu={node.getCpuCapacity()}
maxMemory={node.getMemoryCapacity()}
/>
<KubeEventDetails object={node}/>
</div>
)
}
Expand Down