链接操作Link actions

可以通过工作簿链接步骤或者网格标题图形的列设置来访问链接操作。Link actions can be accessed through Workbook link steps or through column settings of grids, titles, or graphs.

链接操作Link action 单击时的操作Action on click
Generic Details 在属性网格上下文视图中显示行值。Shows the row values in a property grid context view.
Cell Details 在属性网格上下文视图中显示单元格值。Shows the cell value in a property grid context view. 当单元包含带有信息的动态类型(例如,包含位置、角色实例等请求属性的 JSON)时,此操作非常有用。Useful when the cell contains a dynamic type with information (for example, json with request properties like location, role instance, etc.).
Url 单元格的值应该是有效的 HTTP URL,此单元格将是在新选项卡中打开该 URL 的链接。The value of the cell is expected to be a valid http url, and the cell will be a link that opens up that url in a new tab.

Application InsightsApplication Insights

链接操作Link action 单击时的操作Action on click
Custom Event Details 使用单元格中的自定义事件 ID (itemId) 打开 Application Insights 搜索详细信息。Opens the Application Insights search details with the custom event ID (itemId) in the cell.
* Details 类似于自定义事件详细信息,只是在依赖项、异常、页面视图、请求和跟踪方面不同。Similar to Custom Event Details, except for dependencies, exceptions, page views, requests, and traces.
Custom Event User Flows 打开围绕单元格中自定义事件名称构建的 Application Insights 用户流体验。Opens the Application Insights User Flows experience pivoted on the custom event name in the cell.
* User Flows 类似于自定义事件用户流,只是在异常、页面视图和请求方面不同。Similar to Custom Event User Flows except for exceptions, page views and requests.
User Timeline 使用单元格中的用户 ID (user_Id) 打开用户时间线。Opens the user timeline with the user ID (user_Id) in the cell.
Session Timeline 针对单元格中的值打开 Application Insights 搜索体验(例如,当单元格中的值为 abc 时,搜索文本“abc”)。Opens the Application Insights search experience for the value in the cell (for example, search for text 'abc' where abc is the value in the cell).

* 表示上表的通配符* denotes a wildcard for the above table

Azure 资源Azure resource

链接操作Link action 单击时的操作Action on click
ARM Deployment 部署 Azure 资源管理器模板。Deploy an Azure Resource Manager template. 选择此项后,会显示其他字段,使作者可以配置要打开哪个 Azure 资源管理器模板、模板的参数,等等。请参阅 Azure 资源管理器部署链接设置When this item is selected, additional fields are displayed to let the author configure which Azure Resource Manager template to open, parameters for the template, etc. See Azure Resource Manager deployment link settings.
Create Alert Rule 创建资源的警报规则。Creates an Alert rule for a resource.
Custom View 打开自定义视图。Opens a custom View. 选择此项后,会显示其他字段,使作者可以配置视图扩展、视图名称用于打开视图的任何参数。When this item is selected, additional fields are displayed to let the author configure the View extension, View name, and any parameters used to open the View. 请参阅自定义视图See custom view.
Metrics 打开指标视图。Opens a metrics view.
Resource overview 根据单元格中的资源 ID 值在门户中打开资源的视图。Open the resource's view in the portal based on the resource ID value in the cell. 作者还可以选择根据需要设置 submenu 值,该值会在资源视图中打开特定菜单项。The author can also optionally set a submenu value that will open up a specific menu item in the resource view.
Workbook (template) 打开工作簿模板。Open a workbook template. 选择此项后,会显示其他字段,使作者可以配置要打开哪个模板等等。When this item is selected, additional fields are displayed to let the author configure what template to open, etc.

使用链接呈现器时,有以下设置可用:When using the link renderer, the following settings are available:

链接设置的屏幕截图

