@devops-flow/devops-flow-pipeline-detail 0.0.57 → 0.0.59
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/dist/PipelineFlowDetail.js +1 -1
- package/es/components/common/teambition/flow-job-btn/cardsMap.js +2 -1
- package/es/components/common/teambition/flow-job-btn/state-info/index.js +7 -4
- package/es/components/common/teambition/flow-job-btn/state-info-with-redline-new/index.js +10 -7
- package/package.json +1 -1
|
@@ -116,7 +116,8 @@ export var buildButtonComponentWrapper = function buildButtonComponentWrapper(_r
|
|
|
116
116
|
return function (restProps) {
|
|
117
117
|
var button = StateInfoWithRedline[mode];
|
|
118
118
|
return button ? button(_extends({}, props, restProps, {
|
|
119
|
-
id: restProps.key
|
|
119
|
+
id: restProps.key,
|
|
120
|
+
reportLinkHost: reportLinkHost
|
|
120
121
|
})) : null;
|
|
121
122
|
};
|
|
122
123
|
case 'DEPLOY_ORDER':
|
|
@@ -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';
|
|
@@ -7,9 +7,10 @@ import Avatar from "../../avatar";
|
|
|
7
7
|
import { BaiscIconFont } from "../../icon-font";
|
|
8
8
|
import intl from "../../../../../locale";
|
|
9
9
|
import "./index.scss";
|
|
10
|
-
import {
|
|
10
|
+
import { 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,
|
|
@@ -449,7 +450,7 @@ var StateInfoButton = function StateInfoButton(args) {
|
|
|
449
450
|
if (statistic.Total && statistic.PassedRate && statistic.LineCoverageRate) {
|
|
450
451
|
var coverageLink = {
|
|
451
452
|
component: 'a',
|
|
452
|
-
href:
|
|
453
|
+
href: replaceHostWithBase(statistic._COVERAGE_REPORT.url, reportLinkHost),
|
|
453
454
|
target: '_blank'
|
|
454
455
|
};
|
|
455
456
|
var text = [intl.get({
|
|
@@ -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 {
|
|
8
|
+
import { 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';
|
|
@@ -469,7 +470,8 @@ var StateInfoButton = function StateInfoButton(props) {
|
|
|
469
470
|
var data = props.data,
|
|
470
471
|
id = props.id,
|
|
471
472
|
name = props.name,
|
|
472
|
-
hasMore = props.hasMore
|
|
473
|
+
hasMore = props.hasMore,
|
|
474
|
+
reportLinkHost = props.reportLinkHost;
|
|
473
475
|
var _JSON$parse = JSON.parse(data),
|
|
474
476
|
statistic = _JSON$parse.statInfoMap;
|
|
475
477
|
if (!statistic._REPORT && !statistic._COVERAGE_REPORT) {
|
|
@@ -477,7 +479,7 @@ var StateInfoButton = function StateInfoButton(props) {
|
|
|
477
479
|
}
|
|
478
480
|
var link = {
|
|
479
481
|
component: 'a',
|
|
480
|
-
href:
|
|
482
|
+
href: replaceHostWithBase(statistic._REPORT.url, reportLinkHost),
|
|
481
483
|
target: '_blank',
|
|
482
484
|
text: true
|
|
483
485
|
};
|
|
@@ -487,7 +489,7 @@ var StateInfoButton = function StateInfoButton(props) {
|
|
|
487
489
|
if (statistic.Total && statistic.PassedRate && statistic.LineCoverageRate) {
|
|
488
490
|
var coverageLink = {
|
|
489
491
|
component: 'a',
|
|
490
|
-
href:
|
|
492
|
+
href: replaceHostWithBase(statistic._COVERAGE_REPORT.url, reportLinkHost),
|
|
491
493
|
target: '_blank'
|
|
492
494
|
};
|
|
493
495
|
var text = [intl.get({
|
|
@@ -572,10 +574,11 @@ var Summary = function Summary(props) {
|
|
|
572
574
|
hasMore = props.hasMore;
|
|
573
575
|
var _JSON$parse2 = JSON.parse(data),
|
|
574
576
|
statistic = _JSON$parse2.statInfoMap;
|
|
577
|
+
var globalConfig = useContext(ConfigContext);
|
|
575
578
|
// const redlines = redlineResult.filter((r) => !r.checkResult);
|
|
576
579
|
var btns = [];
|
|
577
580
|
// const passed = redlines.length === 0;
|
|
578
|
-
|
|
581
|
+
var reportLinkHost = globalConfig.replaceLinks.report;
|
|
579
582
|
var link = null;
|
|
580
583
|
var _useState = useState(),
|
|
581
584
|
trustReport = _useState[0],
|
|
@@ -591,7 +594,7 @@ var Summary = function Summary(props) {
|
|
|
591
594
|
if (statistic._REPORT) {
|
|
592
595
|
link = {
|
|
593
596
|
component: 'a',
|
|
594
|
-
href:
|
|
597
|
+
href: replaceHostWithBase(statistic._REPORT.url, reportLinkHost),
|
|
595
598
|
target: '_blank',
|
|
596
599
|
text: true
|
|
597
600
|
};
|