@riil-frontend/component-topology 12.0.0-dev.41 → 12.0.0-dev.42

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.
@@ -24,7 +24,7 @@ import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
24
24
  import SelectionModel from "./SelectionModel";
25
25
  import CiCache from "./cache/CiCache"; // eslint-disable-next-line no-undef
26
26
 
27
- var version = typeof "12.0.0-dev.41" === 'string' ? "12.0.0-dev.41" : null;
27
+ var version = typeof "12.0.0-dev.42" === 'string' ? "12.0.0-dev.42" : null;
28
28
  console.info("\u62D3\u6251\u7248\u672C: " + version);
29
29
  /**
30
30
  * 拓扑显示和编辑
@@ -9,12 +9,19 @@ import BlockBox from "./BlockBox";
9
9
  import Link from "../../../../../../../components/Link";
10
10
  import service from "../../../../../../services/overview";
11
11
  import styles from "./index.module.scss";
12
- import { getHistory } from '@riil-frontend/component-topology-utils'; // function getHistory() {
13
- // return history;
14
- // }
12
+ import { getHistory } from '@riil-frontend/component-topology-utils';
15
13
 
16
14
  function formatUrl(url) {
17
- return url;
15
+ var _window, _window$location;
16
+
17
+ console.log(url);
18
+ var prefix = '/default/pagecenter';
19
+
20
+ if (((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.pathname.indexOf(prefix)) === 0 && (url === null || url === void 0 ? void 0 : url.indexOf(prefix)) === 0) {
21
+ return url.split(prefix)[1];
22
+ } else {
23
+ return url;
24
+ }
18
25
  }
19
26
 
20
27
  function EventsCard(props) {
@@ -24,7 +31,7 @@ function EventsCard(props) {
24
31
 
25
32
  var jumpTo = function jumpTo(url) {
26
33
  closeDetailDrawer();
27
- getHistory().push(url);
34
+ getHistory().push(formatUrl(url));
28
35
  }; // 告警table列配置
29
36
 
30
37
 
@@ -54,7 +54,7 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
54
54
  var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
55
55
 
56
56
  // eslint-disable-next-line no-undef
57
- var version = typeof "12.0.0-dev.41" === 'string' ? "12.0.0-dev.41" : null;
57
+ var version = typeof "12.0.0-dev.42" === 'string' ? "12.0.0-dev.42" : null;
58
58
  console.info("\u62D3\u6251\u7248\u672C: " + version);
59
59
  /**
60
60
  * 拓扑显示和编辑
@@ -29,11 +29,17 @@ var _indexModule = _interopRequireDefault(require("./index.module.scss"));
29
29
 
30
30
  var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
31
31
 
32
- // function getHistory() {
33
- // return history;
34
- // }
35
32
  function formatUrl(url) {
36
- return url;
33
+ var _window, _window$location;
34
+
35
+ console.log(url);
36
+ var prefix = '/default/pagecenter';
37
+
38
+ if (((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.pathname.indexOf(prefix)) === 0 && (url === null || url === void 0 ? void 0 : url.indexOf(prefix)) === 0) {
39
+ return url.split(prefix)[1];
40
+ } else {
41
+ return url;
42
+ }
37
43
  }
38
44
 
39
45
  function EventsCard(props) {
@@ -43,7 +49,7 @@ function EventsCard(props) {
43
49
 
44
50
  var jumpTo = function jumpTo(url) {
45
51
  closeDetailDrawer();
46
- (0, _componentTopologyUtils.getHistory)().push(url);
52
+ (0, _componentTopologyUtils.getHistory)().push(formatUrl(url));
47
53
  }; // 告警table列配置
48
54
 
49
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "12.0.0-dev.41",
3
+ "version": "12.0.0-dev.42",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -123,6 +123,6 @@
123
123
  "access": "public"
124
124
  },
125
125
  "license": "MIT",
126
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@12.0.0-dev.41/build/index.html",
126
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@12.0.0-dev.42/build/index.html",
127
127
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
128
128
  }