设置Setting 说明Explanation
View to open 允许作者选择上面枚举的操作之一。Allows the author to select one of the actions enumerated above.
Menu item 如果已选择“资源概述”,则这是要打开的资源概述中的菜单项。If "Resource Overview" is selected, this is the menu item in the resource's overview to open. 这可用于打开警报或活动日志而非资源的“概述”。This can be used to open alerts or activity logs instead of the "overview" for the resource. 每个 Azure Resourcetype 的菜单项值并不相同。Menu item values are different for each Azure Resourcetype.
Link label 如果已指定该项,此值会显示在网格列中。If specified, this value will be displayed in the grid column. 如果未指定此值,则会显示单元格的值。If this value is not specified, the value of the cell will be displayed. 如果希望显示其他值(如热度地图或图标),请不要使用 Link 呈现器,而应使用相应的呈现器并选择“Make this item a link”选项。If you want another value to be displayed, like a heatmap or icon, do not use the Link renderer, instead use the appropriate renderer and select the Make this item a link option.
Open link in Context Blade 如果已指定该项,链接会在窗口右侧以弹出的“上下文”视图形式打开,而不是以完整视图形式打开。If specified, the link will be opened as a popup "context" view on the right side of the window instead of opening as a full view.

使用“Make this item a link”选项时,有以下设置可用:When using the Make this item a link option, the following settings are available:

设置Setting 说明Explanation
Link value comes from 将单元格显示为带链接的呈现器时,此字段指定要在链接中使用的“link”值来自何处,使作者可以在网格中的其他列的下拉列表中进行选择。When displaying a cell as a renderer with a link, this field specifies where the "link" value to be used in the link comes from, allowing the author to select from a dropdown of the other columns in the grid. 例如,单元格可能是一个热度地图值,但你想要该链接打开行中资源 ID 的“资源概述”。For example, the cell may be a heatmap value, but you want the link to open up the Resource Overview for the resource ID in the row. 在这种情况下,可以将“link”值设置为来自“Resource Id”字段。In that case, you'd set the link value to come from the Resource Id field.
View to open 同上。same as above.
Menu item 同上。same as above.
Open link in Context Blade 同上。same as above.

如果所选链接类型为“ARM Deployment”,则作者必须指定其他设置才能打开 Azure 资源管理器部署。If the selected link type is ARM Deployment the author must specify additional settings to open an Azure Resource Manager deployment. 有两个用于配置的主要选项卡。There are two main tabs for configurations.

模板设置Template settings

此部分定义模板应来自何处,以及用于运行 Azure 资源管理器部署的参数。This section defines where the template should come from and the parameters used to run the Azure Resource Manager deployment.

Source 说明Explanation
Resource group id comes from 资源 ID 用于管理已部署的资源。The resource ID is used to manage deployed resources. 订阅用于管理已部署的资源和成本。The subscription is used to manage deployed resources and costs. 资源组可以像文件夹一样用来组织和管理所有资源。The resource groups are used like folders to organize and manage all your resources. 如果未指定此值,部署会失败。If this value is not specified, the deployment will fail. 链接源内的 CellColumnStatic ValueParameter 中进行选择。Select from Cell, Column, Static Value, or Parameter in link sources.
ARM template URI from Azure 资源管理器模板本身的 URI。The URI to the Azure Resource Manager template itself. 模板 URI 需要可供将要部署模板的用户访问。The template URI needs to be accessible to the users who will deploy the template. 链接源内的 CellColumnParameterStatic Value 中进行选择。Select from Cell, Column, Parameter, or Static Value in link sources. 初学者可参阅我们的快速启动模板For starters, take a look at our quickstart templates.
ARM Template Parameters 此部分定义了用于上面定义的模板 URI 的模板参数。This section defines the template parameters used for the template URI defined above. 这些参数将用于在运行页上部署模板。These parameters will be used to deploy the template on the run page. 网格包含一个展开工具栏按钮,有助于用户使用模板 URI 中定义的名称来填充参数,并将其设置为静态空值。The grid contains an expand toolbar button to help fill the parameters using the names defined in the template URI and set it to static empty values. 只有在网格中没有参数且模板 URI 已经过设置的情况下,才可以使用此选项。This option can only be used when there are no parameters in the grid and the template URI has been set. 下半部分是参数输出的外观的预览。The lower section is a preview of what the parameter output looks like. 选择“刷新”可以使用当前的更改更新预览。Select Refresh to update the preview with current changes. 参数通常是值,而引用则是可能指向用户有权访问的 keyvault 机密的项。Parameters are typically values, whereas references are something that could point to keyvault secrets that the user has access to.

