Skip to content

Commit

Permalink
Merge pull request #476 from newrelic/sidebar-time-notification
Browse files Browse the repository at this point in the history
fix: display time period in sidebar when in playback
  • Loading branch information
amit-y authored Dec 16, 2024
2 parents acae43a + ff37774 commit 88af399
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/components/signal-detail-sidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Card,
CardBody,
HeadingText,
InlineMessage,
Link,
SectionMessage,
navigation,
Expand All @@ -17,6 +18,7 @@ import GoldenMetrics from './golden-metrics';
import { AppContext } from '../../contexts';

import typesList from '../../../nerdlets/signal-selection/types.json';
import { formatTimestamp } from '../../utils';

const NO_ENTITY_TYPE = '(unknown entity type)';

Expand Down Expand Up @@ -82,6 +84,15 @@ const SignalDetailSidebar = ({ guid, name, type, data, timeWindow }) => {
{detailLinkText}
</Link>
) : null}
{timeWindow ? (
<InlineMessage
className="detail-time-info"
description="Showing data for the specified time period."
label={`${formatTimestamp(
timeWindow.start
)} - ${formatTimestamp(timeWindow.end)}`}
/>
) : null}
</CardBody>
</Card>
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/components/signal-detail-sidebar/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
line-height: 16px;
}

.detail-time-info {
margin-top: 4px;
}

.alert-incidents-wrapper {
.alert-incidents-header {
margin-bottom: 8px;
Expand Down

0 comments on commit 88af399

Please sign in to comment.