@frangoteam/fuxa-min 1.1.19
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/LICENSE +21 -0
- package/README.md +41 -0
- package/_images/Pipes/P1.svg +39 -0
- package/_images/Tanks/Fl.svg +7 -0
- package/api/alarms/index.js +132 -0
- package/api/auth/index.js +71 -0
- package/api/command/index.js +187 -0
- package/api/daq/index.js +79 -0
- package/api/diagnose/index.js +163 -0
- package/api/index.js +181 -0
- package/api/jwt-helper.js +106 -0
- package/api/plugins/index.js +109 -0
- package/api/projects/index.js +229 -0
- package/api/resources/index.js +118 -0
- package/api/scripts/index.js +82 -0
- package/api/users/index.js +109 -0
- package/dist/3rdpartylicenses.txt +1477 -0
- package/dist/Quicksand-Bold.071154c292aef0b8.woff +0 -0
- package/dist/Quicksand-Bold.6383d6475ed5c40f.woff2 +0 -0
- package/dist/Quicksand-Bold.f07d467887f9cfab.ttf +0 -0
- package/dist/Quicksand-Medium.0982a651e8d4315f.woff +0 -0
- package/dist/Quicksand-Medium.9d2733fbfb9b1be8.ttf +0 -0
- package/dist/Quicksand-Medium.b09302365c586eb2.woff2 +0 -0
- package/dist/Quicksand-Regular.16adf9eecd267273.woff +0 -0
- package/dist/Quicksand-Regular.78819724f6aeff59.woff2 +0 -0
- package/dist/Quicksand-Regular.8829564f0e14bf76.ttf +0 -0
- package/dist/assets/fonts/icomoon.eot +0 -0
- package/dist/assets/fonts/icomoon.svg +19 -0
- package/dist/assets/fonts/icomoon.ttf +0 -0
- package/dist/assets/fonts/icomoon.woff +0 -0
- package/dist/assets/fonts/myicons.eot +0 -0
- package/dist/assets/fonts/myicons.svg +19 -0
- package/dist/assets/fonts/myicons.ttf +0 -0
- package/dist/assets/fonts/myicons.woff +0 -0
- package/dist/assets/fonts/quicksand-bold/Quicksand-Bold.ttf +0 -0
- package/dist/assets/fonts/quicksand-bold/Quicksand-Bold.woff +0 -0
- package/dist/assets/fonts/quicksand-bold/Quicksand-Bold.woff2 +0 -0
- package/dist/assets/fonts/quicksand-medium/Quicksand-Medium.ttf +0 -0
- package/dist/assets/fonts/quicksand-medium/Quicksand-Medium.woff +0 -0
- package/dist/assets/fonts/quicksand-medium/Quicksand-Medium.woff2 +0 -0
- package/dist/assets/fonts/quicksand-regular/Quicksand-Regular.ttf +0 -0
- package/dist/assets/fonts/quicksand-regular/Quicksand-Regular.woff +0 -0
- package/dist/assets/fonts/quicksand-regular/Quicksand-Regular.woff2 +0 -0
- package/dist/assets/fonts/roboto-bold/roboto-bold-webfont.svg +10486 -0
- package/dist/assets/fonts/roboto-bold/roboto-bold-webfont.ttf +0 -0
- package/dist/assets/fonts/roboto-bold/roboto-bold-webfont.woff +0 -0
- package/dist/assets/fonts/roboto-bold/roboto-bold-webfont.woff2 +0 -0
- package/dist/assets/fonts/roboto-light/roboto-light-webfont.svg +9998 -0
- package/dist/assets/fonts/roboto-light/roboto-light-webfont.ttf +0 -0
- package/dist/assets/fonts/roboto-light/roboto-light-webfont.woff +0 -0
- package/dist/assets/fonts/roboto-light/roboto-light-webfont.woff2 +0 -0
- package/dist/assets/fonts/roboto-medium/roboto-medium-webfont.svg +10487 -0
- package/dist/assets/fonts/roboto-medium/roboto-medium-webfont.ttf +0 -0
- package/dist/assets/fonts/roboto-medium/roboto-medium-webfont.woff +0 -0
- package/dist/assets/fonts/roboto-medium/roboto-medium-webfont.woff2 +0 -0
- package/dist/assets/fonts/roboto-regular/roboto-regular-webfont.svg +10004 -0
- package/dist/assets/fonts/roboto-regular/roboto-regular-webfont.ttf +0 -0
- package/dist/assets/fonts/roboto-regular/roboto-regular-webfont.woff +0 -0
- package/dist/assets/fonts/roboto-regular/roboto-regular-webfont.woff2 +0 -0
- package/dist/assets/fonts/roboto-thin/roboto-thin-webfont.svg +10012 -0
- package/dist/assets/fonts/roboto-thin/roboto-thin-webfont.ttf +0 -0
- package/dist/assets/fonts/roboto-thin/roboto-thin-webfont.woff +0 -0
- package/dist/assets/fonts/roboto-thin/roboto-thin-webfont.woff2 +0 -0
- package/dist/assets/i18n/de.json +1308 -0
- package/dist/assets/i18n/en.json +1438 -0
- package/dist/assets/i18n/es.json +777 -0
- package/dist/assets/i18n/fr.json +1129 -0
- package/dist/assets/i18n/ko.json +774 -0
- package/dist/assets/i18n/pt.json +657 -0
- package/dist/assets/i18n/ru.json +1228 -0
- package/dist/assets/i18n/tr.json +673 -0
- package/dist/assets/i18n/ua.json +614 -0
- package/dist/assets/i18n/zh-cn.json +1252 -0
- package/dist/assets/images/align-bottom.svg +88 -0
- package/dist/assets/images/align-center.svg +86 -0
- package/dist/assets/images/align-left.svg +86 -0
- package/dist/assets/images/align-middle.svg +88 -0
- package/dist/assets/images/align-right.svg +88 -0
- package/dist/assets/images/align-top.svg +88 -0
- package/dist/assets/images/bag.svg +115 -0
- package/dist/assets/images/button.svg +22 -0
- package/dist/assets/images/chart.svg +17 -0
- package/dist/assets/images/circle.svg +84 -0
- package/dist/assets/images/compressor-a.svg +2 -0
- package/dist/assets/images/editvalue.svg +14 -0
- package/dist/assets/images/ellipse.svg +84 -0
- package/dist/assets/images/flip-orizontal.svg +86 -0
- package/dist/assets/images/flip-vertical.svg +82 -0
- package/dist/assets/images/gauge-donut.png +0 -0
- package/dist/assets/images/gauge-mat.png +0 -0
- package/dist/assets/images/gauge-zone.png +0 -0
- package/dist/assets/images/graphbar.svg +18 -0
- package/dist/assets/images/group.svg +91 -0
- package/dist/assets/images/iframe.svg +54 -0
- package/dist/assets/images/image.svg +95 -0
- package/dist/assets/images/led-circle.svg +77 -0
- package/dist/assets/images/line.svg +86 -0
- package/dist/assets/images/linecap-butt.svg +77 -0
- package/dist/assets/images/linecap-round.svg +77 -0
- package/dist/assets/images/linecap-square.svg +82 -0
- package/dist/assets/images/linejoin-bevel.svg +77 -0
- package/dist/assets/images/linejoin-miter.svg +77 -0
- package/dist/assets/images/linejoin-round.svg +77 -0
- package/dist/assets/images/logo.svg +18 -0
- package/dist/assets/images/path.svg +100 -0
- package/dist/assets/images/pencil.svg +98 -0
- package/dist/assets/images/pipe.svg +15 -0
- package/dist/assets/images/progress-v.svg +79 -0
- package/dist/assets/images/rect.svg +84 -0
- package/dist/assets/images/select-pointer.svg +93 -0
- package/dist/assets/images/selectvalue.svg +14 -0
- package/dist/assets/images/semaphore.svg +19 -0
- package/dist/assets/images/slider.svg +17 -0
- package/dist/assets/images/switch.svg +15 -0
- package/dist/assets/images/table.svg +55 -0
- package/dist/assets/images/text.svg +294 -0
- package/dist/assets/images/to-bottom.svg +163 -0
- package/dist/assets/images/to-path.svg +94 -0
- package/dist/assets/images/to-top.svg +163 -0
- package/dist/assets/images/to_top.svg +88 -0
- package/dist/assets/images/todelete.svg +13 -0
- package/dist/assets/images/ungroup.svg +108 -0
- package/dist/assets/images/value.svg +81 -0
- package/dist/assets/images/valve-a.svg +2 -0
- package/dist/assets/images/webcam.svg +16 -0
- package/dist/assets/lib/ext-styles.css +28 -0
- package/dist/assets/lib/gauge/gauge.js +988 -0
- package/dist/assets/lib/gauge/gauge.min.js +1 -0
- package/dist/assets/lib/nouislider/nouislider.min.css +1 -0
- package/dist/assets/lib/nouislider/nouislider.min.js +1 -0
- package/dist/assets/lib/numeral/locales.min.js +7 -0
- package/dist/assets/lib/numeral/numeral.min.js +8 -0
- package/dist/assets/lib/pdfkit-table/index.js +967 -0
- package/dist/assets/lib/svg/raphael.min.js +1 -0
- package/dist/assets/lib/svg/svg.js +5573 -0
- package/dist/assets/lib/svg/svg.min.js +13 -0
- package/dist/assets/lib/svgeditor/extensions/ext-bundle.min.js +1 -0
- package/dist/assets/lib/svgeditor/extensions/ext-html_button.min.css +1 -0
- package/dist/assets/lib/svgeditor/fuxa-editor.min.js +23 -0
- package/dist/assets/lib/svgeditor/jquery-plugin.min.css +2 -0
- package/dist/assets/lib/svgeditor/jquery-plugin.min.js +52 -0
- package/dist/assets/lib/svgeditor/jquery-ui-1.8.17.custom.min.js +54 -0
- package/dist/assets/lib/svgeditor/jquery.min.js +4 -0
- package/dist/assets/lib/svgeditor/shapes/ape-shapes.js +39 -0
- package/dist/assets/lib/svgeditor/shapes/img/agitator-disc.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/agitator-paddle.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/agitator-prop.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/agitator-turbo.svg +19 -0
- package/dist/assets/lib/svgeditor/shapes/img/anim-eli.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/anim-piston.svg +14 -0
- package/dist/assets/lib/svgeditor/shapes/img/centrifugal.svg +68 -0
- package/dist/assets/lib/svgeditor/shapes/img/centrifugal1.svg +67 -0
- package/dist/assets/lib/svgeditor/shapes/img/centrifuge1.svg +67 -0
- package/dist/assets/lib/svgeditor/shapes/img/centrifuge2.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/centrifuge3.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/centrifuge4.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/compair.svg +92 -0
- package/dist/assets/lib/svgeditor/shapes/img/compdiaph.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/compejector.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/compreci.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/compreci2.svg +68 -0
- package/dist/assets/lib/svgeditor/shapes/img/compressor-fan.svg +18 -0
- package/dist/assets/lib/svgeditor/shapes/img/compressor-piston.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/compressor-void.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/compring.svg +72 -0
- package/dist/assets/lib/svgeditor/shapes/img/compring2.svg +72 -0
- package/dist/assets/lib/svgeditor/shapes/img/comprotary.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/comprotary2.svg +18 -0
- package/dist/assets/lib/svgeditor/shapes/img/compscrew.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/compsilence.svg +20 -0
- package/dist/assets/lib/svgeditor/shapes/img/compturbo.svg +72 -0
- package/dist/assets/lib/svgeditor/shapes/img/crusher1.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/crusher2.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/crusher3.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/crusher4.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/crusher5.svg +18 -0
- package/dist/assets/lib/svgeditor/shapes/img/crusher6.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/crusher7.svg +21 -0
- package/dist/assets/lib/svgeditor/shapes/img/diaph.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/drier1.svg +63 -0
- package/dist/assets/lib/svgeditor/shapes/img/drier2.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/drier3.svg +23 -0
- package/dist/assets/lib/svgeditor/shapes/img/drier4.svg +18 -0
- package/dist/assets/lib/svgeditor/shapes/img/drier5.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger-filter.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger-heat.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger-tube.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger1.svg +67 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger2.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger3.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger4.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger5.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger6.svg +71 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger7.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger8.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/exchanger9.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/feeder.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/feeder2.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/feeder3.svg +63 -0
- package/dist/assets/lib/svgeditor/shapes/img/filter2.svg +68 -0
- package/dist/assets/lib/svgeditor/shapes/img/filter3.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting1.svg +67 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting10.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting11.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting12.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting13.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting2.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting3.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting4.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting5.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting6.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting7.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting8.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/fitting9.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/misc1.svg +75 -0
- package/dist/assets/lib/svgeditor/shapes/img/misc2.svg +71 -0
- package/dist/assets/lib/svgeditor/shapes/img/misc3.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/misc4.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/misc5.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/misc6.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/misc7.svg +64 -0
- package/dist/assets/lib/svgeditor/shapes/img/misc8.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/motor-simb.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/nozzle.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/nozzle2.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/pipi1.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/pipi2.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/pipi3.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/pipi4.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/pipi5.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/pipi6.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/pipi7.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpblower.svg +76 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpcentri1.svg +64 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpcentri2.svg +64 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpfeed.svg +64 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpgear.svg +18 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpgear2.svg +19 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumphidra.svg +68 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumphorizo.svg +68 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpjet.svg +68 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpperis.svg +20 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpscreew.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpscreew2.svg +72 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpturbi.svg +64 -0
- package/dist/assets/lib/svgeditor/shapes/img/pumpvacuum.svg +72 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-arrow.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-circle.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-circleindi.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-cloud.svg +63 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-cone.svg +71 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-corner.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-cross.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-cylinder.svg +71 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-delay.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-diamond.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-display.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-docu.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-doublearrow.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-drop.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-halfcircle.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-heart.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-looplimit.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-maninput.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-nosymbol.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-octagon.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-offpage.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-or.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-or2.svg +17 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-parallelogram.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-pentagon.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-poval.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-prepara.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-rectangle.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-rectindi.svg +16 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-star4.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-switch.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-tape.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-tee.svg +63 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-ticket.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-trape.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-triangle.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/shape-vor.svg +14 -0
- package/dist/assets/lib/svgeditor/shapes/img/tank1.svg +63 -0
- package/dist/assets/lib/svgeditor/shapes/img/tank2.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/tank3.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/tank4.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/tank5.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/tank6.svg +68 -0
- package/dist/assets/lib/svgeditor/shapes/img/tank7.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/tank8.svg +15 -0
- package/dist/assets/lib/svgeditor/shapes/img/tank9.svg +21 -0
- package/dist/assets/lib/svgeditor/shapes/img/valve-ax.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/valve-bx.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/valve-cx.svg +13 -0
- package/dist/assets/lib/svgeditor/shapes/img/webcam.svg +6 -0
- package/dist/assets/lib/svgeditor/shapes/my-shapes.js +178 -0
- package/dist/assets/lib/svgeditor/shapes/proc-comp-shapes.js +105 -0
- package/dist/assets/lib/svgeditor/shapes/proc-general-shapes.js +60 -0
- package/dist/assets/lib/svgeditor/shapes/proc-pumps-shapes.js +112 -0
- package/dist/assets/lib/svgeditor/shapes/proc-shapes.js +606 -0
- package/dist/assets/lib/svgeditor/shapes/shapes.js +30 -0
- package/dist/assets/lib/svgeditor/svg-editor.min.css +1 -0
- package/dist/assets/lib/uplot/placement.min.js +2 -0
- package/dist/assets/project.demo.fuxap +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/icomoon.86abfb46e057ade8.eot +0 -0
- package/dist/icomoon.c1f8b59bad308d66.woff +0 -0
- package/dist/icomoon.ce427f75e21963af.ttf +0 -0
- package/dist/icomoon.dfb0a89feb346906.svg +19 -0
- package/dist/index.html +50 -0
- package/dist/logo.0e8e64e69250a450.svg +18 -0
- package/dist/main.a356f552d9838b9e.js +1 -0
- package/dist/material-icons-outlined.78a93b2079680a08.woff +0 -0
- package/dist/material-icons-outlined.f86cb7b0aa53f0fe.woff2 +0 -0
- package/dist/material-icons-round.92dc7ca2f4c591e7.woff +0 -0
- package/dist/material-icons-round.b10ec9db5b7fbc74.woff2 +0 -0
- package/dist/material-icons-sharp.3885863ee4746422.woff2 +0 -0
- package/dist/material-icons-sharp.a71cb2bf66c604de.woff +0 -0
- package/dist/material-icons-two-tone.588d63134de807a7.woff +0 -0
- package/dist/material-icons-two-tone.675bd578bd14533e.woff2 +0 -0
- package/dist/material-icons.4ad034d2c499d9b6.woff +0 -0
- package/dist/material-icons.59322316b3fd6063.woff2 +0 -0
- package/dist/polyfills.2696a6f9dc75535e.js +1 -0
- package/dist/roboto-bold-webfont.29ac6158e35aee95.woff +0 -0
- package/dist/roboto-bold-webfont.568ab1fa3f154a77.svg +10486 -0
- package/dist/roboto-bold-webfont.6bcfbdc216b3bc78.woff2 +0 -0
- package/dist/roboto-bold-webfont.7c22a4dfdee2ff33.ttf +0 -0
- package/dist/roboto-light-webfont.13492ec56771eeee.svg +9998 -0
- package/dist/roboto-light-webfont.61fa26c99b07ac83.woff2 +0 -0
- package/dist/roboto-light-webfont.95295ce84942d8ce.ttf +0 -0
- package/dist/roboto-light-webfont.ae19119a2889dfdf.woff +0 -0
- package/dist/roboto-medium-webfont.30344f0411888055.woff +0 -0
- package/dist/roboto-medium-webfont.57fb00cab0317d2d.woff2 +0 -0
- package/dist/roboto-medium-webfont.a40869e060a388c0.ttf +0 -0
- package/dist/roboto-medium-webfont.ea02241c29620c02.svg +10487 -0
- package/dist/roboto-regular-webfont.2b0501b72f5a94d5.ttf +0 -0
- package/dist/roboto-regular-webfont.2ce0ba9a06424965.svg +10004 -0
- package/dist/roboto-regular-webfont.ae47f6f1292d196f.woff2 +0 -0
- package/dist/roboto-regular-webfont.f58066a2d9061006.woff +0 -0
- package/dist/roboto-thin-webfont.0a64479870f676e8.ttf +0 -0
- package/dist/roboto-thin-webfont.0f7221f5c7e972ef.woff2 +0 -0
- package/dist/roboto-thin-webfont.51b221e22714b1fe.svg +10012 -0
- package/dist/roboto-thin-webfont.dac941649dd4eac0.woff +0 -0
- package/dist/runtime.8ef63094e52a66ba.js +1 -0
- package/dist/scripts.1c3385254ff4c93c.js +1 -0
- package/dist/styles.cf8e3cf50d039a5c.css +1 -0
- package/fuxa.js +39 -0
- package/main.js +381 -0
- package/package.json +68 -0
- package/paths.js +44 -0
- package/project.default.json +11 -0
- package/project.demo.fuxap +1 -0
- package/runtime/alarms/alarmstorage.js +205 -0
- package/runtime/alarms/index.js +678 -0
- package/runtime/devices/bacnet/index.js +730 -0
- package/runtime/devices/device-utils.js +95 -0
- package/runtime/devices/device.js +551 -0
- package/runtime/devices/ethernetip/index.js +381 -0
- package/runtime/devices/fuxaserver/index.js +310 -0
- package/runtime/devices/httprequest/index.js +495 -0
- package/runtime/devices/index.js +489 -0
- package/runtime/devices/modbus/datatypes.js +122 -0
- package/runtime/devices/modbus/index.js +730 -0
- package/runtime/devices/mqtt/index.js +618 -0
- package/runtime/devices/odbc/index.js +408 -0
- package/runtime/devices/opcua/index.js +817 -0
- package/runtime/devices/s7/datatypes.js +88 -0
- package/runtime/devices/s7/index.js +702 -0
- package/runtime/devices/template/index.js +141 -0
- package/runtime/events.js +33 -0
- package/runtime/index.js +559 -0
- package/runtime/jobs/cleaner.js +74 -0
- package/runtime/jobs/fonts/LICENSE.txt +202 -0
- package/runtime/jobs/fonts/Roboto-Black.ttf +0 -0
- package/runtime/jobs/fonts/Roboto-BlackItalic.ttf +0 -0
- package/runtime/jobs/fonts/Roboto-Bold.ttf +0 -0
- package/runtime/jobs/fonts/Roboto-BoldItalic.ttf +0 -0
- package/runtime/jobs/fonts/Roboto-Italic.ttf +0 -0
- package/runtime/jobs/fonts/Roboto-Light.ttf +0 -0
- package/runtime/jobs/fonts/Roboto-LightItalic.ttf +0 -0
- package/runtime/jobs/fonts/Roboto-Medium.ttf +0 -0
- package/runtime/jobs/fonts/Roboto-MediumItalic.ttf +0 -0
- package/runtime/jobs/fonts/Roboto-Regular.ttf +0 -0
- package/runtime/jobs/fonts/Roboto-Thin.ttf +0 -0
- package/runtime/jobs/fonts/Roboto-ThinItalic.ttf +0 -0
- package/runtime/jobs/helper/image-generator.js +82 -0
- package/runtime/jobs/index.js +214 -0
- package/runtime/jobs/report.js +353 -0
- package/runtime/logger.js +113 -0
- package/runtime/notificator/index.js +383 -0
- package/runtime/notificator/notifystorage.js +179 -0
- package/runtime/plugins/index.js +255 -0
- package/runtime/project/index.js +959 -0
- package/runtime/project/prjstorage.js +222 -0
- package/runtime/scripts/index.js +313 -0
- package/runtime/scripts/msm.js +146 -0
- package/runtime/storage/calculator.js +227 -0
- package/runtime/storage/daqstorage.js +188 -0
- package/runtime/storage/influxdb/index.js +240 -0
- package/runtime/storage/sqlite/currentstorage.js +144 -0
- package/runtime/storage/sqlite/index.js +695 -0
- package/runtime/storage/tdengine/index.js +106 -0
- package/runtime/users/index.js +123 -0
- package/runtime/users/usrstorage.js +201 -0
- package/runtime/utils.js +284 -0
- package/screenshot/feature-action-move.gif +0 -0
- package/screenshot/fuxa-ani.gif +0 -0
- package/screenshot/fuxa-device.gif +0 -0
- package/screenshot/fuxa-editor.png +0 -0
- package/screenshot/fuxa-hmi.gif +0 -0
- package/screenshot/fuxa-home.png +0 -0
- package/screenshot/fuxa-test.gif +0 -0
- package/settings.default.js +65 -0
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 'odbc': odbc wrapper to communicate with Database
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
'use strict';
|
|
6
|
+
var odbc;
|
|
7
|
+
const utils = require('../../utils');
|
|
8
|
+
const deviceUtils = require('../device-utils');
|
|
9
|
+
|
|
10
|
+
function ODBCclient(_data, _logger, _events) {
|
|
11
|
+
var data = JSON.parse(JSON.stringify(_data)); // Current Device data { id, name, tags, enabled, ... }
|
|
12
|
+
var logger = _logger;
|
|
13
|
+
var lastStatus = ''; // Last connections status
|
|
14
|
+
var varsValue = {}; // Tags to send to frontend { id, type, value }
|
|
15
|
+
var events = _events; // Events to commit change to runtime
|
|
16
|
+
var connection = null; // ODBC connection
|
|
17
|
+
var pool = null; // ODBC pool
|
|
18
|
+
var working = false; // Working flag to manage overloading polling and connection
|
|
19
|
+
var overloading = 0; // Overloading counter to mange the break connection
|
|
20
|
+
var lastTimestampValue; // Last Timestamp of asked values
|
|
21
|
+
var getProperty = null; // Function to ask property (security)
|
|
22
|
+
var currentTable = null; // Current Tablename
|
|
23
|
+
var tableMap = []; // Column name to ask
|
|
24
|
+
/**
|
|
25
|
+
* initialize the device type
|
|
26
|
+
*/
|
|
27
|
+
this.init = function (_type) {
|
|
28
|
+
console.error('Not supported!');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Connect to device
|
|
33
|
+
* Emit connection status to clients, clear all Tags values
|
|
34
|
+
*/
|
|
35
|
+
this.connect = function () {
|
|
36
|
+
return new Promise(async (resolve, reject) => {
|
|
37
|
+
if (data.property && data.property.address) {
|
|
38
|
+
try {
|
|
39
|
+
_clearVarsValue();
|
|
40
|
+
if (_checkWorking(true)) {
|
|
41
|
+
logger.info(`'${data.name}' try to connect ${data.property.address}`, true);
|
|
42
|
+
var security
|
|
43
|
+
await getProperty({query: 'security', name: data.id}).then((result, error) => {
|
|
44
|
+
if (result) {
|
|
45
|
+
security = utils.JsonTryToParse(result.value);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
var connectionsString = data.property.address;
|
|
49
|
+
if (security.uid) {
|
|
50
|
+
connectionsString += `;UID=${security.uid}`;
|
|
51
|
+
}
|
|
52
|
+
if (security.pwd) {
|
|
53
|
+
connectionsString += `;PWD=${security.pwd}`;
|
|
54
|
+
}
|
|
55
|
+
const connectionConfig = {
|
|
56
|
+
connectionString: connectionsString,
|
|
57
|
+
connectionTimeout: 10,
|
|
58
|
+
loginTimeout: 10,
|
|
59
|
+
}
|
|
60
|
+
connection = await odbc.connect(connectionConfig);
|
|
61
|
+
pool = await odbc.pool(connectionConfig);
|
|
62
|
+
var tables = await connection.tables(null, 'dbo', null, null);
|
|
63
|
+
if (tables.length <= 0) {
|
|
64
|
+
tables = await connection.tables(null, null, null, null);
|
|
65
|
+
}
|
|
66
|
+
currentTable = null;
|
|
67
|
+
const tablesToQuery = tables.find(table => table.TABLE_NAME === security.mode);
|
|
68
|
+
if (tablesToQuery) {
|
|
69
|
+
currentTable = security.mode;
|
|
70
|
+
logger.info(`'${data.name}' connected!`);
|
|
71
|
+
_emitStatus('connect-ok');
|
|
72
|
+
_checkWorking(false);
|
|
73
|
+
resolve();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
logger.error(`'${data.name}' missing '${data.mode}' connection data!`);
|
|
77
|
+
_emitStatus('connect-failed');
|
|
78
|
+
}
|
|
79
|
+
} catch (err) {
|
|
80
|
+
logger.error(`'${data.name}' try to connect error! ${err}`);
|
|
81
|
+
_emitStatus('connect-error');
|
|
82
|
+
}
|
|
83
|
+
if (connection) {
|
|
84
|
+
try {
|
|
85
|
+
connection.close();
|
|
86
|
+
} catch { }
|
|
87
|
+
}
|
|
88
|
+
reject();
|
|
89
|
+
} else {
|
|
90
|
+
logger.error(`'${data.name}' missing connection data!`);
|
|
91
|
+
_emitStatus('connect-failed');
|
|
92
|
+
_clearVarsValue();
|
|
93
|
+
reject();
|
|
94
|
+
}
|
|
95
|
+
_checkWorking(false);
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Disconnect
|
|
102
|
+
* Emit connection status to clients, clear all Tags values
|
|
103
|
+
*/
|
|
104
|
+
this.disconnect = function () {
|
|
105
|
+
return new Promise(async (resolve, reject) => {
|
|
106
|
+
if (connection) {
|
|
107
|
+
try {
|
|
108
|
+
await pool.close();
|
|
109
|
+
await connection.close();
|
|
110
|
+
} catch { }
|
|
111
|
+
_checkWorking(false);
|
|
112
|
+
_emitStatus('connect-off');
|
|
113
|
+
_clearVarsValue();
|
|
114
|
+
resolve(true);
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Browse Table to read column
|
|
121
|
+
*/
|
|
122
|
+
this.browse = function (node) {
|
|
123
|
+
return new Promise( async function (resolve, reject) {
|
|
124
|
+
if (_checkWorking(true)) {
|
|
125
|
+
try {
|
|
126
|
+
const columns = await connection.columns(null, null, currentTable, null);
|
|
127
|
+
const result = columns.map(column => {
|
|
128
|
+
return {
|
|
129
|
+
id: column.COLUMN_NAME,
|
|
130
|
+
name: column.COLUMN_NAME,
|
|
131
|
+
type: column.TYPE_NAME,
|
|
132
|
+
class: 'Variable'
|
|
133
|
+
}});
|
|
134
|
+
resolve(result);
|
|
135
|
+
} catch (err) {
|
|
136
|
+
if (err) {
|
|
137
|
+
logger.error(`'${data.name}' browse failure! ${err}`);
|
|
138
|
+
}
|
|
139
|
+
reject();
|
|
140
|
+
}
|
|
141
|
+
_checkWorking(false);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Read values in polling mode
|
|
148
|
+
* Update the tags values list, save in DAQ if value changed or in interval and emit values to clients
|
|
149
|
+
*/
|
|
150
|
+
this.polling = function () {
|
|
151
|
+
if (_checkWorking(true)) {
|
|
152
|
+
if (this.isConnected()) {
|
|
153
|
+
try {
|
|
154
|
+
_readValues().then(result => {
|
|
155
|
+
_checkWorking(false);
|
|
156
|
+
if (result) {
|
|
157
|
+
const values = utils.extractArray(result);
|
|
158
|
+
var varsValueChanged = _updateVarsValue(values);
|
|
159
|
+
lastTimestampValue = new Date().getTime();
|
|
160
|
+
_emitValues(varsValue);
|
|
161
|
+
|
|
162
|
+
if (this.addDaq && !utils.isEmptyObject(varsValueChanged)) {
|
|
163
|
+
this.addDaq(varsValueChanged, data.name, data.id);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}, reason => {
|
|
167
|
+
logger.error(`'${data.name}' _readValues error! ${reason}`);
|
|
168
|
+
_checkWorking(false);
|
|
169
|
+
});
|
|
170
|
+
} catch (err) {
|
|
171
|
+
logger.error(`'${data.name}' polling error: ${err}`);
|
|
172
|
+
_checkWorking(false);
|
|
173
|
+
}
|
|
174
|
+
} else {
|
|
175
|
+
_checkWorking(false);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Load Tags attribute to read with polling
|
|
182
|
+
*/
|
|
183
|
+
this.load = function (_data) {
|
|
184
|
+
data = JSON.parse(JSON.stringify(_data));
|
|
185
|
+
tableMap = Object.values(data.tags).map(tag => tag.name);
|
|
186
|
+
try {
|
|
187
|
+
var count = Object.keys(data.tags).length;
|
|
188
|
+
logger.info(`'${data.name}' data loaded (${count})`, true);
|
|
189
|
+
} catch (err) {
|
|
190
|
+
logger.error(`'${data.name}' load error! ${err}`);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Return Tags values array { id: <name>, value: <value> }
|
|
196
|
+
*/
|
|
197
|
+
this.getValues = function () {
|
|
198
|
+
console.error('Not supported!');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Return Tag value { id: <name>, value: <value>, ts: <lastTimestampValue> }
|
|
203
|
+
*/
|
|
204
|
+
this.getValue = function (tagid) {
|
|
205
|
+
console.error('Not supported!');
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Return connection status 'connect-off', 'connect-ok', 'connect-error', 'connect-busy'
|
|
210
|
+
*/
|
|
211
|
+
this.getStatus = function () {
|
|
212
|
+
return lastStatus;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Return Tag property to show in frontend
|
|
217
|
+
*/
|
|
218
|
+
this.getTagProperty = function (tagid) {
|
|
219
|
+
console.error('Not supported!');
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Set the Tag value to device
|
|
224
|
+
*/
|
|
225
|
+
this.setValue = function (tagid, value) {
|
|
226
|
+
console.error('Not supported!');
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Return if device is connected
|
|
231
|
+
*/
|
|
232
|
+
this.isConnected = function () {
|
|
233
|
+
return (connection) ? connection.connected : false;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Bind the DAQ store function and default daqInterval value in milliseconds
|
|
238
|
+
*/
|
|
239
|
+
this.bindAddDaq = function (fnc) {
|
|
240
|
+
this.addDaq = fnc; // Add the DAQ value to db history
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Return the timestamp of last read tag operation on polling
|
|
245
|
+
* @returns
|
|
246
|
+
*/
|
|
247
|
+
this.lastReadTimestamp = () => {
|
|
248
|
+
console.error('Not supported!');
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Set function to ask property (security)
|
|
253
|
+
*/
|
|
254
|
+
this.bindGetProperty = function (fnc) {
|
|
255
|
+
getProperty = fnc;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Used to manage the async connection and polling automation (that not overloading)
|
|
260
|
+
* @param {*} check
|
|
261
|
+
*/
|
|
262
|
+
var _checkWorking = function (check) {
|
|
263
|
+
if (check && working) {
|
|
264
|
+
overloading++;
|
|
265
|
+
logger.warn(`'${data.name}' working (connection || polling) overload! ${overloading}`);
|
|
266
|
+
// !The driver don't give the break connection
|
|
267
|
+
if (overloading >= 3) {
|
|
268
|
+
try {
|
|
269
|
+
this.disconnect();
|
|
270
|
+
} catch (e) {
|
|
271
|
+
console.error(e);
|
|
272
|
+
}
|
|
273
|
+
} else {
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
working = check;
|
|
278
|
+
overloading = 0;
|
|
279
|
+
return true;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
var _readValues = function () {
|
|
283
|
+
return new Promise(async (resolve, reject) => {
|
|
284
|
+
try {
|
|
285
|
+
const param = tableMap.join(', ');
|
|
286
|
+
const query = `SELECT ${param} from ${currentTable}`;
|
|
287
|
+
const result = await pool.query(query);
|
|
288
|
+
lastTimestampValue = new Date().getTime();
|
|
289
|
+
resolve(result);
|
|
290
|
+
return;
|
|
291
|
+
} catch (err) {
|
|
292
|
+
logger.error(`'${data.name}' load error! ${err}`);
|
|
293
|
+
}
|
|
294
|
+
reject();
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Clear local values by set all to null
|
|
300
|
+
*/
|
|
301
|
+
var _clearVarsValue = function () {
|
|
302
|
+
for (var id in varsValue) {
|
|
303
|
+
varsValue[id].value = null;
|
|
304
|
+
}
|
|
305
|
+
// _emitValues(varsValue);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Emit the PLC Tags values array { id: <name>, value: <value>, type: <type> }
|
|
310
|
+
* @param {*} values
|
|
311
|
+
*/
|
|
312
|
+
var _emitValues = function (values) {
|
|
313
|
+
events.emit('device-value:changed', { id: data.id, values: values });
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Emit the odbc connection status
|
|
318
|
+
* @param {*} status
|
|
319
|
+
*/
|
|
320
|
+
var _emitStatus = function (status) {
|
|
321
|
+
lastStatus = status;
|
|
322
|
+
events.emit('device-status:changed', { id: data.id, status: status });
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Update the Tags values read
|
|
327
|
+
* @param {*} vars
|
|
328
|
+
*/
|
|
329
|
+
var _updateVarsValue = (vars) => {
|
|
330
|
+
const timestamp = new Date().getTime();
|
|
331
|
+
var result = {};
|
|
332
|
+
// for (var id in data.tags) {
|
|
333
|
+
// if (!utils.isNullOrUndefined(data.tags[id].rawValue)) {
|
|
334
|
+
// data.tags[id].value = deviceUtils.tagValueCompose(data.tags[id].rawValue, data.tags[id]);
|
|
335
|
+
// if (this.addDaq && deviceUtils.tagDaqToSave(data.tags[id], timestamp)) {
|
|
336
|
+
// result[id] = data.tags[id];
|
|
337
|
+
// }
|
|
338
|
+
// }
|
|
339
|
+
// data.tags[id].changed = false;
|
|
340
|
+
// varsValue[id] = data.tags[id];
|
|
341
|
+
// }
|
|
342
|
+
return result;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Return tables list
|
|
348
|
+
*/
|
|
349
|
+
function getTables(endpoint, fncGetProperty, packagerManager) {
|
|
350
|
+
return new Promise( async function (resolve, reject) {
|
|
351
|
+
if (loadOdbcLib(packagerManager)) {
|
|
352
|
+
var connection;
|
|
353
|
+
try {
|
|
354
|
+
var security
|
|
355
|
+
await fncGetProperty({query: 'security', name: endpoint.id}).then((result, error) => {
|
|
356
|
+
if (result) {
|
|
357
|
+
security = utils.JsonTryToParse(result.value);
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
var connectionsString = endpoint.address;
|
|
361
|
+
if (endpoint.uid || security.uid) {
|
|
362
|
+
connectionsString += `;UID=${endpoint.uid || security.uid}`;
|
|
363
|
+
}
|
|
364
|
+
if (endpoint.pwd || security.pwd) {
|
|
365
|
+
connectionsString += `;PWD=${endpoint.pwd || security.pwd}`;
|
|
366
|
+
}
|
|
367
|
+
const connectionConfig = {
|
|
368
|
+
connectionString: connectionsString,
|
|
369
|
+
connectionTimeout: 10,
|
|
370
|
+
loginTimeout: 10,
|
|
371
|
+
}
|
|
372
|
+
connection = await odbc.connect(connectionConfig)
|
|
373
|
+
var tables = await connection.tables(null, 'dbo', null, null);
|
|
374
|
+
if (tables.length <= 0) {
|
|
375
|
+
tables = await connection.tables(null, null, null, null);
|
|
376
|
+
}
|
|
377
|
+
const resultEndpoints = tables.map(table => table.TABLE_NAME);
|
|
378
|
+
resolve(resultEndpoints);
|
|
379
|
+
} catch (err) {
|
|
380
|
+
reject('getendpoints-error: ' + err);
|
|
381
|
+
}
|
|
382
|
+
if (connection) {
|
|
383
|
+
connection.close();
|
|
384
|
+
}
|
|
385
|
+
} else {
|
|
386
|
+
reject('getendpoints-error: odbc not found!');
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
function loadOdbcLib(manager) {
|
|
392
|
+
if (!odbc) {
|
|
393
|
+
try { odbc = require('odbc'); } catch { }
|
|
394
|
+
if (!odbc && manager) { try { odbc = manager.require('odbc'); } catch { } }
|
|
395
|
+
}
|
|
396
|
+
return (odbc) ? true : false;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
module.exports = {
|
|
400
|
+
init: function (settings) {
|
|
401
|
+
// deviceCloseTimeout = settings.deviceCloseTimeout || 15000;
|
|
402
|
+
},
|
|
403
|
+
create: function (data, logger, events, manager) {
|
|
404
|
+
if (!loadOdbcLib(manager)) return null;
|
|
405
|
+
return new ODBCclient(data, logger, events);
|
|
406
|
+
},
|
|
407
|
+
getTables: getTables
|
|
408
|
+
}
|