Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #176 "Report tab not loading on ADO" #363

Merged
merged 5 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions extension/DisplayBuildResultReport/src/DisplayBuildResultTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import IframeResizerContent from "!!raw-loader!iframe-resizer/js/iframeResizer.c

import * as SDK from "azure-devops-extension-sdk";
import { CommonServiceIds, IProjectPageService, getClient, IProjectInfo } from "azure-devops-extension-api";
import { IBuildPageDataService, BuildServiceIds, IBuildPageData } from "azure-devops-extension-api/Build";
import { BuildRestClient } from "azure-devops-extension-api/Build/BuildClient"
import { BuildReference, Attachment } from "azure-devops-extension-api/Build/Build";

Expand Down Expand Up @@ -61,10 +62,15 @@ export class BuildResultTab extends React.Component<{}, IBuildResultTabData>
private async initializeState(): Promise<void> {
await SDK.ready();

const config = SDK.getConfiguration();

// ugly
config.onBuildChanged(this.extractReportHtml);
const buildPageService: IBuildPageDataService = await SDK.getService(BuildServiceIds.BuildPageDataService);
const buildPageData: IBuildPageData | undefined = await buildPageService.getBuildPageData();

if (buildPageData?.build === undefined) {
console.error("Error on getting build page data");
return;
}

await this.extractReportHtml(buildPageData.build);

SDK.resize();
return;
Expand Down
3 changes: 2 additions & 1 deletion extension/DisplayBuildResultReport/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"experimentalDecorators": true,
"module": "amd",
"moduleResolution": "node",
"esModuleInterop": true,
"target": "es6",
"sourceMap": true,
"noImplicitAny": true,
Expand All @@ -24,4 +25,4 @@
]
},
"exclude": ["node_modules", "typings"]
}
}
11 changes: 6 additions & 5 deletions extension/azure-devops-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@
"properties": {
"name": "Mutation Report",
"title": "Mutation Report",
"uri": "mutation-report-tab/build-results-report-tab.html",
"supportsTasks": ["2c6a6ed5-01c9-5295-aece-eb07bf07379f"],
"supportsMobile": false,
"dynamic": true
"uri": "mutation-report-tab/build-results-report-tab.html",
"supportsTasks": ["2c6a6ed5-01c9-5295-aece-eb07bf07379f"],
"supportsMobile": false,
"dynamic": true
}
}
],"files": [
],
"files": [
{
"path": "icons",
"addressable": true
Expand Down
Loading