在 Azure 门户中创建和共享仪表板Create and share dashboards in the Azure portal

使用仪表板可以在云资源的 Azure 门户中创建具有针对性和组织有序的视图。Dashboards provide a way for you to create a focused and organized view in the Azure portal of your cloud resources. 可将仪表板用作工作区,在其中可以快速启动日常操作的任务和监视资源。Use dashboards as a workspace where you can quickly launch tasks for day-to-day operations and monitor resources. 例如,基于项目、任务或用户角色生成自定义仪表板。Build custom dashboards based on projects, tasks, or user roles, for example. Azure 门户提供默认仪表板作为起点。The Azure portal provides a default dashboard as a starting point. 可以编辑默认仪表板、创建和自定义其他仪表板,以及发布和共享仪表板,使其可供其他用户使用。You can edit the default dashboard, create and customize additional dashboards, and publish and share dashboards to make them available to other users. 本文介绍如何创建新的仪表板、自定义界面以及发布和共享仪表板。This article describes how to create a new dashboard, customize the interface, and publish and share dashboards.

创建新的仪表板Create a new dashboard

在此示例中,我们将创建新的专用仪表板并分配名称。In this example, we create a new, private dashboard and assign a name. 请从以下步骤开始:Follow these steps to get started:

  1. 登录到 Azure 门户Sign in to the Azure portal.

  2. 在左侧边栏的上半部分选择“仪表板”。 Select Dashboard from the upper section of the left sidebar. 默认视图可能已设置为“仪表板”。Your default view might already be set to dashboard.

  3. 选择“+ 新建仪表板”。 Select + New dashboard.

    默认仪表板的屏幕截图

  4. 此操作会打开“磁贴库”,从中可以选择磁贴,并在一个空网格中排列磁贴。 This action opens the Tile Gallery, from which you'll select tiles, and an empty grid where you'll arrange the tiles.

    磁贴库和空网格的屏幕截图

  5. 选择仪表板标签中的“我的仪表板”文本,并输入一个名称以帮助你轻松识别自定义仪表板。 Select the My Dashboard text in the dashboard label and enter a name that will help you easily identify the custom dashboard.

  6. 在页头中选择“完成自定义”以退出编辑模式。 Select Done customizing in the page header to exit edit mode.

此时,仪表板视图将显示空仪表板。The dashboard view now shows your empty dashboard. 选择仪表板名称旁边的下拉列表可以查看可用的仪表板 – 此列表可能包含其他用户创建和共享的仪表板。Select the drop-down next to the dashboard name to see dashboards available to you – the list might include dashboards that other users have created and shared.

编辑仪表板Edit a dashboard

现在,让我们编辑仪表板以添加、调整和排列代表你的 Azure 资源的磁贴。Now, let's edit the dashboard to add, resize, and arrange tiles that represent your Azure resources.

添加磁贴Add tiles

若要将磁贴添加到仪表板,请执行以下步骤:To add tiles to a dashboard, follow these steps:

  1. 从页头中选择编辑图标“编辑”。 Select edit icon Edit from the page header.

    仪表板的屏幕截图,其中突出显示了“编辑”

  2. 浏览“磁贴库”,或使用搜索字段查找所需的磁贴。 Browse the Tile Gallery or use the search field to find the tile you want.

  3. 选择“添加”,以自动将使用默认大小和位置的磁贴添加到仪表板中。 Select Add to automatically add the tile to the dashboard with a default size and location. 或者将磁贴拖到网格中,并将其放到所需的位置。Or, drag the tile to the grid and place it where you want.

许多资源页(也称为“边栏选项卡”)在命令栏中包含一个图钉图标。Many resource pages (also known as “blades”) include a pushpin icon in the command bar. 如果选择该图标,代表源页的磁贴将固定到当前处于活动状态的仪表板。If you select the icon, a tile representing the source page is pinned to the dashboard that is currently active. 此方法是将磁贴添加到仪表板的替代方法。This method is an alternative way to add tiles to your dashboard.

包含固定图标的页面命令栏屏幕截图

Tip

如果你在多家组织中工作,可将“组织标识”磁贴添加到仪表板,以明确显示资源所属的组织。 If you work with more than one organization, add the Organization identity tile to your dashboard to clearly show which organization the resources belong to.

调整或重新排列磁贴Resize or rearrange tiles

