@parca/profile 0.16.313 → 0.16.315

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.315](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.314...@parca/profile@0.16.315) (2023-11-22)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.16.314](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.313...@parca/profile@0.16.314) (2023-11-22)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## [0.16.313](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.312...@parca/profile@0.16.313) (2023-11-21)
7
15
 
8
16
  **Note:** Version bump only for package @parca/profile
@@ -45,7 +45,7 @@ export function nodeLabel(table, row, level, showBinaryName) {
45
45
  return fallback === '' ? '<unknown>' : fallback;
46
46
  }
47
47
  export const extractFeature = (mapping) => {
48
- if (mapping.startsWith('runtime') || mapping === 'root') {
48
+ if (mapping === 'runtime' || mapping === 'root') {
49
49
  return { name: 'runtime', type: FEATURE_TYPES.Runtime };
50
50
  }
51
51
  if (mapping != null && mapping !== '') {
@@ -128,6 +128,11 @@ const ProfileSelector = ({ queryClient, querySelection, selectProfile, selectQue
128
128
  setQueryExpressionString(q);
129
129
  }
130
130
  };
131
+ useEffect(() => {
132
+ if (viewComponent !== undefined) {
133
+ viewComponent.emitQuery(query.toString());
134
+ }
135
+ }, [query, viewComponent]);
131
136
  useAutoQuerySelector({
132
137
  selectedProfileName,
133
138
  profileTypesData,
@@ -140,7 +145,7 @@ const ProfileSelector = ({ queryClient, querySelection, selectProfile, selectQue
140
145
  queryExpressionString === '{}';
141
146
  const compareDisabled = selectedProfileName === '' || querySelection.expression === undefined;
142
147
  return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mb-2 flex gap-2", children: [_jsxs("div", { className: "flex w-full flex-wrap content-start items-end justify-between gap-2", children: [_jsxs("div", { children: [_jsx("label", { className: "text-xs", children: "Profile type" }), _jsx(ProfileTypeSelector, { profileTypesData: profileTypesData, loading: profileTypesLoading, selectedKey: selectedProfileName, onSelection: setProfileName, error: error })] }), _jsxs("div", { className: "w-full flex-1", children: [_jsxs("div", { className: "mb-[2px] flex items-center justify-between", children: [_jsx("label", { className: "text-xs", children: "Query" }), (query.matchers.length > 0 || query.inputMatcherString.length > 0) &&
143
- viewComponent !== undefined && _jsx("div", { children: viewComponent(query.toString()) })] }), _jsx(MatchersInput, { queryClient: queryClient, setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query })] }), _jsxs("div", { children: [_jsx("label", { className: "text-xs", children: "Period" }), _jsx(DateTimeRangePicker, { onRangeSelection: setTimeRangeSelection, range: timeRangeSelection })] }), _jsxs(ButtonGroup, { children: [!searchDisabled && (_jsx(_Fragment, { children: !comparing && (_jsx(CompareButton, { disabled: compareDisabled, onClick: handleCompareClick })) })), _jsx(Button, { disabled: searchDisabled, onClick: (e) => {
148
+ viewComponent !== undefined && _jsx("div", { children: viewComponent?.createViewComponent })] }), _jsx(MatchersInput, { queryClient: queryClient, setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query })] }), _jsxs("div", { children: [_jsx("label", { className: "text-xs", children: "Period" }), _jsx(DateTimeRangePicker, { onRangeSelection: setTimeRangeSelection, range: timeRangeSelection })] }), _jsxs(ButtonGroup, { children: [!searchDisabled && (_jsx(_Fragment, { children: !comparing && (_jsx(CompareButton, { disabled: compareDisabled, onClick: handleCompareClick })) })), _jsx(Button, { disabled: searchDisabled, onClick: (e) => {
144
149
  e.preventDefault();
145
150
  setQueryExpression();
146
151
  }, id: "matcher-search-button", children: "Search" })] })] }), _jsx("div", { children: comparing && _jsx(IconButton, { onClick: () => closeProfile(), icon: _jsx(CloseIcon, {}) }) })] }), _jsx("div", { className: "rounded bg-white shadow dark:border-gray-500 dark:bg-gray-700", children: _jsx("div", { style: { height: heightStyle }, children: querySelection.expression !== undefined &&
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.313",
3
+ "version": "0.16.315",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@parca/client": "^0.16.100",
7
- "@parca/components": "^0.16.231",
7
+ "@parca/components": "^0.16.232",
8
8
  "@parca/dynamicsize": "^0.16.60",
9
9
  "@parca/hooks": "^0.0.37",
10
10
  "@parca/parser": "^0.16.68",
@@ -50,5 +50,5 @@
50
50
  "access": "public",
51
51
  "registry": "https://registry.npmjs.org/"
52
52
  },
53
- "gitHead": "b1579513b9d76e3d8f28ebbfdf5fc73e6da630de"
53
+ "gitHead": "04204f951c45271c548bc3cfab5cd1ec2e115974"
54
54
  }
@@ -66,7 +66,7 @@ export function nodeLabel(
66
66
  }
67
67
 
68
68
  export const extractFeature = (mapping: string): Feature => {
69
- if (mapping.startsWith('runtime') || mapping === 'root') {
69
+ if (mapping === 'runtime' || mapping === 'root') {
70
70
  return {name: 'runtime', type: FEATURE_TYPES.Runtime};
71
71
  }
72
72
 
@@ -206,6 +206,12 @@ const ProfileSelector = ({
206
206
  }
207
207
  };
208
208
 
209
+ useEffect(() => {
210
+ if (viewComponent !== undefined) {
211
+ viewComponent.emitQuery(query.toString());
212
+ }
213
+ }, [query, viewComponent]);
214
+
209
215
  useAutoQuerySelector({
210
216
  selectedProfileName,
211
217
  profileTypesData,
@@ -242,7 +248,7 @@ const ProfileSelector = ({
242
248
  <label className="text-xs">Query</label>
243
249
 
244
250
  {(query.matchers.length > 0 || query.inputMatcherString.length > 0) &&
245
- viewComponent !== undefined && <div>{viewComponent(query.toString())}</div>}
251
+ viewComponent !== undefined && <div>{viewComponent?.createViewComponent}</div>}
246
252
  </div>
247
253
 
248
254
  <MatchersInput