How to change app/kibana in kibana 6.8 URL to different name like app/devCustom

I want to change the name of app/kibana in kibana app.

I have tried to cahnge the title and id in kibana plugin of src/legacy/core_plugin/kibana folder.
but nothing got changed.

Please help me with steps or idea of changing the kibana app name

Thanks and Regards,

Hi @devesh37,

you can try to change the kibanaBaseUrl variable in src/legacy/core_plugins/kibana/index.js, but be aware that this could break all sorts of things.

Out of curiosity - whats your use case for changing this URL?

Hi,
Sorry for late reply.

My use case is , i donot want to show app/kibana in browser URL "http://localhost:5601/app/kibana#/discover?"

Instead i want to show "http://localhost:5601/app/devCustom#/discover?" in browser url,
or hiding the "http://localhost:5601/app/kibana#" part from URL of browser. anything from above two is ok.

I have tried

  1. solution given by you to change the kibanaBaseUrl variable in src/legacy/core_plugins/kibana/index.js :- but it breaks lots of url in

  2. try to configure nginx reverse proxy to hide "http://localhost:5601/app/kibana#" part of url.
    :- unable to get right combination of nginx configration

Please help @flash1293 .. thanks in advance.

thanks and regards,
devesh kumar

Hi @devesh37,

I was interested in why you want to hide app/kibana in the url - do you not like the looks of it or is there a deeper reason?

The second solution won't work because this navigation is done in the hash part of the URL and is not sent to the server at all - so it has to be done client side.

The first solution is the way to go, I'm afraid you have to go through all of the places that break one by one - it's just that doing this is nothing that's supported by Kibana which means the code is not structured in a way to make it easy.

Thanks for quick reply...

i have tried changing src/legacy/core_plugins/kibana/index.js like below:-

const mkdirp = Promise.promisify(mkdirpNode);

