@operato/scene-scichart 8.0.0-alpha.0 → 8.0.0-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
- 2024-08-26T00:57:16+09:00 info: File Storage is Ready.
2
- 2024-08-26T00:57:17+09:00 error: Error: Cannot find module 'oracledb'
1
+ 2024-09-10T23:40:35+09:00 info: File Storage is Ready.
2
+ 2024-09-10T23:40:36+09:00 error: Error: Cannot find module 'oracledb'
3
3
  Require stack:
4
4
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js
5
5
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js
@@ -25,7 +25,7 @@ Require stack:
25
25
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
26
26
  at Module.load (node:internal/modules/cjs/loader:1208:32)
27
27
  at Module._load (node:internal/modules/cjs/loader:1024:12)
28
- 2024-08-26T00:57:18+09:00 error: Error: Cannot find module 'oracledb'
28
+ 2024-09-10T23:40:36+09:00 error: Error: Cannot find module 'oracledb'
29
29
  Require stack:
30
30
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js
31
31
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js
@@ -51,7 +51,7 @@ Require stack:
51
51
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
52
52
  at Module.load (node:internal/modules/cjs/loader:1208:32)
53
53
  at Module._load (node:internal/modules/cjs/loader:1024:12)
54
- 2024-08-26T00:57:18+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
54
+ 2024-09-10T23:40:36+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
55
55
  Require stack:
56
56
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js
57
57
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js
@@ -76,7 +76,7 @@ Require stack:
76
76
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
77
77
  at Module.load (node:internal/modules/cjs/loader:1208:32)
78
78
  at Module._load (node:internal/modules/cjs/loader:1024:12)
79
- 2024-08-26T00:57:18+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
79
+ 2024-09-10T23:40:36+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
80
80
  Require stack:
81
81
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js
82
82
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js
@@ -100,8 +100,6 @@ Require stack:
100
100
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
101
101
  at Module.load (node:internal/modules/cjs/loader:1208:32)
102
102
  at Module._load (node:internal/modules/cjs/loader:1024:12)
103
- 2024-08-26T00:57:19+09:00 info: Default DataSource established
104
- 2024-08-26T00:57:20+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
105
- 2024-08-26T00:57:20+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
106
- 2024-08-26T00:59:44+09:00 error: Error: read ECONNRESET
107
- at TCP.onStreamRead (node:internal/stream_base_commons:218:20)
103
+ 2024-09-10T23:40:37+09:00 info: Default DataSource established
104
+ 2024-09-10T23:40:38+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
105
+ 2024-09-10T23:40:38+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
@@ -0,0 +1,50 @@
1
+ 2024-09-10T23:40:38+09:00 info: Initializing ConnectionManager...
2
+ 2024-09-10T23:40:38+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2024-09-10T23:40:38+09:00 info: Connector 'echo-back' started to ready
4
+ 2024-09-10T23:40:38+09:00 info: Connector 'http-connector' started to ready
5
+ 2024-09-10T23:40:38+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2024-09-10T23:40:38+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2024-09-10T23:40:38+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2024-09-10T23:40:38+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2024-09-10T23:40:38+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2024-09-10T23:40:38+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2024-09-10T23:40:38+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2024-09-10T23:40:38+09:00 info: Connector 'socket-server' started to ready
13
+ 2024-09-10T23:40:38+09:00 info: Connector 'operato-connector' started to ready
14
+ 2024-09-10T23:40:38+09:00 info: Connector 'email-connector' started to ready
15
+ 2024-09-10T23:40:38+09:00 info: Connector 'influxdb-connector' started to ready
16
+ 2024-09-10T23:40:38+09:00 info: Connector 'msgraph-connector' started to ready
17
+ 2024-09-10T23:40:38+09:00 info: Connector 'proxy-connector' started to ready
18
+ 2024-09-10T23:40:38+09:00 info: echo-back-servers are ready
19
+ 2024-09-10T23:40:38+09:00 info: echo-back connections are ready
20
+ 2024-09-10T23:40:38+09:00 info: http-connector connections are ready
21
+ 2024-09-10T23:40:38+09:00 info: graphql-connector connections are ready
22
+ 2024-09-10T23:40:38+09:00 info: sqlite-connector connections are ready
23
+ 2024-09-10T23:40:38+09:00 info: postgresql-connector connections are ready
24
+ 2024-09-10T23:40:38+09:00 info: mqtt-connector connections are ready
25
+ 2024-09-10T23:40:38+09:00 info: mssql-connector connections are ready
26
+ 2024-09-10T23:40:38+09:00 info: oracle-connector connections are ready
27
+ 2024-09-10T23:40:38+09:00 info: mysql-connector connections are ready
28
+ 2024-09-10T23:40:38+09:00 info: socket servers are ready
29
+ 2024-09-10T23:40:38+09:00 info: operato-connector connections are ready
30
+ 2024-09-10T23:40:38+09:00 info: email connections are ready
31
+ 2024-09-10T23:40:38+09:00 info: influxdb connections are ready
32
+ 2024-09-10T23:40:38+09:00 info: msgraph-connector connections are ready
33
+ 2024-09-10T23:40:38+09:00 info: proxy-connector connections are ready
34
+ 2024-09-10T23:40:38+09:00 info: All connector for 'echo-back-server' ready
35
+ 2024-09-10T23:40:38+09:00 info: All connector for 'echo-back' ready
36
+ 2024-09-10T23:40:38+09:00 info: All connector for 'http-connector' ready
37
+ 2024-09-10T23:40:38+09:00 info: All connector for 'graphql-connector' ready
38
+ 2024-09-10T23:40:38+09:00 info: All connector for 'sqlite-connector' ready
39
+ 2024-09-10T23:40:38+09:00 info: All connector for 'postgresql-connector' ready
40
+ 2024-09-10T23:40:38+09:00 info: All connector for 'mqtt-connector' ready
41
+ 2024-09-10T23:40:38+09:00 info: All connector for 'mssql-connector' ready
42
+ 2024-09-10T23:40:38+09:00 info: All connector for 'oracle-connector' ready
43
+ 2024-09-10T23:40:38+09:00 info: All connector for 'mysql-connector' ready
44
+ 2024-09-10T23:40:38+09:00 info: All connector for 'socket-server' ready
45
+ 2024-09-10T23:40:38+09:00 info: All connector for 'operato-connector' ready
46
+ 2024-09-10T23:40:38+09:00 info: All connector for 'email-connector' ready
47
+ 2024-09-10T23:40:38+09:00 info: All connector for 'influxdb-connector' ready
48
+ 2024-09-10T23:40:38+09:00 info: All connector for 'msgraph-connector' ready
49
+ 2024-09-10T23:40:38+09:00 info: All connector for 'proxy-connector' ready
50
+ 2024-09-10T23:40:38+09:00 info: ConnectionManager initialization done:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@operato/scene-scichart",
3
3
  "description": "scichart wrapping component",
