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

Fix legends in visualizations #6632

Merged
merged 5 commits into from
May 2, 2024
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ All notable changes to the Wazuh app project will be documented in this file.
### Changed

- Moved the plugin menu to platform applications into the side menu [#5840](https://github.com/wazuh/wazuh-dashboard-plugins/pull/5840) [#6226](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6226) [#6244](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6244) [#6176](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6176) [#6423](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6423) [#6510](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6510) [#6591](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6591)
- Changed dashboards. [#6035](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6035)
- Changed dashboards visualizations definitions. [#6035](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6035) [#6632](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6632)
- Change the display order of tabs in all modules. [#6067](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6067)
- Upgraded the `axios` dependency to `1.6.1` [#6114](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6114)
- Changed the api configuration title in the Server APIs section. [#6373](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6373)
Expand Down
9 changes: 0 additions & 9 deletions plugins/main/public/components/visualize/visualizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,6 @@ export const visualizations = {
},
],
},
{
height: 300,
vis: [
{
title: 'Top requirements over time',
id: 'Wazuh-App-Overview-PCI-DSS-Requirements-over-time',
},
],
},
{
height: 530,
vis: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ export default compose(
],
]), //TODO: this need cluster:read permission but manager/cluster is managed in WzConfigurationSwitch component
withRenderIfOrWrapped(
props => props.agent.status !== API_NAME_AGENT_STATUS.ACTIVE,
props =>
props.agent.id !== '000' &&
props.agent.status !== API_NAME_AGENT_STATUS.ACTIVE,
PromptNoActiveAgentWithoutSelect,
),
connect(mapStateToProps, mapDispatchToProps),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ export default [
totalFunc: 'sum',
},
aggs: [
{ id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
{
id: '1',
enabled: true,
type: 'count',
schema: 'metric',
params: {},
},
{
id: '3',
enabled: true,
Expand Down Expand Up @@ -94,9 +100,19 @@ export default [
addLegend: true,
legendPosition: 'right',
isDonut: true,
labels: { show: false, values: true, last_level: true, truncate: 100 },
labels: {
show: false,
values: true,
last_level: true,
truncate: 100,
},
dimensions: {
metric: { accessor: 1, format: { id: 'number' }, params: {}, aggType: 'count' },
metric: {
accessor: 1,
format: { id: 'number' },
params: {},
aggType: 'count',
},
buckets: [
{
accessor: 0,
Expand All @@ -115,7 +131,13 @@ export default [
},
},
aggs: [
{ id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
{
id: '1',
enabled: true,
type: 'count',
schema: 'metric',
params: {},
},
{
id: '2',
enabled: true,
Expand Down Expand Up @@ -160,10 +182,20 @@ export default [
minFontSize: 18,
maxFontSize: 72,
showLabel: true,
metric: { type: 'vis_dimension', accessor: 1, format: { id: 'string', params: {} } },
metric: {
type: 'vis_dimension',
accessor: 1,
format: { id: 'string', params: {} },
},
},
aggs: [
{ id: '1', enabled: true, type: 'count', schema: 'metric', params: { customLabel: '' } },
{
id: '1',
enabled: true,
type: 'count',
schema: 'metric',
params: { customLabel: '' },
},
{
id: '2',
enabled: true,
Expand Down Expand Up @@ -209,9 +241,19 @@ export default [
addLegend: true,
legendPosition: 'right',
isDonut: true,
labels: { show: false, values: true, last_level: true, truncate: 100 },
labels: {
show: false,
values: true,
last_level: true,
truncate: 100,
},
dimensions: {
metric: { accessor: 1, format: { id: 'number' }, params: {}, aggType: 'count' },
metric: {
accessor: 1,
format: { id: 'number' },
params: {},
aggType: 'count',
},
buckets: [
{
accessor: 0,
Expand All @@ -230,7 +272,13 @@ export default [
},
},
aggs: [
{ id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
{
id: '1',
enabled: true,
type: 'count',
schema: 'metric',
params: {},
},
{
id: '2',
enabled: true,
Expand Down Expand Up @@ -275,9 +323,19 @@ export default [
addLegend: true,
legendPosition: 'right',
isDonut: true,
labels: { show: false, values: true, last_level: true, truncate: 100 },
labels: {
show: false,
values: true,
last_level: true,
truncate: 100,
},
dimensions: {
metric: { accessor: 1, format: { id: 'number' }, params: {}, aggType: 'count' },
metric: {
accessor: 1,
format: { id: 'number' },
params: {},
aggType: 'count',
},
buckets: [
{
accessor: 0,
Expand All @@ -296,7 +354,13 @@ export default [
},
},
aggs: [
{ id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
{
id: '1',
enabled: true,
type: 'count',
schema: 'metric',
params: {},
},
{
id: '2',
enabled: true,
Expand Down Expand Up @@ -375,27 +439,50 @@ export default [
},
],
addTooltip: true,
addLegend: true,
addLegend: false,
legendPosition: 'right',
times: [],
addTimeMarker: false,
labels: { show: false },
thresholdLine: { show: false, value: 10, width: 1, style: 'full', color: '#34130C' },
thresholdLine: {
show: false,
value: 10,
width: 1,
style: 'full',
color: '#34130C',
},
dimensions: {
x: {
accessor: 0,
format: {
id: 'terms',
params: { id: 'string', otherBucketLabel: 'Other', missingBucketLabel: 'Missing' },
params: {
id: 'string',
otherBucketLabel: 'Other',
missingBucketLabel: 'Missing',
},
},
params: {},
aggType: 'terms',
},
y: [{ accessor: 1, format: { id: 'number' }, params: {}, aggType: 'count' }],
y: [
{
accessor: 1,
format: { id: 'number' },
params: {},
aggType: 'count',
},
],
},
},
aggs: [
{ id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
{
id: '1',
enabled: true,
type: 'count',
schema: 'metric',
params: {},
},
{
id: '2',
enabled: true,
Expand Down Expand Up @@ -476,11 +563,17 @@ export default [
},
],
addTooltip: true,
addLegend: true,
addLegend: false,
legendPosition: 'right',
times: [],
addTimeMarker: false,
thresholdLine: { show: false, value: 10, width: 1, style: 'full', color: '#34130C' },
thresholdLine: {
show: false,
value: 10,
width: 1,
style: 'full',
color: '#34130C',
},
labels: {},
dimensions: {
x: {
Expand All @@ -490,15 +583,31 @@ export default [
date: true,
interval: 'P1D',
format: 'YYYY-MM-DD',
bounds: { min: '2019-09-07T14:30:14.047Z', max: '2019-11-07T14:19:07.505Z' },
bounds: {
min: '2019-09-07T14:30:14.047Z',
max: '2019-11-07T14:19:07.505Z',
},
},
aggType: 'date_histogram',
},
y: [{ accessor: 1, format: { id: 'number' }, params: {}, aggType: 'count' }],
y: [
{
accessor: 1,
format: { id: 'number' },
params: {},
aggType: 'count',
},
],
},
},
aggs: [
{ id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
{
id: '1',
enabled: true,
type: 'count',
schema: 'metric',
params: {},
},
{
id: '2',
enabled: true,
Expand Down Expand Up @@ -557,12 +666,23 @@ export default [
accessor: 0,
format: {
id: 'terms',
params: { id: 'string', otherBucketLabel: 'Other', missingBucketLabel: 'Missing' },
params: {
id: 'string',
otherBucketLabel: 'Other',
missingBucketLabel: 'Missing',
},
},
params: {},
aggType: 'terms',
},
y: [{ accessor: 2, format: { id: 'number' }, params: {}, aggType: 'count' }],
y: [
{
accessor: 2,
format: { id: 'number' },
params: {},
aggType: 'count',
},
],
series: [
{
accessor: 1,
Expand Down Expand Up @@ -610,7 +730,13 @@ export default [
],
},
aggs: [
{ id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
{
id: '1',
enabled: true,
type: 'count',
schema: 'metric',
params: {},
},
{
id: '2',
enabled: true,
Expand Down Expand Up @@ -673,9 +799,19 @@ export default [
addLegend: true,
legendPosition: 'right',
isDonut: true,
labels: { show: false, values: true, last_level: true, truncate: 100 },
labels: {
show: false,
values: true,
last_level: true,
truncate: 100,
},
dimensions: {
metric: { accessor: 1, format: { id: 'number' }, params: {}, aggType: 'count' },
metric: {
accessor: 1,
format: { id: 'number' },
params: {},
aggType: 'count',
},
buckets: [
{
accessor: 0,
Expand Down Expand Up @@ -720,7 +856,13 @@ export default [
},
},
aggs: [
{ id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
{
id: '1',
enabled: true,
type: 'count',
schema: 'metric',
params: {},
},
{
id: '4',
enabled: true,
Expand Down Expand Up @@ -805,7 +947,13 @@ export default [
totalFunc: 'sum',
},
aggs: [
{ id: '1', enabled: true, type: 'count', schema: 'metric', params: {} },
{
id: '1',
enabled: true,
type: 'count',
schema: 'metric',
params: {},
},
{
id: '2',
enabled: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ export default [
orientation: 'single',
minFontSize: 15,
maxFontSize: 25,
showLabel: true,
showLabel: false,
metric: {
type: 'vis_dimension',
accessor: 1,
Expand Down
Loading
Loading