@grafana/k6-test-builder 0.8.17 → 0.8.18

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.js CHANGED
@@ -15693,12 +15693,12 @@ const $723b70ee4d7f62e8$export$1ae172e61ce3735b = /*#__PURE__*/ (0, $gkIgo$react
15693
15693
 
15694
15694
  const $4e99116d1d1b712a$var$VUH_THRESHOLD = 100;
15695
15695
  const $4e99116d1d1b712a$export$f4f5234705b8ee7d = ({ vuh_breakdown: vuh_breakdown, vuh_usage: vuh_usage = 0 })=>{
15696
- const { base_total_vuh: base_total_vuh = 0, reduction_rate: reduction_rate = 0 } = vuh_breakdown;
15696
+ const { base_total_vuh: base_total_vuh = 0, reduction_rate: reduction_rate = 0 } = vuh_breakdown !== null && vuh_breakdown !== void 0 ? vuh_breakdown : {};
15697
15697
  const original = (0, $4bac6ee95b8c8b72$export$24567f54a9be5ab9)(base_total_vuh);
15698
15698
  const reduced = (0, $4bac6ee95b8c8b72$export$24567f54a9be5ab9)(vuh_usage);
15699
15699
  const percentage = reduction_rate !== null && reduction_rate !== void 0 ? reduction_rate : 0;
15700
- const costText = $4e99116d1d1b712a$export$f1b66467ef7e1dfd(original);
15701
- const reductionText = $4e99116d1d1b712a$export$753b48ee12fd002c(reduced, percentage);
15700
+ const costText = $4e99116d1d1b712a$export$f1b66467ef7e1dfd(reduced);
15701
+ const reductionText = $4e99116d1d1b712a$export$753b48ee12fd002c(original, percentage);
15702
15702
  return /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)($4e99116d1d1b712a$var$Container, {
15703
15703
  children: [
15704
15704
  /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)("span", {
@@ -15718,7 +15718,7 @@ const $4e99116d1d1b712a$export$f1b66467ef7e1dfd = (value)=>{
15718
15718
  return `Your test is estimated to consume ${value} Virtual User Hours (VUh)`;
15719
15719
  };
15720
15720
  const $4e99116d1d1b712a$export$753b48ee12fd002c = (value = 0, percentage = 0)=>{
15721
- return percentage > 0 ? `, but you will only be charged for ${value} VUh. Tests consuming more than ${$4e99116d1d1b712a$var$VUH_THRESHOLD} VUh receive volume reductions based on test size.` : `. Tests consuming less than ${$4e99116d1d1b712a$var$VUH_THRESHOLD} Vuh are not eligible for volume reductions.`;
15721
+ return percentage > 0 ? `, after a volume reduction from the original ${value} VUh. Tests consuming more than ${$4e99116d1d1b712a$var$VUH_THRESHOLD} VUh receive volume reductions based on test size.` : `. Tests consuming less than ${$4e99116d1d1b712a$var$VUH_THRESHOLD} Vuh are not eligible for volume reductions.`;
15722
15722
  };
15723
15723
  const $4e99116d1d1b712a$var$Container = /*#__PURE__*/ (0, ($parcel$interopDefault($gkIgo$styledcomponents))).div.withConfig({
15724
15724
  displayName: "VUhTooltipContent__Container",
@@ -15729,7 +15729,9 @@ const $4e99116d1d1b712a$var$Container = /*#__PURE__*/ (0, ($parcel$interopDefaul
15729
15729
 
15730
15730
 
15731
15731
 
15732
+
15732
15733
  const $420b9b2911eb0b31$export$692b9323eea6a0ee = ()=>{
15734
+ var _vuh$vuh_usage;
15733
15735
  const vuh_usage_legacy = (0, $cdee3562a1fa264f$export$9b8881d67105457d)((0, $c5bb589de61e43ba$export$e6bea69880c59e62));
15734
15736
  const metadata = (0, $cdee3562a1fa264f$export$9b8881d67105457d)((0, $90b0cfd5919312e7$export$3c947cbaab82b2b8));
15735
15737
  const vuh = metadata === null || metadata === void 0 ? void 0 : metadata.vuh;
@@ -15742,23 +15744,33 @@ const $420b9b2911eb0b31$export$692b9323eea6a0ee = ()=>{
15742
15744
  "\xa0VUh"
15743
15745
  ]
15744
15746
  });
15745
- if (!(vuh !== null && vuh !== void 0 && vuh.vuh_usage)) return null;
15746
15747
  return /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $gkIgo$materialuicore.Tooltip), {
15747
15748
  title: /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $4e99116d1d1b712a$export$f4f5234705b8ee7d), {
15748
- ...vuh
15749
+ 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
15749
15751
  }),
15750
15752
  interactive: true,
15751
15753
  children: /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)((0, $7091d48bbccc61e3$export$eb2fcfdbd7ba97d4), {
15752
15754
  children: [
15753
15755
  /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $723b70ee4d7f62e8$export$1ae172e61ce3735b), {}),
15754
- /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)("span", {
15755
- children: (0, $4bac6ee95b8c8b72$export$24567f54a9be5ab9)(vuh.vuh_usage)
15756
- }),
15757
- "\xa0VUh"
15756
+ /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)($420b9b2911eb0b31$var$VUhContainer, {
15757
+ hasResult: !!(vuh !== null && vuh !== void 0 && vuh.vuh_usage),
15758
+ 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),
15760
+ " VUh"
15761
+ ]
15762
+ })
15758
15763
  ]
15759
15764
  })
