@devops-flow/devops-flow-pipeline-detail 0.0.59 → 0.0.61

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.
@@ -50,11 +50,12 @@ export var replaceHostWithBase = function replaceHostWithBase(url, newHost) {
50
50
  if (newHost && replaceUrls.some(function (item) {
51
51
  return host.includes(item);
52
52
  })) {
53
- return newHost + '/devops/getReport?reportPath=' + pathname;
53
+ return newHost + pathname;
54
54
  }
55
55
  return url;
56
56
  };
57
57
  export var replaceAppstack = function replaceAppstack(url, newHost) {
58
+ console.log(url, newHost, '11111');
58
59
  var _parseUrl2 = parseUrl(url),
59
60
  pathname = _parseUrl2.pathname;
60
61
  if (newHost) {
@@ -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.59",
3
+ "version": "0.0.61",
4
4
  "description": "flow 流水线详情",
5
5
  "medusaName": "rdc-tb-cd-assets",
6
6
  "main": "dist/PipelineFlowDetail.js",
@@ -47,5 +47,6 @@
47
47
  "peerDependencies": {
48
48
  "react": "^18.0.0",
49
49
  "react-dom": "^18.0.0"
50
- }
50
+ },
51
+ "homepage": "https://unpkg.com/@devops-flow/devops-flow-pipeline-detail@0.0.61/build/index.html"
51
52
  }