Why doesn't my camunda Cockpit.login plugin not log anything on the console?

57 Views Asked by At

I'm currently writing a cockpit plugin which is supposed to get the currently logged in users username. Therefore I'd like to extend the cockpit.login.data plugin to get that name when logging in and storing it.

My current frontend module looks like this:

export default {
    id: "customPluginLogin",
    pluginPoint: "cockpit.login.data",
    priority: 5,
    render: container => {
        console.log("test");
        container.innerHTML = "Hello World!";
    },
    result: arg => {
        console.log("logged in");
    }
}

My problem is that there is nothing happening. Neither anything gets printed nor does the "Hello World!" label appear anywhere. I also tried (just to test whether I screwed something basic up) the plugin Points cockpit.navigation and cockpit.login

cockpit.login doesn't change anything either but the cockpit.navigation plugin point seems to work

I'm hoping someone can help me, thank you :)

1

There are 1 best solutions below

2
On

The plugin mechanism differs between older and newer Camunda 7 versions (see https://camunda.com/blog/2020/08/all-new-frontend-plugin-system-for-cockpit-starting-with-camunda-bpm-7-14/). When looking at examples, make sure the example is written for the version you are using. Here is an example plugin project which adds functionality to the logout button e.g. in Cockpit. https://github.com/rob2universe/camunda7-proprietary-sso/tree/main/src/main/resources/META-INF/resources/webjars/camunda/app

It is important that you use the correct folder structure and content in it.