Skip to content

Commit

Permalink
Update Alert page header style
Browse files Browse the repository at this point in the history
  • Loading branch information
machadoum committed Aug 12, 2021
1 parent 997e9ec commit 768c607
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { SiemSearchBar } from '../../../common/components/search_bar';
import { SecuritySolutionPageWrapper } from '../../../common/components/page_wrapper';
import { inputsSelectors } from '../../../common/store/inputs';
import { setAbsoluteRangeDatePicker } from '../../../common/store/inputs/actions';
import { useAlertInfo } from '../../components/alerts_info';
import { AlertsTable } from '../../components/alerts_table';
import { NoApiIntegrationKeyCallOut } from '../../components/callouts/no_api_integration_callout';
import { AlertsHistogramPanel } from '../../components/alerts_kpis/alerts_histogram_panel';
Expand All @@ -42,7 +41,7 @@ import { DetectionEngineHeaderPage } from '../../components/detection_engine_hea
import { useListsConfig } from '../../containers/detection_engine/lists/use_lists_config';
import { DetectionEngineUserUnauthenticated } from './detection_engine_user_unauthenticated';
import * as i18n from './translations';
import { LinkButton } from '../../../common/components/links';
import { LinkAnchor } from '../../../common/components/links';
import { useFormatUrl } from '../../../common/components/link_to';
import { useGlobalFullScreen } from '../../../common/containers/use_full_screen';
import { Display } from '../../../hosts/pages/display';
Expand Down Expand Up @@ -122,7 +121,6 @@ const DetectionEnginePageComponent: React.FC<DetectionEngineComponentProps> = ({
loading: listsConfigLoading,
needsConfiguration: needsListsConfiguration,
} = useListsConfig();
const [lastAlerts] = useAlertInfo({});
const { formatUrl } = useFormatUrl(SecurityPageName.rules);
const [showBuildingBlockAlerts, setShowBuildingBlockAlerts] = useState(false);
const [showOnlyThreatIndicatorAlerts, setShowOnlyThreatIndicatorAlerts] = useState(false);
Expand Down Expand Up @@ -281,27 +279,14 @@ const DetectionEnginePageComponent: React.FC<DetectionEngineComponentProps> = ({
data-test-subj="detectionsAlertsPage"
>
<Display show={!globalFullScreen}>
<DetectionEngineHeaderPage
subtitle={
lastAlerts != null && (
<>
{i18n.LAST_ALERT}
{': '}
{lastAlerts}
</>
)
}
title={i18n.PAGE_TITLE}
>
<LinkButton
fill
<DetectionEngineHeaderPage title={i18n.PAGE_TITLE}>
<LinkAnchor
onClick={goToRules}
href={formatUrl(getRulesUrl())}
iconType="gear"
data-test-subj="manage-alert-detection-rules"
>
{i18n.BUTTON_MANAGE_RULES}
</LinkButton>
</LinkAnchor>
</DetectionEngineHeaderPage>
<EuiHorizontalRule margin="m" />
<AlertsTableFilterGroup onFilterGroupChanged={onFilterGroupChangedCallback} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const ALERT = i18n.translate('xpack.securitySolution.detectionEngine.aler
export const BUTTON_MANAGE_RULES = i18n.translate(
'xpack.securitySolution.detectionEngine.buttonManageRules',
{
defaultMessage: 'Manage detection rules',
defaultMessage: 'Manage rules',
}
);

Expand Down

0 comments on commit 768c607

Please sign in to comment.