15760
15765
  });
15761
15766
  };
15767
+ const $420b9b2911eb0b31$var$VUhContainer = /*#__PURE__*/ (0, ($parcel$interopDefault($gkIgo$styledcomponents))).span.withConfig({
15768
+ displayName: "VUhDetail__VUhContainer",
15769
+ componentId: "sc-zegr8m-0"
15770
+ })([
15771
+ "opacity:",
15772
+ ";"
15773
+ ], ({ hasResult: hasResult })=>hasResult ? 1 : 0.5);
15762
15774
 
15763
15775
 
15764
15776
 
package/dist/module.js CHANGED
@@ -15669,12 +15669,12 @@ const $f90e6ac18264291c$export$1ae172e61ce3735b = /*#__PURE__*/ (0, $b7VBt$forwa
15669
15669
 
15670
15670
  const $7c10312fad43a1ee$var$VUH_THRESHOLD = 100;
15671
15671
  const $7c10312fad43a1ee$export$f4f5234705b8ee7d = ({ vuh_breakdown: vuh_breakdown, vuh_usage: vuh_usage = 0 })=>{
15672
- const { base_total_vuh: base_total_vuh = 0, reduction_rate: reduction_rate = 0 } = vuh_breakdown;
15672
+ const { base_total_vuh: base_total_vuh = 0, reduction_rate: reduction_rate = 0 } = vuh_breakdown !== null && vuh_breakdown !== void 0 ? vuh_breakdown : {};
15673
15673
  const original = (0, $f54872b9dc7588c3$export$24567f54a9be5ab9)(base_total_vuh);
15674
15674
  const reduced = (0, $f54872b9dc7588c3$export$24567f54a9be5ab9)(vuh_usage);
15675
15675
  const percentage = reduction_rate !== null && reduction_rate !== void 0 ? reduction_rate : 0;
15676
- const costText = $7c10312fad43a1ee$export$f1b66467ef7e1dfd(original);
15677
- const reductionText = $7c10312fad43a1ee$export$753b48ee12fd002c(reduced, percentage);
15676
+ const costText = $7c10312fad43a1ee$export$f1b66467ef7e1dfd(reduced);
15677
+ const reductionText = $7c10312fad43a1ee$export$753b48ee12fd002c(original, percentage);
15678
15678
  return /*#__PURE__*/ (0, $b7VBt$jsxs)($7c10312fad43a1ee$var$Container, {
15679
15679
  children: [
15680
15680
  /*#__PURE__*/ (0, $b7VBt$jsxs)("span", {
@@ -15694,7 +15694,7 @@ const $7c10312fad43a1ee$export$f1b66467ef7e1dfd = (value)=>{
15694
15694
  return `Your test is estimated to consume ${value} Virtual User Hours (VUh)`;
15695
15695
  };
15696
15696
  const $7c10312fad43a1ee$export$753b48ee12fd002c = (value = 0, percentage = 0)=>{
15697
- return percentage > 0 ? `, but you will only be charged for ${value} VUh. Tests consuming more than ${$7c10312fad43a1ee$var$VUH_THRESHOLD} VUh receive volume reductions based on test size.` : `. Tests consuming less than ${$7c10312fad43a1ee$var$VUH_THRESHOLD} Vuh are not eligible for volume reductions.`;
15697
+ return percentage > 0 ? `, after a volume reduction from the original ${value} VUh. Tests consuming more than ${$7c10312fad43a1ee$var$VUH_THRESHOLD} VUh receive volume reductions based on test size.` : `. Tests consuming less than ${$7c10312fad43a1ee$var$VUH_THRESHOLD} Vuh are not eligible for volume reductions.`;
15698
15698
  };
15699
15699
  const $7c10312fad43a1ee$var$Container = /*#__PURE__*/ (0, $b7VBt$styledcomponents).div.withConfig({
15700
15700
  displayName: "VUhTooltipContent__Container",
@@ -15705,7 +15705,9 @@ const $7c10312fad43a1ee$var$Container = /*#__PURE__*/ (0, $b7VBt$styledcomponent
15705
15705
 
15706
15706
 
15707
15707
 
15708
+
15708
15709
  const $d8f115728c3a4b86$export$692b9323eea6a0ee = ()=>{
15710
+ var _vuh$vuh_usage;
15709
15711
  const vuh_usage_legacy = (0, $f33bf9327a1ab3ee$export$9b8881d67105457d)((0, $d7b1b7c6f96b1d0a$export$e6bea69880c59e62));
15710
15712
  const metadata = (0, $f33bf9327a1ab3ee$export$9b8881d67105457d)((0, $8497e93aef02a037$export$3c947cbaab82b2b8));
15711
15713
  const vuh = metadata === null || metadata === void 0 ? void 0 : metadata.vuh;
@@ -15718,23 +15720,33 @@ const $d8f115728c3a4b86$export$692b9323eea6a0ee = ()=>{
15718
15720
  "\xa0VUh"
15719
15721
  ]
15720
15722
  });
15721
- if (!(vuh !== null && vuh !== void 0 && vuh.vuh_usage)) return null;
15722
15723
  return /*#__PURE__*/ (0, $b7VBt$jsx)((0, $b7VBt$Tooltip), {
15723
15724
  title: /*#__PURE__*/ (0, $b7VBt$jsx)((0, $7c10312fad43a1ee$export$f4f5234705b8ee7d), {
15724
- ...vuh
15725
+ 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
15725
15727
  }),
15726
15728
  interactive: true,
15727
15729
  children: /*#__PURE__*/ (0, $b7VBt$jsxs)((0, $9d9ef6b1aa606543$export$eb2fcfdbd7ba97d4), {
15728
15730
  children: [
15729
15731
  /*#__PURE__*/ (0, $b7VBt$jsx)((0, $f90e6ac18264291c$export$1ae172e61ce3735b), {}),
15730
- /*#__PURE__*/ (0, $b7VBt$jsx)("span", {
15731
- children: (0, $f54872b9dc7588c3$export$24567f54a9be5ab9)(vuh.vuh_usage)
15732
- }),
15733
- "\xa0VUh"
15732
+ /*#__PURE__*/ (0, $b7VBt$jsxs)($d8f115728c3a4b86$var$VUhContainer, {
15733
+ hasResult: !!(vuh !== null && vuh !== void 0 && vuh.vuh_usage),
15734
+ 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),
15736
+ " VUh"
15737
+ ]
15738
+ })
15734
15739
  ]
15735
15740
  })
15736
15741
  });
15737
15742
  };
15743
+ const $d8f115728c3a4b86$var$VUhContainer = /*#__PURE__*/ (0, $b7VBt$styledcomponents).span.withConfig({
15744
+ displayName: "VUhDetail__VUhContainer",
15745
+ componentId: "sc-zegr8m-0"
15746
+ })([
15747
+ "opacity:",
15748
+ ";"
15749
+ ], ({ hasResult: hasResult })=>hasResult ? 1 : 0.5);
15738
15750
 
15739
15751
 
15740
15752
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/k6-test-builder",
3
- "version": "0.8.17",
3
+ "version": "0.8.18",
4
4
  "license": "AGPL-3.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/module.js",