chore(my-joy-beta): add rollbar integration

ref #949
This commit is contained in:
Sara Vieira 2018-02-05 11:30:06 +00:00 committed by Sérgio Ramos
parent de5fba81e3
commit 3671bc78fe
51 changed files with 66 additions and 44 deletions

View File

@ -31,15 +31,15 @@ const server = Hapi.server({
Main(async () => {
await server.register([
// {
// plugin: Rollover,
// options: {
// rollbar: {
// accessToken: ROLLBAR_SERVER_TOKEN,
// reportLevel: 'error'
// }
// }
// },
{
plugin: Rollover,
options: {
rollbar: {
accessToken: ROLLBAR_SERVER_TOKEN,
reportLevel: 'error'
}
}
},
{
plugin: Brule,
options: {

View File

@ -1,36 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="theme-color" content="#1E313B">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<title>My Joyent &beta;</title>
<script type="text/javascript">
window.heap = window.heap || [], heap.load = function (e, t) { window.heap.appid = e, window.heap.config = t = t || {}; var r = t.forceSSL || "https:" === document.location.protocol, a = document.createElement("script"); a.type = "text/javascript", a.async = !0, a.src = (r ? "https:" : "http:") + "//cdn.heapanalytics.com/js/heap-" + e + ".js"; var n = document.getElementsByTagName("script")[0]; n.parentNode.insertBefore(a, n); for (var o = function (e) { return function () { heap.push([e].concat(Array.prototype.slice.call(arguments, 0))) } }, p = ["addEventProperties", "addUserProperties", "clearEventProperties", "identify", "removeEventProperty", "setEventProperties", "track", "unsetEventProperty"], c = 0; c < p.length; c++)heap[p[c]] = o(p[c]) };
heap.load("1044364007");
</script>
<!-- Hotjar Tracking Code for www.makeusproud.com -->
<script>
(function (h, o, t, j, a, r) {
h.hj = h.hj || function () { (h.hj.q = h.hj.q || []).push(arguments) };
h._hjSettings = { hjid: 767828, hjsv: 6 };
a = o.getElementsByTagName('head')[0];
r = o.createElement('script'); r.async = 1;
r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
a.appendChild(r);
})(window, document, 'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="header"></div>
<div id="root"></div>
<script src="/nav-static/main.js"></script>
</body>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="theme-color" content="#1E313B">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<title>My Joyent &beta;</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="header"></div>
<div id="root"></div>
<script src="/nav-static/main.js"></script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -51,7 +51,8 @@ const Animated = WrappedComponent =>
<div
ref={w => {
this.wrapper = w;
}}>
}}
>
<WrappedComponent {...this.props} />
</div>
);

View File

@ -189,6 +189,10 @@ export default compose(
refetch
} = data;
if (error) {
window.Rollbar.error(error, error);
}
const rules = forceArray(firewall_rules_create_machine).filter(
({ enabled }) => enabled || showInactive
);

View File

@ -114,6 +114,10 @@ export default compose(
props: ({ data }) => {
const { networks = [], loading = false, error = null, refetch } = data;
if (error) {
window.Rollbar.error(error, error);
}
return {
networks: forceArray(networks),
loading,
@ -123,7 +127,7 @@ export default compose(
}
}),
connect(
({ values, form }, { networks }) => {
({ values, form }, { networks, error }) => {
const selected = get(form, `${FORM_NAME}.values`, {});
const empty = id => !includes(Object.keys(selected), id);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -285,6 +285,7 @@ export default compose(
});
if (err) {
window.Rollbar.error(parseError(err), err);
return dispatch([
setLoadingFalse,
set({
@ -323,6 +324,7 @@ export default compose(
});
if (err) {
window.Rollbar.error(parseError(err), err);
return dispatch([
setLoadingFalse,
set({
@ -355,6 +357,7 @@ export default compose(
);
if (err) {
window.Rollbar.error(parseError(err), err);
dispatch(set({ name: `cns-${instance.id}-svcs`, services }));
throw new SubmissionError({

View File

@ -187,6 +187,7 @@ export default compose(
);
if (err) {
window.Rollbar.error(parseError(err), err);
throw new SubmissionError({
_error: parseError(err)
});

View File

@ -103,7 +103,8 @@ export const List = ({
sortBy={sortBy}
sortOrder={sortOrder}
toggleSelectAll={toggleSelectAll}
onSortBy={handleSortBy}>
onSortBy={handleSortBy}
>
{_instances.map(({ id, ...rest }) => (
<InstanceListItem
key={id}
@ -187,6 +188,13 @@ export default compose(
}
}));
if (error) {
window.Rollbar.error(
'An error occurred while loading your instances',
error
);
}
return {
instances,
loading,
@ -338,6 +346,10 @@ export default compose(
})
);
if (err) {
window.Rollbar.error(mutationError, mutationError);
}
// reverts submitting flag to false and propagates the error if it exists
const flipSubmitFalse = stopSubmit(TABLE_FORM_NAME, {
_error: err && parseError(err)

View File

@ -218,6 +218,7 @@ export default compose(
);
if (err) {
window.Rollbar.error(parseError(err), err);
// show mutation error
throw new SubmissionError({
_error: parseError(err)
@ -258,6 +259,7 @@ export default compose(
);
if (err) {
window.Rollbar.error(parseError(err), err);
// show mutation error
throw new SubmissionError({
_error: parseError(err)
@ -291,6 +293,7 @@ export default compose(
);
if (err) {
window.Rollbar.error(parseError(err), err);
// show mutation error
throw new SubmissionError({
_error: parseError(err)

View File

@ -299,6 +299,7 @@ export default compose(
);
if (err) {
window.Rollbar.error(parseError(err), err);
return dispatch(
stopSubmit(TABLE_FORM_NAME, {
_error: parseError(err)

View File

@ -138,6 +138,10 @@ export default compose(
})
);
if (err) {
window.Rollbar.error(parseError(err), err);
}
if (!err && action === 'remove') {
const { history } = ownProps;
return history.push(`/instances/`);

View File

@ -237,6 +237,7 @@ export default compose(
const [err] = await intercept(mutation());
if (err) {
window.Rollbar.error(parseError(err), err);
// show mutation error
throw new SubmissionError({
_error: parseError(err)