Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update browser window/tab title to reflect current dashboard title #215

Merged
merged 5 commits into from
Jun 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
dist
bower_components
tmp/
build.number
11 changes: 7 additions & 4 deletions src/app/services/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
global_params: ''
}
};

var sjs = sjsResource(config.solr + config.solr_core);

var gist_pattern = /(^\d{5,}$)|(^[a-z0-9]{10,}$)|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/;
Expand Down Expand Up @@ -154,7 +154,7 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
return false;
}
}

$rootScope.$broadcast('refresh');
});
} else {
Expand Down Expand Up @@ -188,6 +188,9 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
// Cancel all timers
timer.cancel_all();

// update browser window/tab title to reflect current dashboard's title
document.title = dashboard.title;

// Make sure the dashboard being loaded has everything required
dashboard = dash_defaults(dashboard);

Expand Down Expand Up @@ -428,7 +431,7 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
return false;
}
);

};

this.save_gist = function(title,dashboard) {
Expand Down Expand Up @@ -481,4 +484,4 @@ function (angular, $, kbn, _, config, moment, Modernizr) {

});

});
});