mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add KubeEventDetails empty placeholder (#6978)
* KubeEventDetails empty placeholder Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Updaing snapshots Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
a5c62da002
commit
b8d1ef708e
@ -104,12 +104,17 @@ exports[`disable kube object detail items when cluster is not relevant given ext
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
class="DrawerTitle flex gaps align-center title"
|
||||
class="DrawerTitle title"
|
||||
>
|
||||
<span>
|
||||
Events
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="empty"
|
||||
>
|
||||
No events found
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -725,12 +730,17 @@ exports[`disable kube object detail items when cluster is not relevant given ext
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
class="DrawerTitle flex gaps align-center title"
|
||||
class="DrawerTitle title"
|
||||
>
|
||||
<span>
|
||||
Events
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="empty"
|
||||
>
|
||||
No events found
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1346,12 +1356,17 @@ exports[`disable kube object detail items when cluster is not relevant given not
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
class="DrawerTitle flex gaps align-center title"
|
||||
class="DrawerTitle title"
|
||||
>
|
||||
<span>
|
||||
Events
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="empty"
|
||||
>
|
||||
No events found
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -99,12 +99,17 @@ exports[`reactively hide kube object detail item renders 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
class="DrawerTitle flex gaps align-center title"
|
||||
class="DrawerTitle title"
|
||||
>
|
||||
<span>
|
||||
Events
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="empty"
|
||||
>
|
||||
No events found
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -725,12 +730,17 @@ exports[`reactively hide kube object detail item when the item is shown renders
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
class="DrawerTitle flex gaps align-center title"
|
||||
class="DrawerTitle title"
|
||||
>
|
||||
<span>
|
||||
Events
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="empty"
|
||||
>
|
||||
No events found
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -22,8 +22,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.no-items {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
opacity: 0.6;
|
||||
}
|
||||
@ -3,7 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import "./kube-event-details.scss";
|
||||
import styles from "./kube-event-details.module.scss";
|
||||
|
||||
import React from "react";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
@ -57,14 +57,14 @@ class NonInjectedKubeEventDetails extends React.Component<KubeEventDetailsProps
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DrawerTitle className="flex gaps align-center">
|
||||
<DrawerTitle>
|
||||
<span>Events</span>
|
||||
</DrawerTitle>
|
||||
{events.length > 0 && (
|
||||
<div className="KubeEventDetails">
|
||||
<div className={styles.KubeEventDetails}>
|
||||
{events.map(event => (
|
||||
<div className="event" key={event.getId()}>
|
||||
<div className={cssNames("title", { warning: event.isWarning() })}>
|
||||
<div className={styles.event} key={event.getId()}>
|
||||
<div className={cssNames(styles.title, { [styles.warning]: event.isWarning() })}>
|
||||
{event.message}
|
||||
</div>
|
||||
<DrawerItem name="Source">
|
||||
@ -85,6 +85,11 @@ class NonInjectedKubeEventDetails extends React.Component<KubeEventDetailsProps
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{events.length === 0 && (
|
||||
<div className={styles.empty}>
|
||||
No events found
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user