@riil-frontend/component-topology 8.0.7 → 8.0.8

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.
@@ -23,7 +23,7 @@ import topoFactory from "./topoFactory";
23
23
  import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
24
24
  import SelectionModel from "./SelectionModel"; // eslint-disable-next-line no-undef
25
25
 
26
- var version = typeof "8.0.7" === 'string' ? "8.0.7" : null;
26
+ var version = typeof "8.0.8" === 'string' ? "8.0.8" : null;
27
27
  console.info("\u62D3\u6251\u7248\u672C: " + version);
28
28
  /**
29
29
  * 拓扑显示和编辑
@@ -487,32 +487,39 @@ export default function ResourceOverview(props) {
487
487
  switch (_context5.prev = _context5.next) {
488
488
  case 0:
489
489
  _context5.t0 = item.dataIndex;
490
- _context5.next = _context5.t0 === 'display_name' ? 3 : _context5.t0 === 'ciName' ? 7 : _context5.t0 === 'res_address' ? 10 : _context5.t0 === 'imageName' ? 17 : 21;
490
+ _context5.next = _context5.t0 === 'display_name' ? 3 : _context5.t0 === 'ciName' ? 6 : _context5.t0 === 'res_address' ? 9 : _context5.t0 === 'imageName' ? 16 : 20;
491
491
  break;
492
492
 
493
493
  case 3:
494
- link = "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + ciTypeMeta.domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType; // 资源跳转链接
495
-
496
- value = /*#__PURE__*/React.createElement("span", {
497
- onClick: onClose
498
- }, /*#__PURE__*/React.createElement(Link, {
499
- className: styles.link,
500
- title: attributeMap.display_name || '',
501
- to: formatUrl(link)
502
- }, attributeMap.display_name || '-'));
494
+ // 无监控模板不能跳转详情。跳转前需判定资源实例数据属性中是否包含support_templates属性。若不包含,则不能跳转
495
+ if (attributeMap.support_templates) {
496
+ link = "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + ciTypeMeta.domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType; // 资源跳转链接
497
+
498
+ value = /*#__PURE__*/React.createElement("span", {
499
+ onClick: onClose
500
+ }, /*#__PURE__*/React.createElement(Link, {
501
+ className: styles.link,
502
+ disabled: true,
503
+ title: attributeMap.display_name || '',
504
+ to: formatUrl(link)
505
+ }, attributeMap.display_name || '-'));
506
+ } else {
507
+ value = attributeMap.display_name || '-';
508
+ }
509
+
503
510
  contentTitle = attributeMap.display_name || '-';
504
- return _context5.abrupt("break", 22);
511
+ return _context5.abrupt("break", 21);
505
512
 
506
- case 7:
513
+ case 6:
507
514
  value = ciTypeMeta.displayName;
508
515
  contentTitle = value;
509
- return _context5.abrupt("break", 22);
516
+ return _context5.abrupt("break", 21);
510
517
 
511
- case 10:
512
- _context5.next = 12;
518
+ case 9:
519
+ _context5.next = 11;
513
520
  return getAddressFormat(attributeMap);
514
521
 
515
- case 12:
522
+ case 11:
516
523
  address = _context5.sent;
517
524
  owned_computer_room = attributeMap.owned_computer_room, owned_cabinet = attributeMap.owned_cabinet; // 跳转3D机房定位设备
518
525
 
@@ -532,18 +539,18 @@ export default function ResourceOverview(props) {
532
539
  }
533
540
 
534
541
  contentTitle = address;
535
- return _context5.abrupt("break", 22);
542
+ return _context5.abrupt("break", 21);
536
543
 
537
- case 17:
544
+ case 16:
538
545
  node = topo.getDataModel().getDataByTag(id);
539
546
  value = (node === null || node === void 0 ? void 0 : node.a('customName')) || (node === null || node === void 0 ? void 0 : node.a('name')) || '-';
540
547
  contentTitle = value;
541
- return _context5.abrupt("break", 22);
548
+ return _context5.abrupt("break", 21);
542
549
 
543
- case 21:
544
- return _context5.abrupt("break", 22);
550
+ case 20:
551
+ return _context5.abrupt("break", 21);
545
552
 
546
- case 22:
553
+ case 21:
547
554
  case "end":
548
555
  return _context5.stop();
549
556
  }
@@ -54,7 +54,7 @@ var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTag
54
54
  var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