若要在仪表板上更改磁贴大小或重新排列磁贴,请执行以下步骤:To change the size of a tile or to rearrange the tiles on a dashboard, follow these steps:

  1. 从页头中选择编辑图标“编辑”。 Select edit icon Edit from the page header.

  2. 选择磁贴右上角的上下文菜单。Select the context menu in the upper right corner of a tile. 然后选择磁贴大小。Then, choose a tile size. 支持任何大小的磁贴还会在右下角提供“控点”,用于拖动调整磁贴的大小。Tiles that support any size also include a "handle" in the lower right corner that lets you drag the tile to the size you want.

    仪表板的屏幕截图,其中已打开磁贴大小菜单

  3. 选择一个磁贴,并将其拖到网格上的新位置以排列仪表板。Select a tile and drag it to a new location on the grid to arrange your dashboard.

其他磁贴配置Additional tile configuration

某些磁贴可能需要经过其他配置才能显示所需的信息。Some tiles may need more configuration to show the information you want. 例如,“指标图表”磁贴必须经过设置才能显示 Azure Monitor 中的指标。 For example, the Metrics chart tile has to be set up to display a metric from Azure Monitor. 还可以自定义磁贴数据以替代仪表板的默认时间设置。You can also customize tile data to override the dashboard's default time settings.

需要设置的任何磁贴在自定义它之前会显示“配置磁贴”横幅。 Any tile that needs to be set up displays a Configure tile banner until you customize the tile. 请选择该横幅,然后执行所需的设置。Select that banner, then do the required setup.

需要配置的磁贴的屏幕截图

Note

使用 markdown 磁贴可以在仪表板上显示自定义的静态内容。A markdown tile lets you display custom, static content on your dashboard. 这可能是基本说明、一幅图像、一组超链接甚至联系信息。This could be basic instructions, an image, a set of hyperlinks, or even contact information. 有关使用 markdown 磁贴的详细信息,请参阅使用自定义 markdown 磁贴For more information about using a markdown tile, see Use a custom markdown tile.

自定义磁贴数据Customize tile data

仪表板上的数据自动显示过去 24 小时的活动。Data on the dashboard automatically shows activity for the past 24 hours. 若要仅显示此磁贴的不同时间跨度,请执行以下步骤:To show a different time span for just this tile, follow these steps:

  1. 选择磁贴左上角的筛选器图标筛选器图标,或者从上下文菜单中选择“自定义磁贴数据”。 Select the filter icon filter icon from the upper left corner of the tile or select Customize tile data from the context menu.

    磁贴上下文菜单的屏幕截图

  2. 选中“在磁贴级别替代仪表板时间设置”对应的复选框。 Select the checkbox to Override the dashboard time settings at the tile level.

    用于配置磁贴时间设置的对话框屏幕截图

  3. 选择要为此磁贴显示的时间跨度。Choose the time span to show for this tile. 可以选择过去 30 分钟到过去 30 天的时间,或者自定义范围。You can choose from the past 30 minutes to the past 30 days or define a custom range.

  4. 选择要显示的时间粒度。Choose the time granularity to display. 可以使用 1 分钟到 1 个月的增量作为显示粒度。You can show anywhere from one-minute increments to one-month.

  5. 选择“应用”。 Select Apply.

删除磁贴Delete a tile

若要从仪表板中删除磁贴,请执行以下步骤:To remove a tile from a dashboard, follow these steps:

  • 选择磁贴右上角的上下文菜单,然后选择“从仪表板中删除”。 Select the context menu in the upper right corner of the tile, then select Remove from dashboard. 或者,Or,

  • 选择编辑图标“编辑”进入自定义模式。 Select edit icon Edit to enter customization mode. 将鼠标悬停在磁贴的右上角,然后选择删除图标删除图标从仪表板中删除该磁贴。Hover in the upper right corner of the tile, then select the delete icon delete icon to remove the tile from the dashboard.

    演示如何从仪表板中删除磁贴的屏幕截图

克隆仪表板Clone a dashboard

若要使用现有仪表板作为新仪表板的模板,请执行以下步骤:To use an existing dashboard as a template for a new dashboard, follow these steps:

  1. 确保仪表板视图显示了要复制的仪表板。Make sure that the dashboard view is showing the dashboard that you want to copy.
  2. 在 页头中,选择克隆图标“克隆”。 In the page header, select clone icon Clone.
  3. 随后会在编辑模式下打开名为“<你的仪表板名称> 的副本”的仪表板副本。 A copy of the dashboard, named "Clone of your dashboard name" opens in edit mode. 使用本文前面所述的步骤重命名和自定义该仪表板。Use the preceding steps in this article to rename and customize the dashboard.

发布和共享仪表板Publish and share a dashboard

