@rh-support/utils 0.2.19 → 0.2.20
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insightRuleInfoUtils.d.ts","sourceRoot":"","sources":["../../src/insightRuleInfoUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AASlE,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"insightRuleInfoUtils.d.ts","sourceRoot":"","sources":["../../src/insightRuleInfoUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AASlE,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,UAM3E;AAOD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,OAIzE"}
|
|
@@ -14,9 +14,15 @@ doT_1.default.templateSettings = assign_1.default({}, doT_1.default.templateSett
|
|
|
14
14
|
function getRuleReasonHtml(ruleReason, reportDetails) {
|
|
15
15
|
var resultText = parseDotTemplate(ruleReason, reportDetails);
|
|
16
16
|
var html = ui_toolkit_1.markdownToHTML(resultText);
|
|
17
|
-
|
|
17
|
+
var anchorTagRegex = new RegExp("<a", 'g');
|
|
18
|
+
var modifiedHtml = html.toString().replace(anchorTagRegex, '<a class="pf-c-button pf-m-link anchor-tag-button"');
|
|
19
|
+
return modifiedHtml;
|
|
18
20
|
}
|
|
19
21
|
exports.getRuleReasonHtml = getRuleReasonHtml;
|
|
22
|
+
// TODO: Remove modifiedHtml once Accordion Bug is fixed and Replace with below code
|
|
23
|
+
// const resultText = parseDotTemplate(ruleReason, reportDetails);
|
|
24
|
+
// const html = markdownToHTML(resultText);
|
|
25
|
+
// return html as string;
|
|
20
26
|
function parseDotTemplate(dotString, reportDetails) {
|
|
21
27
|
var tempFn = doT_1.default.template(dotString);
|
|
22
28
|
var parsedDotString = tempFn(reportDetails);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insightRuleInfoUtils.d.ts","sourceRoot":"","sources":["../../src/insightRuleInfoUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AASlE,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"insightRuleInfoUtils.d.ts","sourceRoot":"","sources":["../../src/insightRuleInfoUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AASlE,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,UAM3E;AAOD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,OAIzE"}
|
|
@@ -8,8 +8,14 @@ doT.templateSettings = assign({}, doT.templateSettings, {
|
|
|
8
8
|
export function getRuleReasonHtml(ruleReason, reportDetails) {
|
|
9
9
|
const resultText = parseDotTemplate(ruleReason, reportDetails);
|
|
10
10
|
const html = markdownToHTML(resultText);
|
|
11
|
-
|
|
11
|
+
const anchorTagRegex = new RegExp(`<a`, 'g');
|
|
12
|
+
const modifiedHtml = html.toString().replace(anchorTagRegex, '<a class="pf-c-button pf-m-link anchor-tag-button"');
|
|
13
|
+
return modifiedHtml;
|
|
12
14
|
}
|
|
15
|
+
// TODO: Remove modifiedHtml once Accordion Bug is fixed and Replace with below code
|
|
16
|
+
// const resultText = parseDotTemplate(ruleReason, reportDetails);
|
|
17
|
+
// const html = markdownToHTML(resultText);
|
|
18
|
+
// return html as string;
|
|
13
19
|
export function parseDotTemplate(dotString, reportDetails) {
|
|
14
20
|
const tempFn = doT.template(dotString);
|
|
15
21
|
const parsedDotString = tempFn(reportDetails);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/utils",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.20",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"@types/react-dom": "^17.0.9",
|
|
88
88
|
"moment-timezone": "^0.5.32"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "888b282fb16eda05ab2c622c298164921d22bcbc"
|
|
91
91
|
}
|