@hatiolab/things-scene 8.0.0-alpha.3 → 8.0.0-alpha.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.
- package/db.sqlite +0 -0
- package/monitor-extension/devtools.html +10 -11
- package/monitor-extension/devtools.js +11 -9
- package/monitor-extension/injected.js +1 -1
- package/monitor-extension/popup.html +9 -11
- package/monitor-extension/popup.js +15 -8
- package/package.json +1 -1
- package/schema.graphql +4549 -0
- package/things-scene-ie.js +1 -1
- package/things-scene-min.js +1 -1
- package/things-scene.mjs +4 -4
package/db.sqlite
CHANGED
|
Binary file
|
|
@@ -23,13 +23,17 @@
|
|
|
23
23
|
border: 1px solid #000;
|
|
24
24
|
border-radius: 4px;
|
|
25
25
|
width: 100%;
|
|
26
|
+
max-width: 100%;
|
|
27
|
+
max-height: 200px;
|
|
26
28
|
box-sizing: border-box;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
table {
|
|
32
|
+
flex: 1;
|
|
30
33
|
width: 100%;
|
|
31
34
|
border-collapse: collapse;
|
|
32
35
|
margin-top: 20px;
|
|
36
|
+
overflow: auto;
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
th,
|
|
@@ -53,17 +57,12 @@
|
|
|
53
57
|
<!-- sceneResidents 데이터를 보여줄 테이블 -->
|
|
54
58
|
<h2>Scene Residents Data</h2>
|
|
55
59
|
<table id="residentsTable">
|
|
56
|
-
<
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</tr>
|
|
63
|
-
</thead>
|
|
64
|
-
<tbody>
|
|
65
|
-
<!-- 데이터가 동적으로 추가됩니다 -->
|
|
66
|
-
</tbody>
|
|
60
|
+
<tr>
|
|
61
|
+
<th>Type</th>
|
|
62
|
+
<th>Up</th>
|
|
63
|
+
<th>Down</th>
|
|
64
|
+
<th>Difference (Up - Down)</th>
|
|
65
|
+
</tr>
|
|
67
66
|
</table>
|
|
68
67
|
</body>
|
|
69
68
|
</html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
chrome.devtools.panels.create('Scene', 'icons/icon48.png', 'devtools.html', function (panel) {
|
|
2
|
-
var residentChart1, residentChart2, residentChart3
|
|
2
|
+
var residentChart1, residentChart2, residentChart3, residentsTable
|
|
3
3
|
var listenerRegistered = false
|
|
4
4
|
var chartsInitialized = false
|
|
5
5
|
|
|
@@ -22,12 +22,11 @@ chrome.devtools.panels.create('Scene', 'icons/icon48.png', 'devtools.html', func
|
|
|
22
22
|
|
|
23
23
|
// sceneResidents 테이블 업데이트 함수
|
|
24
24
|
const updateResidentsTable = sceneResidents => {
|
|
25
|
-
console.log('updateResidentesTable', sceneResidents)
|
|
26
25
|
if (typeof sceneResidents !== 'object') {
|
|
27
26
|
return
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
const table =
|
|
29
|
+
const table = residentsTable
|
|
31
30
|
table.innerHTML = '' // 기존 테이블 내용을 지움
|
|
32
31
|
|
|
33
32
|
// 테이블 헤더 생성
|
|
@@ -37,12 +36,12 @@ chrome.devtools.panels.create('Scene', 'icons/icon48.png', 'devtools.html', func
|
|
|
37
36
|
|
|
38
37
|
// sceneResidents 데이터로 테이블 행 생성
|
|
39
38
|
for (const [type, residents] of Object.entries(sceneResidents)) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
const { up, down } = residents
|
|
40
|
+
const row = document.createElement('tr')
|
|
41
|
+
const difference = up - down
|
|
42
|
+
row.innerHTML = `<td>${type}</td><td>${up}</td><td>${down}</td><td>${difference}</td>`
|
|
43
|
+
|
|
44
|
+
table.appendChild(row)
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
|
|
@@ -64,6 +63,7 @@ chrome.devtools.panels.create('Scene', 'icons/icon48.png', 'devtools.html', func
|
|
|
64
63
|
]
|
|
65
64
|
},
|
|
66
65
|
options: {
|
|
66
|
+
responsive: true,
|
|
67
67
|
animation: false, // 애니메이션 비활성화
|
|
68
68
|
scales: {
|
|
69
69
|
x: {
|
|
@@ -103,6 +103,8 @@ chrome.devtools.panels.create('Scene', 'icons/icon48.png', 'devtools.html', func
|
|
|
103
103
|
residentChart2 = createChart(ctx2, 'Scene Residents Count')
|
|
104
104
|
residentChart3 = createChart(ctx3, 'ReferenceMap Residents Count')
|
|
105
105
|
|
|
106
|
+
residentsTable = window.document.getElementById('residentsTable')
|
|
107
|
+
|
|
106
108
|
chartsInitialized = true
|
|
107
109
|
}
|
|
108
110
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function logComponentResidents() {
|
|
2
2
|
const componentResidentsCount = window.scene.Component?.residentsCount || 0
|
|
3
|
+
const sceneResidents = window.scene.Component?.residents || {}
|
|
3
4
|
const sceneResidentsCount = window.scene.Scene?.residentsCount || 0
|
|
4
|
-
const sceneResidents = window.scene.Scene?.residents || {}
|
|
5
5
|
const referenceMapResidentsCount = window.scene.ReferenceMap?.residentsCount || 0
|
|
6
6
|
const timestamp = new Date().toISOString()
|
|
7
7
|
|
|
@@ -24,13 +24,16 @@
|
|
|
24
24
|
border: 1px solid #000;
|
|
25
25
|
border-radius: 4px;
|
|
26
26
|
width: 100%;
|
|
27
|
+
max-height: 200px;
|
|
27
28
|
box-sizing: border-box;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
table {
|
|
32
|
+
flex: 1;
|
|
31
33
|
width: 100%;
|
|
32
34
|
border-collapse: collapse;
|
|
33
35
|
margin-top: 20px;
|
|
36
|
+
overflow: auto;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
th,
|
|
@@ -54,17 +57,12 @@
|
|
|
54
57
|
<!-- sceneResidents 데이터를 보여줄 테이블 -->
|
|
55
58
|
<h2>Scene Residents Data</h2>
|
|
56
59
|
<table id="residentsTable">
|
|
57
|
-
<
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</tr>
|
|
64
|
-
</thead>
|
|
65
|
-
<tbody>
|
|
66
|
-
<!-- 데이터가 동적으로 추가됩니다 -->
|
|
67
|
-
</tbody>
|
|
60
|
+
<tr>
|
|
61
|
+
<th>Type</th>
|
|
62
|
+
<th>Up</th>
|
|
63
|
+
<th>Down</th>
|
|
64
|
+
<th>Difference (Up - Down)</th>
|
|
65
|
+
</tr>
|
|
68
66
|
</table>
|
|
69
67
|
</body>
|
|
70
68
|
</html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
document.addEventListener('DOMContentLoaded', () => {
|
|
2
|
-
let residentChart1, residentChart2, residentChart3
|
|
2
|
+
let residentChart1, residentChart2, residentChart3, residentsTable
|
|
3
3
|
let chartsInitialized = false
|
|
4
4
|
let listenerRegistered = false
|
|
5
5
|
|
|
@@ -29,6 +29,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
31
|
options: {
|
|
32
|
+
responsive: true,
|
|
32
33
|
animation: false, // 애니메이션 비활성화
|
|
33
34
|
scales: {
|
|
34
35
|
x: {
|
|
@@ -70,6 +71,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
70
71
|
residentChart2 = createChart(ctx2, 'Scene Residents Count')
|
|
71
72
|
residentChart3 = createChart(ctx3, 'ReferenceMap Residents Count')
|
|
72
73
|
|
|
74
|
+
residentsTable = window.document.getElementById('residentsTable')
|
|
75
|
+
|
|
73
76
|
chartsInitialized = true // 차트가 초기화되었음을 표시
|
|
74
77
|
}
|
|
75
78
|
|
|
@@ -92,7 +95,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
92
95
|
|
|
93
96
|
// sceneResidents 테이블 업데이트 함수
|
|
94
97
|
const updateResidentsTable = sceneResidents => {
|
|
95
|
-
|
|
98
|
+
if (typeof sceneResidents !== 'object') {
|
|
99
|
+
return
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const table = residentsTable
|
|
96
103
|
table.innerHTML = '' // 기존 테이블 내용을 지움
|
|
97
104
|
|
|
98
105
|
// 테이블 헤더 생성
|
|
@@ -102,12 +109,12 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
102
109
|
|
|
103
110
|
// sceneResidents 데이터로 테이블 행 생성
|
|
104
111
|
for (const [type, residents] of Object.entries(sceneResidents)) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
const { up, down } = residents
|
|
113
|
+
const row = document.createElement('tr')
|
|
114
|
+
const difference = up - down
|
|
115
|
+
row.innerHTML = `<td>${type}</td><td>${up}</td><td>${down}</td><td>${difference}</td>`
|
|
116
|
+
|
|
117
|
+
table.appendChild(row)
|
|
111
118
|
}
|
|
112
119
|
}
|
|
113
120
|
|