@parca/profile 0.16.85 → 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,10 @@
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
+
6
10
  ## [0.16.85](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.84...@parca/profile@0.16.85) (2022-12-13)
7
11
 
8
12
  **Note:** Version bump only for package @parca/profile
@@ -101,11 +101,15 @@ var ProfileMetricsGraph = function (_a) {
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
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
  }
107
112
  if (error !== null) {
108
- onError === null || onError === void 0 ? void 0 : onError.metricsGraphError(error);
109
113
  return (_jsxs("div", __assign({ className: "bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative", role: "alert" }, { children: [_jsx("strong", __assign({ className: "font-bold" }, { children: "Error! " })), _jsx("span", __assign({ className: "block sm:inline" }, { children: error.message }))] })));
110
114
  }
111
115
  var series = response === null || response === void 0 ? void 0 : response.series;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.85",
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.74",
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": "155fc7378c1382759ea38c3aaee575dfb0cc90c4"
45
+ "gitHead": "0a1175d936f428fdc53049aaf9c2388cd756f4ea"
46
46
  }
@@ -91,13 +91,17 @@ const ProfileMetricsGraph = ({
91
91
  const isLoaderVisible = useDelayedLoader(isLoading);
92
92
  const {loader, onError} = useParcaContext();
93
93
 
94
+ useEffect(() => {
95
+ if (error !== null) {
96
+ onError?.(error, 'metricsGraph');
97
+ }
98
+ }, [error, onError]);
99
+
94
100
  if (isLoaderVisible) {
95
101
  return <>{loader}</>;
96
102
  }
97
103
 
98
104
  if (error !== null) {
99
- onError?.metricsGraphError(error);
100
-
101
105
  return (
102
106
  <div
103
107
  className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative"