mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Checking for 'kind' to be defined
Inside 'involvedObject' of Event Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
0f11b03692
commit
d38d28d80b
@ -121,6 +121,8 @@ export function lookupApiLink(ref: IKubeObjectRef, parentObject: KubeObject): st
|
|||||||
namespace = parentObject.getNs()
|
namespace = parentObject.getNs()
|
||||||
} = ref;
|
} = ref;
|
||||||
|
|
||||||
|
if (!kind) return "";
|
||||||
|
|
||||||
// search in registered apis by 'kind' & 'apiVersion'
|
// search in registered apis by 'kind' & 'apiVersion'
|
||||||
const api = apiManager.getApi(api => api.kind === kind && api.apiVersionWithGroup == apiVersion)
|
const api = apiManager.getApi(api => api.kind === kind && api.apiVersionWithGroup == apiVersion)
|
||||||
if (api) {
|
if (api) {
|
||||||
|
|||||||
@ -102,7 +102,7 @@ export class Events extends React.Component<Props> {
|
|||||||
},
|
},
|
||||||
event.getNs(),
|
event.getNs(),
|
||||||
kind,
|
kind,
|
||||||
<Link to={detailsUrl} title={name} onClick={stopPropagation}>{name}</Link>,
|
detailsUrl ? <Link to={detailsUrl} title={name} onClick={stopPropagation}>{name}</Link> : name,
|
||||||
event.getSource(),
|
event.getSource(),
|
||||||
event.count,
|
event.count,
|
||||||
event.getAge(),
|
event.getAge(),
|
||||||
|
|||||||
@ -69,6 +69,7 @@ export function getSelectedDetails() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getDetailsUrl(details: string) {
|
export function getDetailsUrl(details: string) {
|
||||||
|
if (!details) return "";
|
||||||
return getQueryString({
|
return getQueryString({
|
||||||
details: details,
|
details: details,
|
||||||
selected: getSelectedDetails(),
|
selected: getSelectedDetails(),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user