# Plugin management setting missing CSS styling

**URL:** https://discuss.elastic.co/t/plugin-management-setting-missing-css-styling/154230
**Category:** Kibana
**Created:** [October 26, 2018, 3:18pm UTC](https://discuss.elastic.co/t/plugin-management-setting-missing-css-styling/154230 "2018-10-26T15:18:42Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Sam\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Sam\_Reynolds](https://discuss.elastic.co/u/Sam_Reynolds)
#### Post date: [October 26, 2018, 3:18pm UTC](https://discuss.elastic.co/t/plugin-management-setting-missing-css-styling/154230/1 "2018-10-26T15:18:43Z")

</div>

Hello,

I followed this guide to add a plugin specific management section: [Adding management plugin](https://discuss.elastic.co/t/adding-management-plugin/102561)

The problem I'm having is that the html is displaying without any styling. this is an example of my html:

```auto
<kbn-management-app section="appName/documentation">
    <kbn-management-appName>
        <div id="documentation">
            <md-content class="md-padding">
                <h1>Documentation</h1>
                <button class="btn-primary" ng-click="downloadPDF()">Download PDF</button>
            </md-content>
        </div>
    </kbn-management-appName>
</kbn-management-app>

```

the h1 tag is not displayed as a header and displayed as plain text and the material styling is not displaying. I know kibana uses react for the default management sections so I'm not sure if that's the reason or if there's something else I'm missing.

I'm using kibana-6.3.2

This is the way I'm registering the management section:

```auto
import { management } from 'ui/management';
import routes from 'ui/routes';
import template from './main.html';
import documentationController from './documentation_controller'
import '../less/main.less'

management.register('appName', {
	display: 'appName',
	order: 40,
	visible: true
});

management.getSection('appName').register('documentation', {
	visible: true,
	display: 'Documentation',
	order: 1,
	url: '#/management/appName/documentation'
});

routes.when('/management/appName/documentation', {
	template: template,
  	controllerAs: 'documentationController',
	controller: documentationController
});

```

---

<div class="post-metadata">

### Author: ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)
#### Post date: [October 26, 2018, 4:57pm UTC](https://discuss.elastic.co/t/plugin-management-setting-missing-css-styling/154230/2 "2018-10-26T16:57:00Z")

</div>

Hey @Sam_Reynolds

Nothing immediately looks out of place to me. You are right that we are using React for a lot of the management sections, and we are actively transitioning the rest to React as well. if you can, I would suggest writing your management section in React too. This will allow you to take advantage of [EUI](https://elastic.github.io/eui/), which will give you consistent styling and accessibility features with the rest of Kibana. This will also help future-proof your plugin for later versions of Kibana.

For an example of setting up a React-based management section, take a look at how the Spaces plugin has implemented one: [https://github.com/elastic/kibana/blob/master/x-pack/plugins/spaces/public/views/management/page\_routes.tsx](https://github.com/elastic/kibana/blob/master/x-pack/plugins/spaces/public/views/management/page_routes.tsx)

---

<div class="post-metadata">

### Author: ![Sam\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Sam\_Reynolds](https://discuss.elastic.co/u/Sam_Reynolds)
#### Post date: [October 26, 2018, 8:00pm UTC](https://discuss.elastic.co/t/plugin-management-setting-missing-css-styling/154230/3 "2018-10-26T20:00:32Z")

</div>

Thanks @Larry_Gregory, I ended up writing my management section in react and got it working.

I haven't been able to figure out how to modify the top nav bar though. How would I go about adding tabs or just a header?

---

<div class="post-metadata">

### Author: ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)
#### Post date: [October 26, 2018, 8:07pm UTC](https://discuss.elastic.co/t/plugin-management-setting-missing-css-styling/154230/4 "2018-10-26T20:07:37Z")

</div>

That's great!

Can you explain what you mean by the top nav bar? Kibana has lots of navigation sections, so I want to make sure we're talking about the same thing before giving you an answer.

---

<div class="post-metadata">

### Author: ![Sam\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Sam\_Reynolds](https://discuss.elastic.co/u/Sam_Reynolds)
#### Post date: [October 26, 2018, 8:24pm UTC](https://discuss.elastic.co/t/plugin-management-setting-missing-css-styling/154230/5 "2018-10-26T20:24:03Z")

</div>

Sorry, I meant the top nav bar of my new management section.  
 ![top_nav](https://us1.discourse-cdn.com/elastic/original/3X/9/6/96af8e3edb36ad47cf9164d50426fc553168cff9.png)

similar to how the advanced settings section has tabs in the top nav bar, I want to put either a header or just a single tab that says "Documentation".

---

<div class="post-metadata">

### Author: ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)
#### Post date: [October 27, 2018, 10:27am UTC](https://discuss.elastic.co/t/plugin-management-setting-missing-css-styling/154230/6 "2018-10-27T10:27:48Z")

</div>

This is ordinarily taken care of by the `<kbn-management-app>` directive (angular basically bootstraps the react app, at least for now). Can you post the code you have at this point?

---

<div class="post-metadata">

### Author: ![Sam\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Sam\_Reynolds](https://discuss.elastic.co/u/Sam_Reynolds)
#### Post date: [October 29, 2018, 1:24pm UTC](https://discuss.elastic.co/t/plugin-management-setting-missing-css-styling/154230/7 "2018-10-29T13:24:50Z")

</div>

**Index.html** :

```auto
<!DOCTYPE html>
<html>
<kbn-management-app section="appName/documentation">
    <kbn-management-appName>
        <div id="appName-documentation"></div>
    </kbn-management-appName>
</kbn-management-app>
</html>

```

**management\_section.js**

```auto
import {
	management,
	PAGE_TITLE_COMPONENT,
	registerSettingsComponent,
} from 'ui/management';
import routes from 'ui/routes';
import template from './main.html';
import '../less/main.less'

import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { uiModules } from 'ui/modules';
import { Documentation } from './Documentation'

const document_id = "appName-documentation";

management.register('appName', {
	display: 'appName',
	order: 40,
	visible: true
});

management.getSection('appName').register('documentation', {
	visible: true,
	display: 'Documentation',
	order: 1,
	url: '#/management/appName/documentation'
});

routes.when('/management/appName/documentation', {
	template: template,
	controller: function($scope, $http){
		$scope.$$postDigest(() => {
            const node = document.getElementById(document_id);
            render(
                <Documentation http={$http}/>,
                node,
            );
		})
        // updateDocumentation($scope);
	}

});

```

**documentation.js** :

```auto
import {
    Comparators,
    EuiFlexGroup,
    EuiFlexItem,
    EuiSpacer,
    EuiPage,
    Query,
    EuiButton,
    EuiTitle,
} from '@elastic/eui';

import React, { Component } from 'react';
import utils from "../lib/utils";

export class Documentation extends Component {

    constructor(props){
        super(props);
        this.http = props.http;
        const {config, query } = this.props;
        this.state = {};
    }

    downloadPDF = async () => {
        let pdfReq = await this.http.get('../api/appName/docs/pdf/');
        utils.saveToPdf(pdfReq.data.toString("base64"), 'documentation.pdf')
    }

    render(){
        return (
                <EuiPage>
                    <EuiTitle><h1>appName Documentation</h1></EuiTitle>
                    <EuiButton onClick={this.downloadPDF}>Download PDF</EuiButton>
                </EuiPage>
            )
    }
}

```

**index.js**

```auto
import './management_section';

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 26, 2018, 1:24pm UTC](https://discuss.elastic.co/t/plugin-management-setting-missing-css-styling/154230/8 "2018-11-26T13:24:51Z")

</div>

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