mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
This commit is contained in:
parent
e520f121c5
commit
b034e9ceaf
2 changed files with 31 additions and 20 deletions
|
@ -82,27 +82,35 @@ uiModule.directive('monitoringMain', (breadcrumbs, license, kbnUrl, config) => {
|
|||
link(scope, _element, attributes, controller) {
|
||||
config.watch('k7design', (val) => scope.showPluginBreadcrumbs = !val);
|
||||
|
||||
controller.setup({
|
||||
licenseService: license,
|
||||
breadcrumbsService: breadcrumbs,
|
||||
kbnUrlService: kbnUrl,
|
||||
attributes: {
|
||||
name: attributes.name,
|
||||
product: attributes.product,
|
||||
instance: attributes.instance,
|
||||
resolver: attributes.resolver,
|
||||
page: attributes.page,
|
||||
tabIconClass: attributes.tabIconClass,
|
||||
tabIconLabel: attributes.tabIconLabel,
|
||||
pipelineId: attributes.pipelineId,
|
||||
pipelineHash: attributes.pipelineHash,
|
||||
pipelineVersions: get(scope, 'pageData.versions')
|
||||
},
|
||||
clusterName: get(scope, 'cluster.cluster_name')
|
||||
});
|
||||
function getSetupObj() {
|
||||
return {
|
||||
licenseService: license,
|
||||
breadcrumbsService: breadcrumbs,
|
||||
kbnUrlService: kbnUrl,
|
||||
attributes: {
|
||||
name: attributes.name,
|
||||
product: attributes.product,
|
||||
instance: attributes.instance,
|
||||
resolver: attributes.resolver,
|
||||
page: attributes.page,
|
||||
tabIconClass: attributes.tabIconClass,
|
||||
tabIconLabel: attributes.tabIconLabel,
|
||||
pipelineId: attributes.pipelineId,
|
||||
pipelineHash: attributes.pipelineHash,
|
||||
pipelineVersions: get(scope, 'pageData.versions')
|
||||
},
|
||||
clusterName: get(scope, 'cluster.cluster_name')
|
||||
};
|
||||
}
|
||||
|
||||
attributes.$observe('instance', instance => controller.instance = instance);
|
||||
attributes.$observe('resolver', resolver => controller.resolver = resolver);
|
||||
const setupObj = getSetupObj();
|
||||
controller.setup(setupObj);
|
||||
Object.keys(setupObj.attributes).forEach(key => {
|
||||
attributes.$observe(key, () => controller.setup(getSetupObj()));
|
||||
});
|
||||
scope.$watch('pageData.versions', versions => {
|
||||
controller.pipelineVersions = versions;
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
@ -98,6 +98,9 @@ uiRoutes.when('/logstash/pipelines/:id/:hash?', {
|
|||
getPageData,
|
||||
reactNodeId: 'monitoringLogstashPipelineApp',
|
||||
$scope,
|
||||
options: {
|
||||
enableTimeFilter: false,
|
||||
},
|
||||
$injector
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue