-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Develop logic of a new index for the fim module (#6227)
* Create index pattern to be used in file integrity monitoring module and create checks on the health-check of the index pattern * adjustments to the health check for the fim index pattern * tab dashboard name change * merge with master * delete console.log * update changelog * correction of unit test of fim * correction of unit test of fim * correction of unit test of fim * correction of unit test of fim
- Loading branch information
1 parent
01cbd74
commit 72289d5
Showing
21 changed files
with
2,014 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
plugins/main/public/components/overview/fim/dashboard/dashboard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import React from 'react'; | ||
import { getPlugins } from '../../../../kibana-services'; | ||
import { ViewMode } from '../../../../../../../src/plugins/embeddable/public'; | ||
import { getDashboardPanels } from './dashboard_panels'; | ||
import { I18nProvider } from '@osd/i18n/react'; | ||
import useSearchBar from '../../../common/search-bar/use-search-bar'; | ||
import { getDashboardFilters } from './dashboard_panels_filters'; | ||
import './fim_filters.scss'; | ||
import { getKPIsPanel } from './dashboard_panels_kpis'; | ||
import { useAppConfig } from '../../../common/hooks'; | ||
|
||
const plugins = getPlugins(); | ||
|
||
const SearchBar = getPlugins().data.ui.SearchBar; | ||
|
||
const DashboardByRenderer = plugins.dashboard.DashboardContainerByValueRenderer; | ||
|
||
export const DashboardFim: React.FC = () => { | ||
const appConfig = useAppConfig(); | ||
const FIM_INDEX_PATTERN_ID = appConfig.data['fim.pattern']; | ||
|
||
const { searchBarProps } = useSearchBar({ | ||
defaultIndexPatternID: FIM_INDEX_PATTERN_ID, | ||
filters: [], | ||
}); | ||
|
||
return ( | ||
<> | ||
<I18nProvider> | ||
<SearchBar | ||
appName='fim-searchbar' | ||
{...searchBarProps} | ||
showDatePicker={false} | ||
showQueryInput={true} | ||
showQueryBar={true} | ||
/> | ||
</I18nProvider> | ||
<div className='fim-dashboard-filters-wrapper'> | ||
<DashboardByRenderer | ||
input={{ | ||
viewMode: ViewMode.VIEW, | ||
panels: getDashboardFilters(FIM_INDEX_PATTERN_ID), | ||
isFullScreenMode: false, | ||
filters: searchBarProps.filters ?? [], | ||
useMargins: false, | ||
id: 'fim-dashboard-tab-filters', | ||
timeRange: { | ||
from: searchBarProps.dateRangeFrom, | ||
to: searchBarProps.dateRangeTo, | ||
}, | ||
title: 'Fim dashboard filters', | ||
description: 'Dashboard of the Fim filters', | ||
query: searchBarProps.query, | ||
refreshConfig: { | ||
pause: false, | ||
value: 15, | ||
}, | ||
hidePanelTitles: true, | ||
}} | ||
/> | ||
</div> | ||
<DashboardByRenderer | ||
input={{ | ||
viewMode: ViewMode.VIEW, | ||
panels: getKPIsPanel(FIM_INDEX_PATTERN_ID), | ||
isFullScreenMode: false, | ||
filters: searchBarProps.filters ?? [], | ||
useMargins: true, | ||
id: 'kpis-fim-dashboard-tab', | ||
timeRange: { | ||
from: searchBarProps.dateRangeFrom, | ||
to: searchBarProps.dateRangeTo, | ||
}, | ||
title: 'KPIs Fim dashboard', | ||
description: 'KPIs Dashboard of the Fim', | ||
query: searchBarProps.query, | ||
refreshConfig: { | ||
pause: false, | ||
value: 15, | ||
}, | ||
hidePanelTitles: true, | ||
}} | ||
/> | ||
<DashboardByRenderer | ||
input={{ | ||
viewMode: ViewMode.VIEW, | ||
panels: getDashboardPanels(FIM_INDEX_PATTERN_ID), | ||
isFullScreenMode: false, | ||
filters: searchBarProps.filters ?? [], | ||
useMargins: true, | ||
id: 'fim-dashboard-tab', | ||
timeRange: { | ||
from: searchBarProps.dateRangeFrom, | ||
to: searchBarProps.dateRangeTo, | ||
}, | ||
title: 'Fim dashboard', | ||
description: 'Dashboard of the Fim', | ||
query: searchBarProps.query, | ||
refreshConfig: { | ||
pause: false, | ||
value: 15, | ||
}, | ||
hidePanelTitles: false, | ||
}} | ||
/> | ||
</> | ||
); | ||
}; |
Oops, something went wrong.