export default function (kibana) {
const kbnBaseUrl = '/app/techgis';
return new kibana.Plugin({
id: 'kibana',
config: function (Joi) {
return Joi.object({
enabled: Joi.boolean().default(true),
defaultAppId: Joi.string().default('home'),
index: Joi.string().default('.kibana'),
disableWelcomeScreen: Joi.boolean().default(false),
}).default();
},

uiExports: {
  hacks: ['plugins/kibana/dev_tools/hacks/hide_empty_tools'],
  fieldFormats: ['plugins/kibana/field_formats/register'],
  savedObjectTypes: [
    'plugins/kibana/visualize/saved_visualizations/saved_visualization_register',
    'plugins/kibana/discover/saved_searches/saved_search_register',
    'plugins/kibana/dashboard/saved_dashboard/saved_dashboard_register',
  ],
  app: {
    id: 'techgis',
    title: 'techgis',
    listed: false,
    description: i18n.translate('kbn.kibanaDescription', {
      defaultMessage: 'the kibana you know and love'
    }),
    main: 'plugins/kibana/techgis',
  },
  styleSheetPaths: resolve(__dirname, 'public/index.scss'),
  links: [
    {
      id: 'techgis:discover',
      title: i18n.translate('kbn.discoverTitle', {
        defaultMessage: 'Discover'
      }),
      order: -1003,
      url: `${kbnBaseUrl}#/discover`,
      description: i18n.translate('kbn.discoverDescription', {
        defaultMessage: 'interactively explore your data'
      }),
      icon: 'plugins/kibana/assets/discover.svg',
      euiIconType: 'discoverApp',
    }, {
      id: 'techgis:visualize',
      title: i18n.translate('kbn.visualizeTitle', {
        defaultMessage: 'Visualize'
      }),
      order: -1002,
      url: `${kbnBaseUrl}#/visualize`,
      description: i18n.translate('kbn.visualizeDescription', {
        defaultMessage: 'design data visualizations'
      }),
      icon: 'plugins/kibana/assets/visualize.svg',
      euiIconType: 'visualizeApp',
    }, {
      id: 'techgis:dashboard',
      title: i18n.translate('kbn.dashboardTitle', {
        defaultMessage: 'Dashboard'
      }),
      order: -1001,
      url: `${kbnBaseUrl}#/dashboards`,
      // The subUrlBase is the common substring of all urls for this app. If not given, it defaults to the url
      // above. This app has to use a different subUrlBase, in addition to the url above, because "#/dashboard"
      // routes to a page that creates a new dashboard. When we introduced a landing page, we needed to change
      // the url above in order to preserve the original url for BWC. The subUrlBase helps the Chrome api nav
      // to determine what url to use for the app link.
      subUrlBase: `${kbnBaseUrl}#/dashboard`,
      description: i18n.translate('kbn.dashboardDescription', {
        defaultMessage: 'compose visualizations for much win'
      }),
      icon: 'plugins/kibana/assets/dashboard.svg',
      euiIconType: 'dashboardApp',
    }, {
      id: 'techgis:dev_tools',
      title: i18n.translate('kbn.devToolsTitle', {
        defaultMessage: 'Dev Tools'
      }),
      order: 9001,
      url: '/app/techgis#/dev_tools',
      description: i18n.translate('kbn.devToolsDescription', {
        defaultMessage: 'development tools'
      }),
      icon: 'plugins/kibana/assets/wrench.svg',
      euiIconType: 'devToolsApp',
    }, {
      id: 'kibana:management',
      title: i18n.translate('kbn.managementTitle', {
        defaultMessage: 'Management'
      }),
      order: 9003,
      url: `${kbnBaseUrl}#/management`,
      description: i18n.translate('kbn.managementDescription', {
        defaultMessage: 'define index patterns, change config, and more'
      }),
      icon: 'plugins/kibana/assets/settings.svg',
      euiIconType: 'managementApp',
      linkToLastSubUrl: false
    },
  ],

  savedObjectSchemas: {
    'kql-telemetry': {
      isNamespaceAgnostic: true,
    },
  },

But errors are coming which i have no idea how to deal with them and i am struggling like anything

errors:-

[$injector:unpr] Unknown provider: mapConfigProvider <- mapConfig <- serviceSettings http://errors.angularjs.org/1.6.9/$injector/unpr?p0=mapConfigProvider%20%3C-%20mapConfig%20%3C-%20serviceSettings

```
Version: 6.8.0
Build: 9007199254740991
Error: [$injector:unpr] Unknown provider: mapConfigProvider <- mapConfig <- serviceSettings
http://errors.angularjs.org/1.6.9/$injector/unpr?p0=mapConfigProvider%20%3C-%20mapConfig%20%3C-%20serviceSettings
    at eval (webpack://%5Bname%5D/./node_modules/angular/angular.js?:116:12)
    at eval (webpack://%5Bname%5D/./node_modules/angular/angular.js?:4887:19)
    at Object.getService [as get] (webpack://%5Bname%5D/./node_modules/angular/angular.js?:5047:32)
    at eval (webpack://%5Bname%5D/./node_modules/angular/angular.js?:4892:45)
    at getService (webpack://%5Bname%5D/./node_modules/angular/angular.js?:5047:32)
    at injectionArgs (webpack://%5Bname%5D/./node_modules/angular/angular.js?:5072:58)
    at Object.instantiate (webpack://%5Bname%5D/./node_modules/angular/angular.js?:5118:18)
    at Object.eval (webpack://%5Bname%5D/./node_modules/angular/angular.js?:4955:24)
    at Object.invoke (webpack://%5Bname%5D/./node_modules/angular/angular.js?:5106:19)
    at Object.enforcedReturnValue [as $get] (webpack://%5Bname%5D/./node_modules/angular/angular.js?:4939:37)
```

please help for the same...

One thing that springs to my eye is main: 'plugins/kibana/techgis', - this is the path of the main entrypoint, there has to be a file with this name. Other than that it's hard to tell without having the code running. Please put it on Github so I can have another look.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.