Skip to content

Commit 945145e

Browse files
committed
Remove setting new home (#282)
1 parent 5db6b08 commit 945145e

File tree

5 files changed

+31
-22
lines changed

5 files changed

+31
-22
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
@@ -347,11 +347,7 @@
347347

348348
# Set the value to true to enable workspace feature
349349
# 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`
350-
# Please uncomment below uiSettings to enable new home/navigation experience when workspace is enabled
351350
# workspace.enabled: false
352-
# uiSettings:
353-
# overrides:
354-
# "home:useNewHomePage": true
355351

356352
# Set a maximum number of workspaces
357353
# by default, there is no limit.

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

+18-15
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ 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 } from '../../../common/constants';
40-
import { HOME_PAGE_ID } from '../../../../content_management/public';
41-
39+
// import { USE_NEW_HOME_PAGE } from '../../../common/constants';
40+
// import { HOME_PAGE_ID } from '../../../../content_management/public';
41+
import { HOME_PAGE_ID } from '../../../common/constants';
4242
const RedirectToDefaultApp = () => {
4343
useMount(() => {
4444
const { urlForwarding } = getServices();
@@ -53,7 +53,7 @@ export function HomeApp({ directories, solutions }) {
5353
getBasePath,
5454
addBasePath,
5555
telemetry,
56-
uiSettings,
56+
// uiSettings,
5757
contentManagement,
5858
} = getServices();
5959

@@ -78,7 +78,10 @@ export function HomeApp({ directories, solutions }) {
7878
<Route exact path="/feature_directory">
7979
<FeatureDirectory addBasePath={addBasePath} directories={directories} />
8080
</Route>
81-
{uiSettings.get(USE_NEW_HOME_PAGE) ? (
81+
{/*
82+
Wazuh: The check whether the new activated menu is enabled or not is removed,
83+
since we remove the option to activate it until it is working correctly.
84+
{uiSettings.get(USE_NEW_HOME_PAGE) ? (
8285
<>
8386
<Route exact path="/legacy-home">
8487
{legacyHome}
@@ -87,16 +90,16 @@ export function HomeApp({ directories, solutions }) {
8790
{homepage}
8891
</Route>
8992
</>
90-
) : (
91-
<>
92-
<Route exact path="/next-home">
93-
{homepage}
94-
</Route>
95-
<Route exact path="/">
96-
{legacyHome}
97-
</Route>
98-
</>
99-
)}
93+
) : ( */}
94+
<>
95+
<Route exact path="/next-home">
96+
{homepage}
97+
</Route>
98+
<Route exact path="/">
99+
{legacyHome}
100+
</Route>
101+
</>
102+
{/* )} */}
100103
<Route path="*" exact={true} component={RedirectToDefaultApp} />
101104
</Switch>
102105
</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
@@ -16,7 +16,10 @@ import { UiSettingsParams } from 'opensearch-dashboards/server';
1616
import { UiSettingScope } from '../../../core/server';
1717
import { SEARCH_WORKSPACE_DISMISS_GET_STARTED, USE_NEW_HOME_PAGE } from '../common/constants';
1818

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

0 commit comments

Comments
 (0)