@perses-dev/pyroscope-plugin 0.2.0

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.
Files changed (270) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +23 -0
  3. package/__mf/css/async/1339.6763d50b.css +1 -0
  4. package/__mf/css/async/4758.6763d50b.css +1 -0
  5. package/__mf/css/async/9633.6763d50b.css +1 -0
  6. package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
  7. package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
  8. package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
  9. package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
  10. package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
  11. package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
  12. package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
  13. package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
  14. package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
  15. package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
  16. package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
  17. package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
  18. package/__mf/js/Pyroscope.24cb38f3.js +5 -0
  19. package/__mf/js/async/1101.380fb9ae.js +73 -0
  20. package/__mf/js/async/1101.380fb9ae.js.LICENSE.txt +19 -0
  21. package/__mf/js/async/1339.e58b309f.js +1 -0
  22. package/__mf/js/async/1964.88ffca96.js +2 -0
  23. package/__mf/js/async/1964.88ffca96.js.LICENSE.txt +9 -0
  24. package/__mf/js/async/2002.8fc3eb19.js +1 -0
  25. package/__mf/js/async/2114.6befeb2d.js +1 -0
  26. package/__mf/js/async/2292.ed7843fc.js +2 -0
  27. package/__mf/js/async/2292.ed7843fc.js.LICENSE.txt +24 -0
  28. package/__mf/js/async/2911.ec166b7f.js +38 -0
  29. package/__mf/js/async/3224.755c2f09.js +1 -0
  30. package/__mf/js/async/3431.bc5c0624.js +1 -0
  31. package/__mf/js/async/3863.dbe40473.js +2 -0
  32. package/__mf/js/async/3863.dbe40473.js.LICENSE.txt +9 -0
  33. package/__mf/js/async/3960.a5d41140.js +2 -0
  34. package/__mf/js/async/3960.a5d41140.js.LICENSE.txt +8 -0
  35. package/__mf/js/async/3980.f1ef0ece.js +2 -0
  36. package/__mf/js/async/3980.f1ef0ece.js.LICENSE.txt +9 -0
  37. package/__mf/js/async/4075.cde93ec7.js +1 -0
  38. package/__mf/js/async/4238.f154b81c.js +1 -0
  39. package/__mf/js/async/424.edb69d58.js +1 -0
  40. package/__mf/js/async/4368.2d817d5d.js +2 -0
  41. package/__mf/js/async/4368.2d817d5d.js.LICENSE.txt +15 -0
  42. package/__mf/js/async/4421.d44d1d6f.js +1 -0
  43. package/__mf/js/async/4556.aabe5dff.js +2 -0
  44. package/__mf/js/async/4556.aabe5dff.js.LICENSE.txt +9 -0
  45. package/__mf/js/async/4758.a629b413.js +1 -0
  46. package/__mf/js/async/5214.8d3dd135.js +1 -0
  47. package/__mf/js/async/5215.6fd5cc14.js +1 -0
  48. package/__mf/js/async/5220.d1e40fff.js +10 -0
  49. package/__mf/js/async/5220.d1e40fff.js.LICENSE.txt +17 -0
  50. package/__mf/js/async/5358.40b9537e.js +7 -0
  51. package/__mf/js/async/5358.40b9537e.js.LICENSE.txt +21 -0
  52. package/__mf/js/async/5409.0df9c301.js +1 -0
  53. package/__mf/js/async/5790.677172d7.js +1 -0
  54. package/__mf/js/async/5876.38b119d5.js +2 -0
  55. package/__mf/js/async/5876.38b119d5.js.LICENSE.txt +21 -0
  56. package/__mf/js/async/5924.582b0cc4.js +2 -0
  57. package/__mf/js/async/5924.582b0cc4.js.LICENSE.txt +9 -0
  58. package/__mf/js/async/5981.9c662ef8.js +2 -0
  59. package/__mf/js/async/5981.9c662ef8.js.LICENSE.txt +8 -0
  60. package/__mf/js/async/6292.e30a4c42.js +1 -0
  61. package/__mf/js/async/6377.f6e824aa.js +2 -0
  62. package/__mf/js/async/6377.f6e824aa.js.LICENSE.txt +32 -0
  63. package/__mf/js/async/6770.2f87fe88.js +1 -0
  64. package/__mf/js/async/694.5e15c44d.js +1 -0
  65. package/__mf/js/async/7376.c4cd77b0.js +1 -0
  66. package/__mf/js/async/738.fa73528b.js +1 -0
  67. package/__mf/js/async/7740.474defbd.js +1 -0
  68. package/__mf/js/async/8216.be450b83.js +1 -0
  69. package/__mf/js/async/8488.00c7f348.js +1 -0
  70. package/__mf/js/async/8930.496019db.js +1 -0
  71. package/__mf/js/async/9092.cfd47472.js +101 -0
  72. package/__mf/js/async/9173.5959814f.js +2 -0
  73. package/__mf/js/async/9173.5959814f.js.LICENSE.txt +19 -0
  74. package/__mf/js/async/9478.c76fe552.js +2 -0
  75. package/__mf/js/async/9478.c76fe552.js.LICENSE.txt +9 -0
  76. package/__mf/js/async/9633.a7997138.js +2 -0
  77. package/__mf/js/async/9633.a7997138.js.LICENSE.txt +9 -0
  78. package/__mf/js/async/__federation_expose_PyroscopeDatasource.76f63abf.js +2 -0
  79. package/__mf/js/async/__federation_expose_PyroscopeDatasource.76f63abf.js.LICENSE.txt +9 -0
  80. package/__mf/js/async/__federation_expose_PyroscopeExplorer.88d5e4fb.js +2 -0
  81. package/__mf/js/async/__federation_expose_PyroscopeExplorer.88d5e4fb.js.LICENSE.txt +9 -0
  82. package/__mf/js/async/__federation_expose_PyroscopeProfileQuery.75c9c11b.js +2 -0
  83. package/__mf/js/async/__federation_expose_PyroscopeProfileQuery.75c9c11b.js.LICENSE.txt +9 -0
  84. package/__mf/js/main.4caf1064.js +5 -0
  85. package/lib/bootstrap.d.ts +2 -0
  86. package/lib/bootstrap.d.ts.map +1 -0
  87. package/lib/bootstrap.js +19 -0
  88. package/lib/bootstrap.js.map +1 -0
  89. package/lib/cjs/bootstrap.js +26 -0
  90. package/lib/cjs/components/AddFilterItem.js +38 -0
  91. package/lib/cjs/components/DeleteFilterItem.js +42 -0
  92. package/lib/cjs/components/FilterItem.js +83 -0
  93. package/lib/cjs/components/Filters.js +106 -0
  94. package/lib/cjs/components/LabelName.js +59 -0
  95. package/lib/cjs/components/LabelValue.js +59 -0
  96. package/lib/cjs/components/Operator.js +45 -0
  97. package/lib/cjs/components/ProfileTypeSelector.js +57 -0
  98. package/lib/cjs/components/Service.js +60 -0
  99. package/lib/cjs/components/index.js +32 -0
  100. package/lib/cjs/env.d.js +14 -0
  101. package/lib/cjs/explore/PyroscopeExplorer.js +90 -0
  102. package/lib/cjs/explore/index.js +30 -0
  103. package/lib/cjs/getPluginModule.js +39 -0
  104. package/lib/cjs/index-federation.js +55 -0
  105. package/lib/cjs/index.js +40 -0
  106. package/lib/cjs/model/api-types.js +19 -0
  107. package/lib/cjs/model/index.js +33 -0
  108. package/lib/cjs/model/profile-query-model.js +16 -0
  109. package/lib/cjs/model/pyroscope-client.js +94 -0
  110. package/lib/cjs/model/pyroscope-selectors.js +46 -0
  111. package/lib/cjs/plugins/PyroscopeDatasourceEditor.js +70 -0
  112. package/lib/cjs/plugins/index.js +33 -0
  113. package/lib/cjs/plugins/pyroscope-datasource-types.js +16 -0
  114. package/lib/cjs/plugins/pyroscope-datasource.js +68 -0
  115. package/lib/cjs/plugins/pyroscope-profile-query/PyroscopeProfileQuery.js +41 -0
  116. package/lib/cjs/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.js +114 -0
  117. package/lib/cjs/plugins/pyroscope-profile-query/get-profile-data.js +201 -0
  118. package/lib/cjs/plugins/pyroscope-profile-query/index.js +33 -0
  119. package/lib/cjs/plugins/pyroscope-profile-query/query-editor-model.js +120 -0
  120. package/lib/cjs/setup-tests.js +19 -0
  121. package/lib/cjs/test/index.js +30 -0
  122. package/lib/cjs/test/mock-data.js +151 -0
  123. package/lib/cjs/test/setup-tests.js +17 -0
  124. package/lib/cjs/utils/types.js +25 -0
  125. package/lib/cjs/utils/use-query.js +112 -0
  126. package/lib/components/AddFilterItem.d.ts +6 -0
  127. package/lib/components/AddFilterItem.d.ts.map +1 -0
  128. package/lib/components/AddFilterItem.js +25 -0
  129. package/lib/components/AddFilterItem.js.map +1 -0
  130. package/lib/components/DeleteFilterItem.d.ts +6 -0
  131. package/lib/components/DeleteFilterItem.d.ts.map +1 -0
  132. package/lib/components/DeleteFilterItem.js +29 -0
  133. package/lib/components/DeleteFilterItem.js.map +1 -0
  134. package/lib/components/FilterItem.d.ts +11 -0
  135. package/lib/components/FilterItem.d.ts.map +1 -0
  136. package/lib/components/FilterItem.js +75 -0
  137. package/lib/components/FilterItem.js.map +1 -0
  138. package/lib/components/Filters.d.ts +10 -0
  139. package/lib/components/Filters.d.ts.map +1 -0
  140. package/lib/components/Filters.js +98 -0
  141. package/lib/components/Filters.js.map +1 -0
  142. package/lib/components/LabelName.d.ts +9 -0
  143. package/lib/components/LabelName.d.ts.map +1 -0
  144. package/lib/components/LabelName.js +51 -0
  145. package/lib/components/LabelName.js.map +1 -0
  146. package/lib/components/LabelValue.d.ts +10 -0
  147. package/lib/components/LabelValue.d.ts.map +1 -0
  148. package/lib/components/LabelValue.js +51 -0
  149. package/lib/components/LabelValue.js.map +1 -0
  150. package/lib/components/Operator.d.ts +7 -0
  151. package/lib/components/Operator.d.ts.map +1 -0
  152. package/lib/components/Operator.js +37 -0
  153. package/lib/components/Operator.js.map +1 -0
  154. package/lib/components/ProfileTypeSelector.d.ts +9 -0
  155. package/lib/components/ProfileTypeSelector.d.ts.map +1 -0
  156. package/lib/components/ProfileTypeSelector.js +49 -0
  157. package/lib/components/ProfileTypeSelector.js.map +1 -0
  158. package/lib/components/Service.d.ts +9 -0
  159. package/lib/components/Service.d.ts.map +1 -0
  160. package/lib/components/Service.js +52 -0
  161. package/lib/components/Service.js.map +1 -0
  162. package/lib/components/index.d.ts +4 -0
  163. package/lib/components/index.d.ts.map +1 -0
  164. package/lib/components/index.js +17 -0
  165. package/lib/components/index.js.map +1 -0
  166. package/lib/env.d.js +15 -0
  167. package/lib/env.d.js.map +1 -0
  168. package/lib/explore/PyroscopeExplorer.d.ts +3 -0
  169. package/lib/explore/PyroscopeExplorer.d.ts.map +1 -0
  170. package/lib/explore/PyroscopeExplorer.js +82 -0
  171. package/lib/explore/PyroscopeExplorer.js.map +1 -0
  172. package/lib/explore/index.d.ts +2 -0
  173. package/lib/explore/index.d.ts.map +1 -0
  174. package/lib/explore/index.js +15 -0
  175. package/lib/explore/index.js.map +1 -0
  176. package/lib/getPluginModule.d.ts +6 -0
  177. package/lib/getPluginModule.d.ts.map +1 -0
  178. package/lib/getPluginModule.js +28 -0
  179. package/lib/getPluginModule.js.map +1 -0
  180. package/lib/index-federation.d.ts +1 -0
  181. package/lib/index-federation.d.ts.map +1 -0
  182. package/lib/index-federation.js +15 -0
  183. package/lib/index-federation.js.map +1 -0
  184. package/lib/index.d.ts +6 -0
  185. package/lib/index.d.ts.map +1 -0
  186. package/lib/index.js +19 -0
  187. package/lib/index.js.map +1 -0
  188. package/lib/model/api-types.d.ts +82 -0
  189. package/lib/model/api-types.d.ts.map +1 -0
  190. package/lib/model/api-types.js +20 -0
  191. package/lib/model/api-types.js.map +1 -0
  192. package/lib/model/index.d.ts +5 -0
  193. package/lib/model/index.d.ts.map +1 -0
  194. package/lib/model/index.js +18 -0
  195. package/lib/model/index.js.map +1 -0
  196. package/lib/model/profile-query-model.d.ts +13 -0
  197. package/lib/model/profile-query-model.d.ts.map +1 -0
  198. package/lib/model/profile-query-model.js +17 -0
  199. package/lib/model/profile-query-model.js.map +1 -0
  200. package/lib/model/pyroscope-client.d.ts +43 -0
  201. package/lib/model/pyroscope-client.d.ts.map +1 -0
  202. package/lib/model/pyroscope-client.js +77 -0
  203. package/lib/model/pyroscope-client.js.map +1 -0
  204. package/lib/model/pyroscope-selectors.d.ts +21 -0
  205. package/lib/model/pyroscope-selectors.d.ts.map +1 -0
  206. package/lib/model/pyroscope-selectors.js +30 -0
  207. package/lib/model/pyroscope-selectors.js.map +1 -0
  208. package/lib/plugins/PyroscopeDatasourceEditor.d.ts +9 -0
  209. package/lib/plugins/PyroscopeDatasourceEditor.d.ts.map +1 -0
  210. package/lib/plugins/PyroscopeDatasourceEditor.js +57 -0
  211. package/lib/plugins/PyroscopeDatasourceEditor.js.map +1 -0
  212. package/lib/plugins/index.d.ts +5 -0
  213. package/lib/plugins/index.d.ts.map +1 -0
  214. package/lib/plugins/index.js +18 -0
  215. package/lib/plugins/index.js.map +1 -0
  216. package/lib/plugins/pyroscope-datasource-types.d.ts +6 -0
  217. package/lib/plugins/pyroscope-datasource-types.d.ts.map +1 -0
  218. package/lib/plugins/pyroscope-datasource-types.js +15 -0
  219. package/lib/plugins/pyroscope-datasource-types.js.map +1 -0
  220. package/lib/plugins/pyroscope-datasource.d.ts +5 -0
  221. package/lib/plugins/pyroscope-datasource.d.ts.map +1 -0
  222. package/lib/plugins/pyroscope-datasource.js +60 -0
  223. package/lib/plugins/pyroscope-datasource.js.map +1 -0
  224. package/lib/plugins/pyroscope-profile-query/PyroscopeProfileQuery.d.ts +14 -0
  225. package/lib/plugins/pyroscope-profile-query/PyroscopeProfileQuery.d.ts.map +1 -0
  226. package/lib/plugins/pyroscope-profile-query/PyroscopeProfileQuery.js +33 -0
  227. package/lib/plugins/pyroscope-profile-query/PyroscopeProfileQuery.js.map +1 -0
  228. package/lib/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.d.ts +4 -0
  229. package/lib/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.d.ts.map +1 -0
  230. package/lib/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.js +106 -0
  231. package/lib/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.js.map +1 -0
  232. package/lib/plugins/pyroscope-profile-query/get-profile-data.d.ts +9 -0
  233. package/lib/plugins/pyroscope-profile-query/get-profile-data.d.ts.map +1 -0
  234. package/lib/plugins/pyroscope-profile-query/get-profile-data.js +185 -0
  235. package/lib/plugins/pyroscope-profile-query/get-profile-data.js.map +1 -0
  236. package/lib/plugins/pyroscope-profile-query/index.d.ts +5 -0
  237. package/lib/plugins/pyroscope-profile-query/index.d.ts.map +1 -0
  238. package/lib/plugins/pyroscope-profile-query/index.js +18 -0
  239. package/lib/plugins/pyroscope-profile-query/index.js.map +1 -0
  240. package/lib/plugins/pyroscope-profile-query/query-editor-model.d.ts +34 -0
  241. package/lib/plugins/pyroscope-profile-query/query-editor-model.d.ts.map +1 -0
  242. package/lib/plugins/pyroscope-profile-query/query-editor-model.js +106 -0
  243. package/lib/plugins/pyroscope-profile-query/query-editor-model.js.map +1 -0
  244. package/lib/setup-tests.d.ts +2 -0
  245. package/lib/setup-tests.d.ts.map +1 -0
  246. package/lib/setup-tests.js +17 -0
  247. package/lib/setup-tests.js.map +1 -0
  248. package/lib/test/index.d.ts +2 -0
  249. package/lib/test/index.d.ts.map +1 -0
  250. package/lib/test/index.js +15 -0
  251. package/lib/test/index.js.map +1 -0
  252. package/lib/test/mock-data.d.ts +5 -0
  253. package/lib/test/mock-data.d.ts.map +1 -0
  254. package/lib/test/mock-data.js +133 -0
  255. package/lib/test/mock-data.js.map +1 -0
  256. package/lib/test/setup-tests.d.ts +2 -0
  257. package/lib/test/setup-tests.d.ts.map +1 -0
  258. package/lib/test/setup-tests.js +15 -0
  259. package/lib/test/setup-tests.js.map +1 -0
  260. package/lib/utils/types.d.ts +8 -0
  261. package/lib/utils/types.d.ts.map +1 -0
  262. package/lib/utils/types.js +17 -0
  263. package/lib/utils/types.js.map +1 -0
  264. package/lib/utils/use-query.d.ts +9 -0
  265. package/lib/utils/use-query.d.ts.map +1 -0
  266. package/lib/utils/use-query.js +87 -0
  267. package/lib/utils/use-query.js.map +1 -0
  268. package/mf-manifest.json +455 -0
  269. package/mf-stats.json +539 -0
  270. package/package.json +88 -0
