@grafana/k6-test-builder 0.8.18 → 0.8.21

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,21 @@ 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
+ calculating: boolean;
17
+ vuh_usage: number | null;
17
18
  vuh_breakdown: VUhBreakdown;
18
19
  }
19
- interface Metadata {
20
+ export interface TestBuilderMetadata {
20
21
  vuh: VuhStats;
21
22
  }
22
23
  type LoadZoneDistribution = 'even' | 'manual';
@@ -381,7 +382,7 @@ interface TestBuilderStandaloneProps {
381
382
  loading?: boolean;
382
383
  saving?: boolean;
383
384
  k6Test?: TestBuilderTest;
384
- metadata?: Metadata;
385
+ metadata?: TestBuilderMetadata;
385
386
  hasCloudExecution?: boolean;
386
387
  /** @deprecated To be replaced by adaptive VUhs */
387
388
  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",
@@ -15729,9 +15730,7 @@ const $4e99116d1d1b712a$var$Container = /*#__PURE__*/ (0, ($parcel$interopDefaul
15729
15730
 
15730
15731
 
15731
15732
 
15732
-
15733
15733
  const $420b9b2911eb0b31$export$692b9323eea6a0ee = ()=>{
15734
- var _vuh$vuh_usage;
15735
15734
  const vuh_usage_legacy = (0, $cdee3562a1fa264f$export$9b8881d67105457d)((0, $c5bb589de61e43ba$export$e6bea69880c59e62));
15736
15735
  const metadata = (0, $cdee3562a1fa264f$export$9b8881d67105457d)((0, $90b0cfd5919312e7$export$3c947cbaab82b2b8));
15737
15736
  const vuh = metadata === null || metadata === void 0 ? void 0 : metadata.vuh;
@@ -15744,19 +15743,22 @@ const $420b9b2911eb0b31$export$692b9323eea6a0ee = ()=>{
15744
15743
  "\xa0VUh"
15745
15744
  ]
15746
15745
  });
15746
+ const isCalculating = vuh === null || vuh === void 0 ? void 0 : vuh.calculating;
15747
+ const vuhUsage = vuh === null || vuh === void 0 ? void 0 : vuh.vuh_usage;
15747
15748
  return /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $gkIgo$materialuicore.Tooltip), {
15749
+ disableHoverListener: !vuhUsage,
15748
15750
  title: /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $4e99116d1d1b712a$export$f4f5234705b8ee7d), {
15749
15751
  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
15752
+ vuh_usage: vuhUsage
15751
15753
  }),
15752
15754
  interactive: true,
15753
15755
  children: /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)((0, $7091d48bbccc61e3$export$eb2fcfdbd7ba97d4), {
15754
15756
  children: [
15755
15757
  /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $723b70ee4d7f62e8$export$1ae172e61ce3735b), {}),
15756
15758
  /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)($420b9b2911eb0b31$var$VUhContainer, {
15757
- hasResult: !!(vuh !== null && vuh !== void 0 && vuh.vuh_usage),
15759
+ hasResult: !isCalculating && !!vuhUsage,
15758
15760
  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),
15761
+ (0, $4bac6ee95b8c8b72$export$24567f54a9be5ab9)(vuhUsage || 0),
15760
15762
  " VUh"
15761
15763
  ]
15762
15764
  })
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",
@@ -15705,9 +15706,7 @@ const $7c10312fad43a1ee$var$Container = /*#__PURE__*/ (0, $b7VBt$styledcomponent
15705
15706
 
15706
15707
 
15707
15708
 
15708
-
15709
15709
  const $d8f115728c3a4b86$export$692b9323eea6a0ee = ()=>{
15710
- var _vuh$vuh_usage;
15711
15710
  const vuh_usage_legacy = (0, $f33bf9327a1ab3ee$export$9b8881d67105457d)((0, $d7b1b7c6f96b1d0a$export$e6bea69880c59e62));
15712
15711
  const metadata = (0, $f33bf9327a1ab3ee$export$9b8881d67105457d)((0, $8497e93aef02a037$export$3c947cbaab82b2b8));
15713
15712
  const vuh = metadata === null || metadata === void 0 ? void 0 : metadata.vuh;
@@ -15720,19 +15719,22 @@ const $d8f115728c3a4b86$export$692b9323eea6a0ee = ()=>{
15720
15719
  "\xa0VUh"
15721
15720
  ]
15722
15721
  });
15722
+ const isCalculating = vuh === null || vuh === void 0 ? void 0 : vuh.calculating;
15723
+ const vuhUsage = vuh === null || vuh === void 0 ? void 0 : vuh.vuh_usage;
15723
15724
  return /*#__PURE__*/ (0, $b7VBt$jsx)((0, $b7VBt$Tooltip), {
15725
+ disableHoverListener: !vuhUsage,
15724
15726
  title: /*#__PURE__*/ (0, $b7VBt$jsx)((0, $7c10312fad43a1ee$export$f4f5234705b8ee7d), {
15725
15727
  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
15728
+ vuh_usage: vuhUsage
15727
15729
  }),
15728
15730
  interactive: true,
15729
15731
  children: /*#__PURE__*/ (0, $b7VBt$jsxs)((0, $9d9ef6b1aa606543$export$eb2fcfdbd7ba97d4), {
15730
15732
  children: [
15731
15733
  /*#__PURE__*/ (0, $b7VBt$jsx)((0, $f90e6ac18264291c$export$1ae172e61ce3735b), {}),
15732
15734
  /*#__PURE__*/ (0, $b7VBt$jsxs)($d8f115728c3a4b86$var$VUhContainer, {
15733
- hasResult: !!(vuh !== null && vuh !== void 0 && vuh.vuh_usage),
15735
+ hasResult: !isCalculating && !!vuhUsage,
15734
15736
  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),
15737
+ (0, $f54872b9dc7588c3$export$24567f54a9be5ab9)(vuhUsage || 0),
15736
15738
  " VUh"
15737
15739
  ]
15738
15740
  })
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.21",
4
4
  "license": "AGPL-3.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/module.js",