@grafana/k6-test-builder 0.8.13 → 0.8.15
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 +57 -37
- package/dist/index.js +419 -312
- package/dist/module.js +419 -312
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,21 +2,22 @@ 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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
interface VUhBreakdown {
|
|
6
|
+
base_total_vuh: number;
|
|
7
|
+
protocol_vuh: number;
|
|
8
|
+
browser_vuh: number;
|
|
9
|
+
reduction_rate: number | null;
|
|
10
|
+
reduction_rate_breakdown: {
|
|
11
|
+
volume: number;
|
|
12
|
+
local_run: number;
|
|
13
|
+
} | null;
|
|
14
|
+
}
|
|
15
|
+
interface VuhStats {
|
|
16
|
+
vuh_usage: number | undefined;
|
|
17
|
+
vuh_breakdown: VUhBreakdown;
|
|
18
|
+
}
|
|
19
|
+
interface Metadata {
|
|
20
|
+
vuh: VuhStats;
|
|
20
21
|
}
|
|
21
22
|
type LoadZoneDistribution = 'even' | 'manual';
|
|
22
23
|
export interface RampingStage {
|
|
@@ -158,26 +159,6 @@ interface ScriptScenarioConfig<T = ScenarioOptions> extends ConfigObject<T> {
|
|
|
158
159
|
imports: string[];
|
|
159
160
|
body: string;
|
|
160
161
|
}
|
|
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
162
|
interface APM extends PrometheusConfig, AzureMonitorConfig, DatadogConfig {
|
|
182
163
|
provider: ProviderType;
|
|
183
164
|
metrics: Array<string>;
|
|
@@ -288,6 +269,44 @@ interface Archive {
|
|
|
288
269
|
log: ArchiveLog;
|
|
289
270
|
optionsPlaceholder?: boolean;
|
|
290
271
|
}
|
|
272
|
+
declare const TestBuilderIcon: () => JSX.Element;
|
|
273
|
+
/** @todo move this type */
|
|
274
|
+
interface K6LoadZone {
|
|
275
|
+
available: boolean;
|
|
276
|
+
id: number;
|
|
277
|
+
name: string;
|
|
278
|
+
vendor: string;
|
|
279
|
+
country: string | null;
|
|
280
|
+
city: string | null;
|
|
281
|
+
aggregate_region: boolean;
|
|
282
|
+
latitude: number;
|
|
283
|
+
longitude: number;
|
|
284
|
+
configurable: boolean;
|
|
285
|
+
is_k6_only: boolean;
|
|
286
|
+
k6_load_zone_id: string;
|
|
287
|
+
public: boolean;
|
|
288
|
+
}
|
|
289
|
+
export const DOCS_ARTICLE_LINKS: {
|
|
290
|
+
thresholds: string;
|
|
291
|
+
'request-builder': string;
|
|
292
|
+
'cloud-logs': string;
|
|
293
|
+
'cloud-apm': string;
|
|
294
|
+
'cloud-apm-azure-monitor': string;
|
|
295
|
+
'cloud-apm-datadog': string;
|
|
296
|
+
'cloud-apm-grafana-cloud': string;
|
|
297
|
+
'cloud-apm-new-relic': string;
|
|
298
|
+
'results-visualization/cloud': string;
|
|
299
|
+
'cloud-tests-from-cli.load-zones': string;
|
|
300
|
+
vuhs: string;
|
|
301
|
+
};
|
|
302
|
+
type DocsArticleLink = keyof typeof DOCS_ARTICLE_LINKS;
|
|
303
|
+
interface ImportItemChoice {
|
|
304
|
+
label: string;
|
|
305
|
+
value: string;
|
|
306
|
+
package: string;
|
|
307
|
+
}
|
|
308
|
+
export const IMPORT_ITEMS: ImportItemChoice[];
|
|
309
|
+
export type TestBuilderStatus = 'success' | 'error' | 'loading' | 'saving' | 'unsaved' | 'warning';
|
|
291
310
|
export function convertDurationToSeconds(duration?: string): number;
|
|
292
311
|
export function isDurationValid(duration: string): boolean;
|
|
293
312
|
export function isStageTargetValid(target: any): boolean;
|
|
@@ -326,7 +345,6 @@ interface DocsLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'h
|
|
|
326
345
|
article: DocsArticleLink;
|
|
327
346
|
children: ReactNode;
|
|
328
347
|
}
|
|
329
|
-
declare const TestBuilderIcon: () => JSX.Element;
|
|
330
348
|
interface StagesVirtualizationComponentProps {
|
|
331
349
|
startValue?: number;
|
|
332
350
|
stages: RampingStage[];
|
|
@@ -363,7 +381,9 @@ interface TestBuilderStandaloneProps {
|
|
|
363
381
|
loading?: boolean;
|
|
364
382
|
saving?: boolean;
|
|
365
383
|
k6Test?: TestBuilderTest;
|
|
384
|
+
metadata?: Metadata;
|
|
366
385
|
hasCloudExecution?: boolean;
|
|
386
|
+
/** @deprecated To be replaced by adaptive VUhs */
|
|
367
387
|
hasFractionalVUhResolution?: boolean;
|
|
368
388
|
availableLoadZones?: LoadZoneDataItem[];
|
|
369
389
|
DocsLinkComponent?: ElementType<DocsLinkProps>;
|
|
@@ -378,7 +398,7 @@ interface TestBuilderStandaloneProps {
|
|
|
378
398
|
openImportModal?: BaseBuilderContextValue['openImportModal'];
|
|
379
399
|
startRecorder?: BaseBuilderContextValue['startRecorder'];
|
|
380
400
|
}
|
|
381
|
-
export function TestBuilder({ loading, saving, k6Test, hasCloudExecution, hasFractionalVUhResolution, availableLoadZones, DocsLinkComponent, onViewChange, StagesVirtualizationComponent, ScriptEditorComponent, TestBuilderIconComponent, readonlyScriptScenarios, apmConfigs, hasCloudAPM, disableAPM, openImportModal, startRecorder, }: TestBuilderStandaloneProps): JSX.Element;
|
|
401
|
+
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
402
|
interface Label {
|
|
383
403
|
name: string;
|
|
384
404
|
value: string;
|