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

Replace redirection to /home with /app/wazuh #17

Closed
Tracked by #26 ...
AlexRuiz7 opened this issue Feb 9, 2023 · 1 comment
Closed
Tracked by #26 ...

Replace redirection to /home with /app/wazuh #17

AlexRuiz7 opened this issue Feb 9, 2023 · 1 comment
Labels
level/subtask Subtask issue type/enhancement New feature or request

Comments

@AlexRuiz7
Copy link
Member

AlexRuiz7 commented Feb 9, 2023

Description

We would like to make the Wazuh app the main view of the platform. By default, the home app is shown when the platform is accessed, and all links to home lead to this view.

We can simply replace the redirections in the source code, however, this will leave the platform in an inconsistent state as the Wazuh app is not installed yet, as seen in the image below. For this reason, we'll probably prefer to make this change using the configuration option uiSettings.overrides.defaultRoute: /app/wazuh in the opensearch_dashboards.yml file.

image

Search results for /app/home:

11 results - 7 files

wazuh-dashboard/src/core/public/chrome/chrome_service.tsx:
  251            helpSupportUrl$={helpSupportUrl$.pipe(takeUntil(this.stop$))}
  252:           homeHref={http.basePath.prepend('/app/home')}
  253            isVisible$={this.isVisible$}

wazuh-dashboard/src/core/server/ui_settings/settings/navigation.ts:
  41        }),
  42:       value: '/app/home',
  43        schema: schema.string({

wazuh-dashboard/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_footer/overview_page_footer.tsx:
  112                  flush="both"
  113:                 href={addBasePath('/app/home#/feature_directory')}
  114                  iconType="apps"

wazuh-dashboard/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx:
  166                        flush="both"
  167:                       href={addBasePath('/app/home#/tutorial_directory')}
  168                        iconType="indexOpen"

wazuh-dashboard/test/functional/apps/home/_home.ts:
  46        const url = await browser.getCurrentUrl();
  47:       expect(url.includes('/app/home')).to.be(true);
  48      });

  54        const url = await browser.getCurrentUrl();
  55:       expect(url.includes('/app/home')).to.be(true);
  56      });

wazuh-dashboard/test/functional/apps/visualize/_custom_branding.ts:
  139            const url = await browser.getCurrentUrl();
  140:           expect(url.includes('/app/home')).to.be(true);
  141          });

  147            const url = await browser.getCurrentUrl();
  148:           expect(url.includes('/app/home')).to.be(true);
  149          });

  204            const url = await browser.getCurrentUrl();
  205:           expect(url.includes('/app/home')).to.be(true);
  206          });

  212            const url = await browser.getCurrentUrl();
  213:           expect(url.includes('/app/home')).to.be(true);
  214          });

wazuh-dashboard/test/new_visualize_flow/config.ts:
  90        home: {
  91:         pathname: '/app/home',
  92          hash: '/',

Search results for navigateToApp('home'):

18 results - 9 files

wazuh-dashboard/src/core/public/chrome/ui/header/header_logo.tsx:
  94    } else {
  95:     navigateToApp('home');
  96      event.preventDefault();

wazuh-dashboard/src/core/public/chrome/ui/header/home_loader.tsx:
  98    } else {
  99:     navigateToApp('home');
  100      event.preventDefault();

wazuh-dashboard/src/plugins/data/public/index_patterns/index_patterns/redirect_no_index_pattern.tsx:
  72    if (redirectTarget === '/home') {
  73:     navigateToApp('home');
  74    } else {

wazuh-dashboard/src/plugins/dev_tools/public/application.tsx:
  124    if (!application.capabilities.dev_tools.show) {
  125:     application.navigateToApp('home');
  126      return true;

wazuh-dashboard/src/plugins/saved_objects_management/public/management_section/mount_section.tsx:
  75      if (!allowed) {
  76:       coreStart.application.navigateToApp('home');
  77        return null;

wazuh-dashboard/test/accessibility/apps/home.ts:
  38      before(async () => {
  39:       await PageObjects.common.navigateToApp('home');
  40      });

wazuh-dashboard/test/functional/apps/home/_navigation.ts:
  49        // Navigate to home app
  50:       await PageObjects.common.navigateToApp('home');
  51        const homeUrl = await browser.getCurrentUrl();

wazuh-dashboard/test/functional/apps/visualize/_custom_branding.ts:
   34        before(async function () {
   35:         await PageObjects.common.navigateToApp('home');
   36          await PageObjects.common.navigateToApp('opensearch_dashboards_overview');

   68          await opensearchArchiver.unload('visualize');
   69:         await PageObjects.common.navigateToApp('home');
   70        });

  104          await PageObjects.settings.toggleAdvancedSettingCheckbox('theme:darkMode');
  105:         await PageObjects.common.navigateToApp('home');
  106          await testSubjects.existOrFail('welcomeCustomLogo');

  118        before(async function () {
  119:         await PageObjects.common.navigateToApp('home');
  120        });

  122        after(async function () {
  123:         await PageObjects.common.navigateToApp('home');
  124        });

  183            await PageObjects.settings.toggleAdvancedSettingCheckbox('theme:darkMode');
  184:           await PageObjects.common.navigateToApp('home');
  185          });

wazuh-dashboard/test/security_functional/insecure_cluster_warning.ts:
  41      before(async () => {
  42:       await pageObjects.common.navigateToApp('home');
  43        await browser.setLocalStorageItem('insecureClusterWarningVisibility', '');

  62          );
  63:         await pageObjects.common.navigateToApp('home');
  64          await testSubjects.missingOrFail('insecureClusterDefaultAlertText');

  69        before(async () => {
  70:         await pageObjects.common.navigateToApp('home');
  71          await browser.setLocalStorageItem('insecureClusterWarningVisibility', '');

  79        it('should warn about an insecure cluster, and hide when dismissed', async () => {
  80:         await pageObjects.common.navigateToApp('home');
  81          await testSubjects.existOrFail('insecureClusterDefaultAlertText');

  92          );
  93:         await pageObjects.common.navigateToApp('home');
  94          await testSubjects.missingOrFail('insecureClusterDefaultAlertText');
@AlexRuiz7 AlexRuiz7 mentioned this issue Feb 9, 2023
19 tasks
@AlexRuiz7 AlexRuiz7 changed the title Replace redirection to /home by /app/wazuh Replace redirection to /home with /app/wazuh Feb 9, 2023
@AlexRuiz7 AlexRuiz7 added this to the Wazuh Dashboard first steps milestone Feb 16, 2023
@gdiazlo gdiazlo added type/enhancement New feature or request level/task Task issue and removed untriaged labels Mar 9, 2023
@AlexRuiz7 AlexRuiz7 added level/subtask Subtask issue and removed level/task Task issue labels Apr 19, 2023
@AlexRuiz7
Copy link
Member Author

Closing this issue as it will be done in #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/subtask Subtask issue type/enhancement New feature or request
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants