Skip to content

Commit 8242435

Browse files
authored
[Workers] Adding Zone-level dash buttons (cloudflare#25232)
* [Workers] Zone-level dash buttons * Fixes
1 parent 4e649c6 commit 8242435

File tree

5 files changed

+69
-36
lines changed

5 files changed

+69
-36
lines changed

src/content/docs/workers/ci-cd/builds/git-integration/index.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ sidebar:
66
order: 3
77
---
88

9+
import { DashButton, Steps } from "~/components";
10+
911
Cloudflare supports connecting your [GitHub](/workers/ci-cd/builds/git-integration/github-integration/) and [GitLab](/workers/ci-cd/builds/git-integration/gitlab-integration/) repository to your Cloudflare Worker, and will automatically deploy your code every time you push a change.
1012

1113
Adding a Git integration also lets you monitor build statuses directly in your Git provider using [pull request comments](/workers/ci-cd/builds/git-integration/github-integration/#pull-request-comment), [check runs](/workers/ci-cd/builds/git-integration/github-integration/#check-run), or [commit statuses](/workers/ci-cd/builds/git-integration/gitlab-integration/#commit-status), so you can manage deployments without leaving your workflow.
@@ -33,6 +35,16 @@ For details on providing access to organization accounts, see [GitHub organizati
3335

3436
## Manage a Git Integration
3537

36-
To manage your Git installation, go to the [Cloudflare dashboard](https://dash.cloudflare.com) > **Workers & Pages** > your Worker > **Settings** > **Builds** > under **Git Repository**, select **Manage**.
38+
To manage your Git installation:
39+
40+
<Steps>
41+
1. Go to the **Workers & Pages** page in the Cloudflare dashboard.
42+
43+
<DashButton url="/?to=/:account/workers-and-pages" />
44+
45+
2. Select your Worker.
46+
3. Go to **Settings** > **Builds**.
47+
4. Under **Git Repository**, select **Manage**.
48+
</Steps>
3749

3850
This can be useful for managing repository access or troubleshooting installation issues by reinstalling. For more details, see the [GitHub](/workers/ci-cd/builds/git-integration/github-integration) and [GitLab](/workers/ci-cd/builds/git-integration/gitlab-integration) guides for how to manage your installation.

src/content/docs/workers/configuration/routing/custom-domains.mdx

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Custom Domains
44

55
---
66

7-
import { WranglerConfig, DashButton } from "~/components";
7+
import { WranglerConfig, DashButton, Steps } from "~/components";
88

99
## Background
1010

@@ -41,6 +41,7 @@ You cannot create a Custom Domain on a hostname with an existing CNAME DNS recor
4141

4242
To set up a Custom Domain in the dashboard:
4343

44+
<Steps>
4445
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
4546

4647
<DashButton url="/?to=/:account/workers-and-pages" />
@@ -49,6 +50,7 @@ To set up a Custom Domain in the dashboard:
4950
3. Go to **Settings** > **Domains & Routes** > **Add** > **Custom Domain**.
5051
4. Enter the domain you want to configure for your Worker.
5152
5. Select **Add Custom Domain**.
53+
</Steps>
5254

5355
After you have added the domain or subdomain, Cloudflare will create a new DNS record for you. You can add multiple Custom Domains.
5456

@@ -152,39 +154,41 @@ If you are currently invoking a Worker using a [route](/workers/configuration/ro
152154
### Migrate from Routes via the dashboard
153155

154156
To migrate the route `example.com/*`:
155-
1. In the Cloudflare dashboard, go to the **Account home** page.
156157

157-
<DashButton url="/?to=/:account/home" />
158+
<Steps>
159+
1. In the Cloudflare dashboard, go to the **DNS** page for your domain.
158160

159-
2. Select your domain.
160-
3. Go to **DNS** and delete the CNAME record for `example.com`.
161-
4. Go to **Account Home** > **Workers & Pages**.
162-
5. In **Overview**, select your Worker > **Settings** > **Domains & Routes**.
163-
6. Select **Add** > **Custom domain** and add `example.com`.
164-
7. Delete the route `example.com/*` located in your Worker > **Settings** > **Domains & Routes**.
161+
<DashButton url="/?to=/:account/:zone/dns" />
162+
163+
2. Delete the CNAME record for `example.com`.
164+
3. Go to **Account Home** > **Workers & Pages**.
165+
4. In **Overview**, select your Worker > **Settings** > **Domains & Routes**.
166+
5. Select **Add** > **Custom domain** and add `example.com`.
167+
6. Delete the route `example.com/*` located in your Worker > **Settings** > **Domains & Routes**.
168+
</Steps>
165169

166170
### Migrate from Routes via Wrangler
167171

168172
To migrate the route `example.com/*` in your [Wrangler configuration file](/workers/wrangler/configuration/):
169173

170-
1. In the Cloudflare dashboard, go to the **Account home** page.
171-
172-
<DashButton url="/?to=/:account/home" />
174+
<Steps>
175+
1. In the Cloudflare dashboard, go to the **DNS** page for your domain.
173176

174-
2. Select your domain.
175-
3. Go to **DNS** and delete the CNAME record for `example.com`.
176-
4. Add the following to your Wrangler file:
177+
<DashButton url="/?to=/:account/:zone/dns" />
177178

179+
2. Delete the CNAME record for `example.com`.
180+
3. Add the following to your Wrangler file:
178181

179182

180-
<WranglerConfig>
183+
<WranglerConfig>
181184

182-
```toml
183-
[[routes]]
184-
pattern = "example.com"
185-
custom_domain = true
186-
```
185+
```toml
186+
[[routes]]
187+
pattern = "example.com"
188+
custom_domain = true
189+
```
187190

188-
</WranglerConfig>
191+
</WranglerConfig>
189192

190193
4. Run `npx wrangler deploy` to create the Custom Domain your Worker will run on.
194+
</Steps>

src/content/docs/workers/configuration/routing/routes.mdx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pcx_content_type: concept
33
title: Routes
44
---
55

6-
import { WranglerConfig, DashButton } from "~/components";
6+
import { WranglerConfig, DashButton, Steps } from "~/components";
77

88
## Background
99

@@ -42,6 +42,8 @@ Routes can also be created via the API. Refer to the [Workers Routes API documen
4242
Before you set up a route, make sure you have a DNS record set up for the [domain](/dns/manage-dns-records/how-to/create-zone-apex/) or [subdomain](/dns/manage-dns-records/how-to/create-subdomain/) you would like to route to.
4343

4444
To set up a route in the dashboard:
45+
46+
<Steps>
4547
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
4648

4749
<DashButton url="/?to=/:account/workers-and-pages" />
@@ -50,6 +52,7 @@ To set up a route in the dashboard:
5052
3. Go to **Settings** > **Domains & Routes** > **Add** > **Route**.
5153
4. Select the zone and enter the route pattern.
5254
5. Select **Add route**.
55+
</Steps>
5356

5457
### Set up a route in the Wrangler configuration file
5558

@@ -73,7 +76,15 @@ zone_id = "<YOUR_ZONE_ID>"
7376

7477
</WranglerConfig>
7578

76-
Add the `zone_name` or `zone_id` option after each route. The `zone_name` and `zone_id` options are interchangeable. If using `zone_id`, find your zone ID by logging in to the Cloudflare dashboard > select your account > select your website > find the **Zone ID** in the left-hand side of **Overview**.
79+
Add the `zone_name` or `zone_id` option after each route. The `zone_name` and `zone_id` options are interchangeable. If using `zone_id`, find your zone ID by:
80+
81+
<Steps>
82+
1. Go to the Zone Overview page in the Cloudflare dashboard.
83+
84+
<DashButton url="/?to=/:account/:zone/" />
85+
86+
2. Find the **Zone ID** in the left-hand side of **Overview**.
87+
</Steps>
7788

7889
To add multiple routes:
7990

src/content/docs/workers/examples/103-early-hints.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@ sidebar:
1313
order: 1001
1414
description: Allow a client to request static assets while waiting for the HTML response.
1515
---
16-
import { DashButton } from "~/components";
16+
import { DashButton, Steps, TabItem, Tabs } from "~/components";
1717

1818
If you want to get started quickly, click on the button below.
1919

2020
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/docs-examples/tree/main/workers/103-early-hints)
2121

2222
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
2323

24-
import { TabItem, Tabs } from "~/components";
25-
2624
`103` Early Hints is an HTTP status code designed to speed up content delivery. When enabled, Cloudflare can cache the `Link` headers marked with preload and/or preconnect from HTML pages and serve them in a `103` Early Hints response before reaching the origin server. Browsers can use these hints to fetch linked assets while waiting for the origin’s final response, dramatically improving page load speeds.
2725

2826
To ensure Early Hints are enabled on your zone:
2927

30-
1. In the Cloudflare dashboard, go to the **Account home** page.
28+
<Steps>
29+
1. In the Cloudflare dashboard, go to the **Speed settings** page.
3130

32-
<DashButton url="/?to=/:account/home" />
31+
<DashButton url="/?to=/:account/:zone/speed/optimization" />
3332

34-
2. Go to **Speed** > **Optimization** > **Content Optimization**.
33+
2. Go to **Content Optimization**.
3534
3. Enable the **Early Hints** toggle to on.
35+
</Steps>
3636

3737
You can return `Link` headers from a Worker running on your zone to speed up your page load times.
3838

src/content/docs/workers/observability/metrics-and-analytics.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Diagnose issues with Workers metrics, and review request data for a
99

1010
---
1111

12-
import { GlossaryTooltip, DashButton } from "~/components"
12+
import { GlossaryTooltip, DashButton, Steps } from "~/components"
1313

1414
There are two graphical sources of information about your Workers traffic at a given time: Workers metrics and zone-based Workers analytics.
1515

@@ -21,11 +21,13 @@ Zone analytics show how much traffic all Workers assigned to a zone are handling
2121

2222
Workers metrics aggregate request data for an individual Worker (if your Worker is running across multiple domains, and on `*.workers.dev`, metrics will aggregate requests across them). To view your Worker's metrics:
2323

24+
<Steps>
2425
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
2526

2627
<DashButton url="/?to=/:account/workers-and-pages" />
2728

2829
2. In **Overview**, select your Worker to view its metrics.
30+
</Steps>
2931

3032
There are two metrics that can help you understand the health of your Worker in a given moment: requests success and error metrics, and invocation statuses.
3133

@@ -65,13 +67,15 @@ The Duration per request chart shows historical [duration](/workers/platform/lim
6567

6668
To review invocation statuses:
6769

70+
<Steps>
6871
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
6972

7073
<DashButton url="/?to=/:account/workers-and-pages" />
7174

7275
2. Select your Worker.
7376
4. Find the **Summary** graph in **Metrics**.
7477
5. Select **Errors**.
78+
</Steps>
7579

7680
Worker invocation statuses indicate whether a Worker executed successfully or failed to generate a response in the Workers runtime. Invocation statuses differ from HTTP status codes. In some cases, a Worker invocation succeeds but does not generate a successful HTTP status because of another error encountered outside of the Workers runtime. Some invocation statuses result in a [Workers error code](/workers/observability/errors/#error-pages-generated-by-workers) being returned to the client.
7781

@@ -110,12 +114,14 @@ Worker metrics can be inspected for up to three months in the past in maximum in
110114
Zone analytics aggregate request data for all Workers assigned to any [routes](/workers/configuration/routing/routes/) defined for a zone.
111115

112116
To review zone metrics:
113-
1. In the Cloudflare dashboard, go to the **Account home** page.
114117

115-
<DashButton url="/?to=/:account/home" />
118+
<Steps>
119+
1. In the Cloudflare dashboard, go to the **Analytics & Logs** page for your zone.
116120

117-
2. Select your domain.
118-
3. In **Analytics & Logs**, select **Workers**.
121+
<DashButton url="/?to=/:account/:zone/analytics" />
122+
123+
2. Select **Workers**.
124+
</Steps>
119125

120126
Zone data can be scoped by time range within the last 30 days. The dashboard includes charts and information described below.
121127

0 commit comments

Comments
 (0)