Skip to content
Open
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
23 changes: 23 additions & 0 deletions frontend/src/components/cluster/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import { Icon } from '@iconify/react';
import Box from '@mui/material/Box';
import FormControlLabel from '@mui/material/FormControlLabel';
import Grid from '@mui/material/Grid';
import { Theme } from '@mui/material/styles';
Expand Down Expand Up @@ -173,6 +175,27 @@ function EventsSection() {
headerProps={{
noNamespaceFilter: false,
titleSideActions: [
<LightTooltip
key="event-lifetime-info"
title={t(
"translation|Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
)}
interactive
>
<Box
component="span"
sx={{
display: 'inline-flex',
alignItems: 'center',
verticalAlign: 'middle',
fontSize: '1.75rem',
lineHeight: 0,
mr: 1,
}}
>
<Icon icon="mdi:information-outline" />
</Box>
</LightTooltip>,
Comment on lines +178 to +198
<FormControlLabel
checked={isWarningEventSwitchChecked}
label={t('Only warnings ({{ numWarnings }})', { numWarnings })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,11 @@
<div
class="MuiBox-root css-ldp2l3"
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
<label
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,11 @@
<div
class="MuiBox-root css-ldp2l3"
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
<label
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,11 @@
<div
class="MuiBox-root css-ldp2l3"
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
<label
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
Expand Down
34 changes: 33 additions & 1 deletion frontend/src/components/common/ObjectEventList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import { Icon } from '@iconify/react';
import Box from '@mui/material/Box';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import Event, { KubeEvent } from '../../lib/k8s/event';
Expand All @@ -23,6 +25,7 @@ import { HeadlampEventType, useEventCallback } from '../../redux/headlampEventSl
import { HoverInfoLabel } from '../common/Label';
import SectionBox from '../common/SectionBox';
import SimpleTable from '../common/SimpleTable';
import { LightTooltip } from '../common/Tooltip';
import ShowHideLabel from './ShowHideLabel';

export interface ObjectEventListProps {
Expand Down Expand Up @@ -101,7 +104,36 @@ export default function ObjectEventList(props: ObjectEventListProps) {
const { t } = useTranslation(['translation', 'glossary']);

return (
<SectionBox title={t('glossary|Events')}>
<SectionBox
title={t('glossary|Events')}
headerProps={{
noPadding: false,
headerStyle: 'subsection',
titleSideActions: [
<LightTooltip
key="event-lifetime-info"
title={t(
"translation|Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
)}
interactive
>
<Box
component="span"
sx={{
display: 'inline-flex',
alignItems: 'center',
verticalAlign: 'middle',
fontSize: '1.75rem',
lineHeight: 0,
mr: 1,
}}
>
<Icon icon="mdi:information-outline" />
</Box>
</LightTooltip>,
],
}}
>
Comment on lines +107 to +136
<SimpleTable
columns={[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,13 @@ cookieName: session-id"
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,13 @@ api.example.com"
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,13 @@
</h2>
<div
class="MuiBox-root css-ldp2l3"
/>
>
<span
aria-label="Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
class="MuiBox-root css-14rnpui"
data-mui-internal-clone-element="true"
/>
</div>
</div>
</div>
</div>
Expand Down
Loading
Loading