“模板查看器”边栏选项卡限制 - 不会正确呈现引用参数,只是会将其显示为 null/值,因此用户将无法从“模板查看器”选项卡正确部署引用参数。Template Viewer blade limitation - does not render reference parameters correctly and will show up as null/value, thus users will not be able to correctly deploy reference parameters from Template Viewer tab.

Azure 资源管理器模板设置的屏幕截图

UX 设置UX settings

此部分配置用户在运行 Azure 资源管理器部署之前会看到的内容。This section configures what the users will see before they run the Azure Resource Manager deployment.

Source 说明Explanation
Title from 在运行视图上使用的标题。Title used on the run view. 链接源内的 CellColumnParameterStatic Value 中进行选择。Select from Cell, Column, Parameter, or Static Value in link sources.
Description from 这是 Markdown 文本,用于在用户需要部署模板时为用户提供有用的说明。This is the markdown text used to provide a helpful description to users when they want to deploy the template. 链接源内的 CellColumnParameterStatic Value 中进行选择。Select from Cell, Column, Parameter, or Static Value in link sources.

注意: 如果选择“Static Value”,则会显示一个多行文本框。NOTE: If Static Value is selected, a multi-line text box will appear. 在此文本框中,可以使用 {paramName} 来解析参数。In this text box, you can resolve parameters using {paramName}. 还可以通过在列名后面追加 _column(如 {columnName_column})将列视为参数。Also you can treat columns as parameters by appending _column after the column name like {columnName_column}. 在下面的示例图中,可以通过编写 {VMName_column} 来引用列 VMNameIn the example image below, we can reference the column VMName by writing {VMName_column}. 冒号后的值是参数格式化程序,在此示例中为 valueThe value after the colon is the parameter formatter, in this case it is value.
Run button text from 在部署 Azure 资源管理器模板所需的运行(执行)按钮上使用的标签。Label used on the run (execute) button to deploy the Azure Resource Manager template. 这是用户开始部署 Azure 资源管理器模板时将要选择的内容。This is what users will select to start deploying the Azure Resource Manager template.

Azure 资源管理器 UX 设置的屏幕截图

设置这些配置后,当用户选择该链接时,它就会打开包含 UX 设置中所述 UX 的视图。After these configurations are set, when the users select the link, it will open up the view with the UX described in the UX settings. 如果用户选择“Run button text from”,它会使用模板设置中的值部署 Azure 资源管理器模板。If the user selects Run button text from it will deploy an Azure Resource Manager template using the values from template settings. “查看模板”按钮会打开“模板查看器”选项卡,供用户在部署前检查模板和参数。View template will open up the template viewer tab for the user to examine the template and the parameters before deploying.

“运行 Azure 资源管理器”视图的屏幕截图

使用此项可在 Azure 门户中打开“自定义视图”。Use this to open Custom Views in the Azure portal. 验证所有配置和设置。Verify all of the configuration and settings. 值不正确会导致门户中出现错误,或者无法正确打开视图。Incorrect values will cause errors in the portal or fail to open the views correctly. 可以使用两种方法通过 FormURL 来配置设置。There are two ways to configure the settings via the Form or URL.

备注

无法在上下文选项卡中打开具有菜单的视图。如果将具有菜单的视图配置为在上下文选项卡中打开,则在选择链接时不会显示任何上下文选项卡。Views with a menu cannot be opened in a context tab. If a view with a menu is configured to open in a context tab then no context tab will be shown when the link is selected.

窗体Form

Source 说明Explanation
Extension name 承载视图名称的扩展的名称。The name of the extension that hosts the name of the View.
View name 要打开的视图的名称。The name of the View to open.

视图输入View inputs

