Skip to content

Commit 6d3367c

Browse files
Remove setting new home (#282)
1 parent 6c3bcf6 commit 6d3367c

File tree

5 files changed

+30
-21
lines changed

5 files changed

+30
-21
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
All notable changes to the Wazuh app project will be documented in this file.
44

5-
## Wazuh dashboard v4.9.0 - OpenSearch Dashboards 2.13.0 - Revision 05
5+
## Wazuh dashboard v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 00
6+
7+
### Removed
8+
9+
- Removed the setting home:useNewHomePage from the advanced settings because the views are not finished. [#282](https://github.com/wazuh/wazuh-dashboard/pull/282)
10+
11+
## Wazuh dashboard v4.9.0 - OpenSearch Dashboards 2.13.0 - Revision 06
612

713
### Changed
814

config/opensearch_dashboards.yml

-4
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,7 @@
343343

344344
# Set the value to true to enable workspace feature
345345
# Please note, workspace will not work with multi-tenancy. To enable workspace feature, you need to disable multi-tenancy first with `opensearch_security.multitenancy.enabled: false`
346-
# Please uncomment below uiSettings to enable new home/navigation experience when workspace is enabled
347346
# workspace.enabled: false
348-
# uiSettings:
349-
# overrides:
350-
# "home:useNewHomePage": true
351347

352348
# Optional settings to specify saved object types to be deleted during migration.
353349
# This feature can help address compatibility issues that may arise during the migration of saved objects, such as types defined by legacy applications.

src/plugins/home/public/application/components/home_app.js

+17-14
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ import { FeatureDirectory } from './feature_directory';
3636
import { HashRouter as Router, Switch, Route } from 'react-router-dom';
3737
import { getServices } from '../opensearch_dashboards_services';
3838
import { useMount } from 'react-use';
39-
import { USE_NEW_HOME_PAGE, HOME_PAGE_ID } from '../../../common/constants';
40-
39+
// import { USE_NEW_HOME_PAGE, HOME_PAGE_ID } from '../../../common/constants';
40+
import { HOME_PAGE_ID } from '../../../common/constants';
4141
const RedirectToDefaultApp = () => {
4242
useMount(() => {
4343
const { urlForwarding } = getServices();
@@ -52,7 +52,7 @@ export function HomeApp({ directories, solutions }) {
5252
getBasePath,
5353
addBasePath,
5454
telemetry,
55-
uiSettings,
55+
// uiSettings,
5656
contentManagement,
5757
} = getServices();
5858

@@ -77,7 +77,10 @@ export function HomeApp({ directories, solutions }) {
7777
<Route exact path="/feature_directory">
7878
<FeatureDirectory addBasePath={addBasePath} directories={directories} />
7979
</Route>
80-
{uiSettings.get(USE_NEW_HOME_PAGE) ? (
80+
{/*
81+
Wazuh: The check whether the new activated menu is enabled or not is removed,
82+
since we remove the option to activate it until it is working correctly.
83+
{uiSettings.get(USE_NEW_HOME_PAGE) ? (
8184
<>
8285
<Route exact path="/legacy-home">
8386
{legacyHome}
@@ -86,16 +89,16 @@ export function HomeApp({ directories, solutions }) {
8689
{homepage}
8790
</Route>
8891
</>
89-
) : (
90-
<>
91-
<Route exact path="/next-home">
92-
{homepage}
93-
</Route>
94-
<Route exact path="/">
95-
{legacyHome}
96-
</Route>
97-
</>
98-
)}
92+
) : ( */}
93+
<>
94+
<Route exact path="/next-home">
95+
{homepage}
96+
</Route>
97+
<Route exact path="/">
98+
{legacyHome}
99+
</Route>
100+
</>
101+
{/* )} */}
99102
<Route path="*" exact={true} component={RedirectToDefaultApp} />
100103
</Switch>
101104
</Router>

src/plugins/home/server/ui_settings.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ describe('home settings', () => {
1616
const getValidationFn = (setting: UiSettingsParams) => (value: any) =>
1717
setting.schema.validate(value);
1818

19-
describe('home:useNewHomePage', () => {
19+
// Wazuh: Skip test because it is not used in Wazuh for now
20+
describe.skip('home:useNewHomePage', () => {
2021
const validate = getValidationFn(uiSettings['home:useNewHomePage']);
2122

2223
it('should only accept boolean values', () => {

src/plugins/home/server/ui_settings.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import { schema } from '@osd/config-schema';
1515
import { UiSettingsParams } from 'opensearch-dashboards/server';
1616
import { USE_NEW_HOME_PAGE } from '../common/constants';
1717

18-
export const uiSettings: Record<string, UiSettingsParams> = {
18+
// Wazuh: Remove the new home page configuration for now because it is not ready yet.
19+
// To add it again it must be exported
20+
// export const uiSettings: Record<string, UiSettingsParams> = {
21+
const uiSettings: Record<string, UiSettingsParams> = {
1922
[USE_NEW_HOME_PAGE]: {
2023
name: i18n.translate('core.ui_settings.params.useNewHomePage', {
2124
defaultMessage: 'Use New Home Page',

0 commit comments

Comments
 (0)