4
- "version": "8.0.0-alpha.0",
4
+ "version": "8.0.0-alpha.2",
5
5
  "license": "MIT",
6
6
  "things-scene": true,
7
7
  "author": "heartyoh",
@@ -27,14 +27,14 @@
27
27
  "migration": "things-factory-migration"
28
28
  },
29
29
  "dependencies": {
30
- "@hatiolab/things-scene": "^3.2.0",
30
+ "@hatiolab/things-scene": "^8.0.0-alpha",
31
31
  "@operato/chart": "^8.0.0-alpha",
32
32
  "scichart": "^3.4.617"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@hatiolab/prettier-config": "^1.0.0",
36
- "@things-factory/builder": "^7.0.0",
37
- "@things-factory/operato-board": "^7.0.0",
36
+ "@things-factory/builder": "^8.0.0-alpha",
37
+ "@things-factory/operato-board": "^8.0.0-alpha",
38
38
  "@typescript-eslint/eslint-plugin": "^4.33.0",
39
39
  "@typescript-eslint/parser": "^4.33.0",
40
40
  "@web/dev-server": "^0.1.28",
@@ -59,5 +59,5 @@
59
59
  "prettier --write"
60
60
  ]
61
61
  },
62
- "gitHead": "bcfeeca92c274cb1fb20be92e1ca57bae46fd1b6"
62
+ "gitHead": "b2075b8c239d6d257f545dca9cf3c2098c1bd535"
63
63
  }
package/schema.graphql CHANGED
@@ -201,6 +201,7 @@ type Attachment {
201
201
  refBy: String
202
202
  refType: String
203
203
  size: String!
204
+ tags: Object
204
205
  updatedAt: DateTimeISO!
205
206
  updater: User
206
207
  }
@@ -219,6 +220,7 @@ input AttachmentPatch {
219
220
  name: String
220
221
  refBy: String
221
222
  refType: String
223
+ tags: Object
222
224
  }
223
225
 
224
226
  """Entity for AttributeSet"""
@@ -2363,6 +2365,7 @@ input NewAttachment {
2363
2365
  file: Upload!
2364
2366
  refBy: String
2365
2367
  refType: String
2368
+ tags: Object
2366
2369
  }
2367
2370
 
