@cloudcare/guance-front-tools 1.0.0 → 1.0.2

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.
package/README.md CHANGED
@@ -23,9 +23,3 @@ $ grafanaCovertToGuance
23
23
  # run task
24
24
  $ grafanaCovertToGuance -d examples/grafana.json -o examples/guance.json
25
25
  ```
26
-
27
- #### 执行方式
28
-
29
- ```bash
30
- node grafanaCovertToGuance
31
- ```
@@ -75,9 +75,10 @@ const grafanaPanelTypeToGuanceChartMap: { [key: string]: GuanceChartType } = {
75
75
  heatmap: 'heatmap',
76
76
  treemap: 'treemap',
77
77
  }
78
-
78
+ const GRAFANA_KEYWORKD = ['__interval']
79
79
  function replaceVariableStr(grafanaExpr: string): string {
80
80
  return grafanaExpr.replace(/\$([\d_\w]+)/g, (match, $0) => {
81
+ if (GRAFANA_KEYWORKD.includes($0)) return match
81
82
  return `#{${$0}}`
82
83
  })
83
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudcare/guance-front-tools",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },