@parca/profile 0.16.84 → 0.16.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 0.16.86 (2022-12-14)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.16.85](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.84...@parca/profile@0.16.85) (2022-12-13)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## [0.16.84](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.83...@parca/profile@0.16.84) (2022-12-13)
7
15
 
8
16
  **Note:** Version bump only for package @parca/profile
@@ -100,7 +100,12 @@ var ProfileMetricsGraph = function (_a) {
100
100
  var queryClient = _a.queryClient, queryExpression = _a.queryExpression, profile = _a.profile, from = _a.from, to = _a.to, select = _a.select, setTimeRange = _a.setTimeRange, addLabelMatcher = _a.addLabelMatcher;
101
101
  var _b = useQueryRange(queryClient, queryExpression, from, to), isLoading = _b.isLoading, response = _b.response, error = _b.error;
102
102
  var isLoaderVisible = useDelayedLoader(isLoading);
103
- var loader = useParcaContext().loader;
103
+ var _c = useParcaContext(), loader = _c.loader, onError = _c.onError;
104
+ useEffect(function () {
105
+ if (error !== null) {
106
+ onError === null || onError === void 0 ? void 0 : onError(error, 'metricsGraph');
107
+ }
108
+ }, [error, onError]);
104
109
  if (isLoaderVisible) {
105
110
  return _jsx(_Fragment, { children: loader });
106
111
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.84",
3
+ "version": "0.16.86",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@parca/client": "^0.16.58",
7
- "@parca/components": "^0.16.73",
7
+ "@parca/components": "^0.16.75",
8
8
  "@parca/dynamicsize": "^0.16.51",
9
9
  "@parca/functions": "^0.16.53",
10
10
  "@parca/parser": "^0.16.51",
@@ -42,5 +42,5 @@
42
42
  "access": "public",
43
43
  "registry": "https://registry.npmjs.org/"
44
44
  },
45
- "gitHead": "bd7cf76b0c282bce3bf3a4dd1ab1ab15c8328af9"
45
+ "gitHead": "0a1175d936f428fdc53049aaf9c2388cd756f4ea"
46
46
  }
@@ -15,6 +15,7 @@ import {QueryServiceClient} from '@parca/client';
15
15
  import {ProfileSelection, ProfileViewWithData, NavigateFunction} from '..';
16
16
 
17
17
  import ProfileSelector, {QuerySelection} from '../ProfileSelector';
18
+
18
19
  interface ProfileExplorerSingleProps {
19
20
  queryClient: QueryServiceClient;
20
21
  query: QuerySelection;
@@ -89,7 +89,13 @@ const ProfileMetricsGraph = ({
89
89
  }: ProfileMetricsGraphProps): JSX.Element => {
90
90
  const {isLoading, response, error} = useQueryRange(queryClient, queryExpression, from, to);
91
91
  const isLoaderVisible = useDelayedLoader(isLoading);
92
- const {loader} = useParcaContext();
92
+ const {loader, onError} = useParcaContext();
93
+
94
+ useEffect(() => {
95
+ if (error !== null) {
96
+ onError?.(error, 'metricsGraph');
97
+ }
98
+ }, [error, onError]);
93
99
 
94
100
  if (isLoaderVisible) {
95
101
  return <>{loader}</>;