@grafana/k6-test-builder 0.8.18 → 0.8.20

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/dist/index.d.ts CHANGED
@@ -3,20 +3,20 @@ import { InvalidArchiveError } from "har-to-k6";
3
3
  import { ThemeOptions } from "@material-ui/core/styles/createTheme";
4
4
  import { GrafanaTheme2 } from "@grafana/data";
5
5
  interface VUhBreakdown {
6
- base_total_vuh: number;
7
- protocol_vuh: number;
8
- browser_vuh: number;
6
+ base_total_vuh: number | null;
7
+ protocol_vuh: number | null;
8
+ browser_vuh: number | null;
9
9
  reduction_rate: number | null;
10
10
  reduction_rate_breakdown: {
11
- volume: number;
12
- local_run: number;
11
+ volume: number | null;
12
+ local_run: number | null;
13
13
  } | null;
14
14
  }
15
15
  interface VuhStats {
16
- vuh_usage: number | undefined;
16
+ vuh_usage: number | null;
17
17
  vuh_breakdown: VUhBreakdown;
18
18
  }
19
- interface Metadata {
19
+ export interface TestBuilderMetadata {
20
20
  vuh: VuhStats;
21
21
  }
22
22
  type LoadZoneDistribution = 'even' | 'manual';
@@ -381,7 +381,7 @@ interface TestBuilderStandaloneProps {
381
381
  loading?: boolean;
382
382
  saving?: boolean;
383
383
  k6Test?: TestBuilderTest;
384
- metadata?: Metadata;
384
+ metadata?: TestBuilderMetadata;
385
385
  hasCloudExecution?: boolean;
386
386
  /** @deprecated To be replaced by adaptive VUhs */
387
387
  hasFractionalVUhResolution?: boolean;
package/dist/index.js CHANGED
@@ -15672,6 +15672,7 @@ const $7091d48bbccc61e3$export$42a852a2b6b56249 = /*#__PURE__*/ (0, ($parcel$int
15672
15672
 
15673
15673
 
15674
15674
 
15675
+
15675
15676
  const $723b70ee4d7f62e8$export$1ae172e61ce3735b = /*#__PURE__*/ (0, $gkIgo$react.forwardRef)(({ props: props }, ref)=>/*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)("svg", {
15676
15677
  ref: ref,
15677
15678
  xmlns: "http://www.w3.org/2000/svg",
@@ -15730,11 +15731,23 @@ const $4e99116d1d1b712a$var$Container = /*#__PURE__*/ (0, ($parcel$interopDefaul
15730
15731
 
15731
15732
 
15732
15733
 
15734
+ const $6a5cd5d240c5dbb0$export$5cae361ad82dce8b = (value)=>{
15735
+ const ref = (0, $gkIgo$react.useRef)();
15736
+ (0, $gkIgo$react.useEffect)(()=>{
15737
+ ref.current = value;
15738
+ }, [
15739
+ value
15740
+ ]);
15741
+ return ref.current;
15742
+ };
15743
+
15744
+
15733
15745
  const $420b9b2911eb0b31$export$692b9323eea6a0ee = ()=>{
15734
- var _vuh$vuh_usage;
15735
15746
  const vuh_usage_legacy = (0, $cdee3562a1fa264f$export$9b8881d67105457d)((0, $c5bb589de61e43ba$export$e6bea69880c59e62));
15736
15747
  const metadata = (0, $cdee3562a1fa264f$export$9b8881d67105457d)((0, $90b0cfd5919312e7$export$3c947cbaab82b2b8));
15737
15748
  const vuh = metadata === null || metadata === void 0 ? void 0 : metadata.vuh;
15749
+ const vuhUsage = vuh === null || vuh === void 0 ? void 0 : vuh.vuh_usage;
15750
+ const prevVUhUsage = (0, $6a5cd5d240c5dbb0$export$5cae361ad82dce8b)(vuhUsage);
15738
15751
  if (vuh_usage_legacy && !vuh) return /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)((0, $7091d48bbccc61e3$export$eb2fcfdbd7ba97d4), {
15739
15752
  children: [
15740
15753
  /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $723b70ee4d7f62e8$export$1ae172e61ce3735b), {}),
@@ -15745,18 +15758,19 @@ const $420b9b2911eb0b31$export$692b9323eea6a0ee = ()=>{
15745
15758
  ]
15746
15759
  });
15747
15760
  return /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $gkIgo$materialuicore.Tooltip), {
15761
+ disableHoverListener: !vuhUsage,
15748
15762
  title: /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $4e99116d1d1b712a$export$f4f5234705b8ee7d), {
15749
15763
  vuh_breakdown: vuh === null || vuh === void 0 ? void 0 : vuh.vuh_breakdown,
15750
- vuh_usage: vuh === null || vuh === void 0 ? void 0 : vuh.vuh_usage
15764
+ vuh_usage: vuhUsage
15751
15765
  }),
15752
15766
  interactive: true,
15753
15767
  children: /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)((0, $7091d48bbccc61e3$export$eb2fcfdbd7ba97d4), {
15754
15768
  children: [
15755
15769
  /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $723b70ee4d7f62e8$export$1ae172e61ce3735b), {}),
15756
15770
  /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)($420b9b2911eb0b31$var$VUhContainer, {
15757
- hasResult: !!(vuh !== null && vuh !== void 0 && vuh.vuh_usage),
15771
+ hasResult: !!vuhUsage,
15758
15772
  children: [
15759
- (0, $4bac6ee95b8c8b72$export$24567f54a9be5ab9)((_vuh$vuh_usage = vuh === null || vuh === void 0 ? void 0 : vuh.vuh_usage) !== null && _vuh$vuh_usage !== void 0 ? _vuh$vuh_usage : 0),
15773
+ (0, $4bac6ee95b8c8b72$export$24567f54a9be5ab9)(vuhUsage || prevVUhUsage || 0),
15760
15774
  " VUh"
15761
15775
  ]
15762
15776
  })
package/dist/module.js CHANGED
@@ -15648,6 +15648,7 @@ const $9d9ef6b1aa606543$export$42a852a2b6b56249 = /*#__PURE__*/ (0, $b7VBt$style
15648
15648
 
15649
15649
 
15650
15650
 
15651
+
15651
15652
  const $f90e6ac18264291c$export$1ae172e61ce3735b = /*#__PURE__*/ (0, $b7VBt$forwardRef)(({ props: props }, ref)=>/*#__PURE__*/ (0, $b7VBt$jsx)("svg", {
15652
15653
  ref: ref,
15653
15654
  xmlns: "http://www.w3.org/2000/svg",
@@ -15706,11 +15707,23 @@ const $7c10312fad43a1ee$var$Container = /*#__PURE__*/ (0, $b7VBt$styledcomponent
15706
15707
 
15707
15708
 
15708
15709
 
15710
+ const $ccb3ba0354cddffc$export$5cae361ad82dce8b = (value)=>{
15711
+ const ref = (0, $b7VBt$useRef)();
15712
+ (0, $b7VBt$useEffect)(()=>{
15713
+ ref.current = value;
15714
+ }, [
15715
+ value
15716
+ ]);
15717
+ return ref.current;
15718
+ };
15719
+
15720
+
15709
15721
  const $d8f115728c3a4b86$export$692b9323eea6a0ee = ()=>{
15710
- var _vuh$vuh_usage;
15711
15722
  const vuh_usage_legacy = (0, $f33bf9327a1ab3ee$export$9b8881d67105457d)((0, $d7b1b7c6f96b1d0a$export$e6bea69880c59e62));
15712
15723
  const metadata = (0, $f33bf9327a1ab3ee$export$9b8881d67105457d)((0, $8497e93aef02a037$export$3c947cbaab82b2b8));
15713
15724
  const vuh = metadata === null || metadata === void 0 ? void 0 : metadata.vuh;
15725
+ const vuhUsage = vuh === null || vuh === void 0 ? void 0 : vuh.vuh_usage;
15726
+ const prevVUhUsage = (0, $ccb3ba0354cddffc$export$5cae361ad82dce8b)(vuhUsage);
15714
15727
  if (vuh_usage_legacy && !vuh) return /*#__PURE__*/ (0, $b7VBt$jsxs)((0, $9d9ef6b1aa606543$export$eb2fcfdbd7ba97d4), {
15715
15728
  children: [
15716
15729
  /*#__PURE__*/ (0, $b7VBt$jsx)((0, $f90e6ac18264291c$export$1ae172e61ce3735b), {}),
@@ -15721,18 +15734,19 @@ const $d8f115728c3a4b86$export$692b9323eea6a0ee = ()=>{
15721
15734
  ]
15722
15735
  });
15723
15736
  return /*#__PURE__*/ (0, $b7VBt$jsx)((0, $b7VBt$Tooltip), {
15737
+ disableHoverListener: !vuhUsage,
15724
15738
  title: /*#__PURE__*/ (0, $b7VBt$jsx)((0, $7c10312fad43a1ee$export$f4f5234705b8ee7d), {
15725
15739
  vuh_breakdown: vuh === null || vuh === void 0 ? void 0 : vuh.vuh_breakdown,
15726
- vuh_usage: vuh === null || vuh === void 0 ? void 0 : vuh.vuh_usage
15740
+ vuh_usage: vuhUsage
15727
15741
  }),
15728
15742
  interactive: true,
15729
15743
  children: /*#__PURE__*/ (0, $b7VBt$jsxs)((0, $9d9ef6b1aa606543$export$eb2fcfdbd7ba97d4), {
15730
15744
  children: [
15731
15745
  /*#__PURE__*/ (0, $b7VBt$jsx)((0, $f90e6ac18264291c$export$1ae172e61ce3735b), {}),
15732
15746
  /*#__PURE__*/ (0, $b7VBt$jsxs)($d8f115728c3a4b86$var$VUhContainer, {
15733
- hasResult: !!(vuh !== null && vuh !== void 0 && vuh.vuh_usage),
15747
+ hasResult: !!vuhUsage,
15734
15748
  children: [
15735
- (0, $f54872b9dc7588c3$export$24567f54a9be5ab9)((_vuh$vuh_usage = vuh === null || vuh === void 0 ? void 0 : vuh.vuh_usage) !== null && _vuh$vuh_usage !== void 0 ? _vuh$vuh_usage : 0),
15749
+ (0, $f54872b9dc7588c3$export$24567f54a9be5ab9)(vuhUsage || prevVUhUsage || 0),
15736
15750
  " VUh"
15737
15751
  ]
15738
15752
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/k6-test-builder",
3
- "version": "0.8.18",
3
+ "version": "0.8.20",
4
4
  "license": "AGPL-3.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/module.js",