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

Remove Inventory table from vulnerability dashboard tab and change filter titles #6260

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const getVisStateTopVulnerabilities = (indexPatternId: string) => {
const getVisStateTopVulnerabilitiesEndpoints = (indexPatternId: string) => {
return {
id: 'most_vulnerable_endpoints_vulnerabilities',
title: 'The most vulnerable endpoints',
title: 'Most vulnerable endpoints',
type: 'horizontal_bar',
params: {
type: 'histogram',
Expand Down Expand Up @@ -420,152 +420,6 @@ const getVisStateAccumulationMostDetectedVulnerabilities = (
};
};

const getVisStateInventoryTable = (indexPatternId: string) => {
return {
id: 'inventory_table_vulnerabilities',
title: 'Inventory table',
type: 'table',
params: {
perPage: 5,
showPartialRows: false,
showMetricsAtAllLevels: false,
showTotal: false,
totalFunc: 'sum',
percentageCol: '',
},
data: {
searchSource: {
query: {
language: 'kuery',
query: '',
},
filter: [],
index: indexPatternId,
},
references: [
{
name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
type: 'index-pattern',
id: indexPatternId,
},
],
aggs: [
{
id: '1',
enabled: true,
type: 'count',
params: {
customLabel: 'Count',
},
schema: 'metric',
},
{
id: '2',
enabled: true,
type: 'terms',
params: {
field: 'package.name',
orderBy: '1',
order: 'desc',
size: 5,
otherBucket: false,
otherBucketLabel: 'Other',
missingBucket: false,
missingBucketLabel: 'Missing',
customLabel: 'name',
},
schema: 'bucket',
},
{
id: '3',
enabled: true,
type: 'terms',
params: {
field: 'package.version',
orderBy: '1',
order: 'desc',
size: 5,
otherBucket: false,
otherBucketLabel: 'Other',
missingBucket: false,
missingBucketLabel: 'Missing',
customLabel: 'version',
},
schema: 'bucket',
},
{
id: '5',
enabled: true,
type: 'terms',
params: {
field: 'vulnerability.severity',
orderBy: '1',
order: 'desc',
size: 5,
otherBucket: false,
otherBucketLabel: 'Other',
missingBucket: false,
missingBucketLabel: 'Missing',
customLabel: 'severity',
},
schema: 'bucket',
},
{
id: '6',
enabled: true,
type: 'terms',
params: {
field: 'vulnerability.id',
orderBy: '1',
order: 'desc',
size: 5,
otherBucket: false,
otherBucketLabel: 'Other',
missingBucket: false,
missingBucketLabel: 'Missing',
customLabel: 'id',
},
schema: 'bucket',
},
{
id: '7',
enabled: true,
type: 'terms',
params: {
field: 'vulnerability.score.version',
orderBy: '1',
order: 'desc',
size: 5,
otherBucket: false,
otherBucketLabel: 'Other',
missingBucket: false,
missingBucketLabel: 'Missing',
customLabel: 'score version',
},
schema: 'bucket',
},
{
id: '8',
enabled: true,
type: 'terms',
params: {
field: 'vulnerability.score.base',
orderBy: '1',
order: 'desc',
size: 5,
otherBucket: false,
otherBucketLabel: 'Other',
missingBucket: false,
missingBucketLabel: 'Missing',
customLabel: 'score base',
},
schema: 'bucket',
},
],
},
};
};

export const getDashboardPanels = (
indexPatternId: string,
): {
Expand Down Expand Up @@ -617,19 +471,5 @@ export const getDashboardPanels = (
getVisStateAccumulationMostDetectedVulnerabilities(indexPatternId),
},
},
'9': {
gridData: {
w: 48,
h: 12,
x: 0,
y: 14,
i: '9',
},
type: 'visualization',
explicitInput: {
id: '9',
savedVis: getVisStateInventoryTable(indexPatternId),
},
},
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export const getDashboardFilters = (
savedVis: getVisStateFilter(
'topPackageSelector',
indexPatternId,
'Top Packages vulnerabilities',
'Package',
'Top packages vulnerabilities',
'Top 5 package names',
'package.name',
),
},
Expand All @@ -110,8 +110,8 @@ export const getDashboardFilters = (
savedVis: getVisStateFilter(
'topOSVulnerabilities',
indexPatternId,
'Top Operating system vulnerabilities',
'Operating system',
'Top operating system vulnerabilities',
'Top 5 operating systems',
'host.os.full',
),
},
Expand All @@ -131,7 +131,7 @@ export const getDashboardFilters = (
'topAgentVulnerabilities',
indexPatternId,
'Agent filter',
'Agent',
'Top 5 agents',
'agent.id',
),
},
Expand All @@ -151,7 +151,7 @@ export const getDashboardFilters = (
'topVulnerabilities',
indexPatternId,
'Top vulnerabilities',
'Vulnerability',
'Top 5 vulnerabilities',
'vulnerability.id',
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const getVisStateSeverityCritical = (indexPatternId: string) => {
query: 'vulnerability.severity:"Critical"',
language: 'kuery',
},
label: '- Critical Severity Alerts',
label: '- Critical severity alerts',
},
],
},
Expand Down Expand Up @@ -167,7 +167,7 @@ const getVisStateSeverityHigh = (indexPatternId: string) => {
query: 'vulnerability.severity:"High"',
language: 'kuery',
},
label: '- High Severity Alerts',
label: '- High severity alerts',
},
],
},
Expand Down Expand Up @@ -252,7 +252,7 @@ const getVisStateSeverityMedium = (indexPatternId: string) => {
query: 'vulnerability.severity:"Medium"',
language: 'kuery',
},
label: '- Medium Severity Alerts',
label: '- Medium severity alerts',
},
],
},
Expand Down Expand Up @@ -337,7 +337,7 @@ const getVisStateSeverityLow = (indexPatternId: string) => {
query: 'vulnerability.severity:"Low"',
language: 'kuery',
},
label: '- Low Severity Alerts',
label: '- Low severity alerts',
},
],
},
Expand Down
Loading