mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
[website] report client-side errors to sentry.io (#11039)
This commit is contained in:
parent
dbe36dd37d
commit
2f28dbe7d6
@ -144,6 +144,7 @@ def get_js_in(args):
|
|||||||
f"'{args.website_dir}/js/jquery.js'",
|
f"'{args.website_dir}/js/jquery.js'",
|
||||||
f"'{args.website_dir}/js/popper.js'",
|
f"'{args.website_dir}/js/popper.js'",
|
||||||
f"'{args.website_dir}/js/bootstrap.js'",
|
f"'{args.website_dir}/js/bootstrap.js'",
|
||||||
|
f"'{args.website_dir}/js/sentry.js'",
|
||||||
f"'{args.website_dir}/js/base.js'",
|
f"'{args.website_dir}/js/base.js'",
|
||||||
f"'{args.website_dir}/js/index.js'",
|
f"'{args.website_dir}/js/index.js'",
|
||||||
f"'{args.website_dir}/js/docsearch.js'",
|
f"'{args.website_dir}/js/docsearch.js'",
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
(function () {
|
(function () {
|
||||||
|
Sentry.init({ dsn: 'https://2b95b52c943f4ad99baccab7a9048e4d@o388870.ingest.sentry.io/5246103' });
|
||||||
$(document).click(function (event) {
|
$(document).click(function (event) {
|
||||||
var target = $(event.target);
|
var target = $(event.target);
|
||||||
var target_id = target.attr('id');
|
var target_id = target.attr('id');
|
||||||
@ -7,14 +8,11 @@
|
|||||||
var is_collapse = target.attr('data-toggle') === 'collapse';
|
var is_collapse = target.attr('data-toggle') === 'collapse';
|
||||||
var is_rating = target.attr('role') === 'rating';
|
var is_rating = target.attr('role') === 'rating';
|
||||||
var navbar_toggle = $('#navbar-toggle');
|
var navbar_toggle = $('#navbar-toggle');
|
||||||
|
|
||||||
navbar_toggle.collapse('hide');
|
navbar_toggle.collapse('hide');
|
||||||
$('.algolia-autocomplete .ds-dropdown-menu').hide();
|
$('.algolia-autocomplete .ds-dropdown-menu').hide();
|
||||||
|
|
||||||
if (target_id && target_id.startsWith('logo-')) {
|
if (target_id && target_id.startsWith('logo-')) {
|
||||||
selector = '#';
|
selector = '#';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selector && selector.startsWith('#') && !is_tab && !is_collapse && !is_rating) {
|
if (selector && selector.startsWith('#') && !is_tab && !is_collapse && !is_rating) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var dst = window.location.href.replace(window.location.hash, '');
|
var dst = window.location.href.replace(window.location.hash, '');
|
||||||
|
5699
website/js/sentry.js
Normal file
5699
website/js/sentry.js
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user