Looking for kibana 6 config.js equivalent in 7.8

Hey guys, I've been looking through the kibana 7.8 codebase for a place to store some variables that would be widely available one instantiated. In my previous custom kibana 6 version, I've used the config object to store some variables which I could then easily use in different other places in the codebase by injecting it. I'm looking for something similar in the current latest version and I'm having a hard time grasping how it's organized, any tips/pointers would be greatly appreciated.

Thanks!

Hey @MarcoRocco,

I'm not sure I'm completely following you, would you mind pointing me to the "config.js" code in Kibana 6 that you were relying on?

Kibana 7.8 is based on quite flexible platform now (Kibana Platform) and I'm pretty sure we can find something there that would suit your needs.

Best,
Oleg

So, in kibana 6.2 I modified /src/ui/public/config/config.js to contains a couple more fields other than the default ones then I would simply inject this config into relevant files such as dashboard_app.js like so:


const app = uiModules.get('app/dashboard', [
  //...
  'kibana/config',
  //...
]);


app.directive('dashboardApp', function ($injector) {
  //...
  const config = $injector.get('config');
  //...

config.getSomeProperty();

I'm looking for a way to this in 7.8, essentially and object that's instantiated on session load and easily importable by components such as dashboard, visualization, search, etc.

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