Sharing - exposing Dashboard and Visualize title and type (#14946) (#15903)

* Exposing the sharing title on the controller

* Implementing the getSharingType on the controllers

* Adding a getSharingSavedObjectId method

* We don't need the savedObjectId anymore
This commit is contained in:
Brandon Kobel 2018-01-08 13:53:14 -05:00 committed by GitHub
parent e5e59b85cf
commit 0ebc879792
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -107,6 +107,14 @@ app.directive('dashboardApp', function ($injector) {
dirty: !dash.id
};
this.getSharingTitle = () => {
return dash.title;
};
this.getSharingType = () => {
return 'dashboard';
};
dashboardStateManager.registerChangeListener(status => {
this.appStatus.dirty = status.dirty || !dash.id;
updateState();

View file

@ -118,6 +118,14 @@ function VisEditor($scope, $route, timefilter, AppState, $window, kbnUrl, courie
dirty: !savedVis.id
};
this.getSharingTitle = () => {
return savedVis.title;
};
this.getSharingType = () => {
return 'visualization';
};
if (savedVis.id) {
docTitle.change(savedVis.title);
}