有两种类型的输入:网格和 JSON。There are two types of inputs, grids and JSON. 使用“Grid”进行简单键和值选项卡输入,或选择“JSON”以指定嵌套式 JSON 输入。Use Grid for simple key and value tab inputs or select JSON to specify a nested JSON input.

  • 网格Grid

    • Parameter Name:视图输入参数的名称。Parameter Name: The name of the View input parameter.
    • Parameter Comes From:视图参数的值应来自何处。Parameter Comes From: Where the value of the View parameter should come from. 链接源内的 CellColumnParameterStatic Value 中进行选择。Select from Cell, Column, Parameter, or Static Value in link sources.

    备注

    如果选择“Static Value”,则可使用文本框中的方括号链接 {paramName} 来解析参数。If Static Value is selected, the parameters can be resolved using brackets link {paramName} in the text box. 可以通过在列名后追加 _column(如 {columnName_column})将列视为参数列。Columns can be treated as parameters columns by appending _column after the column name like {columnName_column}.

    • Parameter Value:这将是一个包含可用参数、列或静态值的下拉列表,具体取决于“Parameter Comes From”选项。Parameter Value: depending on Parameter Comes From, this will be a dropdown of available parameters, columns, or a static value.

    “编辑列设置”的屏幕截图,显示将从表单获取自定义视图设置。

  • JSONJSON

    • 在编辑器中以 JSON 格式指定选项卡输入。Specify your tab input in a JSON format on the editor. 与“Grid”模式一样,引用参数和列时,可以使用 {paramName} 来表示参数,使用 {columnName_column} 来表示列。Like the Grid mode, parameters, and columns may be referenced by using {paramName} for parameters, and {columnName_column} for columns. 选择“Show JSON Sample”会显示用于视图输入的所有已解析参数和列的预期输出。Selecting Show JSON Sample, will show the expected output of all resolved parameters and columns user for the view input.

    屏幕截图,显示了“打开自定义视图”设置,其中的视图输入采用 JSON 格式。

URLURL

粘贴一个门户 URL,其中包含扩展、视图名称以及打开视图所需的任何输入。Paste a Portal URL containing the extension, name of the view, and any inputs needed to open the view. 在选择“Initialize Settings”后,它会填充供作者添加/修改/删除任何视图输入所需的“Form”。After selecting Initialize Settings, it will populate the Form for the author to add/modify/remove any of the view inputs.

“编辑列设置”的屏幕截图,显示将从 URL 中获取自定义视图设置。Screenshot showing column setting show Custom View settings from URL.

如果所选链接类型为“Workbook (Template)”,则作者必须指定其他设置才能打开正确的工作簿模板。If the selected link type is Workbook (Template), the author must specify additional settings to open up the correct workbook template. 以下设置包含网格如何查找每个设置的相应值的选项。The settings below have options for how the grid will find the appropriate value for each of the settings.

设置Setting 说明Explanation
Workbook owner Resource Id 这是“拥有”工作簿的 Azure 资源的资源 ID。This is the Resource ID of the Azure Resource that "owns" the workbook. 通常情况下,它是 Application Insights 资源或 Log Analytics 工作区。Commonly it is an Application Insights resource, or a Log Analytics Workspace. 在 Azure Monitor 中,它也可能是文本字符串 "Azure Monitor"Inside of Azure Monitor, this may also be the literal string "Azure Monitor". 保存工作簿时,这是工作簿要链接到的位置。When the workbook is Saved, this is what the workbook will be linked to.
Workbook resources Azure 资源 ID 的数组,用于指定工作簿中使用的默认资源。An array of Azure Resource Ids that specify the default resource used in the workbook. 例如,如果将要打开的模板显示虚拟机指标,则此处的值将是虚拟机资源 ID。For example, if the template being opened shows Virtual Machine metrics, the values here would be Virtual Machine resource IDs. 很多时候,所有者和资源设置为相同的设置。Many times, the owner, and resources are set to the same settings.
Template Id 指定要打开的模板的 ID。Specify the ID of the template to be opened. 如果这是库中的社区模板(最常见的情况),请为模板的路径加上 Community- 前缀。例如,Workbooks/Performance/Apdex 模板的路径加上该前缀后变为 Community-Workbooks/Performance/ApdexIf this is a community template from the gallery (the most common case), prefix the path to the template with Community-, like Community-Workbooks/Performance/Apdex for the Workbooks/Performance/Apdex template. 如果这是一个指向已保存工作簿/模板的链接,则它是该项的完整 Azure 资源 ID。If this is a link to a saved workbook/template, it is the full Azure resource ID of that item.
Workbook Type 指定要打开的工作簿模板的类型。Specify the kind of workbook template to open. 最常见的情况是通过“Default”或“Workbook”选项来使用当前工作簿中的值。The most common cases use the Default or Workbook option to use the value in the current workbook.
Gallery Type 此项指定会显示在已打开模板的“库”视图中的库类型。This specifies the gallery type that will be displayed in the "Gallery" view of the template that opens. 最常见的情况是通过“Default”或“Workbook”选项来使用当前工作簿中的值。The most common cases use the Default or Workbook option to use the value in the current workbook.
Location comes from 如果要打开特定工作簿资源,则应指定位置字段。The location field should be specified if you are opening a specific Workbook resource. 如果未指定位置,则查找工作簿内容的速度会慢得多。If location is not specified, finding the workbook content is much slower. 如果知道位置,请指定它。If you know the location, specify it. 如果不知道位置或打开的模板没有特定位置,请将此字段保留为“Default”。If you do not know the location or are opening a template that with no specific location, leave this field as "Default".
Pass specific parameters to template 选择此项可以将特定参数传递给模板。Select to pass specific parameters to the template. 如果选择了此项,则仅将指定的参数传递给模板。否则,当前工作簿中的所有参数都会传递给模板,这种情况下,两个工作簿中的参数 names 必须相同,此参数值才能生效。If selected, only the specified parameters are passed to the template else all the parameters in the current workbook are passed to the template and in that case the parameter names must be the same in both workbooks for this parameter value to work.
Workbook Template Parameters 此部分定义传递给目标模板的参数。This section defines the parameters that are passed to the target template. 名称应与目标模板中的参数的名称匹配。The name should match with the name of the parameter in the target template. 从“Cell”、“Column”、“Parameter”和“Static Value”中选择值。Select value from Cell, Column, Parameter, and Static Value. 名称和值不得为空,否则无法将该参数传递给目标模板。Name and value must not be empty to pass that parameter to the target template.

