跳转到主要内容

DashButton

import AvailableDashRoutes from "~/components/AvailableDashRoutes.astro";

This component creates a LinkButton that links to a Cloudflare dashboard deeplink.

While we recommend the use of DashButton, you can continue to use deeplinks (as a link, without the component), if necessary.

:::note[Where routes are stored] The list of available routes are generated by running a script that we manually trigger periodically. The script outputs the available paths in src/content/dash-routes/index.json.

The DashButton component then uses those routes to automatically generate the list of buttons on this page. The DashButton will fail to build if you edit the url prop to a route that is not listed in the index.json file.

Additionally, each run of the script overwrites the previous /dash-routes/index.json file. If you edit the this file manually, it will be overwritten in the next run of the script.

Therefore, only make manual changes to this file if both of the following are true:

Import

import { DashButton } from "~/components";

;

Usage

Core dashboard

import { DashButton } from "~/components";

1. In the Cloudflare dashboard, go to the **WAF** page.

   <DashButton url="/?to=/:account/application-security/waf" />

2. ...

Zero Trust dashboard

import { DashButton } from "~/components";

1. Log in to Cloudflare One and go to the **AI controls** page.

   <DashButton url="/?to=/:account/access/ai-controls" zeroTrust />

2. ...

<DashButton> Props

url

type: string

The Cloudflare dashboard deeplink to navigate to. See the below list for available routes.

buttonName

type: string

default: The name of the route.

Additional name to override the default name of the route.

zeroTrust

type: boolean

default: false

Set to true to use the Zero Trust dashboard routes instead of the Cloudflare dashboard routes.

Available routes