Skip to content

Commit 4827f7a

Browse files
committed
Updating instructions for Workers KV dashboard instructions
1 parent 91ea71d commit 4827f7a

File tree

3 files changed

+37
-39
lines changed

3 files changed

+37
-39
lines changed

src/content/docs/kv/concepts/kv-namespaces.mdx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
order: 7
66

77
---
8-
import { Type, MetaInfo, WranglerConfig } from "~/components";
8+
import { Type, MetaInfo, WranglerConfig, DashButton } from "~/components";
99

1010
A KV namespace is a key-value database replicated to Cloudflare’s global network.
1111

@@ -49,12 +49,11 @@ kv_namespaces = [
4949

5050
To bind the namespace to your Worker in the Cloudflare dashboard:
5151

52-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com).
53-
2. Go to **Workers & Pages**.
54-
3. Select your **Worker**.
55-
4. Select **Settings** > **Bindings**.
56-
5. Select **Add**.
57-
6. Select **KV Namespace**.
58-
7. Enter your desired variable name (the name of the binding).
59-
8. Select the KV namespace you wish to bind the Worker to.
60-
9. Select **Deploy**.
52+
1. <DashButton url="/?to=/:account/workers-and-pages" />
53+
2. Select your **Worker**.
54+
3. Select **Settings** > **Bindings**.
55+
4. Select **Add**.
56+
5. Select **KV Namespace**.
57+
6. Enter your desired variable name (the name of the binding).
58+
7. Select the KV namespace you wish to bind the Worker to.
59+
8. Select **Deploy**.

src/content/docs/kv/get-started.mdx

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar:
88
order: 2
99
---
1010

11-
import { Render, PackageManagers, Steps, FileTree, Details, Tabs, TabItem, WranglerConfig, GitHubCode } from "~/components";
11+
import { Render, PackageManagers, Steps, FileTree, Details, Tabs, TabItem, WranglerConfig, GitHubCode, DashButton } from "~/components";
1212

1313
Workers KV provides low-latency, high-throughput global storage to your [Cloudflare Workers](/workers/) applications. Workers KV is ideal for storing user configuration data, routing data, A/B testing configurations and authentication tokens, and is well suited for read-heavy workloads.
1414

@@ -100,12 +100,11 @@ Create a new Worker to read and write to your KV namespace.
100100
</TabItem> <TabItem label = 'Dashboard'>
101101