对于上述每项设置,作者必须选择已链接工作簿中的值将来自何处。For each of the above settings, the author must pick where the value in the linked workbook will come from. 请参阅链接源See link Sources

打开工作簿链接时,将向新的工作簿视图传递在上述设置中配置的所有值。When the workbook link is opened, the new workbook view will be passed all of the values configured from the settings above.

工作簿链接设置的屏幕截图

工作簿模板参数设置的屏幕截图

Source 说明Explanation
Cell 此项将使用网格中该单元格中的值作为链接值This will use the value in that cell in the grid as the link value
Column 选择此项后,会显示另一字段,使作者可以在网格中选择另一列。When selected, another field will be displayed to let the author select another column in the grid. 与行对应的该列的值将用在链接值中。The value of that column for the row will be used in the link value. 这通常用于使网格的每一行都能通过将“Template Id”字段设置为“column”来打开不同的模板,或者使每一行都能为不同资源打开相同的工作簿模板,前提是已将“Workbook resources”字段设置为包含 Azure 资源 ID 的列。This is commonly used to enable each row of a grid to open a different template, by setting Template Id field to column, or to open up the same workbook template for different resources, if the Workbook resources field is set to a column that contains an Azure Resource ID
Parameter 选择此项后,会显示另一字段,使作者可以选择一个参数。When selected, another field will be displayed to let the author select a parameter. 单击链接时,该参数的值将用于值The value of that parameter will be used for the value when the link is clicked
Static value 选择此项后,会显示另一字段,使作者可以键入将在已链接工作簿中使用的静态值。When selected, another field will be displayed to let the author type in a static value that will be used in the linked workbook. 这通常适用于网格中的所有行都会对某个字段使用同一值的情形。This is commonly used when all of the rows in the grid will use the same value for a field.
Step 使用在工作簿的当前步骤中设置的值。Use the value set in the current step of the workbook. 这常见于查询和指标步骤,目的是将已链接工作簿中的工作簿资源设置为在查询/指标步骤中使用的工作簿资源,而不是在当前工作簿中使用的工作簿资源This is common in query and metrics steps to set the workbook resources in the linked workbook to those used in the query/metrics step, not the current workbook
Workbook 使用在当前工作簿中设置的值。Use the value set in the current workbook.
Default 使用在未指定任何值的情况下会使用的默认值。Use the default value that would be used if no value was specified. 这常见于库类型,其中的默认库将根据所有者资源的类型来设置This is common for Gallery Type, where the default gallery would be set by the type of the owner resource

后续步骤Next steps