UI for plugin not loading

Hi!

I’m new to the Graylog universe, and I’ve recently setup the dev environment on my local machine.
I’m trying to integrate a plugin with Graylog and wanted some help on it. I’m able to see the APIs for the plugin on the graylog api browser, and the functionality is working fine. But I’m having issues with the front-end component. The plugin is supposed to create a new tab on the Graylog dashboard menu but it’s not loading on the UI.

This is from the package.json file:

  "scripts": {
    "build": "webpack",
    "lint": "eslint src",
    "lint:path": "eslint",
    "test": "jest"
  },
  
  "dependencies": {
  },
  "devDependencies": {
    "graylog-web-plugin": "file:../graylog2-server/graylog2-web-interface/packages/graylog-web-plugin"
  }
}

And this is from my /src/web/index.jsx file:

import 'webpack-entry';

import packageJson from '../../package.json'
import { PluginManifest, PluginStore } from 'graylog-web-plugin/plugin'
import AggregatesConfig from 'aggregates/AggregatesConfig';
import AggregatesPage from 'aggregates/AggregatesPage'
import SchedulesPage from 'aggregates/SchedulesPage'

const manifest = new PluginManifest(packageJson, {

  routes: [
    { path: '/aggregates', component: AggregatesPage, permissions: 'AGGREGATE_RULES_READ' },
    { path: '/aggregates/schedules', component: SchedulesPage, permissions: 'AGGREGATE_REPORT_SCHEDULES_READ' }
  ],
  navigation: [
    { path: '/aggregates', description: 'Aggregates', permissions: 'aggregate_rules:read' }
  ],

  systemConfigurations: [
    {
      component: AggregatesConfig,
      configType: 'org.graylog.plugins.aggregates.config.AggregatesConfig',
    },
  ],
});

PluginStore.register(manifest);

When I run the ./node/yarn/dist/bin/yarn start command to start the web interface, I don’t see the plugin in those logs. Please let me know if I’m missing something. Your help would be really appreciated!

Thanks,
Swarna

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