2368
2371
  input NewAttributeSet {
@@ -95,6 +95,36 @@ export class OxSciChartMultiple extends LitElement {
95
95
  await this.createOverviewChart()
96
96
  }
97
97
 
98
+ disconnectedCallback(): void {
99
+ super.disconnectedCallback()
100
+
101
+ // 그룹 차트 자원 해제
102
+ this.groupCharts.forEach(chart => {
103
+ if (chart.sciChartSurface) {
104
+ this.synchronizer.removeAxis(chart.sciChartSurface.xAxes.get(0))
105
+ this.verticalGroup.removeSurface(chart.sciChartSurface)
106
+
107
+ // 각 데이터 시리즈 명시적으로 해제
108
+ chart.dataSeries.forEach(ds => ds.delete())
109
+
110
+ // 차트 삭제
111
+ chart.sciChartSurface.delete()
112
+ }
113
+ })
114
+
115
+ // 오버뷰 차트 자원 해제
116
+ if (this.overviewChart) {
117
+ this.overviewChart.sciChartSurface.renderableSeries.clear()
118
+ this.overviewDataSeries.forEach(ds => ds.delete())
119
+ this.overviewChart.sciChartSurface.delete()
120
+ this.overviewDataSeries.length = 0
121
+ }
122
+
123
+ // 사용된 그룹, 오버뷰 데이터 초기화
124
+ this.groupCharts.length = 0
125
+ this.overviewChart = null
126
+ }
127
+
98
128
  async createOverviewChart() {
99
129
  const { chart, dataSeries } =
100
130
  (await buildSciChartOverview(
@@ -53,6 +53,24 @@ export class OxSciChart extends LitElement {
53
53
  this.dataSeries = dataSeries!
54
54
  }
55
55
 
56
+ disconnectedCallback(): void {
57
+ super.disconnectedCallback()
58
+
59
+ // 데이터 시리즈 해제
60
+ this.dataSeries.forEach(ds => ds.delete())
61
+ this.dataSeries = []
62
+
63
+ // SciChartSurface 해제
64
+ if (this.chart?.sciChartSurface) {
65
+ this.chart.sciChartSurface.renderableSeries.clear() // 렌더러 시리즈 제거
66
+ this.chart.sciChartSurface.xAxes.clear() // X축 제거
67
+ this.chart.sciChartSurface.yAxes.clear() // Y축 제거
68
+ this.chart.sciChartSurface.delete() // SciChartSurface 삭제
69
+ }
70
+
71
+ this.chart = null // chart 객체 초기화
72
+ }
73
+
56
74
  async updated(changedProperties: Map<string | number | symbol, unknown>) {
57
75
  var needDataUpdate = false
58
76
 
@@ -49,13 +49,56 @@ import {
49
49
  } from 'scichart'
50
50
  import { AxisSynchroniser } from './axis-synchronizer'
51
51
 
52
- SciChartSurface.UseCommunityLicense()
53
-
54
52
  SciChartSurface.configure({
55
53
  dataUrl: `/node_modules/scichart/_wasm/scichart2d.data`,
56
54
  wasmUrl: `/node_modules/scichart/_wasm/scichart2d.wasm`
57
55
  })
58
56
 
57
+ var licenseInitialized: boolean = false
58
+
59
+ // 커뮤니티 라이선스 적용 함수
60
+ function useCommunityLicense() {
61
+ SciChartSurface.UseCommunityLicense()
62
+ }
63
+
64
+ // SciChart 라이선스 설정 함수
65
+ async function fetchSciChartLicense() {
66
+ try {
67
+ const response = await fetch('/frontend-config/scichart')
68
+ if (response.ok) {
69
+ const { licenseKey = '' } = (await response.json()) || {}
70
+
71
+ if (licenseKey) {
72
+ SciChartSurface.setRuntimeLicenseKey(licenseKey)
73
+ console.log('SciChart license key setting complete')
74
+ } else {
75
+ console.warn('License key not found. Using community version.')
76
+ useCommunityLicense()
77
+ }
78
+ } else {
79
+ console.warn('License server response not found. Using community version.')
80
+ useCommunityLicense()
81
+ }
82
+ } catch (error) {
83
+ console.error('Error fetching license. Using community version:', error)
84
+ useCommunityLicense()
85
+ }
86
+ }
87
+
88
+ // SciChart 초기화 함수
89
+ async function initializeSciChartLicense() {
90
+ if (!licenseInitialized) {
91
+ if (window.location.hostname === 'localhost') {
92
+ console.warn('Localhost detected. Using SciChart community license.')
93
+ useCommunityLicense() // localhost인 경우 커뮤니티 라이선스 적용
94
+ } else {
95
+ await fetchSciChartLicense() // 서버에서 라이선스 키 가져오기
96
+ }
97
+
98
+ licenseInitialized = true
99
+ }
100
+ }
101
+
59
102
  export const DEFAULT_COLOR = '#FF6600'
60
103
  const DEFAULT_STROKE = '#000000'
61
104
  const POINT_MARKER_SIZE = 10
@@ -265,6 +308,8 @@ export async function buildSciChart(
265
308
  ): Promise<{ chart: any; dataSeries: any[] } | undefined> {
266
309
  if (!config) return
267
310
 
311
+ await initializeSciChartLicense()
312
+
268
313
  const { type: chartType, options, data: fromData } = config
269
314
  const { datasets = [] } = fromData || {}
270
315
  var {