Showing
14 changed files
with
183 additions
and
12 deletions
Too many changes to show.
To preserve performance only 14 of 15 files are displayed.
.DS_Store
0 → 100644
No preview for this file type
etc/.DS_Store
0 → 100644
No preview for this file type
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | "main": "src/main/webapp/index.html", | 4 | "main": "src/main/webapp/index.html", | 
| 5 | "scripts": { | 5 | "scripts": { | 
| 6 | "start": "cd src/main/webapp && serve", | 6 | "start": "cd src/main/webapp && serve", | 
| 7 | - "build": "cd etc/build && ant" | 7 | + "build": "cd etc/build && ant war" | 
| 8 | }, | 8 | }, | 
| 9 | "license": "MIT", | 9 | "license": "MIT", | 
| 10 | "dependencies": { | 10 | "dependencies": { | 
src/main/webapp/.DS_Store
0 → 100644
No preview for this file type
src/main/webapp/images/logo-16x16.ico
0 → 100644
No preview for this file type
src/main/webapp/images/logo-16x16.png
0 → 100644
3.24 KB
src/main/webapp/images/logo-32x32.png
0 → 100644
3.78 KB
| @@ -2,7 +2,8 @@ | @@ -2,7 +2,8 @@ | ||
| 2 | <!DOCTYPE html> | 2 | <!DOCTYPE html> | 
| 3 | <html> | 3 | <html> | 
| 4 | <head> | 4 | <head> | 
| 5 | - <title>Flowchart Maker & Online Diagram Software</title> | 5 | +<!-- <title>Flowchart Maker & Online Diagram Software</title>--> | 
| 6 | + <title>thingskit 云组态</title> | ||
| 6 | <meta charset="utf-8"> | 7 | <meta charset="utf-8"> | 
| 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | 8 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | 
| 8 | <meta name="Description" content="diagrams.net is free online diagram software for making flowcharts, process diagrams, org charts, UML, ER and network diagrams"> | 9 | <meta name="Description" content="diagrams.net is free online diagram software for making flowcharts, process diagrams, org charts, UML, ER and network diagrams"> | 
| @@ -16,6 +17,15 @@ | @@ -16,6 +17,15 @@ | ||
| 16 | <meta name="msapplication-config" content="images/browserconfig.xml"> | 17 | <meta name="msapplication-config" content="images/browserconfig.xml"> | 
| 17 | <meta name="mobile-web-app-capable" content="yes"> | 18 | <meta name="mobile-web-app-capable" content="yes"> | 
| 18 | <meta name="theme-color" content="#d89000"> | 19 | <meta name="theme-color" content="#d89000"> | 
| 20 | + <!-- crypto-js --> | ||
| 21 | + <script src="./js/plugin/crypto-js/crypto-js.js"></script> | ||
| 22 | +<!-- <script src="./js/plugin/crypto-js/aes.js"></script>--> | ||
| 23 | +<!-- <script src="./js/plugin/crypto-js/enc-utf8.js"></script>--> | ||
| 24 | +<!-- <script src="./js/plugin/crypto-js/pad-pkcs7.js"></script>--> | ||
| 25 | +<!-- <script src="./js/plugin/crypto-js/mode-ecb.js"></script>--> | ||
| 26 | +<!-- <script src="./js/plugin/crypto-js/md5.js"></script>--> | ||
| 27 | +<!-- <script src="./js/plugin/crypto-js/enc-utf8.js"></script>--> | ||
| 28 | +<!-- <script src="./js/plugin/crypto-js/enc-base64.js"></script>--> | ||
| 19 | <!-- 全局变量 --> | 29 | <!-- 全局变量 --> | 
| 20 | <script src="./js/const/const.js"></script> | 30 | <script src="./js/const/const.js"></script> | 
| 21 | 31 | ||
| @@ -39,7 +49,7 @@ | @@ -39,7 +49,7 @@ | ||
| 39 | <!-- <script type="text/javascript" src="./js/jquery.select.zTree.v1.5.min.js"></script>--> | 49 | <!-- <script type="text/javascript" src="./js/jquery.select.zTree.v1.5.min.js"></script>--> | 
| 40 | 50 | ||
| 41 | <!-- Axios --> | 51 | <!-- Axios --> | 
| 42 | - <script src="./plugins/defHttp.js"></script> | 52 | + <script src="./plugins/DefHttp.js"></script> | 
| 43 | 53 | ||
| 44 | <script src="./js/api/index.js"></script> | 54 | <script src="./js/api/index.js"></script> | 
| 45 | 55 | ||
| @@ -386,15 +396,18 @@ | @@ -386,15 +396,18 @@ | ||
| 386 | </script> | 396 | </script> | 
| 387 | <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/plgmlhohecdddhbmmkncjdmlhcmaachm"> | 397 | <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/plgmlhohecdddhbmmkncjdmlhcmaachm"> | 
| 388 | <link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon.png"> | 398 | <link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon.png"> | 
| 389 | - <link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png"> | 399 | +<!-- <link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">--> | 
| 400 | + <link rel="icon" type="image/png" sizes="32x32" href="images/logo-32x32.png"> | ||
| 390 | <link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png"> | 401 | <link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png"> | 
| 402 | +<!-- <link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">--> | ||
| 391 | <link rel="mask-icon" href="images/safari-pinned-tab.svg" color="#d89000"> | 403 | <link rel="mask-icon" href="images/safari-pinned-tab.svg" color="#d89000"> | 
| 392 | <link rel="stylesheet" type="text/css" href="styles/grapheditor.css"> | 404 | <link rel="stylesheet" type="text/css" href="styles/grapheditor.css"> | 
| 393 | <link rel="stylesheet" type="text/css" href="styles/easyui.css"> | 405 | <link rel="stylesheet" type="text/css" href="styles/easyui.css"> | 
| 394 | <link rel="preconnect" href="https://storage.googleapis.com"> | 406 | <link rel="preconnect" href="https://storage.googleapis.com"> | 
| 395 | <link rel="canonical" href="https://app.diagrams.net"> | 407 | <link rel="canonical" href="https://app.diagrams.net"> | 
| 396 | <link rel="manifest" href="images/manifest.json"> | 408 | <link rel="manifest" href="images/manifest.json"> | 
| 397 | - <link rel="shortcut icon" href="favicon.ico"> | 409 | +<!-- <link rel="shortcut icon" href="favicon.ico">--> | 
| 410 | + <link rel="shortcut icon" href="images/logo-16x16.ico"> | ||
| 398 | <style type="text/css"> | 411 | <style type="text/css"> | 
| 399 | body { overflow:hidden; } | 412 | body { overflow:hidden; } | 
| 400 | div.picker { z-index: 10007; } | 413 | div.picker { z-index: 10007; } | 
src/main/webapp/js/.DS_Store
0 → 100644
No preview for this file type
| 1 | -const GLOBAL_TOKEN = JSON.parse(localStorage.getItem("UNDEFINED__DEVELOPMENT__2.7.1__COMMON__LOCAL__KEY__")).value.JWT_TOKEN.value | 1 | +// const { encrypt, decrypt } = CryptoJS.AES | 
| 2 | +// const parse = CryptoJS.enc.Utf8; | ||
| 3 | +// const pkcs7 = CryptoJS.pad.Pkcs7; | ||
| 4 | +// const ECB = CryptoJS.mode.ECB; | ||
| 5 | +// const UTF8 = CryptoJS.enc.Utf8; | ||
| 6 | +// | ||
| 7 | +// const cacheCipher = { | ||
| 8 | +// key: '_11111000001111@', | ||
| 9 | +// iv: '@11111000001111_', | ||
| 10 | +// } | ||
| 11 | +// | ||
| 12 | +// const DEFAULT_CACHE_TIME = 60 * 60 * 24 * 7; | ||
| 13 | +// | ||
| 14 | +// const isNullOrUnDef = (val) => typeof val === 'undefined' || val === null | ||
| 15 | +// | ||
| 16 | +// class AesEncryption { | ||
| 17 | +// key; | ||
| 18 | +// iv; | ||
| 19 | +// | ||
| 20 | +// constructor(opt = {}) { | ||
| 21 | +// const { key, iv } = opt; | ||
| 22 | +// if (key) { | ||
| 23 | +// this.key = parse(key); | ||
| 24 | +// } | ||
| 25 | +// if (iv) { | ||
| 26 | +// this.iv = parse(iv); | ||
| 27 | +// } | ||
| 28 | +// } | ||
| 29 | +// | ||
| 30 | +// get getOptions() { | ||
| 31 | +// return { | ||
| 32 | +// mode: ECB, | ||
| 33 | +// padding: pkcs7, | ||
| 34 | +// iv: this.iv, | ||
| 35 | +// }; | ||
| 36 | +// } | ||
| 37 | +// | ||
| 38 | +// encryptByAES(cipherText) { | ||
| 39 | +// return encrypt(cipherText, this.key, this.getOptions).toString(); | ||
| 40 | +// } | ||
| 41 | +// | ||
| 42 | +// decryptByAES(cipherText) { | ||
| 43 | +// return decrypt(cipherText, this.key, this.getOptions).toString(UTF8); | ||
| 44 | +// } | ||
| 45 | +// } | ||
| 46 | +// | ||
| 47 | +// | ||
| 48 | +// const createStorage = ( | ||
| 49 | +// { | ||
| 50 | +// prefixKey = '', | ||
| 51 | +// storage = sessionStorage, | ||
| 52 | +// key = cacheCipher.key, | ||
| 53 | +// iv = cacheCipher.iv, | ||
| 54 | +// timeout = null, | ||
| 55 | +// hasEncrypt = true, | ||
| 56 | +// } = {}) => { | ||
| 57 | +// if (hasEncrypt && [ key.length, iv.length ].some((item) => item !== 16)) { | ||
| 58 | +// throw new Error('When hasEncrypt is true, the key or iv must be 16 bits!'); | ||
| 59 | +// } | ||
| 60 | +// | ||
| 61 | +// const encryption = new AesEncryption({ key, iv }); | ||
| 62 | +// | ||
| 63 | +// /** | ||
| 64 | +// *Cache class | ||
| 65 | +// *Construction parameters can be passed into sessionStorage, localStorage, | ||
| 66 | +// * @class Cache | ||
| 67 | +// * @example | ||
| 68 | +// */ | ||
| 69 | +// const WebStorage = class WebStorage { | ||
| 70 | +// storage | ||
| 71 | +// prefixKey | ||
| 72 | +// encryption | ||
| 73 | +// hasEncrypt | ||
| 74 | +// | ||
| 75 | +// /** | ||
| 76 | +// * | ||
| 77 | +// * @param {*} storage | ||
| 78 | +// */ | ||
| 79 | +// constructor() { | ||
| 80 | +// this.storage = storage; | ||
| 81 | +// this.prefixKey = prefixKey; | ||
| 82 | +// this.encryption = encryption; | ||
| 83 | +// this.hasEncrypt = hasEncrypt; | ||
| 84 | +// } | ||
| 85 | +// | ||
| 86 | +// getKey(key) { | ||
| 87 | +// return `${ this.prefixKey }${ key }`.toUpperCase(); | ||
| 88 | +// } | ||
| 89 | +// | ||
| 90 | +// /** | ||
| 91 | +// * | ||
| 92 | +// * Set cache | ||
| 93 | +// * @param {string} key | ||
| 94 | +// * @param {*} value | ||
| 95 | +// * @param {*} expire | ||
| 96 | +// * @expire Expiration time in seconds | ||
| 97 | +// * @memberof Cache | ||
| 98 | +// */ | ||
| 99 | +// set(key, value, expire = timeout) { | ||
| 100 | +// const stringData = JSON.stringify({ | ||
| 101 | +// value, | ||
| 102 | +// time: Date.now(), | ||
| 103 | +// expire: !isNullOrUnDef(expire) ? new Date().getTime() + expire * 1000 : null, | ||
| 104 | +// }); | ||
| 105 | +// const stringifyValue = this.hasEncrypt | ||
| 106 | +// ? this.encryption.encryptByAES(stringData) | ||
| 107 | +// : stringData; | ||
| 108 | +// this.storage.setItem(this.getKey(key), stringifyValue); | ||
| 109 | +// } | ||
| 110 | +// | ||
| 111 | +// /** | ||
| 112 | +// *Read cache | ||
| 113 | +// * @param {string} key | ||
| 114 | +// * @param {any} [def=null] def | ||
| 115 | +// * @memberof Cache | ||
| 116 | +// */ | ||
| 117 | +// get(key, def = null) { | ||
| 118 | +// const val = this.storage.getItem(this.getKey(key)); | ||
| 119 | +// if (!val) return def; | ||
| 120 | +// | ||
| 121 | +// try { | ||
| 122 | +// const decVal = this.hasEncrypt ? this.encryption.decryptByAES(val) : val; | ||
| 123 | +// const data = JSON.parse(decVal); | ||
| 124 | +// const { value, expire } = data; | ||
| 125 | +// if (isNullOrUnDef(expire) || expire >= new Date().getTime()) { | ||
| 126 | +// return value; | ||
| 127 | +// } | ||
| 128 | +// this.remove(key); | ||
| 129 | +// } catch (e) { | ||
| 130 | +// return def; | ||
| 131 | +// } | ||
| 132 | +// } | ||
| 133 | +// | ||
| 134 | +// /** | ||
| 135 | +// * Delete cache based on key | ||
| 136 | +// * @param {string} key | ||
| 137 | +// * @memberof Cache | ||
| 138 | +// */ | ||
| 139 | +// remove(key) { | ||
| 140 | +// this.storage.removeItem(this.getKey(key)); | ||
| 141 | +// } | ||
| 142 | +// | ||
| 143 | +// /** | ||
| 144 | +// * Delete all caches of this instance | ||
| 145 | +// */ | ||
| 146 | +// clear() { | ||
| 147 | +// this.storage.clear(); | ||
| 148 | +// } | ||
| 149 | +// }; | ||
| 150 | +// return new WebStorage(); | ||
| 151 | +// } | ||
| 2 | 152 | ||
| 3 | -const GLOBAL_WS_URL = (() => { | ||
| 4 | - const { host, href } = location | ||
| 5 | - const reg = /^https/ | ||
| 6 | - return `${ reg.test(href) ? 'wss' : 'ws' }://${ host }/api/ws/plugins/telemetry?token=${GLOBAL_TOKEN}` | 153 | +const GLOBAL_STORAGE_KEY = (() => { | 
| 154 | + const isDev = location.href.includes('dev=1') | ||
| 155 | + const DEVELOPMENT = 'DEVELOPMENT' | ||
| 156 | + const PRODUCTION = 'PRODUCTION' | ||
| 157 | + return `UNDEFINED__${ isDev ? DEVELOPMENT : PRODUCTION }__2.7.1__COMMON__LOCAL__KEY__` | ||
| 158 | +})() | ||
| 159 | + | ||
| 160 | +const GLOBAL_TOKEN = (() => { | ||
| 161 | + return JSON.parse(localStorage.getItem(GLOBAL_STORAGE_KEY)).value.JWT_TOKEN.value | ||
| 7 | })() | 162 | })() | 
| 8 | 163 | ||
| 9 | -// const GLOBAL_WS_URL = `ws://47.99.141.212:8080/api/ws/plugins/telemetry?token=${ GLOBAL_TOKEN }` | ||
| 164 | +const GLOBAL_WS_URL = (() => { | ||
| 165 | + const { host, href } = location | ||
| 166 | + const reg = /^https/ | ||
| 167 | + return `${ reg.test(href) ? 'wss' : 'ws' }://${ host }/api/ws/plugins/telemetry?token=${ GLOBAL_TOKEN }` | ||
| 168 | +})() | 
src/main/webapp/js/grapheditor/.DS_Store
0 → 100644
No preview for this file type
| @@ -11170,7 +11170,6 @@ class DispatchCenter { | @@ -11170,7 +11170,6 @@ class DispatchCenter { | ||
| 11170 | * @description 建立socket连接 | 11170 | * @description 建立socket连接 | 
| 11171 | */ | 11171 | */ | 
| 11172 | connectSocket() { | 11172 | connectSocket() { | 
| 11173 | - const GLOBAL_TOKEN = JSON.parse(localStorage.getItem("UNDEFINED__DEVELOPMENT__2.7.1__COMMON__LOCAL__KEY__")).value.JWT_TOKEN.value | ||
| 11174 | this.socket = Ws.getInstance({ url: GLOBAL_WS_URL, onmessageCallback: this.socketOnmessage }) | 11173 | this.socket = Ws.getInstance({ url: GLOBAL_WS_URL, onmessageCallback: this.socketOnmessage }) | 
| 11175 | } | 11174 | } | 
| 11176 | 11175 | 
src/main/webapp/js/plugin/.DS_Store
0 → 100644
No preview for this file type
No preview for this file type