[Maps][6.7] fix breadcrumbs in Maps application (#34270)

This commit is contained in:
Nathan Reese 2019-04-04 10:22:55 -06:00 committed by GitHub
parent f6b8f91c3f
commit 8afef73af0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -12,7 +12,12 @@
aria-level="1"
ng-if="showPluginBreadcrumbs">
<div class="kuiLocalBreadcrumb">
<a class="kuiLocalBreadcrumb__link" href="#">Map</a>
<a
class="kuiLocalBreadcrumb__link"
href="#"
i18n-id="xpack.maps.mapController.mapsBreadcrumbLabel"
i18n-default-message="Maps"
></a>
</div>
<div class="kuiLocalBreadcrumb">
{{ getMapTitle() }}

View file

@ -201,6 +201,10 @@ app.controller('GisMapController', ($scope, $route, config, kbnUrl, localStorage
}
});
$scope.getMapTitle = function () {
return $scope.map.title;
};
// k7design breadcrumbs
// TODO subscribe to store change and change when store updates title
chrome.breadcrumbs.set([
{ text: i18n.translate('xpack.maps.mapController.mapsBreadcrumbLabel', {
@ -208,6 +212,7 @@ app.controller('GisMapController', ($scope, $route, config, kbnUrl, localStorage
}), href: '#' },
{ text: $scope.map.title }
]);
config.watch('k7design', (val) => $scope.showPluginBreadcrumbs = !val);
async function doSave(saveOptions) {
const store = getStore();