创建仪表板时,默认该仪表板是专用的,这意味着只有你才可以看到它。When you create a dashboard, it's private by default, which means you're the only one who can see it. 若要使仪表板可供其他人使用,可与其他用户共享这些仪表板。To make dashboards available to others, you can share them with other users. 首先,必须将仪表板发布为 Azure 资源。First, you have to publish the dashboard as an Azure resource. 若要发布和共享自定义仪表板,请执行以下步骤:To publish and share a custom dashboard, follow these steps:

  1. 在页头中选择共享图标“共享”。 Select share icon Share from the page header. 此时将显示“共享 + 访问控制”窗体。 The Sharing + access control form appears.

  2. 确认是否显示了正确的仪表板名称。Verify that the correct dashboard name is shown.

  3. 选择一个订阅名称Select a Subscription name. 有权访问该订阅的用户可以使用共享的仪表板。Users with access to the subscription can use the shared dashboard. 是否能够访问各个磁贴所代表的资源由 Azure 基于角色的访问控制决定。Access to the resources represented by the individual tiles is determined by Azure role-based access control.

  4. 选中相应的复选框,将此仪表板发布到所选订阅的“仪表板”资源组。Select the checkbox to publish this dashboard to the 'dashboards' resource group for the selected subscription. 或者清除相应的复选框,并选择发布到现有资源组。Or, clear the checkbox and choose to publish to an existing resource group instead.

  5. 选择仪表板资源的位置。Choose a location for the dashboard resource. 我们建议将仪表板与其他资源定位在一起。We recommend you locate the dashboard with other resources. 注意:如果从现有资源组中进行选择,该仪表板会自动与该资源组定位在一起。Note: if you choose from existing resource groups, the dashboard is automatically located with that resource group.

  6. 选择“发布” 。Select Publish.

    仪表板发布对话框的屏幕截图

设置对共享仪表板的访问控制Set access control on a shared dashboard

发布仪表板后,执行以下步骤来管理有权访问仪表板的用户:After the dashboard is published, manage who has access to the dashboard by following these steps:

  1. 在“共享 + 访问控制”窗格中,选择“管理用户”。 In the Sharing + access control pane, select Manage users.

    仪表板共享 + 访问控制对话框的屏幕截图

  2. 此时会打开“访问控制”页。 The Access Control page opens. 在此页上,可以查看某位用户的访问级别,或添加新的角色分配。On this page, you can review the level of access for someone or add a new role assignment. 在此处添加角色分配时,将授予对仪表板的权限。When you add a role assignment here, you're granting permissions to the dashboard.

Note

磁贴是组织中资源的代表性视图。Tiles are representative views of resources in your organization. 对资源的访问权限是通过基于角色的访问控制分配进行管理的,权限将从订阅一路继承到资源。Access to resources is managed through role-based access control assignment and permissions are inherited from the subscription down to the resource. 授予对仪表板的访问权限并不会自动分配对仪表板中显示的资源的权限。Giving access to a dashboard doesn’t automatically assign permissions to the resources shown on the dashboard. 有关对共享仪表板的权限以及对资源的基于角色的访问控制的详细信息,请参阅使用基于角色的访问控制共享仪表板For more information about permissions to shared dashboards and role-based access control for resources, see Share dashboards with role-based access control.

打开共享的仪表板Open a shared dashboard

若要查找并打开共享的仪表板,请执行以下步骤:To find and open a shared dashboard, follow these steps:

  1. 选择仪表板名称旁边的下拉列表。Select the drop-down next to the dashboard name.

  2. 从显示的仪表板列表中选择;如果要打开的仪表板未列出,请选择“浏览所有仪表板”。 Select from the displayed list of dashboards or Browse all dashboards if the dashboard you want to open isn't listed.

    仪表板选择菜单的屏幕截图

  3. 在“类型”字段中,选择“共享的仪表板”。 In the Type field, select Shared dashboards.

  4. 选择一个或多个订阅。Select one or more subscriptions. 还可以输入文本以按名称筛选仪表板。You can also enter text to filter dashboards by name.

  5. 从共享仪表板列表中选择一个仪表板。Select a dashboard from the list of shared dashboards.

删除仪表板Delete a dashboard

若要永久删除专用或共享仪表板,请执行以下步骤:To permanently delete a private or shared dashboard, follow these steps:

  1. 从仪表板名称旁的下拉列表中选择要删除的仪表板。Select the dashboard you want to delete from the drop-down list next to the dashboard name.

  2. 从页头中选择删除图标“删除”。 Select delete icon Delete from the page header.

  3. 对于专用仪表板,请在确认对话框中选择“确定”以删除仪表板。 For a private dashboard, select OK on the confirmation dialog to remove the dashboard. 对于共享仪表板,请在确认对话框中选中相应的复选框,以确认发布的仪表板不再可供其他人查看。For a shared dashboard, on the confirmation dialog, select the checkbox to confirm that the published dashboard will no longer be viewable by others. 选择“确定”。 Then, select OK.

    删除确认屏幕截图

后续步骤Next steps