Skip to content

Commit 59c76e2

Browse files
Grafana docs: fix links (#1406)
* Add missing CookieJar page, fix links * Add cookiejar fixes to v0.47 * Replace blockquotes with admonition shortcode * Replace blockquotes with admonition for v0.47 * Fix slugs * Fix frontmatter properties in aws pages Add missing slugs, remove excerpt * Fix slug for response-submitform method * Fix broken links * Fix more broken links * Add fixes to v0.47
1 parent 457e755 commit 59c76e2

File tree

412 files changed

+950
-892
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

412 files changed

+950
-892
lines changed

docs/sources/next/examples/cookies-example.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ export default function () {
190190

191191
**Relevant k6 APIs**:
192192

193-
- [http.cookieJar()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/cookiejar)
193+
- [http.cookieJar()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/cookiejar-method)
194194
- [http.CookieJar](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/cookiejar)
195195

196-
- [set(url, name, value, [options])](/javascript-api/k6-http/cookiejar/cookiejar-set)
196+
- [set(url, name, value, [options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/cookiejar/cookiejar-set)
197197
- [delete(url, name)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/cookiejar/cookiejar-delete)
198198
- [clear(url)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/cookiejar/cookiejar-clear)

docs/sources/next/examples/correlation-and-dynamic-data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ export default function () {
6767
### Extracting values/tokens from form fields
6868

6969
You can choose from two different approaches when deciding how to handle form submissions.
70-
Either you use the higher-level [Response.submitForm([params])](/javascript-api/k6-http/response/response-submitform) API
70+
Either you use the higher-level [Response.submitForm([params])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/response/response-submitform) API
7171
or you extract necessary hidden fields etc. and build a request yourself and then send it using the
72-
appropriate `http.*` family of APIs, like [http.post(url, [body], [params])](/javascript-api/k6-http/post).
72+
appropriate `http.*` family of APIs, like [http.post(url, [body], [params])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/post).
7373

7474
#### Extracting .NET ViewStates, CSRF tokens and other hidden input fields
7575

docs/sources/next/examples/data-parameterization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This will, in turn, make your test more realistic.
2323
## Performance implications of `SharedArray`
2424

2525
Each VU in k6 is a separate JS VM. To prevent multiple copies of the whole data file,
26-
[SharedArray](/javascript-api/k6-data/sharedarray) was added. It does have some CPU overhead in accessing elements compared to a normal non shared
26+
[SharedArray](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-data/sharedarray) was added. It does have some CPU overhead in accessing elements compared to a normal non shared
2727
array, but the difference is negligible compared to the time it takes to make requests. This becomes
2828
even less of an issue compared to not using it with large files, as k6 would otherwise use too much memory to run, which might lead to your script not being able to run at all or aborting in the middle if the system resources are exhausted.
2929

docs/sources/next/examples/data-uploads.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ In the example above we use the [http.file()](https://grafana.com/docs/k6/<K6_VE
8282
API to wrap the file contents in a [FileData](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/filedata) object.
8383
When passing a JS object as the body parameter to [http.post()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/post),
8484
or any of the other HTTP request functions, where one of the property values is a
85-
[FileData](/javascript-api/k6-http/filedata) a multipart request will be constructed
85+
[FileData](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/filedata) a multipart request will be constructed
8686
and sent.
8787

8888
### Relevant k6 APIs
8989

90-
- [open(filePath, [mode])](/javascript-api/init-context/open)
91-
- [http.file(data, [filename], [contentType])](/javascript-api/k6-http/file)
90+
- [open(filePath, [mode])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/init-context/open)
91+
- [http.file(data, [filename], [contentType])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/file)
9292

9393
## Advanced multipart request
9494

docs/sources/next/examples/distribute-workloads.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Distribute workloads across VUs
33
excerpt: How to configure different amounts of traffic for different VU behaviors
4-
slug: /examples/distribute-workloads
4+
slug: /distribute-workloads
55
weight: 24
66
---
77

docs/sources/next/examples/html-forms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ weight: 07
88

99
Scripting example on how to handle HTML forms.
1010

11-
In many cases using the [Selection](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-html/selection) API (jQuery API clone) to interact with HTML data is enough, but for some use cases, like with forms, we can make things easier providing a higher-level API like the [Response.submitForm( [params] )](/javascript-api/k6-http/response/response-submitform) API.
11+
In many cases using the [Selection](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-html/selection) API (jQuery API clone) to interact with HTML data is enough, but for some use cases, like with forms, we can make things easier providing a higher-level API like the [Response.submitForm( [params] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/response/response-submitform) API.
1212

1313
{{< code >}}
1414

@@ -33,7 +33,7 @@ export default function () {
3333

3434
**Relevant k6 APIs**:
3535

36-
- [Response.submitForm([params])](/javascript-api/k6-http/response/response-submitform)
36+
- [Response.submitForm([params])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/response/response-submitform)
3737
- [Selection.find(selector)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-html/selection/selection-find)
3838
(the [jQuery Selector API](http://api.jquery.com/category/selectors/) docs are also a good
3939
resource on what possible selector queries can be made)

docs/sources/next/javascript-api/init-context/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ For details about the runtime, refer to the [Test lifecycle](https://grafana.com
1212

1313
| Function | Description |
1414
| ------------------------------------------------------------- | ---------------------------------------------------- |
15-
| [open( filePath, [mode] )](/javascript-api/init-context/open) | Opens a file and reads all the contents into memory. |
15+
| [open( filePath, [mode] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/init-context/open) | Opens a file and reads all the contents into memory. |

docs/sources/next/javascript-api/init-context/open.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,23 @@ excerpt: 'Opens a file and reads all the contents into memory.'
99

1010
Opens a file, reading all its contents into memory for use in the script.
1111

12-
> #### Use [SharedArray](/javascript-api/k6-data/sharedarray/) for CSV and JSON files
13-
>
14-
> `open()` often consumes a large amount of memory because every VU keeps a separate copy of the file in memory.
15-
> To reduce the memory consumption, we strongly advise the usage of [SharedArray](/javascript-api/k6-data/sharedarray/) for CSV, JSON and other files intended for script parametrization.
12+
{{% admonition type="note" %}}
1613

17-
<blockquote mod='attention' title='Function available only in init context'>
14+
`open()` often consumes a large amount of memory because every VU keeps a separate copy of the file in memory.
15+
16+
To reduce the memory consumption, we strongly advise the usage of [SharedArray](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-data/sharedarray) for CSV, JSON and other files intended for script parametrization.
17+
18+
{{% /admonition %}}
19+
20+
{{% admonition type="caution" %}}
1821

1922
This function can only be called from the init context (aka _init code_), code in the global context that is, outside of the main export default function { ... }.
2023

2124
By restricting it to the init context, we can easily determine what local files are needed to run the test and thus what we need to bundle up when distributing the test to multiple nodes in a clustered/distributed test.
2225

23-
See the example further down on this page. For a more in-depth description, see [Test lifecycle](/using-k6/test-lifecycle).
26+
See the example further down on this page. For a more in-depth description, see [Test lifecycle](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-lifecycle).
2427

25-
</blockquote>
28+
{{% /admonition %}}
2629

2730
| Parameter | Type | Description |
2831
| --------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |

docs/sources/next/javascript-api/jslib/aws/KMSClient/00 generateDataKey.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ excerpt: 'KMSClient.generateDataKey generates a symmetric data key for use outsi
2121

2222
| Type | Description |
2323
| :-------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- |
24-
| Promise<[KMSDataKey](/javascript-api/jslib/aws/kmsclient/kmsdatakey)> | A Promise that fulfills with a [KMSDataKey](/javascript-api/jslib/aws/kmsclient/kmskey) object. |
24+
| Promise<[KMSDataKey](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/aws/kmsclient/kmsdatakey)> | A Promise that fulfills with a [KMSDataKey](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/aws/kmsclient/kmskey) object. |
2525

2626
### Example
2727

docs/sources/next/javascript-api/jslib/aws/KMSClient/00 listKeys.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ excerpt: "KMSClient.listKeys lists all the KMS keys in the caller's AWS account
1414

1515
| Type | Description |
1616
| :-------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------- |
17-
| Promise<[KMSKey[]](/javascript-api/jslib/aws/kmsclient/kmskey)> | A Promise that fulfills with an array of [`KMSKey`](/javascript-api/jslib/aws/kmsclient/kmskey) objects. |
17+
| Promise<[KMSKey[]](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/aws/kmsclient/kmskey)> | A Promise that fulfills with an array of [`KMSKey`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/aws/kmsclient/kmskey) objects. |
1818

1919
### Example
2020

0 commit comments

Comments
 (0)