@@ -0,0 +1,59 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "LabelValue", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return LabelValue;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ const _usequery = require("../utils/use-query");
26
+ function LabelValue(props) {
27
+ const { datasource, value, labelName, onChange } = props;
28
+ const { data: labelValuesOptions, isLoading: isLabelValuesOptionsLoading } = (0, _usequery.useLabelValues)(datasource, labelName);
29
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Select, {
30
+ sx: {
31
+ borderRadius: '0'
32
+ },
33
+ value: value,
34
+ size: "small",
35
+ onChange: (event)=>onChange?.(event.target.value),
36
+ displayEmpty: true,
37
+ disabled: !labelName || labelName === '',
38
+ renderValue: (selected)=>{
39
+ if (selected === '') {
40
+ return 'Select label value';
41
+ }
42
+ return selected;
43
+ },
44
+ children: isLabelValuesOptionsLoading ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
45
+ width: "100%",
46
+ sx: {
47
+ alignItems: 'center',
48
+ justifyContent: 'center'
49
+ },
50
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.CircularProgress, {
51
+ color: "inherit",
52
+ size: 20
53
+ })
54
+ }) : labelValuesOptions?.names && labelValuesOptions?.names.map((labelValue)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
55
+ value: labelValue,
56
+ children: labelValue
57
+ }, labelValue))
58
+ });
59
+ }
@@ -0,0 +1,45 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "Operator", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return Operator;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ function Operator(props) {
26
+ const { value, onChange } = props;
27
+ const operators = [
28
+ '=',
29
+ '!=',
30
+ '=~',
31
+ '!~'
32
+ ];
33
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Select, {
34
+ sx: {
35
+ borderRadius: '0'
36
+ },
37
+ value: value,
38
+ size: "small",
39
+ onChange: (event)=>onChange?.(event.target.value),
40
+ children: operators.map((op)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
41
+ value: op,
42
+ children: op
43
+ }, op))
44
+ });
45
+ }
@@ -0,0 +1,57 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "ProfileTypeSelector", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return ProfileTypeSelector;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ const _usequery = require("../utils/use-query");
26
+ function ProfileTypeSelector(props) {
27
+ const { datasource, value, onChange } = props;
28
+ const { data: profileTypesOptions, isLoading: isProfileTypesOptionsLoading } = (0, _usequery.useProfileTypes)(datasource);
29
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
30
+ position: "relative",
31
+ sx: {
32
+ flexGrow: 1,
33
+ maxWidth: '100%'
34
+ },
35
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
36
+ select: true,
37
+ label: "Profile Type",
38
+ value: value,
39
+ size: "small",
40
+ onChange: (event)=>onChange?.(event.target.value),
41
+ children: isProfileTypesOptionsLoading ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
42
+ width: "100%",
43
+ sx: {
44
+ alignItems: 'center',
45
+ justifyContent: 'center'
46
+ },
47
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.CircularProgress, {
48
+ color: "inherit",
49
+ size: 20
50
+ })
51
+ }) : profileTypesOptions?.profileTypes && profileTypesOptions?.profileTypes.map((type)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
52
+ value: type.ID,
53
+ children: type.name + '/' + type.sampleType
54
+ }, type.ID))
55
+ })
56
+ });
57
+ }
@@ -0,0 +1,60 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "Service", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return Service;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ const _usequery = require("../utils/use-query");
26
+ function Service(props) {
27
+ const { datasource, value, onChange } = props;
28
+ const { data: servicesOptions, isLoading: isServicesOptionsLoading } = (0, _usequery.useServices)(datasource);
29
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
30
+ position: "relative",
31
+ sx: {
32
+ flexGrow: 1,
33
+ maxWidth: '100%',
34
+ [(0, _material.useTheme)().breakpoints.down('sm')]: {
35
+ width: '100%'
36
+ }
37
+ },
38
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
39
+ select: true,
40
+ label: "Service",
41
+ value: value,
42
+ size: "small",
43
+ onChange: (event)=>onChange?.(event.target.value),
44
+ children: isServicesOptionsLoading ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
45
+ width: "100%",
46
+ sx: {
47
+ alignItems: 'center',
48
+ justifyContent: 'center'
49
+ },
50
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.CircularProgress, {
51
+ color: "inherit",
52
+ size: 20
53
+ })
54
+ }) : servicesOptions?.names && servicesOptions?.names.map((service)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
55
+ value: service,
56
+ children: service
57
+ }, service))
58
+ })
59
+ });
60
+ }
@@ -0,0 +1,32 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ _export_star(require("./ProfileTypeSelector"), exports);
18
+ _export_star(require("./Service"), exports);
19
+ _export_star(require("./Filters"), exports);
20
+ function _export_star(from, to) {
21
+ Object.keys(from).forEach(function(k) {
22
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
23
+ Object.defineProperty(to, k, {
24
+ enumerable: true,
25
+ get: function() {
26
+ return from[k];
27
+ }
28
+ });
29
+ }
30
+ });
31
+ return from;
32
+ }
@@ -0,0 +1,14 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ /// <reference types="@rsbuild/core/types" />
14
+ "use strict";
@@ -0,0 +1,90 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "PyroscopeExplorer", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return PyroscopeExplorer;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ const _pluginsystem = require("@perses-dev/plugin-system");
26
+ const _dashboards = require("@perses-dev/dashboards");
27
+ const _explore = require("@perses-dev/explore");
28
+ const initialSpec = {
29
+ palette: 'package-name',
30
+ showSettings: true,
31
+ showSeries: true,
32
+ showTable: true,
33
+ showFlameGraph: true
34
+ };
35
+ function FlameGraphPanel({ queries }) {
36
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_dashboards.Panel, {
37
+ panelOptions: {
38
+ hideHeader: true
39
+ },
40
+ definition: {
41
+ kind: 'Panel',
42
+ spec: {
43
+ queries,
44
+ display: {
45
+ name: ''
46
+ },
47
+ plugin: {
48
+ kind: 'FlameChart',
49
+ spec: initialSpec
50
+ }
51
+ }
52
+ }
53
+ });
54
+ }
55
+ function PyroscopeExplorer() {
56
+ const { data: { queries = [] }, setData } = (0, _explore.useExplorerManagerContext)();
57
+ // map ProfileQueryDefinition to Definition<UnknownSpec>
58
+ const definitions = queries.length ? queries.map((query)=>{
59
+ return {
60
+ kind: query.spec.plugin.kind,
61
+ spec: query.spec.plugin.spec
62
+ };
63
+ }) : [];
64
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
65
+ gap: 2,
66
+ sx: {
67
+ width: '100%'
68
+ },
69
+ children: [
70
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.MultiQueryEditor, {
71
+ queryTypes: [
72
+ 'ProfileQuery'
73
+ ],
74
+ onChange: (newQueries)=>setData({
75
+ queries: newQueries
76
+ }),
77
+ queries: queries
78
+ }),
79
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DataQueriesProvider, {
80
+ definitions: definitions,
81
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
82
+ height: 980,
83
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(FlameGraphPanel, {
84
+ queries: queries
85
+ })
86
+ })
87
+ })
88
+ ]
89
+ });
90
+ }
@@ -0,0 +1,30 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ _export_star(require("./PyroscopeExplorer"), exports);
18
+ function _export_star(from, to) {
19
+ Object.keys(from).forEach(function(k) {
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
28
+ });
29
+ return from;
30
+ }
@@ -0,0 +1,39 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "getPluginModule", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return getPluginModule;
21
+ }
22
+ });
23
+ const _packagejson = /*#__PURE__*/ _interop_require_default(require("../package.json"));
24
+ function _interop_require_default(obj) {
25
+ return obj && obj.__esModule ? obj : {
26
+ default: obj
27
+ };
28
+ }
29
+ function getPluginModule() {
30
+ const { name, version, perses } = _packagejson.default;
31
+ return {
32
+ kind: 'PluginModule',
33
+ metadata: {
34
+ name,
35
+ version
36
+ },
37
+ spec: perses
38
+ };
39
+ }
@@ -0,0 +1,55 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ function _getRequireWildcardCache(nodeInterop) {
15
+ if (typeof WeakMap !== "function") return null;
16
+ var cacheBabelInterop = new WeakMap();
17
+ var cacheNodeInterop = new WeakMap();
18
+ return (_getRequireWildcardCache = function(nodeInterop) {
19
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
20
+ })(nodeInterop);
21
+ }
22
+ function _interop_require_wildcard(obj, nodeInterop) {
23
+ if (!nodeInterop && obj && obj.__esModule) {
24
+ return obj;
25
+ }
26
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
27
+ return {
28
+ default: obj
29
+ };
30
+ }
31
+ var cache = _getRequireWildcardCache(nodeInterop);
32
+ if (cache && cache.has(obj)) {
33
+ return cache.get(obj);
34
+ }
35
+ var newObj = {
36
+ __proto__: null
37
+ };
38
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
39
+ for(var key in obj){
40
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
41
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
42
+ if (desc && (desc.get || desc.set)) {
43
+ Object.defineProperty(newObj, key, desc);
44
+ } else {
45
+ newObj[key] = obj[key];
46
+ }
47
+ }
48
+ }
49
+ newObj.default = obj;
50
+ if (cache) {
51
+ cache.set(obj, newObj);
52
+ }
53
+ return newObj;
54
+ }
55
+ Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./bootstrap")));
@@ -0,0 +1,40 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "getPluginModule", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return _getPluginModule.getPluginModule;
21
+ }
22
+ });
23
+ _export_star(require("./components"), exports);
24
+ _export_star(require("./explore"), exports);
25
+ const _getPluginModule = require("./getPluginModule");
26
+ _export_star(require("./model"), exports);
27
+ _export_star(require("./plugins"), exports);
28
+ function _export_star(from, to) {
29
+ Object.keys(from).forEach(function(k) {
30
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
31
+ Object.defineProperty(to, k, {
32
+ enumerable: true,
33
+ get: function() {
34
+ return from[k];
35
+ }
36
+ });
37
+ }
38
+ });
39
+ return from;
40
+ }
@@ -0,0 +1,19 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ /**
14
+ * Request parameters of Pyroscope HTTP API endpoint GET /pyroscope/render
15
+ * https://grafana.com/docs/pyroscope/latest/reference-server-api/#querying-profile-data
16
+ */ "use strict";
17
+ Object.defineProperty(exports, "__esModule", {
18
+ value: true
19
+ });
@@ -0,0 +1,33 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ _export_star(require("./pyroscope-client"), exports);
18
+ _export_star(require("./pyroscope-selectors"), exports);
19
+ _export_star(require("./profile-query-model"), exports);
20
+ _export_star(require("./api-types"), exports);
21
+ function _export_star(from, to) {
22
+ Object.keys(from).forEach(function(k) {
23
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
24
+ Object.defineProperty(to, k, {
25
+ enumerable: true,
26
+ get: function() {
27
+ return from[k];
28
+ }
29
+ });
30
+ }
31
+ });
32
+ return from;
33
+ }
@@ -0,0 +1,16 @@
1
+ // Copyright 2025 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });