@allurereport/plugin-dashboard 3.0.0-beta.14 → 3.0.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/generators.js +5 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ Trend charts allow you to track metrics over time. Available configurations:
|
|
|
66
66
|
type: "trend",
|
|
67
67
|
dataType: "status",
|
|
68
68
|
mode: "percent", // optional, default: "raw"
|
|
69
|
-
limit: 10, // optional: limit number of builds
|
|
69
|
+
limit: 10, // optional: limit number of builds, default: 10
|
|
70
70
|
title: "Custom Status Trend", // optional
|
|
71
71
|
metadata: { // optional
|
|
72
72
|
executionIdAccessor: (executionOrder) => `build-${executionOrder}`,
|
package/dist/generators.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createBaseUrlScript, createFontLinkTag, createReportDataScript, createScriptTag, createStylesLinkTag, } from "@allurereport/web-commons";
|
|
1
|
+
import { createBaseUrlScript, createFontLinkTag, createReportDataScript, createScriptTag, createStylesLinkTag, DEFAULT_CHART_HISTORY_LIMIT, } from "@allurereport/web-commons";
|
|
2
2
|
import { randomUUID } from "crypto";
|
|
3
3
|
import Handlebars from "handlebars";
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
|
@@ -51,13 +51,14 @@ export const readTemplateManifest = async (singleFileMode) => {
|
|
|
51
51
|
return JSON.parse(templateManifest);
|
|
52
52
|
};
|
|
53
53
|
const generateTrendChart = (options, stores, context) => {
|
|
54
|
-
const {
|
|
54
|
+
const newOptions = { limit: DEFAULT_CHART_HISTORY_LIMIT, ...options };
|
|
55
|
+
const { dataType } = newOptions;
|
|
55
56
|
const { statistic, historyDataPoints, testResults } = stores;
|
|
56
57
|
if (dataType === ChartData.Status) {
|
|
57
|
-
return getStatusTrendData(statistic, context.reportName, historyDataPoints,
|
|
58
|
+
return getStatusTrendData(statistic, context.reportName, historyDataPoints, newOptions);
|
|
58
59
|
}
|
|
59
60
|
else if (dataType === ChartData.Severity) {
|
|
60
|
-
return getSeverityTrendData(testResults, context.reportName, historyDataPoints,
|
|
61
|
+
return getSeverityTrendData(testResults, context.reportName, historyDataPoints, newOptions);
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
64
|
const generatePieChart = (options, stores) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-dashboard",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.15",
|
|
4
4
|
"description": "Allure Dashboard Plugin – plugin for generating dashboard with a mix of charts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"test": "rimraf ./out && vitest run"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@allurereport/core-api": "3.0.0-beta.
|
|
36
|
-
"@allurereport/plugin-api": "3.0.0-beta.
|
|
37
|
-
"@allurereport/web-commons": "3.0.0-beta.
|
|
38
|
-
"@allurereport/web-dashboard": "3.0.0-beta.
|
|
35
|
+
"@allurereport/core-api": "3.0.0-beta.15",
|
|
36
|
+
"@allurereport/plugin-api": "3.0.0-beta.15",
|
|
37
|
+
"@allurereport/web-commons": "3.0.0-beta.15",
|
|
38
|
+
"@allurereport/web-dashboard": "3.0.0-beta.15",
|
|
39
39
|
"d3-shape": "^3.2.0",
|
|
40
40
|
"handlebars": "^4.7.8"
|
|
41
41
|
},
|