@grafana/k6-test-builder 0.8.12 → 0.8.14

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
@@ -2,21 +2,12 @@ import { FocusEventHandler, AnchorHTMLAttributes, ReactNode, ElementType, ReactE
2
2
  import { InvalidArchiveError } from "har-to-k6";
3
3
  import { ThemeOptions } from "@material-ui/core/styles/createTheme";
4
4
  import { GrafanaTheme2 } from "@grafana/data";
5
- /** @todo move this type */
6
- interface K6LoadZone {
7
- available: boolean;
8
- id: number;
9
- name: string;
10
- vendor: string;
11
- country: string | null;
12
- city: string | null;
13
- aggregate_region: boolean;
14
- latitude: number;
15
- longitude: number;
16
- configurable: boolean;
17
- is_k6_only: boolean;
18
- k6_load_zone_id: string;
19
- public: boolean;
5
+ interface VuhStats {
6
+ vuh_usage: number | undefined;
7
+ vuh_reduction_rate: number | undefined;
8
+ }
9
+ interface Metadata {
10
+ vuh: VuhStats;
20
11
  }
21
12
  type LoadZoneDistribution = 'even' | 'manual';
22
13
  export interface RampingStage {
@@ -158,26 +149,6 @@ interface ScriptScenarioConfig<T = ScenarioOptions> extends ConfigObject<T> {
158
149
  imports: string[];
159
150
  body: string;
160
151
  }
161
- export const DOCS_ARTICLE_LINKS: {
162
- thresholds: string;
163
- 'request-builder': string;
164
- 'cloud-logs': string;
165
- 'cloud-apm': string;
166
- 'cloud-apm-azure-monitor': string;
167
- 'cloud-apm-datadog': string;
168
- 'cloud-apm-grafana-cloud': string;
169
- 'cloud-apm-new-relic': string;
170
- 'results-visualization/cloud': string;
171
- 'cloud-tests-from-cli.load-zones': string;
172
- };
173
- type DocsArticleLink = keyof typeof DOCS_ARTICLE_LINKS;
174
- interface ImportItemChoice {
175
- label: string;
176
- value: string;
177
- package: string;
178
- }
179
- export const IMPORT_ITEMS: ImportItemChoice[];
180
- export type TestBuilderStatus = 'success' | 'error' | 'loading' | 'saving' | 'unsaved' | 'warning';
181
152
  interface APM extends PrometheusConfig, AzureMonitorConfig, DatadogConfig {
182
153
  provider: ProviderType;
183
154
  metrics: Array<string>;
@@ -288,6 +259,44 @@ interface Archive {
288
259
  log: ArchiveLog;
289
260
  optionsPlaceholder?: boolean;
290
261
  }
262
+ declare const TestBuilderIcon: () => JSX.Element;
263
+ /** @todo move this type */
264
+ interface K6LoadZone {
265
+ available: boolean;
266
+ id: number;
267
+ name: string;
268
+ vendor: string;
269
+ country: string | null;
270
+ city: string | null;
271
+ aggregate_region: boolean;
272
+ latitude: number;
273
+ longitude: number;
274
+ configurable: boolean;
275
+ is_k6_only: boolean;
276
+ k6_load_zone_id: string;
277
+ public: boolean;
278
+ }
279
+ export const DOCS_ARTICLE_LINKS: {
280
+ thresholds: string;
281
+ 'request-builder': string;
282
+ 'cloud-logs': string;
283
+ 'cloud-apm': string;
284
+ 'cloud-apm-azure-monitor': string;
285
+ 'cloud-apm-datadog': string;
286
+ 'cloud-apm-grafana-cloud': string;
287
+ 'cloud-apm-new-relic': string;
288
+ 'results-visualization/cloud': string;
289
+ 'cloud-tests-from-cli.load-zones': string;
290
+ vuhs: string;
291
+ };
292
+ type DocsArticleLink = keyof typeof DOCS_ARTICLE_LINKS;
293
+ interface ImportItemChoice {
294
+ label: string;
295
+ value: string;
296
+ package: string;
297
+ }
298
+ export const IMPORT_ITEMS: ImportItemChoice[];
299
+ export type TestBuilderStatus = 'success' | 'error' | 'loading' | 'saving' | 'unsaved' | 'warning';
291
300
  export function convertDurationToSeconds(duration?: string): number;
292
301
  export function isDurationValid(duration: string): boolean;
293
302
  export function isStageTargetValid(target: any): boolean;
@@ -326,7 +335,6 @@ interface DocsLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'h
326
335
  article: DocsArticleLink;
327
336
  children: ReactNode;
328
337
  }
329
- declare const TestBuilderIcon: () => JSX.Element;
330
338
  interface StagesVirtualizationComponentProps {
331
339
  startValue?: number;
332
340
  stages: RampingStage[];
@@ -363,7 +371,9 @@ interface TestBuilderStandaloneProps {
363
371
  loading?: boolean;
364
372
  saving?: boolean;
365
373
  k6Test?: TestBuilderTest;
374
+ metadata?: Metadata;
366
375
  hasCloudExecution?: boolean;
376
+ /** @deprecated To be replaced by adaptive VUhs */
367
377
  hasFractionalVUhResolution?: boolean;
368
378
  availableLoadZones?: LoadZoneDataItem[];
369
379
  DocsLinkComponent?: ElementType<DocsLinkProps>;
@@ -378,7 +388,7 @@ interface TestBuilderStandaloneProps {
378
388
  openImportModal?: BaseBuilderContextValue['openImportModal'];
379
389
  startRecorder?: BaseBuilderContextValue['startRecorder'];
380
390
  }
381
- export function TestBuilder({ loading, saving, k6Test, hasCloudExecution, hasFractionalVUhResolution, availableLoadZones, DocsLinkComponent, onViewChange, StagesVirtualizationComponent, ScriptEditorComponent, TestBuilderIconComponent, readonlyScriptScenarios, apmConfigs, hasCloudAPM, disableAPM, openImportModal, startRecorder, }: TestBuilderStandaloneProps): JSX.Element;
391
+ export function TestBuilder({ loading, saving, k6Test, metadata, hasCloudExecution, hasFractionalVUhResolution, availableLoadZones, DocsLinkComponent, onViewChange, StagesVirtualizationComponent, ScriptEditorComponent, TestBuilderIconComponent, readonlyScriptScenarios, apmConfigs, hasCloudAPM, disableAPM, openImportModal, startRecorder, }: TestBuilderStandaloneProps): JSX.Element;
382
392
  interface Label {
383
393
  name: string;
384
394
  value: string;