@devops-flow/devops-flow-pipeline-detail 0.0.57 → 0.0.58
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,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
3
3
|
import { Button } from '@teamix/ui';
|
|
4
4
|
import { Title } from '@alife/devops-ui';
|
|
5
5
|
import QRCode from 'qrcode.react';
|
|
@@ -10,6 +10,7 @@ import "./index.scss";
|
|
|
10
10
|
import { replaceHost, replaceHostWithBase } from "../replaceHost";
|
|
11
11
|
import { CommonButton, StatInfoItem } from "../stat-info-s-common/common";
|
|
12
12
|
import confirmOpenReportDialog, { getTrustPipelineReportConfig } from "../stat-info-s-common/RememberConfirm";
|
|
13
|
+
import ConfigContext from "../../../../../contexts/config";
|
|
13
14
|
var skippedOrOthers = function skippedOrOthers(stat) {
|
|
14
15
|
return stat.Skipped ? {
|
|
15
16
|
value: stat.Skipped.value,
|
|
@@ -534,6 +535,8 @@ var Summary = function Summary(props) {
|
|
|
534
535
|
name = props.name,
|
|
535
536
|
hasMore = props.hasMore;
|
|
536
537
|
var statistic = JSON.parse(data);
|
|
538
|
+
var globalConfig = useContext(ConfigContext);
|
|
539
|
+
var reportLinkHost = globalConfig.replaceLinks.report;
|
|
537
540
|
var btns = [];
|
|
538
541
|
var link = null;
|
|
539
542
|
var _useState = useState(),
|
|
@@ -597,7 +600,7 @@ var Summary = function Summary(props) {
|
|
|
597
600
|
if (statistic._REPORT) {
|
|
598
601
|
link = {
|
|
599
602
|
component: 'a',
|
|
600
|
-
href:
|
|
603
|
+
href: replaceHostWithBase(statistic._REPORT.url, reportLinkHost),
|
|
601
604
|
target: '_blank',
|
|
602
605
|
text: true
|
|
603
606
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
3
3
|
import { Dropdown, Button, Tag } from '@teamix/ui';
|
|
4
4
|
import { Title, YunxiaoIcon } from '@alife/devops-ui';
|
|
5
5
|
import { BaiscIconFont } from "../../icon-font";
|
|
6
6
|
import intl from "../../../../../locale";
|
|
7
7
|
import "./index.scss";
|
|
8
|
-
import { replaceHost } from "../replaceHost";
|
|
8
|
+
import { replaceHost, replaceHostWithBase } from "../replaceHost";
|
|
9
9
|
import { CommonButton, StatInfoItem } from "../stat-info-s-common/common";
|
|
10
10
|
import confirmOpenReportDialog, { getTrustPipelineReportConfig } from "../stat-info-s-common/RememberConfirm";
|
|
11
|
+
import ConfigContext from "../../../../../contexts/config";
|
|
11
12
|
var rateClass = function rateClass(rate) {
|
|
12
13
|
if (parseInt(rate, 0) > 99) return 'success';
|
|
13
14
|
if (parseInt(rate, 0) > 60) return 'warning';
|
|
@@ -572,10 +573,11 @@ var Summary = function Summary(props) {
|
|
|
572
573
|
hasMore = props.hasMore;
|
|
573
574
|
var _JSON$parse2 = JSON.parse(data),
|
|
574
575
|
statistic = _JSON$parse2.statInfoMap;
|
|
576
|
+
var globalConfig = useContext(ConfigContext);
|
|
575
577
|
// const redlines = redlineResult.filter((r) => !r.checkResult);
|
|
576
578
|
var btns = [];
|
|
577
579
|
// const passed = redlines.length === 0;
|
|
578
|
-
|
|
580
|
+
var reportLinkHost = globalConfig.replaceLinks.report;
|
|
579
581
|
var link = null;
|
|
580
582
|
var _useState = useState(),
|
|
581
583
|
trustReport = _useState[0],
|
|
@@ -591,7 +593,7 @@ var Summary = function Summary(props) {
|
|
|
591
593
|
if (statistic._REPORT) {
|
|
592
594
|
link = {
|
|
593
595
|
component: 'a',
|
|
594
|
-
href:
|
|
596
|
+
href: replaceHostWithBase(statistic._REPORT.url, reportLinkHost),
|
|
595
597
|
target: '_blank',
|
|
596
598
|
text: true
|
|
597
599
|
};
|