Health
Health is often used in conjunction with agents or applications in plugin.
Your Health component will be rendered in a Dashboard Modal once you click on your plugin name in the Health widget list in the upper right corner (widget bar).
What does Health look like?
const GUI = Dashboard.GUI
class MyHealth extends Dashboard.Health {
render() {
return <GUI.Wrapper>
<GUI.Paragraph text='infocaster ready'/>
</GUI.Wrapper>
}
}
and don't forget to register your Health component in register function:
Dashboard.register({
...
health: MyHealth
...
})
In this example we create a simple health that renders the status of LCC-Agent Plugin.
How to set plugin health status
setHealthResults
How to register a Health component?
Like any other main component, from your main index.js
file where you register your plugin, import your Health and pass it down with the register() method from Plugin-API
import DashboardPlugin from 'Dashboard/plugin'
const Plugin = new DashboardPlugin('@plugin_bundle')
const registerPlugin = () => {
const { Health } = require('@components/Health')
Plugin.register({
health: Health
}
}
registerPlugin()
export {
Plugin
}
Last updated
Was this helpful?