102102
<Steps>
103-
1. Log in to your Cloudflare dashboard and select your account.
104-
2. Go to [your account > **Workers & Pages** > **Overview**](https://dash.cloudflare.com/?to=/:account/workers-and-pages).
105-
3. Select **Create**.
106-
4. Select **Create Worker**.
107-
5. Name your Worker. For this tutorial, name your Worker `kv-tutorial`.
108-
6. Select **Deploy**.
103+
1. <DashButton url="/?to=/:account/workers-and-pages" />
104+
2. Select **Create application**.
105+
3. Select **Start with Hello World!** > **Get started**.
106+
4. Name your Worker. For this tutorial, name your Worker `kv-tutorial`.
107+
5. Select **Deploy**.
109108
</Steps>
110109
</TabItem>
111110
</Tabs>
@@ -159,10 +158,10 @@ To create a KV namespace via Wrangler:
159158
</TabItem><TabItem label = 'Dashboard'>
160159

161160
<Steps>
162-
1. Go to [**Storage & Databases** > **KV**](https://dash.cloudflare.com/?to=/:account/workers/kv/namespaces).
163-
2. Select **Create a namespace**.
161+
1. <DashButton url="/?to=/:account/workers/kv/namespaces" />
162+
2. Select **Create instance**.
164163
3. Enter a name for your namespace. For this tutorial, use `kv_tutorial_namespace`.
165-
4. Select **Add**.
164+
4. Select **Create**.
166165
</Steps>
167166

168167
</TabItem></Tabs>
@@ -205,13 +204,12 @@ To bind your KV namespace to your Worker:
205204
</TabItem><TabItem label='Dashboard'>
206205

207206
<Steps>
208-
1. Go to [**Workers & Pages** > **Overview**](https://dash.cloudflare.com/?to=/:account/workers-and-pages).
207+
1. <DashButton url="/?to=/:account/workers-and-pages" />
209208
2. Select the `kv-tutorial` Worker you created in [step 1](/kv/get-started/#1-create-a-worker-project).
210-
3. Select **Settings**.
211-
4. Scroll to **Bindings**, then select **Add**.
212-
5. Select **KV namespace**.
213-
6. Name your binding (`BINDING_NAME`) in **Variable name**, then select the KV namespace (`kv_tutorial_namespace`) you created in [step 2](/kv/get-started/#2-create-a-kv-namespace) from the dropdown menu.
214-
7. Select **Deploy** to deploy your binding.
209+
3. Got to the **Bindings** tab, then select **Add binding**.
210+
4. Select **KV namespace** > **Add binding**.
211+
5. Name your binding (`BINDING_NAME`) in **Variable name**, then select the KV namespace (`kv_tutorial_namespace`) you created in [step 2](/kv/get-started/#2-create-a-kv-namespace) from the dropdown menu.
212+
6. Select **Add binding** to deploy your binding.
215213
</Steps>
216214
</TabItem></Tabs>
217215

@@ -266,9 +264,9 @@ npx wrangler kv key put --namespace-id=xxxxxxxxxxxxxxxx "<KEY>" "<VALUE>" --remo
266264

267265
</TabItem><TabItem label = 'Dashboard'>
268266
<Steps>
269-
1. Go to [**Storage & Databases** > **KV**](https://dash.cloudflare.com/?to=/:account/workers/kv/namespaces).
270-
2. Select the KV namespace you created (`kv_tutorial_namespace`), then select **View**.
271-
3. Select **KV Pairs**.
267+
1. <DashButton url="/?to=/:account/workers/kv/namespaces" />
268+
2. Select the KV namespace you created (`kv_tutorial_namespace`).
269+
3. Go to the **KV Pairs** tab.
272270
4. Enter a `<KEY>` of your choice.
273271
5. Enter a `<VALUE>` of your choice.
274272
6. Select **Add entry**.
@@ -314,9 +312,9 @@ Refer to the [`kv bulk` documentation](/kv/reference/kv-commands/#kv-bulk) to wr
314312

315313
You can view key-value pairs directly from the dashboard.
316314
<Steps>
317-
1. Go to your account > **Storage & Databases** > **KV**.
318-
2. Go to the KV namespace you created (`kv_tutorial_namespace`), then select **View**.
319-
3. Select **KV Pairs**.
315+
1. <DashButton url="/?to=/:account/workers/kv/namespaces" />
316+
2. Go to the KV namespace you created (`kv_tutorial_namespace`).
317+
3. Go to the **KV Pairs** tab.
320318
</Steps>
321319
</TabItem></Tabs>
322320

@@ -377,7 +375,7 @@ The code above:
377375
</TabItem><TabItem label = 'Dashboard'>
378376

379377
<Steps>
380-
1. Go to **Workers & Pages** > **Overview**.
378+
1. <DashButton url="/?to=/:account/workers-and-pages" />
381379
2. Go to the `kv-tutorial` Worker you created.
382380
3. Select **Edit Code**.
383381
4. Clear the contents of the `workers.js` file, then paste the following code.
@@ -398,7 +396,7 @@ The code above:
398396
3. Uses JavaScript's [`try...catch`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) exception handling to catch potential errors. When writing or reading from any service, such as Workers KV or external APIs using `fetch()`, you should expect to handle exceptions explicitly.
399397

400398
The browser should simply return the `VALUE` corresponding to the `KEY` you have specified with the `get()` method.
401-
2. Select **Save**.
399+
2. Select the dropdown arrow next to **Deploy** and select **Save**.
402400

403401
</Steps>
404402

@@ -426,7 +424,7 @@ Deploy your Worker to Cloudflare's global network.
426424
</TabItem><TabItem label='Dashboard'>
427425
<Steps>
428426

429-
1. Go to **Workers & Pages** > **Overview**.
427+
1. <DashButton url="/?to=/:account/workers-and-pages" />
430428
2. Select your `kv-tutorial` Worker.
431429
3. Select **Deployments**.
432430
4. From the **Version History** table, select **Deploy version**.

src/content/docs/kv/observability/metrics-analytics.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ sidebar:
55
order: 10
66
---
77

8+
import { DashButton } from "~/components";
9+
810
KV exposes analytics that allow you to inspect requests and storage across all namespaces in your account.
911

1012
The metrics displayed in the [Cloudflare dashboard](https://dash.cloudflare.com/) charts are queried from Cloudflare’s [GraphQL Analytics API](/analytics/graphql-api/). You can access the metrics [programmatically](#query-via-the-graphql-api) via GraphQL or HTTP client.
@@ -24,10 +26,9 @@ Metrics can be queried (and are retained) for the past 31 days.
2426

2527
Per-namespace analytics for KV are available in the Cloudflare dashboard. To view current and historical metrics for a database:
2628

27-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
28-
2. Go to [**Workers & Pages** > **KV**](https://dash.cloudflare.com/?to=/:account/workers/kv/namespaces).
29-
3. Select an existing namespace.
30-
4. Select the **Metrics** tab.
29+
1. <DashButton url="/?to=/:account/workers/kv/namespaces" />
30+
2. Select an existing namespace.
31+
3. Select the **Metrics** tab.
3132

3233
You can optionally select a time window to query. This defaults to the last 24 hours.
3334

0 commit comments

Comments
 (0)