0

今天我试图为我的公司创建一个融合插件,并且我尝试关注atlassian 文档

我的问题是在向 atlassian-connect.json 添加新的 customContent 时尝试运行 express 应用程序,运行后npm start出现以下错误。

注册主机失败 https://admin:xxx@xxx.atlassian.net/wiki (200) {"type":"INSTALL","pingAfter":300,"status":{"done":true," statusCode":200,"contentType":"application/vnd.atl.plugins.task.install.err+json","subCode":"upm.pluginInstall.error.descriptor.not.from.marketplace","source ":"https‍://1a0adc 8f.ngrok.io/atlassian-connect.json","名称":"https‍://1a0adc8f.ngrok.io/atlassi an-connect.json"},"链接":{ "self":"/wiki/rest/plugins/1.0/pending/b88594d3-c3 c2-4760-b687-c8d860c0a377","alternate":"/wiki/rest/plugins/1.0/tasks/b88594d3 -c3c2-4760- b687-c8d860c0a377"},"时间戳":1502272147602,"userKey":"xxx","id":"xxx"} 插件
未注册;未检测到兼容主机

这是我的 atlassian-connect.json 文件:

{
"key": "my-add-on",
"name": "Ping Pong",
"description": "My very first add-on",
"vendor": {
    "name": "Angry Nerds",
    "url": "https://www.atlassian.com/angrynerds"
},
"baseUrl": "{{localBaseUrl}}",
"links": {
    "self": "{{localBaseUrl}}/atlassian-connect.json",
    "homepage": "{{localBaseUrl}}/atlassian-connect.json"
},
"authentication": {
    "type": "jwt"
},
"lifecycle": {
    "installed": "/installed"
},
"scopes": [
    "READ"
],
"modules": {
    "generalPages": [
        {
            "key": "hello-world-page-jira",
            "location": "system.top.navigation.bar",
            "name": {
                "value": "Hello World"
            },
            "url": "/hello-world",
            "conditions": [{
                "condition": "user_is_logged_in"
            }]
        },
        {
            "key": "customersViewer",
            "location": "system.header/left",
            "name": {
                "value": "Hello World"
            },
            "url": "/hello-world",
            "conditions": [{
                "condition": "user_is_logged_in"
            }]
        }
    ],
    "customContent": [
        {
            "key": "customer",
            "name": {
                "value": "Customers"
            },
            "uiSupport": {
                "contentViewComponent": {
                    "moduleKey": "customersViewer"
                },
                "listViewComponent": {
                    "moduleKey": "customerList"
                },
                "icons": {
                    "item": {
                        "url": "/images/customers.png"
                    }
                }
            },
            "apiSupport": {
                "supportedContainerTypes": ["space"]
            }
        }
    ]
}
}

有人知道发生了什么吗?

4

1 回答 1

0

contentViewComponent 在moduleKey 中找不到它所引用的generalPage。

从文档:

在上面的代码片段中,moduleKey“customersViewer”映射到我们在附加组件中定义的 generalPage 模块。这个 generalPage 被传递给我们指定的上下文参数,并相应地可视化我们的内容。

如果您使用密钥更改generalPage,hello-world-page-confluencecustomersViewer就可以安装并启动和运行。

于 2017-08-08T21:53:45.317 回答