@parca/profile 0.16.84 → 0.16.85
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.85](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.84...@parca/profile@0.16.85) (2022-12-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
6
10
|
## [0.16.84](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.83...@parca/profile@0.16.84) (2022-12-13)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -100,11 +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
|
|
103
|
+
var _c = useParcaContext(), loader = _c.loader, onError = _c.onError;
|
|
104
104
|
if (isLoaderVisible) {
|
|
105
105
|
return _jsx(_Fragment, { children: loader });
|
|
106
106
|
}
|
|
107
107
|
if (error !== null) {
|
|
108
|
+
onError === null || onError === void 0 ? void 0 : onError.metricsGraphError(error);
|
|
108
109
|
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 }))] })));
|
|
109
110
|
}
|
|
110
111
|
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.
|
|
3
|
+
"version": "0.16.85",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@parca/client": "^0.16.58",
|
|
7
|
-
"@parca/components": "^0.16.
|
|
7
|
+
"@parca/components": "^0.16.74",
|
|
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": "
|
|
45
|
+
"gitHead": "155fc7378c1382759ea38c3aaee575dfb0cc90c4"
|
|
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,13 +89,15 @@ 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
93
|
|
|
94
94
|
if (isLoaderVisible) {
|
|
95
95
|
return <>{loader}</>;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
if (error !== null) {
|
|
99
|
+
onError?.metricsGraphError(error);
|
|
100
|
+
|
|
99
101
|
return (
|
|
100
102
|
<div
|
|
101
103
|
className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative"
|