Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use custom icons inside kibana custom plugin ? #1690

Closed
arulselvan opened this issue Mar 7, 2019 · 7 comments
Closed

How to use custom icons inside kibana custom plugin ? #1690

arulselvan opened this issue Mar 7, 2019 · 7 comments

Comments

@arulselvan
Copy link

We need to load custom icons inside our custom kibana plugin , but as per your documentation (https://elastic.github.io/eui/#/display/icons), we put icons in following path of our plugin.

New icons should be placed in the /icons/assets/.

is it correct ? or please guide me how to load custom icons.

Thank you!
Arul

@snide
Copy link
Contributor

snide commented Mar 7, 2019

EuiIcon does not currently support custom icons. It's on our near term roadmap #1398

Currently any icons that need to be added to EuiIcon would need to require a build of EUI and have that build imported into your version of Kibana. If you're just looking to have your app icon show up in the Kibana sidebar, you can use the icon property and point to a file within your local version of Kibana. Kibana will use that icon if no EuiIcon is present.

https://github.com/elastic/kibana/blob/master/x-pack/plugins/uptime/index.ts#L25-L26

@arulselvan
Copy link
Author

Thank a lot @snide for your prompt reply

@snide
Copy link
Contributor

snide commented Mar 8, 2019

Closing this in place of #1702 which better explains the issue.

@snide snide closed this as completed Mar 8, 2019
@parikshitgawali
Copy link

parikshitgawali commented Jun 18, 2020

Hi @snide ,
icon property is not working 7.7.x onward . eui css styles are not imported for custom icon. due to this icon looks inappropriate . Could you help me with this ?

@cchaos
Copy link
Contributor

cchaos commented Jun 18, 2020

@parikshitgawali Can you please explain more of your implementation so we can troubleshoot?

@parikshitgawali
Copy link

parikshitgawali commented Jun 21, 2020

Hi @cchaos ,
My implementation is working fine till 7.6.x release. I am facing issue while migrating plugin to 7.7.x. I have attached my plugin screenshot of custom plugin icons. It looks bigger than default EUI icons. As per my analysis 'class="euiIcon euiIcon--medium euiIcon--app euiIcon-isLoaded euiListGroupItem__icon"' is not getting included for custom icon which are implemented using Icon property.

uiExports: {
app: {
title: 'SIP Analyzer',
description: 'An Awesome Kibana SIP Plugin',
main: mainFile,
icon: 'plugins/sip/resource/logo-scaled.png',
}
},

Html tags for custom plugin icon where above mention classes are not includes:

  • SIP Analyzer
  • plugin : https://github.com/BroadSoft-Xtended/BroadWorks-Dashboards-and-Discovery/blob/master/SIP-2.4.0_K_7.6.2.zip

    7 7 0

    Older version :
    7 6 0

    @cchaos
    Copy link
    Contributor

    cchaos commented Jun 23, 2020

    @parikshitgawali This is actually an implementation problem with Kibana's nav and I have opened an issue in their repo referencing your comment elastic/kibana#69691

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants