-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Event schema null checks #13478
Add Event schema null checks #13478
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ export default { | |
|
||
const schema = this.$store.getters['cluster/schemaFor'](EVENT); | ||
|
||
const paginationHeaders = [ | ||
const paginationHeaders = schema ? [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are changes to this file needed? the events table isn't shown if the type can't been seen There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In theory no, this is just a null check for the component itself. It doesn't hurt, I would keep it, so that if the EventTable is shown by any mistake, the UI doesn't crash. |
||
reason, | ||
STEVE_EVENT_OBJECT, | ||
MESSAGE, | ||
|
@@ -49,7 +49,7 @@ export default { | |
defaultSort: true, | ||
}, | ||
headerFromSchemaColString('Count', schema, this.$store.getters, true), | ||
]; | ||
] : []; | ||
|
||
return { | ||
schema, | ||
|
@@ -88,6 +88,7 @@ export default { | |
|
||
<template> | ||
<PaginatedResourceTable | ||
v-if="!!schema" | ||
:schema="schema" | ||
:headers="eventHeaders" | ||
:pagination-headers="paginationHeaders" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paginationHeaders
can be an empty array since the UI shows events only if event schema is not null: