@things-factory/integration-influxdb 7.0.0-alpha.13
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/CHANGELOG.md +8 -0
- package/README.md +0 -0
- package/client/bootstrap.ts +9 -0
- package/client/editors/property-editor.ts +20 -0
- package/client/editors/things-editor-influxdb-point-scheme.ts +305 -0
- package/client/index.ts +0 -0
- package/dist-server/engine/connector/index.js +4 -0
- package/dist-server/engine/connector/index.js.map +1 -0
- package/dist-server/engine/connector/influxdb.js +56 -0
- package/dist-server/engine/connector/influxdb.js.map +1 -0
- package/dist-server/engine/index.js +5 -0
- package/dist-server/engine/index.js.map +1 -0
- package/dist-server/engine/task/index.js +5 -0
- package/dist-server/engine/task/index.js.map +1 -0
- package/dist-server/engine/task/influxdb-query.js +59 -0
- package/dist-server/engine/task/influxdb-query.js.map +1 -0
- package/dist-server/engine/task/influxdb-write-point.js +70 -0
- package/dist-server/engine/task/influxdb-write-point.js.map +1 -0
- package/dist-server/index.js +4 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/helps/integration/connector/influxdb-connector.ja.md +17 -0
- package/helps/integration/connector/influxdb-connector.ko.md +17 -0
- package/helps/integration/connector/influxdb-connector.md +17 -0
- package/helps/integration/connector/influxdb-connector.ms.md +17 -0
- package/helps/integration/connector/influxdb-connector.zh.md +17 -0
- package/helps/integration/task/influxdb-query.ja.md +15 -0
- package/helps/integration/task/influxdb-query.ko.md +15 -0
- package/helps/integration/task/influxdb-query.md +15 -0
- package/helps/integration/task/influxdb-query.ms.md +15 -0
- package/helps/integration/task/influxdb-query.zh.md +15 -0
- package/helps/integration/task/influxdb-write-point.ja.md +28 -0
- package/helps/integration/task/influxdb-write-point.ko.md +28 -0
- package/helps/integration/task/influxdb-write-point.md +28 -0
- package/helps/integration/task/influxdb-write-point.ms.md +28 -0
- package/helps/integration/task/influxdb-write-point.zh.md +28 -0
- package/package.json +32 -0
- package/server/engine/connector/index.ts +1 -0
- package/server/engine/connector/influxdb.ts +66 -0
- package/server/engine/index.ts +2 -0
- package/server/engine/task/index.ts +2 -0
- package/server/engine/task/influxdb-query.ts +95 -0
- package/server/engine/task/influxdb-write-point.ts +89 -0
- package/server/index.ts +1 -0
- package/things-factory.config.js +5 -0
- package/translations/en.json +7 -0
- package/translations/ja.json +7 -0
- package/translations/ko.json +7 -0
- package/translations/ms.json +7 -0
- package/translations/zh.json +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/lerna/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@influxdata/influxdb-client/dist/index.d.ts","../server/engine/connector/influxdb.ts","../server/engine/connector/index.ts","../server/engine/task/influxdb-write-point.ts","../../../node_modules/vm2/index.d.ts","../server/engine/task/influxdb-query.ts","../server/engine/task/index.ts","../server/engine/index.ts","../server/index.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/expect/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900",{"version":"332f064bd084584121036cbcc2b77d00745ff31707a40521fd611ebf64e8a28d","affectsGlobalScope":true},"f92857220d8a8d7ad4ec4c3aa0da38d0a64542288cae7eacd56f35d31a03dba8","e4f19ec0721048e9fb0540ead9156374f785f8a3da4934a1a197798e2217764f","de88eb9562dc71346a8495221a269123ef309e79a1fc2ade295e089ca5bb1d04","798896c189e93e0f50971e4d0025fb913bc5e9d7486784d10916fcbd09e33d8e","b2f01ea5d2928c37f3db9730f91c8fd9e5710c4079f5efbe4a84461214201b98","3d74741dd04b2041c98196ccad2d4e0e87acc8c11dba5ad99c99dcfd01e6d175","8547694bbf35e324d5bb64215ae218ab372807c759be08f9ce27a8adfc9af9fb","336b6d64b4cff6c2e09100b496e9870743d9c8005e718c18e6200bce7ec2975c","efc7d584a33fe3422847783d228f315c4cd1afe74bd7cf8e3f0e4c1125129fef","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"7fd7fcbf021a5845bdd9397d4649fcf2fe17152d2098140fc723099a215d19ad","affectsGlobalScope":true},"df3389f71a71a38bc931aaf1ef97a65fada98f0a27f19dd12f8b8de2b0f4e461","7b43160a49cf2c6082da0465876c4a0b164e160b81187caeb0a6ca7a281e85ba",{"version":"41fb2a1c108fbf46609ce5a451b7ec78eb9b5ada95fd5b94643e4b26397de0b3","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb",{"version":"8b809082dfeffc8cc4f3b9c59f55c0ff52ba12f5ae0766cb5c35deee83b8552e","affectsGlobalScope":true},"bd3f5d05b6b5e4bfcea7739a45f3ffb4a7f4a3442ba7baf93e0200799285b8f1","4c775c2fccabf49483c03cd5e3673f87c1ffb6079d98e7b81089c3def79e29c6","8806ae97308ef26363bd7ec8071bca4d07fb575f905ee3d8a91aff226df6d618","af5bf1db6f1804fb0069039ae77a05d60133c77a2158d9635ea27b6bb2828a8f","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true},{"version":"674168aa3db414ea0a19b2a31d901b2d49705c7a495e43ffdc96928543010f8c","affectsGlobalScope":true},"fe1fd6afdfe77976d4c702f3746c05fb05a7e566845c890e0e970fe9376d6a90","313a0b063f5188037db113509de1b934a0e286f14e9479af24fada241435e707","afb1701fd4be413a8a5a88df6befdd4510c30a31372c07a4138facf61594c66d","87ef1a23caa071b07157c72077fa42b86d30568f9dc9e31eed24d5d14fc30ba8","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","21773f5ac69ddf5a05636ba1f50b5239f4f2d27e4420db147fc2f76a5ae598ac",{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true},"c07146dbbbd8b347241b5df250a51e48f2d7bef19b1e187b1a3f20c849988ff1","45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"ae5507fc333d637dec9f37c6b3f4d423105421ea2820a64818de55db85214d66","affectsGlobalScope":true},{"version":"0666f4c99b8688c7be5956df8fecf5d1779d3b22f8f2a88258ae7072c7b6026f","affectsGlobalScope":true},"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","54e854615c4eafbdd3fd7688bd02a3aafd0ccf0e87c98f79d3e9109f047ce6b8","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","7fa32887f8a97909fca35ebba3740f8caf8df146618d8fff957a3f89f67a2f6a","9a9634296cca836c3308923ba7aa094fa6ed76bb1e366d8ddcf5c65888ab1024",{"version":"bddce945d552a963c9733db106b17a25474eefcab7fc990157a2134ef55d4954","affectsGlobalScope":true},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","4b55240c2a03b2c71e98a7fc528b16136faa762211c92e781a01c37821915ea6","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"94c086dff8dbc5998749326bc69b520e8e4273fb5b7b58b50e0210e0885dfcde","affectsGlobalScope":true},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true},"ebe5facd12fd7745cda5f4bc3319f91fb29dc1f96e57e9c6f8b260a7cc5b67ee","79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","37dc027f781c75f0f546e329cfac7cf92a6b289f42458f47a9adc25e516b6839",{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec",{"version":"5ab630d466ac55baa6d32820378098404fc18ba9da6f7bc5df30c5dbb1cffae8","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":false,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":1,"noEmitOnError":true,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":false,"target":4,"useDefineForClassFields":false},"fileIdsList":[[143],[145,148],[54],[90],[91,96,124],[92,103,104,111,121,132],[92,93,103,111],[94,133],[95,96,104,112],[96,121,129],[97,99,103,111],[90,98],[99,100],[103],[101,103],[90,103],[103,104,105,121,132],[103,104,105,118,121,124],[88,91,137],[99,103,106,111,121,132],[103,104,106,107,111,121,129,132],[106,108,121,129,132],[54,55,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[103,109],[110,132,137],[99,103,111,121],[112],[113],[90,114],[115,131,137],[116],[117],[103,118,119],[118,120,133,135],[91,103,121,122,123,124],[91,121,123],[121,122],[124],[125],[90,121],[103,127,128],[127,128],[96,111,121,129],[130],[111,131],[91,106,117,132],[96,133],[121,134],[110,135],[136],[91,96,103,105,114,121,132,135,137],[121,138],[141,147],[145],[142,146],[144],[65,69,132],[65,121,132],[60],[62,65,129,132],[111,129],[140],[60,140],[62,65,111,132],[57,58,61,64,91,103,121,132],[57,63],[61,65,91,124,132,140],[91,140],[81,91,140],[59,60,140],[65],[59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,86,87],[65,72,73],[63,65,73,74],[64],[57,60,65],[65,69,73,74],[69],[63,65,68,132],[57,62,63,65,69,72],[91,121],[60,65,81,91,137,140],[44,46],[44,45],[44,47,51],[44,48,50],[44,45,49],[44,52]],"referencedMap":[[144,1],[149,2],[54,3],[55,3],[90,4],[91,5],[92,6],[93,7],[94,8],[95,9],[96,10],[97,11],[98,12],[99,13],[100,13],[102,14],[101,15],[103,16],[104,17],[105,18],[89,19],[106,20],[107,21],[108,22],[140,23],[109,24],[110,25],[111,26],[112,27],[113,28],[114,29],[115,30],[116,31],[117,32],[118,33],[119,33],[120,34],[121,35],[123,36],[122,37],[124,38],[125,39],[126,40],[127,41],[128,42],[129,43],[130,44],[131,45],[132,46],[133,47],[134,48],[135,49],[136,50],[137,51],[138,52],[148,53],[146,54],[147,55],[145,56],[72,57],[79,58],[71,57],[86,59],[63,60],[62,61],[85,62],[80,63],[83,64],[65,65],[64,66],[60,67],[59,68],[82,69],[61,70],[66,71],[70,71],[88,72],[87,71],[74,73],[75,74],[77,75],[73,76],[76,77],[81,62],[68,78],[69,79],[78,80],[58,81],[84,82],[49,14],[47,83],[46,84],[52,85],[51,86],[50,87],[48,84],[53,88]],"exportedModulesMap":[[144,1],[149,2],[54,3],[55,3],[90,4],[91,5],[92,6],[93,7],[94,8],[95,9],[96,10],[97,11],[98,12],[99,13],[100,13],[102,14],[101,15],[103,16],[104,17],[105,18],[89,19],[106,20],[107,21],[108,22],[140,23],[109,24],[110,25],[111,26],[112,27],[113,28],[114,29],[115,30],[116,31],[117,32],[118,33],[119,33],[120,34],[121,35],[123,36],[122,37],[124,38],[125,39],[126,40],[127,41],[128,42],[129,43],[130,44],[131,45],[132,46],[133,47],[134,48],[135,49],[136,50],[137,51],[138,52],[148,53],[146,54],[147,55],[145,56],[72,57],[79,58],[71,57],[86,59],[63,60],[62,61],[85,62],[80,63],[83,64],[65,65],[64,66],[60,67],[59,68],[82,69],[61,70],[66,71],[70,71],[88,72],[87,71],[74,73],[75,74],[77,75],[73,76],[76,77],[81,62],[68,78],[69,79],[78,80],[58,81],[84,82],[49,14],[47,83],[46,84],[52,85],[51,86],[50,87],[48,84],[53,88]],"semanticDiagnosticsPerFile":[45,141,144,143,149,54,55,90,91,92,93,94,95,96,97,98,99,100,102,101,103,104,105,89,139,106,107,108,140,109,110,111,112,113,114,115,116,117,118,119,120,121,123,122,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,56,142,148,146,147,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,34,31,32,33,35,7,36,41,42,37,38,39,40,1,43,145,44,72,79,71,86,63,62,85,80,83,65,64,60,59,82,61,66,67,70,57,88,87,74,75,77,73,76,81,68,69,78,58,84,49,47,46,52,51,50,48,53]},"version":"4.9.5"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# InfluxDB Connector
|
|
2
|
+
|
|
3
|
+
## 説明
|
|
4
|
+
|
|
5
|
+
InfluxDB コネクタは、InfluxDB クライアントを使用して InfluxDB に接続し、操作を行うために使用されます。
|
|
6
|
+
|
|
7
|
+
## 設定
|
|
8
|
+
|
|
9
|
+
### エンドポイント
|
|
10
|
+
|
|
11
|
+
InfluxDB サーバーのエンドポイントを指定します。
|
|
12
|
+
|
|
13
|
+
例:_http://localhost:8086_
|
|
14
|
+
|
|
15
|
+
### パラメーター
|
|
16
|
+
|
|
17
|
+
- トークン:InfluxDB に接続する際に使用する認証トークンを入力します。
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# InfluxDB 커넥터
|
|
2
|
+
|
|
3
|
+
## 설명
|
|
4
|
+
|
|
5
|
+
InfluxDB 커넥터는 InfluxDB 클라이언트를 사용하여 InfluxDB에 연결하고 작업을 수행하는 데 사용됩니다.
|
|
6
|
+
|
|
7
|
+
## 설정
|
|
8
|
+
|
|
9
|
+
### 엔드포인트
|
|
10
|
+
|
|
11
|
+
InfluxDB 서버의 엔드포인트를 지정합니다.
|
|
12
|
+
|
|
13
|
+
예: _http://localhost:8086_
|
|
14
|
+
|
|
15
|
+
### 매개변수
|
|
16
|
+
|
|
17
|
+
- 토큰: InfluxDB에 연결할 때 사용할 인증 토큰을 입력합니다.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# InfluxDB Connector
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
The InfluxDB Connector is used to connect and perform operations on InfluxDB using the InfluxDB client.
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
### Endpoint
|
|
10
|
+
|
|
11
|
+
Specify the endpoint of the InfluxDB server.
|
|
12
|
+
|
|
13
|
+
Example: _http://localhost:8086_
|
|
14
|
+
|
|
15
|
+
### Parameters
|
|
16
|
+
|
|
17
|
+
- Token: Enter the authentication token to use when connecting to InfluxDB.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# InfluxDB Connector
|
|
2
|
+
|
|
3
|
+
## Penerangan
|
|
4
|
+
|
|
5
|
+
Konektor InfluxDB digunakan untuk menyambung dan melakukan operasi pada InfluxDB menggunakan pelanggan InfluxDB.
|
|
6
|
+
|
|
7
|
+
## Konfigurasi
|
|
8
|
+
|
|
9
|
+
### Titik Akhir
|
|
10
|
+
|
|
11
|
+
Nyatakan titik akhir pelayan InfluxDB.
|
|
12
|
+
|
|
13
|
+
Contoh: _http://localhost:8086_
|
|
14
|
+
|
|
15
|
+
### Parameter
|
|
16
|
+
|
|
17
|
+
- Token: Masukkan token pengesahan untuk digunakan ketika menyambung ke InfluxDB.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# InfluxDB Query Task
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
This task executes a query against an InfluxDB database and returns the result.
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
### Organization
|
|
10
|
+
|
|
11
|
+
Specify the organization to be used in InfluxDB.
|
|
12
|
+
|
|
13
|
+
### Query
|
|
14
|
+
|
|
15
|
+
Enter the InfluxDB Flux query to be executed.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# InfluxDB Kueri Tugas
|
|
2
|
+
|
|
3
|
+
## Deskripsi
|
|
4
|
+
|
|
5
|
+
Tugas ini menjalankan kueri terhadap basis data InfluxDB dan mengembalikan hasilnya.
|
|
6
|
+
|
|
7
|
+
## Konfigurasi
|
|
8
|
+
|
|
9
|
+
### Organisasi
|
|
10
|
+
|
|
11
|
+
Tentukan organisasi yang akan digunakan dalam InfluxDB.
|
|
12
|
+
|
|
13
|
+
### Kueri
|
|
14
|
+
|
|
15
|
+
Masukkan kueri Flux InfluxDB yang akan dijalankan.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# InfluxDB データポイント書き込みタスク
|
|
2
|
+
|
|
3
|
+
## 説明
|
|
4
|
+
|
|
5
|
+
このタスクは、InfluxDB データベースにデータポイントを書き込みます。
|
|
6
|
+
|
|
7
|
+
## 設定
|
|
8
|
+
|
|
9
|
+
### 組織
|
|
10
|
+
|
|
11
|
+
InfluxDB で使用する組織を指定します。
|
|
12
|
+
|
|
13
|
+
### バケット
|
|
14
|
+
|
|
15
|
+
データポイントが書き込まれるバケットを指定します。
|
|
16
|
+
|
|
17
|
+
### 測定
|
|
18
|
+
|
|
19
|
+
データポイントが格納される測定を指定します。
|
|
20
|
+
|
|
21
|
+
### スキーマ
|
|
22
|
+
|
|
23
|
+
書き込まれるデータポイントのスキーマを定義します。スキーマの各フィールドは InfluxDB データポイントのフィールドを表し、以下のプロパティを指定する必要があります:
|
|
24
|
+
|
|
25
|
+
- `name`: フィールドの名前。
|
|
26
|
+
- `type`: フィールドのタイプ(タグ、文字列、整数、符号なし整数、浮動小数点数、ブール値)。
|
|
27
|
+
- `val`(オプション):フィールドのデフォルト値。
|
|
28
|
+
- `accessor`(オプション):入力データから値を抽出するためのデータアクセスパス。
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# InfluxDB 데이터 포인트 작성 작업
|
|
2
|
+
|
|
3
|
+
## 설명
|
|
4
|
+
|
|
5
|
+
이 작업은 InfluxDB 데이터베이스에 데이터 포인트를 작성합니다.
|
|
6
|
+
|
|
7
|
+
## 설정
|
|
8
|
+
|
|
9
|
+
### 조직
|
|
10
|
+
|
|
11
|
+
InfluxDB에서 사용할 조직을 지정합니다.
|
|
12
|
+
|
|
13
|
+
### 버킷
|
|
14
|
+
|
|
15
|
+
데이터 포인트가 작성될 버킷을 지정합니다.
|
|
16
|
+
|
|
17
|
+
### 측정치
|
|
18
|
+
|
|
19
|
+
데이터 포인트가 저장될 측정치를 지정합니다.
|
|
20
|
+
|
|
21
|
+
### 스키마
|
|
22
|
+
|
|
23
|
+
작성될 데이터 포인트의 스키마를 정의합니다. 스키마의 각 필드는 InfluxDB 데이터 포인트의 필드를 나타내며 다음 속성을 지정해야 합니다:
|
|
24
|
+
|
|
25
|
+
- `name`: 필드의 이름.
|
|
26
|
+
- `type`: 필드의 유형 (태그, 문자열, 정수, 부호 없는 정수, 부동 소수점, 불리언).
|
|
27
|
+
- `val` (선택사항): 필드의 기본값.
|
|
28
|
+
- `accessor` (선택사항): 입력 데이터에서 값을 추출하기 위한 데이터 접근 경로.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# InfluxDB Write Point Task
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
This task writes a data point to an InfluxDB database.
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
### Organization
|
|
10
|
+
|
|
11
|
+
Specify the organization to be used in InfluxDB.
|
|
12
|
+
|
|
13
|
+
### Bucket
|
|
14
|
+
|
|
15
|
+
Specify the bucket to which the data point will be written.
|
|
16
|
+
|
|
17
|
+
### Measurement
|
|
18
|
+
|
|
19
|
+
Specify the measurement under which the data point will be stored.
|
|
20
|
+
|
|
21
|
+
### Scheme
|
|
22
|
+
|
|
23
|
+
Define the schema of the data point to be written. Each field in the scheme represents a field in the InfluxDB data point and must specify the following properties:
|
|
24
|
+
|
|
25
|
+
- `name`: The name of the field.
|
|
26
|
+
- `type`: The type of the field (Tag, String, Integer, Unsigned, Float, Boolean).
|
|
27
|
+
- `val` (optional): The default value of the field.
|
|
28
|
+
- `accessor` (optional): The data accessor path to extract the value from the input data.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# InfluxDB Write Point Task
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
This task writes a data point to an InfluxDB database.
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
### Organization
|
|
10
|
+
|
|
11
|
+
Specify the organization to be used in InfluxDB.
|
|
12
|
+
|
|
13
|
+
### Bucket
|
|
14
|
+
|
|
15
|
+
Specify the bucket to which the data point will be written.
|
|
16
|
+
|
|
17
|
+
### Measurement
|
|
18
|
+
|
|
19
|
+
Specify the measurement under which the data point will be stored.
|
|
20
|
+
|
|
21
|
+
### Scheme
|
|
22
|
+
|
|
23
|
+
Define the schema of the data point to be written. Each field in the scheme represents a field in the InfluxDB data point and must specify the following properties:
|
|
24
|
+
|
|
25
|
+
- `name`: The name of the field.
|
|
26
|
+
- `type`: The type of the field (Tag, String, Integer, Unsigned, Float, Boolean).
|
|
27
|
+
- `val` (optional): The default value of the field.
|
|
28
|
+
- `accessor` (optional): The data accessor path to extract the value from the input data.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# InfluxDB 数据点写入任务
|
|
2
|
+
|
|
3
|
+
## 描述
|
|
4
|
+
|
|
5
|
+
此任务向 InfluxDB 数据库写入一个数据点。
|
|
6
|
+
|
|
7
|
+
## 配置
|
|
8
|
+
|
|
9
|
+
### 组织
|
|
10
|
+
|
|
11
|
+
指定在 InfluxDB 中使用的组织。
|
|
12
|
+
|
|
13
|
+
### 存储桶
|
|
14
|
+
|
|
15
|
+
指定将数据点写入哪个存储桶。
|
|
16
|
+
|
|
17
|
+
### 测量值
|
|
18
|
+
|
|
19
|
+
指定将数据点存储在哪个测量值下。
|
|
20
|
+
|
|
21
|
+
### 方案
|
|
22
|
+
|
|
23
|
+
定义要写入的数据点的方案。方案中的每个字段都代表 InfluxDB 数据点中的一个字段,并且必须指定以下属性:
|
|
24
|
+
|
|
25
|
+
- `name`: 字段的名称。
|
|
26
|
+
- `type`: 字段的类型(标签,字符串,整数,无符号,浮点,布尔)。
|
|
27
|
+
- `val`(可选):字段的默认值。
|
|
28
|
+
- `accessor`(可选):从输入数据中提取值的数据访问路径。
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@things-factory/integration-influxdb",
|
|
3
|
+
"version": "7.0.0-alpha.13",
|
|
4
|
+
"main": "dist-server/index.js",
|
|
5
|
+
"things-factory": true,
|
|
6
|
+
"author": "heartyoh <heartyoh@hatiolab.com>",
|
|
7
|
+
"description": "Module to provide influxdb connection on integration engine",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public",
|
|
11
|
+
"@things-factory:registry": "https://registry.npmjs.org"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/hatiolab/things-factory.git",
|
|
16
|
+
"directory": "packages/integration-influxdb"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "npm run build:server && npm run build:client",
|
|
20
|
+
"copy:files": "copyfiles -e \"./client/**/*.{ts,js,json}\" -u 1 \"./client/**/*\" dist-client",
|
|
21
|
+
"build:client": "npm run copy:files && npx tsc --p ./client/tsconfig.json",
|
|
22
|
+
"build:server": "npx tsc --p ./server/tsconfig.json",
|
|
23
|
+
"clean:client": "npx rimraf dist-client",
|
|
24
|
+
"clean:server": "npx rimraf dist-server",
|
|
25
|
+
"clean": "npm run clean:server && npm run clean:client"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@influxdata/influxdb-client": "^1.33.2",
|
|
29
|
+
"@things-factory/integration-base": "^7.0.0-alpha.9"
|
|
30
|
+
},
|
|
31
|
+
"gitHead": "f4b4bd491776f0a7137bb81862cd6825336716be"
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './influxdb'
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { InfluxDB } from '@influxdata/influxdb-client'
|
|
2
|
+
|
|
3
|
+
import { Connection, ConnectionManager, Connector } from '@things-factory/integration-base'
|
|
4
|
+
|
|
5
|
+
export class InfluxDBConnector implements Connector {
|
|
6
|
+
async ready(connectionConfigs) {
|
|
7
|
+
await Promise.all(connectionConfigs.map(this.connect.bind(this)))
|
|
8
|
+
|
|
9
|
+
ConnectionManager.logger.info('influxdb connections are ready')
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
checkConnectionInstance(domain, connectionName): boolean {
|
|
13
|
+
try {
|
|
14
|
+
const connection = ConnectionManager.getConnectionInstanceByName(domain, connectionName)
|
|
15
|
+
|
|
16
|
+
return !!(connection?.client?.connectionState !== 'online')
|
|
17
|
+
} catch (e) {
|
|
18
|
+
return false
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async connect(connection) {
|
|
23
|
+
var {
|
|
24
|
+
endpoint,
|
|
25
|
+
params: { token }
|
|
26
|
+
} = connection
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
const client = new InfluxDB({ url: endpoint, token })
|
|
30
|
+
|
|
31
|
+
ConnectionManager.addConnectionInstance(connection, client)
|
|
32
|
+
|
|
33
|
+
ConnectionManager.logger.info(`influxdb connection(${connection.name}:${connection.endpoint}) is connected`)
|
|
34
|
+
} catch (ex) {
|
|
35
|
+
ConnectionManager.logger.info(`influxdb connection(${connection.name}:${connection.endpoint}) failed to connect`)
|
|
36
|
+
throw ex
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async disconnect(connection: Connection) {
|
|
41
|
+
var { client } = ConnectionManager.removeConnectionInstance(connection)
|
|
42
|
+
client.close()
|
|
43
|
+
|
|
44
|
+
ConnectionManager.logger.info(`influxdb connection(${connection.name}) is disconnected`)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
get parameterSpec() {
|
|
48
|
+
return [
|
|
49
|
+
{
|
|
50
|
+
type: 'string',
|
|
51
|
+
name: 'token',
|
|
52
|
+
label: 'token'
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
get taskPrefixes() {
|
|
58
|
+
return ['influxdb']
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
get help() {
|
|
62
|
+
return 'integration/connector/influxdb-connector'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
ConnectionManager.registerConnector('influxdb', new InfluxDBConnector())
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { InfluxDB, FluxTableMetaData } from '@influxdata/influxdb-client'
|
|
2
|
+
import { VM } from 'vm2'
|
|
3
|
+
|
|
4
|
+
import { ConnectionManager, Context, TaskRegistry } from '@things-factory/integration-base'
|
|
5
|
+
|
|
6
|
+
const debug = require('debug')('things-factory:influxdb-query')
|
|
7
|
+
|
|
8
|
+
interface InfluxData {
|
|
9
|
+
measurement: string
|
|
10
|
+
tags: { [key: string]: string }
|
|
11
|
+
fields: { [key: string]: number | string | boolean }
|
|
12
|
+
timestamp: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface InfluxRaw {
|
|
16
|
+
_time: string
|
|
17
|
+
_start: string
|
|
18
|
+
_stop: string
|
|
19
|
+
_measurement: string
|
|
20
|
+
_field: string
|
|
21
|
+
_value: any
|
|
22
|
+
table: any
|
|
23
|
+
result: any
|
|
24
|
+
[tag: string]: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function processInfluxData(raws: InfluxRaw[]): InfluxData[] {
|
|
28
|
+
var current: InfluxData
|
|
29
|
+
var result: { [time: string]: InfluxData } = {}
|
|
30
|
+
|
|
31
|
+
raws.forEach(raw => {
|
|
32
|
+
const { _time, _field, _value, _measurement, _start, _stop, result: _result, table, ...tags } = raw
|
|
33
|
+
|
|
34
|
+
result[_time] ||= {
|
|
35
|
+
timestamp: _time,
|
|
36
|
+
measurement: _measurement,
|
|
37
|
+
tags,
|
|
38
|
+
fields: {}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
result[_time].fields[_field] = _value
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
return Object.values(result)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async function influxdbQuery(step, { domain, user, data, variables, lng }: Context) {
|
|
48
|
+
const {
|
|
49
|
+
connection,
|
|
50
|
+
params: { organization, query }
|
|
51
|
+
} = step
|
|
52
|
+
|
|
53
|
+
const client = ConnectionManager.getConnectionInstanceByName(domain, connection) as InfluxDB
|
|
54
|
+
if (!client) {
|
|
55
|
+
debug(`no connection : ${connection}`)
|
|
56
|
+
throw new Error(`no connection : ${connection}`)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const vm = new VM({
|
|
60
|
+
sandbox: {
|
|
61
|
+
domain,
|
|
62
|
+
user,
|
|
63
|
+
lng,
|
|
64
|
+
data,
|
|
65
|
+
variables
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
const fluxQuery = vm.run('`' + query + '`')
|
|
70
|
+
|
|
71
|
+
const queryApi = client.getQueryApi(organization)
|
|
72
|
+
|
|
73
|
+
const result = await queryApi.collectRows(fluxQuery)
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
data: processInfluxData(result as InfluxRaw[])
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
influxdbQuery.parameterSpec = [
|
|
81
|
+
{
|
|
82
|
+
type: 'string',
|
|
83
|
+
name: 'organization',
|
|
84
|
+
label: 'influxdb.organization'
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: 'textarea',
|
|
88
|
+
name: 'query',
|
|
89
|
+
label: 'influxdb.query'
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
influxdbQuery.help = 'integration/task/influxdb-query'
|
|
94
|
+
|
|
95
|
+
TaskRegistry.registerTaskHandler('influxdb-query', influxdbQuery)
|