Skip to content
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

feat(ui): Added timing info to container state UI #20920

Merged
merged 1 commit into from
Nov 24, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {ApplicationResourcesDiff} from '../application-resources-diff/applicatio
import {ComparisonStatusIcon, formatCreationTimestamp, getPodReadinessGatesState, getPodStateReason, HealthStatusIcon} from '../utils';
import './application-node-info.scss';
import {ReadinessGatesNotPassedWarning} from './readiness-gates-not-passed-warning';
import Moment from 'react-moment';

const RenderContainerState = (props: {container: any}) => {
const state = (props.container.state?.waiting && 'waiting') || (props.container.state?.terminated && 'terminated') || (props.container.state?.running && 'running');
Expand Down Expand Up @@ -69,7 +70,13 @@ const RenderContainerState = (props: {container: any}) => {
{lastState && (
<>
<>
The container last terminated with <span className='application-node-info__container--highlight'>exit code {lastState?.exitCode}</span>
The container last terminated{' '}
<span className='application-node-info__container--highlight'>
<Moment fromNow={true} ago={true}>
{lastState.finishedAt}
</Moment>{' '}
ago with exit code {lastState?.exitCode}
</span>
</>
{lastState?.reason && ' because of '}
<span title={props.container.lastState?.message || ''}>
Expand Down