@devops-flow/devops-flow-pipeline-detail 0.0.58 → 0.0.60

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.
@@ -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':
@@ -7,7 +7,7 @@ import Avatar from "../../avatar";
7
7
  import { BaiscIconFont } from "../../icon-font";
8
8
  import intl from "../../../../../locale";
9
9
  import "./index.scss";
10
- import { replaceHost, replaceHostWithBase } from "../replaceHost";
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
13
  import ConfigContext from "../../../../../contexts/config";
@@ -450,7 +450,7 @@ var StateInfoButton = function StateInfoButton(args) {
450
450
  if (statistic.Total && statistic.PassedRate && statistic.LineCoverageRate) {
451
451
  var coverageLink = {
452
452
  component: 'a',
453
- href: replaceHost(statistic._COVERAGE_REPORT.url),
453
+ href: replaceHostWithBase(statistic._COVERAGE_REPORT.url, reportLinkHost),
454
454
  target: '_blank'
455
455
  };
456
456
  var text = [intl.get({
@@ -5,7 +5,7 @@ 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, replaceHostWithBase } from "../replaceHost";
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
11
  import ConfigContext from "../../../../../contexts/config";
@@ -470,7 +470,8 @@ var StateInfoButton = function StateInfoButton(props) {
470
470
  var data = props.data,
471
471
  id = props.id,
472
472
  name = props.name,
473
- hasMore = props.hasMore;
473
+ hasMore = props.hasMore,
474
+ reportLinkHost = props.reportLinkHost;
474
475
  var _JSON$parse = JSON.parse(data),
475
476
  statistic = _JSON$parse.statInfoMap;
476
477
  if (!statistic._REPORT && !statistic._COVERAGE_REPORT) {
@@ -478,7 +479,7 @@ var StateInfoButton = function StateInfoButton(props) {
478
479
  }
479
480
  var link = {
480
481
  component: 'a',
481
- href: replaceHost(statistic._REPORT.url),
482
+ href: replaceHostWithBase(statistic._REPORT.url, reportLinkHost),
482
483
  target: '_blank',
483
484
  text: true
484
485
  };
@@ -488,7 +489,7 @@ var StateInfoButton = function StateInfoButton(props) {
488
489
  if (statistic.Total && statistic.PassedRate && statistic.LineCoverageRate) {
489
490
  var coverageLink = {
490
491
  component: 'a',
491
- href: replaceHost(statistic._COVERAGE_REPORT.url),
492
+ href: replaceHostWithBase(statistic._COVERAGE_REPORT.url, reportLinkHost),
492
493
  target: '_blank'
493
494
  };
494
495
  var text = [intl.get({
@@ -359,7 +359,7 @@ var PipelineInstance = function PipelineInstance(props) {
359
359
  href: helpLink('concurrency_and_build_time')
360
360
  })))), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Duration, {
361
361
  startedAt: instance.flowInstVo.gmtCreate,
362
- endedAt: utils.isFinished(instance.flowInstVo.status, instance.flowInstVo.runningStatus) ? instance.flowInstVo.gmtModified : null
362
+ endedAt: utils.isFinished(instance.flowInstVo.status) ? instance.flowInstVo.gmtModified : null
363
363
  }))), enablePackages && /*#__PURE__*/React.createElement(Packages, {
364
364
  packages: packages
365
365
  }), contextObj.FLOW_INST_RUNNING_COMMENT && /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("label", null, intl.get({
@@ -121,9 +121,7 @@ export var StatusBar = /*#__PURE__*/React.memo(function (props) {
121
121
  }, /*#__PURE__*/React.createElement(Duration, {
122
122
  className: "duration",
123
123
  startedAt: instance.createTime,
124
- endedAt: utils.isFinished(instance.status, instance.status
125
- // instance.flowInstVo.runningStatus,
126
- ) ? instance.updateTime : null
124
+ endedAt: utils.isFinished(instance.status) ? instance.updateTime : null
127
125
  }), /*#__PURE__*/React.createElement(Balloon.Tooltip, {
128
126
  trigger: /*#__PURE__*/React.createElement(YunxiaoIcon, {
129
127
  type: "question-line",
@@ -239,7 +237,7 @@ export var StatusBar = /*#__PURE__*/React.memo(function (props) {
239
237
  }, /*#__PURE__*/React.createElement(Duration, {
240
238
  className: "duration",
241
239
  startedAt: instance.createTime,
242
- endedAt: instance.updateTime
240
+ endedAt: utils.isFinished(instance.status) ? instance.updateTime : null
243
241
  }), /*#__PURE__*/React.createElement(Balloon.Tooltip, {
244
242
  trigger: /*#__PURE__*/React.createElement(YunxiaoIcon, {
245
243
  type: "question-line",
@@ -137,7 +137,7 @@ var Histories = function Histories(_ref) {
137
137
  cell: function cell(_, __, record) {
138
138
  return /*#__PURE__*/React.createElement(Duration, {
139
139
  startedAt: record.flowInstVo.gmtCreate,
140
- endedAt: utils.isFinished(record.flowInstVo.status, record.flowInstVo.runningStatus) ? record.flowInstVo.gmtModified : null
140
+ endedAt: utils.isFinished(record.flowInstVo.status) ? record.flowInstVo.gmtModified : null
141
141
  });
142
142
  }
143
143
  }),
@@ -22,7 +22,7 @@ declare const tools: {
22
22
  [x: string]: any;
23
23
  type?: string;
24
24
  }, key: any): void;
25
- isFinished(status: any, runningStatus: any): boolean;
25
+ isFinished(status: any): boolean;
26
26
  };
27
27
  export declare const onceToast: any;
28
28
  export declare const tireToast: any;
package/es/utils/index.js CHANGED
@@ -157,9 +157,8 @@ var tools = {
157
157
  }));
158
158
  this.onceToastCacheMap[key] = true;
159
159
  },
160
- isFinished: function isFinished(status, runningStatus) {
161
- if (['FINISH', 'CANCELED'].indexOf((status || '').toUpperCase()) > -1) return true;
162
- return ['FAIL', 'CANCELED'].includes(runningStatus);
160
+ isFinished: function isFinished(status) {
161
+ return ['FINISH', 'CANCELED', 'FAIL', 'SUCCESS'].indexOf((status || '').toUpperCase()) > -1;
163
162
  }
164
163
  };
165
164
  export var onceToast = tools.onceToast.bind(tools);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devops-flow/devops-flow-pipeline-detail",
3
- "version": "0.0.58",
3
+ "version": "0.0.60",
4
4
  "description": "flow 流水线详情",
5
5
  "medusaName": "rdc-tb-cd-assets",
6
6
  "main": "dist/PipelineFlowDetail.js",