【问题标题】:Azure Managed App - ViewDefinition.json action with link to appAzure 托管应用程序 - 带有应用程序链接的 ViewDefinition.json 操作
【发布时间】:2020-10-13 08:15:07
【问题描述】:

我们希望在 Azure 服务目录/市场应用程序的概览仪表板上提供一个链接,以跳转到我们的自定义 Web 应用程序(作为应用程序的一部分部署)。 Screenshot of overview dashboard with sample link

根据文档commands可以在viewDefinition.jsonoverview中定义,比如:

{
    "kind": "Overview",
    "properties": {
        "header": "Welcome to your Azure Managed Application",
        "description": "This managed application is for demo purposes only.",
        "commands": [
            {
                "displayName": "Launch App",
                "path": "testAction",
                "icon": "Link"
            }
        ]
    }
}

由于我们想要提供到作为托管应用程序的一部分部署的 WebApp 的(动态)链接,我们要么需要来自部署的一些信息(例如来自 CreateUiDefinition.json 的输出),要么需要在viewDefinition.json 建立一个 URL。

但是,即使只是提供静态链接 path 在我们的测试中也不起作用:

{
    "displayName": "Static Link",
    "path": "https://my-domain.com/", //<-- not working
    "icon": "Link"
}

根据文档,commandpath 可以触发对custom resource provider 的操作。资源提供者可以proxy the request 到自定义服务。如果您想这样做,这可能会很好用。提供启动/停止服务的操作,但由于代理需要来自服务的 JSON 响应,我们不能简单地显示或重定向到我们的页面。我们也不知道如何使用 JSON 响应来设置 path

我们只想提供一个命令,在新选项卡中打开指向我们自定义 WebApp 的链接或重定向到它。有谁知道我们如何实现这样的链接?

我们已经看到像 SendGrid 这样的 Azure 托管应用程序提供了这样的选项,因此必须有一个(未记录的)方式。 Screenshot of SendGrid App overview dashboard with link

类似问题:Opening a web app page using View Definition


更新(2020-11-24):
我们联系了 MS 支持并得到以下回复:

我们得到了产品团队的确认,很遗憾,无法在摘要页面添加动态链接。这是因为自定义操作仅用于执行自定义提供程序操作,不应该打开硬编码链接等。

【问题讨论】:

标签: azure azure-managed-app


【解决方案1】:

不支持从托管应用程序命令打开外部链接。但是,您可以在“概览”页面中的托管应用程序描述中包含指向外部网站的链接。 "Overview" page 中的“description”属性支持 Markdown。

类似链接的 URL 示例:

Here is a link to the Azure Portal: <https://portal.azure.com/>

呈现为:

这里是 Azure 门户的链接:https://portal.azure.com/

命名链接示例:

Here is a named link to the Azure Portal: [Azure Portal](https://portal.azure.com/)

呈现为:

这是指向 Azure 门户的命名链接:Azure Portal

编辑:目前在托管应用程序中不支持打开动态链接

【讨论】:

  • 谢谢,但我们需要一个动态链接来引导客户访问其作为托管应用程序的一部分部署的 Web 应用程序。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-05-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多