55
55
 
56
56
  // eslint-disable-next-line no-undef
57
- var version = typeof "8.0.7" === 'string' ? "8.0.7" : null;
57
+ var version = typeof "8.0.8" === 'string' ? "8.0.8" : null;
58
58
  console.info("\u62D3\u6251\u7248\u672C: " + version);
59
59
  /**
60
60
  * 拓扑显示和编辑
@@ -520,32 +520,39 @@ function ResourceOverview(props) {
520
520
  switch (_context5.prev = _context5.next) {
521
521
  case 0:
522
522
  _context5.t0 = item.dataIndex;
523
- _context5.next = _context5.t0 === 'display_name' ? 3 : _context5.t0 === 'ciName' ? 7 : _context5.t0 === 'res_address' ? 10 : _context5.t0 === 'imageName' ? 17 : 21;
523
+ _context5.next = _context5.t0 === 'display_name' ? 3 : _context5.t0 === 'ciName' ? 6 : _context5.t0 === 'res_address' ? 9 : _context5.t0 === 'imageName' ? 16 : 20;
524
524
  break;
525
525
 
526
526
  case 3:
527
- link = "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + ciTypeMeta.domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType; // 资源跳转链接
528
-
529
- value = /*#__PURE__*/_react["default"].createElement("span", {
530
- onClick: onClose
531
- }, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
532
- className: _indexModule["default"].link,
533
- title: attributeMap.display_name || '',
534
- to: formatUrl(link)
535
- }, attributeMap.display_name || '-'));
527
+ // 无监控模板不能跳转详情。跳转前需判定资源实例数据属性中是否包含support_templates属性。若不包含,则不能跳转
528
+ if (attributeMap.support_templates) {
529
+ link = "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + ciTypeMeta.domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType; // 资源跳转链接
530
+
531
+ value = /*#__PURE__*/_react["default"].createElement("span", {
532
+ onClick: onClose
533
+ }, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
534
+ className: _indexModule["default"].link,
535
+ disabled: true,
536
+ title: attributeMap.display_name || '',
537
+ to: formatUrl(link)
538
+ }, attributeMap.display_name || '-'));
539
+ } else {
540
+ value = attributeMap.display_name || '-';
541
+ }
542
+
536
543
  contentTitle = attributeMap.display_name || '-';
537
- return _context5.abrupt("break", 22);
544
+ return _context5.abrupt("break", 21);
538
545
 
539
- case 7:
546
+ case 6:
540
547
  value = ciTypeMeta.displayName;
541
548
  contentTitle = value;
542
- return _context5.abrupt("break", 22);
549
+ return _context5.abrupt("break", 21);
543
550
 
544
- case 10:
545
- _context5.next = 12;
551
+ case 9:
552
+ _context5.next = 11;
546
553
  return getAddressFormat(attributeMap);
547
554
 
548
- case 12:
555
+ case 11:
549
556
  address = _context5.sent;
550
557
  owned_computer_room = attributeMap.owned_computer_room, owned_cabinet = attributeMap.owned_cabinet; // 跳转3D机房定位设备
551
558
 
@@ -565,18 +572,18 @@ function ResourceOverview(props) {
565
572
  }
566
573
 
567
574
  contentTitle = address;
568
- return _context5.abrupt("break", 22);
575
+ return _context5.abrupt("break", 21);
569
576
 
570
- case 17:
577
+ case 16:
571
578
  node = topo.getDataModel().getDataByTag(id);
572
579
  value = (node === null || node === void 0 ? void 0 : node.a('customName')) || (node === null || node === void 0 ? void 0 : node.a('name')) || '-';
573
580
  contentTitle = value;
574
- return _context5.abrupt("break", 22);
581
+ return _context5.abrupt("break", 21);
575
582
 
576
- case 21:
577
- return _context5.abrupt("break", 22);
583
+ case 20:
584
+ return _context5.abrupt("break", 21);
578
585
 
579
- case 22:
586
+ case 21:
580
587
  case "end":
581
588
  return _context5.stop();
582
589
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "8.0.7",
3
+ "version": "8.0.8",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -116,6 +116,6 @@
116
116
  "access": "public"
117
117
  },
118
118
  "license": "MIT",
119
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@8.0.7/build/index.html",
119
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@8.0.8/build/index.html",
120
120
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
121
121
  }