javascripthtmlazureconfluenceallure

js net::ERR_ABORTED 404 (Not Found)


I use Allure report in Azure DevOps, and hosted this report in Azure Storage Account. I want share this report in my confluence page. For implement this i use macro "HTML include". But when i try to share my allure report i have error "js net::ERR_ABORTED 404 (Not Found)"

My structure in azure storage account like this: enter image description here

My index.html like this:

<!DOCTYPE html>
<html dir="ltr">
<head>
    <meta charset="utf-8">
    <title>Allure Report</title>
    <link rel="favicon" href="favicon.ico?v=2">
    <link rel="stylesheet" type="text/css" href="styles.css">
        <link rel="stylesheet" href="plugins/screen-diff/styles.css">
</head>
<body>
<div id="alert"></div>
<div id="content">
    <span class="spinner">
        <span class="spinner__circle"></span>
    </span>
</div>
<div id="popup"></div>
<script src="app.js"></script>
    <script src="plugins/behaviors/index.js"></script>
    <script src="plugins/packages/index.js"></script>
    <script src="plugins/screen-diff/index.js"></script>
</body>
</html>

I investigated my issue, and if i added an absolute path to "script src" for example "<script src="https://"<my_allure_report_url>"/$web/$(Build.BuildNumber)/app.js">" I have other errors something like this: "https://"<confluence___url>"/pages/widgets/executors.json 404 (Not Found)" etc. enter image description here

First off all i dont understand why if i try use HTML include confluence rewrite path to this file ? Furthermore what i need to do for resolve my problem with share allure report to confluence page ? Maybe i need modify index.html, or configure Azure CND, or install some custom plagin to confluence server ?

Any ideas ? Please helm me.

P.S. I need to use Azure storage account for my static allure report. Because only in storage account i can store a lot of report. If i right understand in azure storage static web site i cant configure web.config and use it. In Allure documentation they recommended use this solution:

"Please note If you use Azure Website or IIS in general some file types used by Allure are not enabled by default. Please, add mimetypes as shown below to your web.config in order to enable support of .json and .woff file types."

<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension=".json" mimeType="application/json" />
            <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
     </staticContent>
    </system.webServer>
</configuration> 

But it not work for Azure storage account. It work only for Azure web app.


Solution

  • So i resolve my problem just by using "iframe" in confluence. In confluence should use HTML macros and past this value:

    <iframe src='https://<your_allure_report>/index.html?r=JYXl0' width='1024' height='640' style='border:1px solid #ccc;'></iframe>