Currently I'm developing Kibana 5.6.4 custom plugin to inject a button to discover, now the problem that I have is I want to inject an $http to the run method so that I could make an http request to backend
import { NavBarExtensionsRegistryProvider } from 'ui/registry/navbar_extensions';
function discoverControlProvider() {
return {
appName: 'discover',
key: 'heiho',
label: 'Heiho',
run: (elm, prop) => {
button.disable(); // Disable the button
$http.get(); // This is what I'm trying to do
}
}
}
NavBarExtensionsRegistryProvider.register(discoverControlProvider);
Is that possible ? Also is it possible to disable the button upon making http request programmatically ?