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

Welcome screen management #133

Merged
merged 9 commits into from Mar 21, 2019
Merged

Welcome screen management #133

merged 9 commits into from Mar 21, 2019

Conversation

SitoRBJ
Copy link
Contributor

@SitoRBJ SitoRBJ commented Mar 20, 2019

Hello team,

This PR solves issue #131

First of all we have declared an ARG variable to build the image of Kibana adjusting it to the needs that are required.

  • Kibana Dockerfile

ARG CHANGE_WELCOME="false"

Setting this variable to true will imply the desired changes in the welcome screen.

After that, we add the script that makes the changes.

  • Kibana change welcome screen script
#!/bin/bash


if [[ $CHANGE_WELCOME == "true" ]]
then

    rm -rf ./optimize/bundles

    kibana_path="/usr/share/kibana"
    # Set Wazuh app as the default landing page
    echo "Set Wazuh app as the default landing page"
    echo "server.defaultRoute: /app/wazuh" >> /usr/share/kibana/config/kibana.yml

    # Redirect Kibana welcome screen to Discover
    echo "Redirect Kibana welcome screen to Discover"
    sed -i "s:'/app/kibana#/home':'/app/wazuh':g" $kibana_path/src/ui/public/chrome/directives/global_nav/global_nav.html
    sed -i "s:'/app/kibana#/home':'/app/wazuh':g" $kibana_path/src/ui/public/chrome/directives/header_global_nav/header_global_nav.js

    # Redirect Kibana welcome screen to Discover
    echo "Hide undesired links"
    sed -i 's#visible: true#visible: false#g' $kibana_path/node_modules/x-pack/plugins/rollup/public/crud_app/index.js
    sed -i 's#visible: true#visible: false#g' $kibana_path/node_modules/x-pack/plugins/license_management/public/management_section.js
fi
  • Kibana Dockerfile
COPY --chown=kibana:kibana ./config/welcome_wazuh.sh ./

RUN chmod +x ./welcome_wazuh.sh

RUN ./welcome_wazuh.sh

RUN /usr/local/bin/kibana-docker --optimize

In order to make these changes, it is necessary to eliminate the bundles and optimize them later, which is why these operations are carried out in the indicated order.

We will delete the bundles only if we use the script.

  • With these changes when opening in the browser the Kibana portal will automatically take us to the Wazuh APP section.

  • Clicking on Kibana's icon will automatically take us to Wazuh's APP.

  • Additionally, in the management section, we have deleted two confusing entries for users.

Best regards,

Alfonso Ruiz-Bravo

@manuasir manuasir added this to In progress in v3.9.x Mar 21, 2019
@manuasir manuasir removed this from In progress in v3.9.x Mar 21, 2019
Copy link
Contributor

@manuasir manuasir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SitoRBJ

@manuasir manuasir merged commit 18e9550 into 3.8.2_6.5.4 Mar 21, 2019
@manuasir manuasir deleted the dev-welcome-screen branch March 21, 2019 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants