@riil-frontend/component-topology 8.0.4 → 8.0.5

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.4" === 'string' ? "8.0.4" : null;
26
+ var version = typeof "8.0.5" === 'string' ? "8.0.5" : null;
27
27
  console.info("\u62D3\u6251\u7248\u672C: " + version);
28
28
  /**
29
29
  * 拓扑显示和编辑
@@ -155,7 +155,12 @@ export default function ResourceOverview(props) {
155
155
 
156
156
  function onClose() {
157
157
  isAppTopo && resourceOverviewProps.onClose && resourceOverviewProps.onClose();
158
- } // 基本信息可选项
158
+ }
159
+
160
+ var jump = function jump(roomLink) {
161
+ onClose();
162
+ roomLink && window.open("" + window.location.origin + roomLink);
163
+ }; // 基本信息可选项
159
164
 
160
165
 
161
166
  var baseInfoCol = useMemo(function () {
@@ -409,7 +414,7 @@ export default function ResourceOverview(props) {
409
414
  _baseInfoColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(col) {
410
415
  var _col;
411
416
 
412
- var infoData, attributeMap, _iterator, _step, item, value, contentTitle, link, address, owned_computer_room, owned_cabinet, roomLink, node, _data, _ref2, _ref2$, _item, _attributeMap, object, _object, displayName, attr;
417
+ var infoData, attributeMap, _iterator, _step, item, value, contentTitle, link, address, owned_computer_room, owned_cabinet, node, _data, _ref2, _ref2$, _item, _attributeMap, object, _object, displayName, attr;
413
418
 
414
419
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
415
420
  while (1) {
@@ -477,16 +482,18 @@ export default function ResourceOverview(props) {
477
482
  owned_computer_room = attributeMap.owned_computer_room, owned_cabinet = attributeMap.owned_cabinet; // 跳转3D机房定位设备
478
483
 
479
484
  if (owned_computer_room && owned_cabinet) {
480
- // /visual/room/index_runtime.html?type=preview&room_id=00000000383e3381&rack_id=11&device_id=122
481
- roomLink = "/visual/room/index_runtime.html?type=preview&room_id=" + owned_computer_room + "&rack_id=" + owned_cabinet + "&device_id=" + id;
482
- value = /*#__PURE__*/React.createElement("span", {
483
- onClick: onClose
484
- }, /*#__PURE__*/React.createElement(Link, {
485
- className: styles.link,
486
- title: address,
487
- to: roomLink,
488
- target: "_blank"
489
- }, address));
485
+ (function () {
486
+ // /visual/room/index_runtime.html?type=preview&room_id=00000000383e3381&rack_id=11&device_id=122
487
+ var roomLink = "/visual/room/index_runtime.html?type=preview&room_id=" + owned_computer_room + "&rack_id=" + owned_cabinet + "&device_id=" + id;
488
+ value = /*#__PURE__*/React.createElement("span", {
489
+ onClick: function onClick() {
490
+ jump(roomLink);
491
+ }
492
+ }, /*#__PURE__*/React.createElement("span", {
493
+ className: styles.link,
494
+ title: address
495
+ }, address));
496
+ })();
490
497
  } else {
491
498
  value = address;
492
499
  }
@@ -30,6 +30,13 @@
30
30
  overflow: hidden;
31
31
  text-overflow: ellipsis;
32
32
  white-space: nowrap;
33
+ color: var(--color-link-1);
34
+ cursor: pointer;
35
+ }
36
+ .link:hover{
37
+ color: var(--btn-text-primary-color-hover);
38
+ background-color: transparent;
39
+ border-color: transparent;
33
40
  }
34
41
  }
35
42
  }
@@ -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.4" === 'string' ? "8.0.4" : null;
57
+ var version = typeof "8.0.5" === 'string' ? "8.0.5" : null;
58
58
  console.info("\u62D3\u6251\u7248\u672C: " + version);
59
59
  /**
60
60
  * 拓扑显示和编辑
@@ -188,7 +188,12 @@ function ResourceOverview(props) {
188
188
 
189
189
  function onClose() {
190
190
  isAppTopo && resourceOverviewProps.onClose && resourceOverviewProps.onClose();
191
- } // 基本信息可选项
191
+ }
192
+
193
+ var jump = function jump(roomLink) {
194
+ onClose();
195
+ roomLink && window.open("" + window.location.origin + roomLink);
196
+ }; // 基本信息可选项
192
197
 
193
198
 
194
199
  var baseInfoCol = (0, _react.useMemo)(function () {
@@ -442,7 +447,7 @@ function ResourceOverview(props) {
442
447
  _baseInfoColChange = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(col) {
443
448
  var _col;
444
449
 
445
- var infoData, attributeMap, _iterator, _step, item, value, contentTitle, link, address, owned_computer_room, owned_cabinet, roomLink, node, _data, _ref2, _ref2$, _item, _attributeMap, object, _object, displayName, attr;
450
+ var infoData, attributeMap, _iterator, _step, item, value, contentTitle, link, address, owned_computer_room, owned_cabinet, node, _data, _ref2, _ref2$, _item, _attributeMap, object, _object, displayName, attr;
446
451
 
447
452
  return _regenerator["default"].wrap(function _callee4$(_context4) {
448
453
  while (1) {
@@ -510,16 +515,18 @@ function ResourceOverview(props) {
510
515
  owned_computer_room = attributeMap.owned_computer_room, owned_cabinet = attributeMap.owned_cabinet; // 跳转3D机房定位设备
511
516
 
512
517
  if (owned_computer_room && owned_cabinet) {
513
- // /visual/room/index_runtime.html?type=preview&room_id=00000000383e3381&rack_id=11&device_id=122
514
- roomLink = "/visual/room/index_runtime.html?type=preview&room_id=" + owned_computer_room + "&rack_id=" + owned_cabinet + "&device_id=" + id;
515
- value = /*#__PURE__*/_react["default"].createElement("span", {
516
- onClick: onClose
517
- }, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
518
- className: _indexModule["default"].link,
519
- title: address,
520
- to: roomLink,
521
- target: "_blank"
522
- }, address));
518
+ (function () {
519
+ // /visual/room/index_runtime.html?type=preview&room_id=00000000383e3381&rack_id=11&device_id=122
520
+ var roomLink = "/visual/room/index_runtime.html?type=preview&room_id=" + owned_computer_room + "&rack_id=" + owned_cabinet + "&device_id=" + id;
521
+ value = /*#__PURE__*/_react["default"].createElement("span", {
522
+ onClick: function onClick() {
523
+ jump(roomLink);
524
+ }
525
+ }, /*#__PURE__*/_react["default"].createElement("span", {
526
+ className: _indexModule["default"].link,
527
+ title: address
528
+ }, address));
529
+ })();
523
530
  } else {
524
531
  value = address;
525
532
  }
@@ -30,6 +30,13 @@
30
30
  overflow: hidden;
31
31
  text-overflow: ellipsis;
32
32
  white-space: nowrap;
33
+ color: var(--color-link-1);
34
+ cursor: pointer;
35
+ }
36
+ .link:hover{
37
+ color: var(--btn-text-primary-color-hover);
38
+ background-color: transparent;
39
+ border-color: transparent;
33
40
  }
34
41
  }
35
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "8.0.4",
3
+ "version": "8.0.5",
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.4/build/index.html",
119
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@8.0.5/build/index.html",
120
120
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
121
121
  }