This commit is contained in:
parent
e520f121c5
commit
b034e9ceaf
|
@ -82,27 +82,35 @@ uiModule.directive('monitoringMain', (breadcrumbs, license, kbnUrl, config) => {
|
||||||
link(scope, _element, attributes, controller) {
|
link(scope, _element, attributes, controller) {
|
||||||
config.watch('k7design', (val) => scope.showPluginBreadcrumbs = !val);
|
config.watch('k7design', (val) => scope.showPluginBreadcrumbs = !val);
|
||||||
|
|
||||||
controller.setup({
|
function getSetupObj() {
|
||||||
licenseService: license,
|
return {
|
||||||
breadcrumbsService: breadcrumbs,
|
licenseService: license,
|
||||||
kbnUrlService: kbnUrl,
|
breadcrumbsService: breadcrumbs,
|
||||||
attributes: {
|
kbnUrlService: kbnUrl,
|
||||||
name: attributes.name,
|
attributes: {
|
||||||
product: attributes.product,
|
name: attributes.name,
|
||||||
instance: attributes.instance,
|
product: attributes.product,
|
||||||
resolver: attributes.resolver,
|
instance: attributes.instance,
|
||||||
page: attributes.page,
|
resolver: attributes.resolver,
|
||||||
tabIconClass: attributes.tabIconClass,
|
page: attributes.page,
|
||||||
tabIconLabel: attributes.tabIconLabel,
|
tabIconClass: attributes.tabIconClass,
|
||||||
pipelineId: attributes.pipelineId,
|
tabIconLabel: attributes.tabIconLabel,
|
||||||
pipelineHash: attributes.pipelineHash,
|
pipelineId: attributes.pipelineId,
|
||||||
pipelineVersions: get(scope, 'pageData.versions')
|
pipelineHash: attributes.pipelineHash,
|
||||||
},
|
pipelineVersions: get(scope, 'pageData.versions')
|
||||||
clusterName: get(scope, 'cluster.cluster_name')
|
},
|
||||||
});
|
clusterName: get(scope, 'cluster.cluster_name')
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
attributes.$observe('instance', instance => controller.instance = instance);
|
const setupObj = getSetupObj();
|
||||||
attributes.$observe('resolver', resolver => controller.resolver = resolver);
|
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,
|
getPageData,
|
||||||
reactNodeId: 'monitoringLogstashPipelineApp',
|
reactNodeId: 'monitoringLogstashPipelineApp',
|
||||||
$scope,
|
$scope,
|
||||||
|
options: {
|
||||||
|
enableTimeFilter: false,
|
||||||
|
},
|
||||||
$injector
|
$injector
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue