Commit f407ab25f0817e5b0501b1d22e23c7551708e5c8
Merge branch 'main' of git.yuntengiot.com:huang/thingskit-drawio
Showing
9 changed files
with
149 additions
and
99 deletions
Too many changes to show.
To preserve performance only 9 of 12 files are displayed.
.idea/.gitignore
deleted
100644 → 0
.idea/azure/azureSettings.xml
deleted
100644 → 0
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<project version="4"> | ||
3 | - <component name="AzureSettings"> | ||
4 | - <option name="appInsights" value="rO0ABXVyAEtbTGNvbS5taWNyb3NvZnQuYXBwbGljYXRpb25pbnNpZ2h0cy5wcmVmZXJlbmNlLkFwcGxpY2F0aW9uSW5zaWdodHNSZXNvdXJjZTvCzxEP0C2HbAIAAHhwAAAAAA==" /> | ||
5 | - </component> | ||
6 | -</project> |
.idea/google-java-format.xml
deleted
100644 → 0
.idea/modules.xml
deleted
100644 → 0
.idea/runConfigurations.xml
deleted
100644 → 0
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<project version="4"> | ||
3 | - <component name="RunConfigurationProducerService"> | ||
4 | - <option name="ignoredProducers"> | ||
5 | - <set> | ||
6 | - <option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" /> | ||
7 | - </set> | ||
8 | - </option> | ||
9 | - </component> | ||
10 | -</project> |
.idea/thingskit-drawio.iml
deleted
100644 → 0
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<module type="JAVA_MODULE" version="4"> | ||
3 | - <component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
4 | - <exclude-output /> | ||
5 | - <content url="file://$MODULE_DIR$" /> | ||
6 | - <orderEntry type="inheritedJdk" /> | ||
7 | - <orderEntry type="sourceFolder" forTests="false" /> | ||
8 | - </component> | ||
9 | -</module> |
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | <meta name="Keywords" content="diagram, online, flow chart, flowchart maker, uml, erd"> | 9 | <meta name="Keywords" content="diagram, online, flow chart, flowchart maker, uml, erd"> |
10 | <meta itemprop="name" content="diagrams.net - free flowchart maker and diagrams online"> | 10 | <meta itemprop="name" content="diagrams.net - free flowchart maker and diagrams online"> |
11 | <meta itemprop="description" content="diagrams.net is a free online diagramming application and flowchart maker . You can use it to create UML, entity relationship, | 11 | <meta itemprop="description" content="diagrams.net is a free online diagramming application and flowchart maker . You can use it to create UML, entity relationship, |
12 | - org charts, BPMN and BPM, database schema and networks. Also possible are telecommunication network, workflow, flowcharts, maps overlays and GIS, electronic | 12 | + org charts, BPMN and BPM, database schema and networks. Also possible are telecommunication network, workflow, flowcharts, maps overlays and GIS, electronic |
13 | circuit and social network diagrams."> | 13 | circuit and social network diagrams."> |
14 | <meta itemprop="image" content="https://lh4.googleusercontent.com/-cLKEldMbT_E/Tx8qXDuw6eI/AAAAAAAAAAs/Ke0pnlk8Gpg/w500-h344-k/BPMN%2Bdiagram%2Brc2f.png"> | 14 | <meta itemprop="image" content="https://lh4.googleusercontent.com/-cLKEldMbT_E/Tx8qXDuw6eI/AAAAAAAAAAs/Ke0pnlk8Gpg/w500-h344-k/BPMN%2Bdiagram%2Brc2f.png"> |
15 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | 15 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> |
@@ -17,18 +17,25 @@ | @@ -17,18 +17,25 @@ | ||
17 | <meta name="mobile-web-app-capable" content="yes"> | 17 | <meta name="mobile-web-app-capable" content="yes"> |
18 | <meta name="theme-color" content="#d89000"> | 18 | <meta name="theme-color" content="#d89000"> |
19 | <script src="./plugins/axios.min.js"></script> | 19 | <script src="./plugins/axios.min.js"></script> |
20 | - <script src="./js/jquery/jquery-3.3.1.min.js"></script> | ||
21 | - <script src="./js/jquery.easyui.min.js"></script> | 20 | +<!-- <script src="./js/jquery/jquery-3.3.1.min.js"></script>--> |
21 | +<!-- <script src="./js/jquery.easyui.min.js"></script>--> | ||
22 | <link rel="stylesheet" href="https://cdnjs.loli.net/ajax/libs/layui/2.6.8/css/layui.min.css" integrity="sha512-iQBJbsNHXUcgEIgWThd2dr8tOdKPvICwqjPEZYY81z3eMya44A5MiAqfWSCh+Ee1YzNYkdrI982Qhwgr8LEYOQ==" crossorigin="anonymous" referrerpolicy="no-referrer" /> | 22 | <link rel="stylesheet" href="https://cdnjs.loli.net/ajax/libs/layui/2.6.8/css/layui.min.css" integrity="sha512-iQBJbsNHXUcgEIgWThd2dr8tOdKPvICwqjPEZYY81z3eMya44A5MiAqfWSCh+Ee1YzNYkdrI982Qhwgr8LEYOQ==" crossorigin="anonymous" referrerpolicy="no-referrer" /> |
23 | <script src="https://cdnjs.loli.net/ajax/libs/layui/2.6.8/layui.min.js" integrity="sha512-EKrFvch3qTzLFQgjbcjpsRmF8T3UCtc9ojtMAu6dvvP+bV8qYUDOaQ84nwYCkSLT7lbqGoya/Kf+8fyCBE0vRg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | 23 | <script src="https://cdnjs.loli.net/ajax/libs/layui/2.6.8/layui.min.js" integrity="sha512-EKrFvch3qTzLFQgjbcjpsRmF8T3UCtc9ojtMAu6dvvP+bV8qYUDOaQ84nwYCkSLT7lbqGoya/Kf+8fyCBE0vRg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> |
24 | - | 24 | + |
25 | + <!-- 引入修改样式 --> | ||
26 | + <link rel="stylesheet" href="./styles/formatChange.css"> | ||
27 | + | ||
25 | <!-- 引入select.zTree及相关依赖 --> | 28 | <!-- 引入select.zTree及相关依赖 --> |
26 | - <link rel="stylesheet" href="./styles/zTreeStyle.css" type="text/css"> | ||
27 | - <link rel="stylesheet" href="./styles/jquery.select.zTree.v1.5.css" type="text/css"> | ||
28 | - <script type="text/javascript" src="./js/jquery.ztree.core.min.js"></script> | ||
29 | - <script type="text/javascript" src="./js/jquery.ztree.exhide.min.js"></script> | ||
30 | - <script type="text/javascript" src="./js/jquery.select.zTree.v1.5.min.js"></script> | 29 | +<!-- <link rel="stylesheet" href="./styles/zTreeStyle.css" type="text/css">--> |
30 | +<!-- <link rel="stylesheet" href="./styles/jquery.select.zTree.v1.5.css" type="text/css">--> | ||
31 | +<!-- <script type="text/javascript" src="./js/jquery.ztree.core.min.js"></script>--> | ||
32 | +<!-- <script type="text/javascript" src="./js/jquery.ztree.exhide.min.js"></script>--> | ||
33 | +<!-- <script type="text/javascript" src="./js/jquery.select.zTree.v1.5.min.js"></script>--> | ||
34 | + | ||
35 | +<!-- Axios --> | ||
31 | <script src="./plugins/defHttp.js"></script> | 36 | <script src="./plugins/defHttp.js"></script> |
37 | + | ||
38 | + <script src="./js/api/index.js"></script> | ||
32 | 39 | ||
33 | <script type="text/javascript"> | 40 | <script type="text/javascript"> |
34 | /** | 41 | /** |
@@ -54,27 +61,27 @@ | @@ -54,27 +61,27 @@ | ||
54 | { | 61 | { |
55 | var result = new Object(); | 62 | var result = new Object(); |
56 | var params = window.location.search.slice(1).split('&'); | 63 | var params = window.location.search.slice(1).split('&'); |
57 | - | 64 | + |
58 | for (var i = 0; i < params.length; i++) | 65 | for (var i = 0; i < params.length; i++) |
59 | { | 66 | { |
60 | var idx = params[i].indexOf('='); | 67 | var idx = params[i].indexOf('='); |
61 | - | 68 | + |
62 | if (idx > 0) | 69 | if (idx > 0) |
63 | { | 70 | { |
64 | result[params[i].substring(0, idx)] = params[i].substring(idx + 1); | 71 | result[params[i].substring(0, idx)] = params[i].substring(idx + 1); |
65 | } | 72 | } |
66 | } | 73 | } |
67 | - | 74 | + |
68 | return result; | 75 | return result; |
69 | })(); | 76 | })(); |
70 | - | 77 | + |
71 | // Forces CDN caches by passing URL parameters via URL hash | 78 | // Forces CDN caches by passing URL parameters via URL hash |
72 | if (window.location.hash != null && window.location.hash.substring(0, 2) == '#P') | 79 | if (window.location.hash != null && window.location.hash.substring(0, 2) == '#P') |
73 | { | 80 | { |
74 | try | 81 | try |
75 | { | 82 | { |
76 | urlParams = JSON.parse(decodeURIComponent(window.location.hash.substring(2))); | 83 | urlParams = JSON.parse(decodeURIComponent(window.location.hash.substring(2))); |
77 | - | 84 | + |
78 | if (urlParams.hash != null) | 85 | if (urlParams.hash != null) |
79 | { | 86 | { |
80 | window.location.hash = urlParams.hash; | 87 | window.location.hash = urlParams.hash; |
@@ -85,7 +92,7 @@ | @@ -85,7 +92,7 @@ | ||
85 | // ignore | 92 | // ignore |
86 | } | 93 | } |
87 | } | 94 | } |
88 | - | 95 | + |
89 | // Global variable for desktop | 96 | // Global variable for desktop |
90 | var mxIsElectron = window && window.process && window.process.type; | 97 | var mxIsElectron = window && window.process && window.process.type; |
91 | 98 | ||
@@ -95,21 +102,21 @@ | @@ -95,21 +102,21 @@ | ||
95 | (function() | 102 | (function() |
96 | { | 103 | { |
97 | var proto = window.location.protocol; | 104 | var proto = window.location.protocol; |
98 | - | 105 | + |
99 | if (!mxIsElectron) | 106 | if (!mxIsElectron) |
100 | { | 107 | { |
101 | var host = window.location.host; | 108 | var host = window.location.host; |
102 | - | 109 | + |
103 | // Redirects apex, drive and rt to www | 110 | // Redirects apex, drive and rt to www |
104 | if (host === 'draw.io' || host === 'rt.draw.io' || host === 'drive.draw.io') | 111 | if (host === 'draw.io' || host === 'rt.draw.io' || host === 'drive.draw.io') |
105 | { | 112 | { |
106 | host = 'www.draw.io'; | 113 | host = 'www.draw.io'; |
107 | } | 114 | } |
108 | - | 115 | + |
109 | var href = proto + '//' + host + window.location.href.substring( | 116 | var href = proto + '//' + host + window.location.href.substring( |
110 | window.location.protocol.length + | 117 | window.location.protocol.length + |
111 | window.location.host.length + 2); | 118 | window.location.host.length + 2); |
112 | - | 119 | + |
113 | // Redirects if href changes | 120 | // Redirects if href changes |
114 | if (href != window.location.href) | 121 | if (href != window.location.href) |
115 | { | 122 | { |
@@ -118,7 +125,7 @@ | @@ -118,7 +125,7 @@ | ||
118 | } | 125 | } |
119 | })(); | 126 | })(); |
120 | } | 127 | } |
121 | - | 128 | + |
122 | /** | 129 | /** |
123 | * Adds meta tag to the page. | 130 | * Adds meta tag to the page. |
124 | */ | 131 | */ |
@@ -127,15 +134,15 @@ | @@ -127,15 +134,15 @@ | ||
127 | try | 134 | try |
128 | { | 135 | { |
129 | var s = document.createElement('meta'); | 136 | var s = document.createElement('meta'); |
130 | - | ||
131 | - if (name != null) | 137 | + |
138 | + if (name != null) | ||
132 | { | 139 | { |
133 | s.setAttribute('name', name); | 140 | s.setAttribute('name', name); |
134 | } | 141 | } |
135 | 142 | ||
136 | s.setAttribute('content', content); | 143 | s.setAttribute('content', content); |
137 | - | ||
138 | - if (httpEquiv != null) | 144 | + |
145 | + if (httpEquiv != null) | ||
139 | { | 146 | { |
140 | s.setAttribute('http-equiv', httpEquiv); | 147 | s.setAttribute('http-equiv', httpEquiv); |
141 | } | 148 | } |
@@ -148,14 +155,14 @@ | @@ -148,14 +155,14 @@ | ||
148 | // ignore | 155 | // ignore |
149 | } | 156 | } |
150 | }; | 157 | }; |
151 | - | 158 | + |
152 | /** | 159 | /** |
153 | * Synchronously adds scripts to the page. | 160 | * Synchronously adds scripts to the page. |
154 | */ | 161 | */ |
155 | function mxscript(src, onLoad, id, dataAppKey, noWrite) | 162 | function mxscript(src, onLoad, id, dataAppKey, noWrite) |
156 | { | 163 | { |
157 | var defer = onLoad == null && !noWrite; | 164 | var defer = onLoad == null && !noWrite; |
158 | - | 165 | + |
159 | if ((urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function") || | 166 | if ((urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function") || |
160 | onLoad != null || noWrite) | 167 | onLoad != null || noWrite) |
161 | { | 168 | { |
@@ -168,16 +175,16 @@ | @@ -168,16 +175,16 @@ | ||
168 | { | 175 | { |
169 | s.setAttribute('id', id); | 176 | s.setAttribute('id', id); |
170 | } | 177 | } |
171 | - | 178 | + |
172 | if (dataAppKey != null) | 179 | if (dataAppKey != null) |
173 | { | 180 | { |
174 | s.setAttribute('data-app-key', dataAppKey); | 181 | s.setAttribute('data-app-key', dataAppKey); |
175 | } | 182 | } |
176 | - | 183 | + |
177 | if (onLoad != null) | 184 | if (onLoad != null) |
178 | { | 185 | { |
179 | var r = false; | 186 | var r = false; |
180 | - | 187 | + |
181 | s.onload = s.onreadystatechange = function() | 188 | s.onload = s.onreadystatechange = function() |
182 | { | 189 | { |
183 | if (!r && (!this.readyState || this.readyState == 'complete')) | 190 | if (!r && (!this.readyState || this.readyState == 'complete')) |
@@ -187,9 +194,9 @@ | @@ -187,9 +194,9 @@ | ||
187 | } | 194 | } |
188 | }; | 195 | }; |
189 | } | 196 | } |
190 | - | 197 | + |
191 | var t = document.getElementsByTagName('script')[0]; | 198 | var t = document.getElementsByTagName('script')[0]; |
192 | - | 199 | + |
193 | if (t != null) | 200 | if (t != null) |
194 | { | 201 | { |
195 | t.parentNode.insertBefore(s, t); | 202 | t.parentNode.insertBefore(s, t); |
@@ -211,11 +218,11 @@ | @@ -211,11 +218,11 @@ | ||
211 | g.type = 'text/javascript'; | 218 | g.type = 'text/javascript'; |
212 | g.async = true; | 219 | g.async = true; |
213 | g.src = src; | 220 | g.src = src; |
214 | - | 221 | + |
215 | var s = document.getElementsByTagName('script')[0]; | 222 | var s = document.getElementsByTagName('script')[0]; |
216 | s.parentNode.insertBefore(g, s); | 223 | s.parentNode.insertBefore(g, s); |
217 | }; | 224 | }; |
218 | - | 225 | + |
219 | /** | 226 | /** |
220 | * Adds meta tags with application name (depends on offline URL parameter) | 227 | * Adds meta tags with application name (depends on offline URL parameter) |
221 | */ | 228 | */ |
@@ -230,10 +237,10 @@ | @@ -230,10 +237,10 @@ | ||
230 | mxmeta(null, 'default-src \'self\' \'unsafe-inline\'; connect-src \'self\' https://*.draw.io https://fonts.googleapis.com https://fonts.gstatic.com; img-src * data:; media-src *; font-src *; style-src-elem \'self\' \'unsafe-inline\' https://fonts.googleapis.com', 'Content-Security-Policy'); | 237 | mxmeta(null, 'default-src \'self\' \'unsafe-inline\'; connect-src \'self\' https://*.draw.io https://fonts.googleapis.com https://fonts.gstatic.com; img-src * data:; media-src *; font-src *; style-src-elem \'self\' \'unsafe-inline\' https://fonts.googleapis.com', 'Content-Security-Policy'); |
231 | } | 238 | } |
232 | })(); | 239 | })(); |
233 | - | 240 | + |
234 | // Checks for local storage | 241 | // Checks for local storage |
235 | var isLocalStorage = false; | 242 | var isLocalStorage = false; |
236 | - | 243 | + |
237 | try | 244 | try |
238 | { | 245 | { |
239 | isLocalStorage = urlParams['local'] != '1' && typeof(localStorage) != 'undefined'; | 246 | isLocalStorage = urlParams['local'] != '1' && typeof(localStorage) != 'undefined'; |
@@ -244,15 +251,15 @@ | @@ -244,15 +251,15 @@ | ||
244 | } | 251 | } |
245 | 252 | ||
246 | var mxScriptsLoaded = false, mxWinLoaded = false; | 253 | var mxScriptsLoaded = false, mxWinLoaded = false; |
247 | - | 254 | + |
248 | function checkAllLoaded() | 255 | function checkAllLoaded() |
249 | { | 256 | { |
250 | if (mxScriptsLoaded && mxWinLoaded) | 257 | if (mxScriptsLoaded && mxWinLoaded) |
251 | { | 258 | { |
252 | - App.main(); | 259 | + App.main(); |
253 | } | 260 | } |
254 | }; | 261 | }; |
255 | - | 262 | + |
256 | var t0 = new Date(); | 263 | var t0 = new Date(); |
257 | 264 | ||
258 | // Changes paths for local development environment | 265 | // Changes paths for local development environment |
@@ -260,18 +267,18 @@ | @@ -260,18 +267,18 @@ | ||
260 | { | 267 | { |
261 | // Used to request grapheditor/mxgraph sources in dev mode | 268 | // Used to request grapheditor/mxgraph sources in dev mode |
262 | var mxDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main'; | 269 | var mxDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main'; |
263 | - | 270 | + |
264 | // Used to request draw.io sources in dev mode | 271 | // Used to request draw.io sources in dev mode |
265 | var drawDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main/webapp/'; | 272 | var drawDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main/webapp/'; |
266 | var geBasePath = drawDevUrl + '/js/grapheditor'; | 273 | var geBasePath = drawDevUrl + '/js/grapheditor'; |
267 | var mxBasePath = mxDevUrl + '/mxgraph'; | 274 | var mxBasePath = mxDevUrl + '/mxgraph'; |
268 | - | 275 | + |
269 | if (document.location.protocol == 'file:') | 276 | if (document.location.protocol == 'file:') |
270 | { | 277 | { |
271 | geBasePath = './js/grapheditor'; | 278 | geBasePath = './js/grapheditor'; |
272 | mxBasePath = './mxgraph'; | 279 | mxBasePath = './mxgraph'; |
273 | drawDevUrl = './'; | 280 | drawDevUrl = './'; |
274 | - | 281 | + |
275 | // Forces includes for dev environment in node.js | 282 | // Forces includes for dev environment in node.js |
276 | mxForceIncludes = true; | 283 | mxForceIncludes = true; |
277 | } | 284 | } |
@@ -287,19 +294,19 @@ | @@ -287,19 +294,19 @@ | ||
287 | mxscript(drawDevUrl + 'js/diagramly/Init.js'); | 294 | mxscript(drawDevUrl + 'js/diagramly/Init.js'); |
288 | mxscript(geBasePath + '/Init.js'); | 295 | mxscript(geBasePath + '/Init.js'); |
289 | mxscript(mxBasePath + '/mxClient.js'); | 296 | mxscript(mxBasePath + '/mxClient.js'); |
290 | - | 297 | + |
291 | // Adds all JS code that depends on mxClient. This indirection via Devel.js is | 298 | // Adds all JS code that depends on mxClient. This indirection via Devel.js is |
292 | // required in some browsers to make sure mxClient.js (and the files that it | 299 | // required in some browsers to make sure mxClient.js (and the files that it |
293 | // loads asynchronously) are available when the code loaded in Devel.js runs. | 300 | // loads asynchronously) are available when the code loaded in Devel.js runs. |
294 | mxscript(drawDevUrl + 'js/diagramly/Devel.js'); | 301 | mxscript(drawDevUrl + 'js/diagramly/Devel.js'); |
295 | - | 302 | + |
296 | // Electron | 303 | // Electron |
297 | if (mxIsElectron) | 304 | if (mxIsElectron) |
298 | { | 305 | { |
299 | mxscript('js/diagramly/DesktopLibrary.js'); | 306 | mxscript('js/diagramly/DesktopLibrary.js'); |
300 | mxscript('js/diagramly/ElectronApp.js'); | 307 | mxscript('js/diagramly/ElectronApp.js'); |
301 | } | 308 | } |
302 | - | 309 | + |
303 | mxscript(drawDevUrl + 'js/PostConfig.js'); | 310 | mxscript(drawDevUrl + 'js/PostConfig.js'); |
304 | } | 311 | } |
305 | else | 312 | else |
@@ -307,18 +314,18 @@ | @@ -307,18 +314,18 @@ | ||
307 | (function() | 314 | (function() |
308 | { | 315 | { |
309 | var hostName = window.location.hostname; | 316 | var hostName = window.location.hostname; |
310 | - | 317 | + |
311 | // Supported domains are *.draw.io and the packaged version in Quip | 318 | // Supported domains are *.draw.io and the packaged version in Quip |
312 | var supportedDomain = (hostName.substring(hostName.length - 8, hostName.length) === '.draw.io') || | 319 | var supportedDomain = (hostName.substring(hostName.length - 8, hostName.length) === '.draw.io') || |
313 | (hostName.substring(hostName.length - 13, hostName.length) === '.diagrams.net'); | 320 | (hostName.substring(hostName.length - 13, hostName.length) === '.diagrams.net'); |
314 | - | 321 | + |
315 | function loadAppJS() | 322 | function loadAppJS() |
316 | { | 323 | { |
317 | mxscript('js/app.min.js', function() | 324 | mxscript('js/app.min.js', function() |
318 | { | 325 | { |
319 | mxScriptsLoaded = true; | 326 | mxScriptsLoaded = true; |
320 | checkAllLoaded(); | 327 | checkAllLoaded(); |
321 | - | 328 | + |
322 | // Electron | 329 | // Electron |
323 | if (mxIsElectron) | 330 | if (mxIsElectron) |
324 | { | 331 | { |
@@ -345,7 +352,7 @@ | @@ -345,7 +352,7 @@ | ||
345 | } | 352 | } |
346 | }); | 353 | }); |
347 | }; | 354 | }; |
348 | - | 355 | + |
349 | if (!supportedDomain || mxIsElectron) | 356 | if (!supportedDomain || mxIsElectron) |
350 | { | 357 | { |
351 | mxscript('js/PreConfig.js', loadAppJS); | 358 | mxscript('js/PreConfig.js', loadAppJS); |
@@ -361,7 +368,7 @@ | @@ -361,7 +368,7 @@ | ||
361 | window.onerror = function() | 368 | window.onerror = function() |
362 | { | 369 | { |
363 | var status = document.getElementById('geStatus'); | 370 | var status = document.getElementById('geStatus'); |
364 | - | 371 | + |
365 | if (status != null) | 372 | if (status != null) |
366 | { | 373 | { |
367 | status.innerHTML = 'Page could not be loaded. Please try refreshing.'; | 374 | status.innerHTML = 'Page could not be loaded. Please try refreshing.'; |
@@ -461,7 +468,7 @@ if (navigator.userAgent != null && navigator.userAgent.toLowerCase(). | @@ -461,7 +468,7 @@ if (navigator.userAgent != null && navigator.userAgent.toLowerCase(). | ||
461 | { | 468 | { |
462 | // Redirects old Electron app to latest version | 469 | // Redirects old Electron app to latest version |
463 | var div = document.getElementById('geInfo'); | 470 | var div = document.getElementById('geInfo'); |
464 | - | 471 | + |
465 | if (div != null) | 472 | if (div != null) |
466 | { | 473 | { |
467 | div.innerHTML = '<center><h2>You are using an out of date version of this app.<br>Please download the latest version ' + | 474 | div.innerHTML = '<center><h2>You are using an out of date version of this app.<br>Please download the latest version ' + |
src/main/webapp/js/api/index.js
0 → 100644
1 | +class ConfigurationNodeApi { | ||
2 | + /** | ||
3 | + * @description 获取组态信息 | ||
4 | + * @param {'CONFIGURE' | 'CONTENT' | 'NODE'} levelType - 组态资源类型 | ||
5 | + * @param {string} levelId - 组态资源ID | ||
6 | + */ | ||
7 | + static getConfigurationInfo(levelType, levelId) { | ||
8 | + return defHttp.get(`/yt/configuration/node/${levelType}/${levelId}`) | ||
9 | + } | ||
10 | + | ||
11 | + /** | ||
12 | + * @description 获取组织节点树 | ||
13 | + * @returns | ||
14 | + */ | ||
15 | + static getOrgTree() { | ||
16 | + return defHttp.get('/yt/organization/me/list') | ||
17 | + } | ||
18 | + | ||
19 | + /** | ||
20 | + * @description 通过设备ID 获取 设备属性 | ||
21 | + * @param tbDeviceId | ||
22 | + * @returns {Promise<*>} | ||
23 | + */ | ||
24 | + static getDeviceAttr(tbDeviceId) { | ||
25 | + return defHttp.get(`/plugins/telemetry/DEVICE/${tbDeviceId}/keys/timeseries`) | ||
26 | + } | ||
27 | + | ||
28 | + /** | ||
29 | + * @description 获取组织下的设备 | ||
30 | + * @param {'DIRECT_CONNECTION' | 'GATEWAY' | 'SENDOR'} deviceType - 'DIRECT_CONNECTION' 直连设备 'GATEWAY' 网关设备 'SENDOR' 传感器 | ||
31 | + * @param {string} orgId - 组织ID | ||
32 | + * @returns {Promise<*>} | ||
33 | + */ | ||
34 | + static getDeviceUnderTheOrg(deviceType, orgId) { | ||
35 | + return defHttp.get(`/yt/device/list/${deviceType}?organizationId=${orgId}`) | ||
36 | + } | ||
37 | + | ||
38 | + /** | ||
39 | + * @description 查询设备的子设备 | ||
40 | + * @param deviceId 设备ID | ||
41 | + * @returns {Promise<*>} | ||
42 | + */ | ||
43 | + static getDeviceChildDevice(deviceId) { | ||
44 | + return defHttp.get(`/yt/device/relation?page=1&pageSize=10&fromId=${deviceId}`) | ||
45 | + } | ||
46 | + | ||
47 | + /** | ||
48 | + * @description 查询所有主设备列表 | ||
49 | + * @param orgId | ||
50 | + * @returns {Promise<*>} | ||
51 | + */ | ||
52 | + static getMasterDevice(orgId) { | ||
53 | + return defHttp.get(`/yt/device/list/master/${orgId}`) | ||
54 | + } | ||
55 | + | ||
56 | + /** | ||
57 | + * @description 查询所有从设备 | ||
58 | + * @param orgId | ||
59 | + * @param masterDeviceId | ||
60 | + * @returns {Promise<*>} | ||
61 | + */ | ||
62 | + static getSlaveDevice(orgId, masterDeviceId) { | ||
63 | + return defHttp.get(`/yt/device/list/slave/${orgId}?masterId=${masterDeviceId}`) | ||
64 | + } | ||
65 | + | ||
66 | + /** | ||
67 | + * @description 编辑数据交互 | ||
68 | + */ | ||
69 | + static updateNodeEvent(data) { | ||
70 | + return defHttp.post('/yt/configuration/node/event', data) | ||
71 | + } | ||
72 | + | ||
73 | + /** | ||
74 | + * @description 编辑动画效果 | ||
75 | + * @param {*} data | ||
76 | + * @returns | ||
77 | + */ | ||
78 | + static updateNodeAct(data) { | ||
79 | + return defHttp.post('/yt/configuration/node/act', data) | ||
80 | + } | ||
81 | + | ||
82 | + /** | ||
83 | + * @description 更新节点绑定信息 | ||
84 | + * @param {*} data | ||
85 | + * @returns | ||
86 | + */ | ||
87 | + static updateNodeInfo(data) { | ||
88 | + return defHttp.post('/yt/configuration/node', data) | ||
89 | + } | ||
90 | +} |