Revert changes to Monitoring accidentally introduced in #27591 (#27830)

This commit is contained in:
Søren Louv-Jansen 2018-12-28 12:21:09 +01:00 committed by GitHub
parent e520f121c5
commit b034e9ceaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 20 deletions

View file

@ -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;
});
} }
}; };
}); });

View file

@ -98,6 +98,9 @@ uiRoutes.when('/logstash/pipelines/:id/:hash?', {
getPageData, getPageData,
reactNodeId: 'monitoringLogstashPipelineApp', reactNodeId: 'monitoringLogstashPipelineApp',
$scope, $scope,
options: {
enableTimeFilter: false,
},
$injector $injector
}); });