iobroker.mywebui 1.95.0 → 1.96.0
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/default-controls/controls/alarms/alarm-viewer.control +1 -1
- package/dist/backend/3d-editor-integration.js +1 -1
- package/dist/backend/ImportmapCreator.js +1 -1
- package/dist/backend/UploadHelper.js +1 -1
- package/dist/backend/main.js +1 -1
- package/io-package.json +1 -1
- package/package.json +1 -1
- package/scripts/_build_alarmviewer.py +11 -2
- package/www/3d-editor/js/Animation.js +1 -1
- package/www/3d-editor/js/AnimationResizer.js +1 -1
- package/www/3d-editor/js/Command.js +1 -1
- package/www/3d-editor/js/Config.js +1 -1
- package/www/3d-editor/js/Editor.js +1 -1
- package/www/3d-editor/js/EditorControls.js +1 -1
- package/www/3d-editor/js/GLTFImportDialog.js +1 -1
- package/www/3d-editor/js/History.js +1 -1
- package/www/3d-editor/js/Loader.js +1 -1
- package/www/3d-editor/js/LoaderUtils.js +1 -1
- package/www/3d-editor/js/Menubar.Add.js +1 -1
- package/www/3d-editor/js/Menubar.Edit.js +1 -1
- package/www/3d-editor/js/Menubar.File.js +1 -1
- package/www/3d-editor/js/Menubar.Help.js +1 -1
- package/www/3d-editor/js/Menubar.Render.js +1 -1
- package/www/3d-editor/js/Menubar.Status.js +1 -1
- package/www/3d-editor/js/Menubar.View.js +1 -1
- package/www/3d-editor/js/Menubar.js +1 -1
- package/www/3d-editor/js/Player.js +1 -1
- package/www/3d-editor/js/Resizer.js +1 -1
- package/www/3d-editor/js/Script.js +1 -1
- package/www/3d-editor/js/Selector.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.BoxGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.BufferGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.CapsuleGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.CircleGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.CylinderGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.DodecahedronGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.ExtrudeGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.IcosahedronGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.LatheGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.Modifiers.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.OctahedronGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.PlaneGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.RingGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.ShapeGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.SphereGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.TetrahedronGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.TextGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.TorusGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.TorusKnotGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.TubeGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.BooleanProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.ColorProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.ConstantProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.MapProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.NumberProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.Program.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.RangeValueProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.js +1 -1
- package/www/3d-editor/js/Sidebar.Object.js +1 -1
- package/www/3d-editor/js/Sidebar.Project.App.js +1 -1
- package/www/3d-editor/js/Sidebar.Project.Materials.js +1 -1
- package/www/3d-editor/js/Sidebar.Project.Renderer.js +1 -1
- package/www/3d-editor/js/Sidebar.Project.Resources.js +1 -1
- package/www/3d-editor/js/Sidebar.Project.js +1 -1
- package/www/3d-editor/js/Sidebar.Properties.js +1 -1
- package/www/3d-editor/js/Sidebar.Scene.js +1 -1
- package/www/3d-editor/js/Sidebar.Script.js +1 -1
- package/www/3d-editor/js/Sidebar.Settings.History.js +1 -1
- package/www/3d-editor/js/Sidebar.Settings.Shortcuts.js +1 -1
- package/www/3d-editor/js/Sidebar.Settings.js +1 -1
- package/www/3d-editor/js/Sidebar.js +1 -1
- package/www/3d-editor/js/Storage.js +1 -1
- package/www/3d-editor/js/Strings.js +1 -1
- package/www/3d-editor/js/TextureParametersDialog.js +1 -1
- package/www/3d-editor/js/Toolbar.js +1 -1
- package/www/3d-editor/js/Viewport.Controls.js +1 -1
- package/www/3d-editor/js/Viewport.Info.js +1 -1
- package/www/3d-editor/js/Viewport.Pathtracer.js +1 -1
- package/www/3d-editor/js/Viewport.ViewHelper.js +1 -1
- package/www/3d-editor/js/Viewport.XR.js +1 -1
- package/www/3d-editor/js/Viewport.js +1 -1
- package/www/3d-editor/js/commands/AddObjectCommand.js +1 -1
- package/www/3d-editor/js/commands/AddScriptCommand.js +1 -1
- package/www/3d-editor/js/commands/Commands.js +1 -1
- package/www/3d-editor/js/commands/MoveObjectCommand.js +1 -1
- package/www/3d-editor/js/commands/MultiCmdsCommand.js +1 -1
- package/www/3d-editor/js/commands/RemoveObjectCommand.js +1 -1
- package/www/3d-editor/js/commands/RemoveScriptCommand.js +1 -1
- package/www/3d-editor/js/commands/SetColorCommand.js +1 -1
- package/www/3d-editor/js/commands/SetGeometryCommand.js +1 -1
- package/www/3d-editor/js/commands/SetGeometryValueCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialColorCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialMapCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialRangeCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialValueCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialVectorCommand.js +1 -1
- package/www/3d-editor/js/commands/SetPositionCommand.js +1 -1
- package/www/3d-editor/js/commands/SetRotationCommand.js +1 -1
- package/www/3d-editor/js/commands/SetScaleCommand.js +1 -1
- package/www/3d-editor/js/commands/SetSceneCommand.js +1 -1
- package/www/3d-editor/js/commands/SetScriptValueCommand.js +1 -1
- package/www/3d-editor/js/commands/SetShadowValueCommand.js +1 -1
- package/www/3d-editor/js/commands/SetTextureParametersCommand.js +1 -1
- package/www/3d-editor/js/commands/SetUuidCommand.js +1 -1
- package/www/3d-editor/js/commands/SetValueCommand.js +1 -1
- package/www/dist/frontend/bundle/chunk-3C6XC7RW.js +1 -1
- package/www/dist/frontend/bundle/chunk-3WGNLIWJ.js +3 -3
- package/www/dist/frontend/bundle/chunk-3YK3Y2SJ.js +1 -1
- package/www/dist/frontend/bundle/chunk-43HEBO5G.js +3 -3
- package/www/dist/frontend/bundle/chunk-5MUGMRXU.js +1 -1
- package/www/dist/frontend/bundle/chunk-5UBRCTRX.js +3 -3
- package/www/dist/frontend/bundle/chunk-65A3PNMG.js +1 -1
- package/www/dist/frontend/bundle/chunk-6L2YCGEX.js +1 -1
- package/www/dist/frontend/bundle/chunk-7CWDQGAG.js +2 -2
- package/www/dist/frontend/bundle/chunk-7PT7IGUJ.js +3 -3
- package/www/dist/frontend/bundle/chunk-AI5PDLDE.js +3 -3
- package/www/dist/frontend/bundle/chunk-AWKVUUKN.js +3 -3
- package/www/dist/frontend/bundle/chunk-B6NXWGSB.js +1 -1
- package/www/dist/frontend/bundle/chunk-BHSHNRXW.js +1 -1
- package/www/dist/frontend/bundle/chunk-BVONDEOL.js +3 -3
- package/www/dist/frontend/bundle/chunk-C7OGVQZC.js +1 -1
- package/www/dist/frontend/bundle/chunk-CHDKROX5.js +3 -3
- package/www/dist/frontend/bundle/chunk-DNCD2F6X.js +2 -2
- package/www/dist/frontend/bundle/chunk-FHF6DL5U.js +1 -1
- package/www/dist/frontend/bundle/chunk-FO56TEZH.js +3 -3
- package/www/dist/frontend/bundle/chunk-FSRRPQMX.js +3 -3
- package/www/dist/frontend/bundle/chunk-GLQNGCFL.js +1 -1
- package/www/dist/frontend/bundle/chunk-JBDSDK2C.js +3 -3
- package/www/dist/frontend/bundle/chunk-JSC66ZLQ.js +1 -1
- package/www/dist/frontend/bundle/chunk-K6IV7LKW.js +1 -1
- package/www/dist/frontend/bundle/chunk-KY73TL6O.js +3 -3
- package/www/dist/frontend/bundle/chunk-LKS3S4WX.js +1 -0
- package/www/dist/frontend/bundle/chunk-M6VVTDVX.js +3 -3
- package/www/dist/frontend/bundle/chunk-MECWXZRN.js +1 -1
- package/www/dist/frontend/bundle/chunk-N2YIZTB2.js +1 -1
- package/www/dist/frontend/bundle/chunk-NQ7L7KNT.js +3 -3
- package/www/dist/frontend/bundle/chunk-O2AJL747.js +2 -2
- package/www/dist/frontend/bundle/chunk-P7EOR36H.js +1 -1
- package/www/dist/frontend/bundle/chunk-PJYK24KZ.js +1 -1
- package/www/dist/frontend/bundle/chunk-PYLAW6UA.js +3 -3
- package/www/dist/frontend/bundle/chunk-QJJGP23I.js +1 -1
- package/www/dist/frontend/bundle/chunk-QV4IBWXA.js +1 -1
- package/www/dist/frontend/bundle/chunk-R6IQDPAP.js +2 -2
- package/www/dist/frontend/bundle/chunk-RRFSEMFS.js +21 -0
- package/www/dist/frontend/bundle/chunk-RTTBZOQU.js +3 -3
- package/www/dist/frontend/bundle/chunk-S4TLNW5D.js +1 -1
- package/www/dist/frontend/bundle/chunk-SE6N4ZEN.js +1 -1
- package/www/dist/frontend/bundle/chunk-SQHXO2IT.js +3 -3
- package/www/dist/frontend/bundle/chunk-T4AIQBBH.js +3 -3
- package/www/dist/frontend/bundle/chunk-TWQQHCU7.js +3 -3
- package/www/dist/frontend/bundle/chunk-U5Q332OH.js +1 -1
- package/www/dist/frontend/bundle/chunk-UIP324PP.js +1 -1
- package/www/dist/frontend/bundle/chunk-V27IRYSL.js +1 -1
- package/www/dist/frontend/bundle/chunk-V4C5FGJL.js +3 -3
- package/www/dist/frontend/bundle/chunk-V5CHFTYG.js +21 -0
- package/www/dist/frontend/bundle/chunk-WED7CGWA.js +2 -2
- package/www/dist/frontend/bundle/chunk-WQ5H5LTG.js +3 -3
- package/www/dist/frontend/bundle/chunk-WU54NCEU.js +1 -1
- package/www/dist/frontend/bundle/chunk-XFO5FUCN.js +1 -1
- package/www/dist/frontend/bundle/chunk-XWAQ2BWM.js +2 -2
- package/www/dist/frontend/bundle/chunk-YTQCHNRQ.js +2 -2
- package/www/dist/frontend/bundle/chunk-YUSK4FN3.js +3 -3
- package/www/dist/frontend/bundle/chunk-Z34BSG5O.js +3 -3
- package/www/dist/frontend/bundle/common/IobrokerHandler.js +1 -1
- package/www/dist/frontend/bundle/runtime/CustomControls.js +1 -1
- package/www/dist/frontend/bundle/runtime/ScreenViewer.js +1 -1
- package/www/dist/frontend/bundle/runtime/controls.js +3 -3
- package/www/dist/frontend/bundle/runtime/init.js +3 -3
- package/www/dist/frontend/common/Common.globals.js +1 -1
- package/www/dist/frontend/common/IobrokerHandler.js +1 -1
- package/www/dist/frontend/common/Runtime.js +1 -1
- package/www/dist/frontend/config/CommandHandling.js +1 -1
- package/www/dist/frontend/config/ConfigureWebcomponentDesigner.js +1 -1
- package/www/dist/frontend/config/DockHelper.js +1 -1
- package/www/dist/frontend/config/IobrokerWebui3DDriveEngine.js +1 -1
- package/www/dist/frontend/config/IobrokerWebui3DScreenEditor.js +3 -3
- package/www/dist/frontend/config/IobrokerWebui3DScreenPropertiesPanel.js +3 -3
- package/www/dist/frontend/config/IobrokerWebui3DScreenViewer.js +2 -2
- package/www/dist/frontend/config/IobrokerWebuiAppShell.js +3 -3
- package/www/dist/frontend/config/IobrokerWebuiBindingsEditor.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiConfirmationWrapper.js +3 -3
- package/www/dist/frontend/config/IobrokerWebuiControlPropertiesEditor.js +3 -3
- package/www/dist/frontend/config/IobrokerWebuiDynamicPropsEditor.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiEventAssignment.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiIconsView.js +3 -3
- package/www/dist/frontend/config/IobrokerWebuiMonacoEditor.js +3 -3
- package/www/dist/frontend/config/IobrokerWebuiPropertyGrid.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiScreenEditor.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiScreensView.js +2 -2
- package/www/dist/frontend/config/IobrokerWebuiSignalPropertyEditor.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiSolutionExplorer.js +2 -2
- package/www/dist/frontend/config/IobrokerWebuiTranslationEditor.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiWidgetGallery.js +3 -3
- package/www/dist/frontend/helper/DialogHelper.js +3 -3
- package/www/dist/frontend/helper/EsprimaHelper.js +1 -1
- package/www/dist/frontend/helper/Helper.js +1 -1
- package/www/dist/frontend/helper/LayoutHelper.js +1 -1
- package/www/dist/frontend/helper/XmlHelper.js +1 -1
- package/www/dist/frontend/helper/ZipHelper.js +1 -1
- package/www/dist/frontend/runtime/AnimationService.js +1 -1
- package/www/dist/frontend/runtime/CustomControls.js +1 -1
- package/www/dist/frontend/runtime/DynamicElementProperties.js +1 -1
- package/www/dist/frontend/runtime/HabPanelLikeMenu.js +3 -3
- package/www/dist/frontend/runtime/NavigationShell.js +1 -1
- package/www/dist/frontend/runtime/RuntimeTheme.js +1 -1
- package/www/dist/frontend/runtime/ScreenViewer.js +3 -3
- package/www/dist/frontend/runtime/TranslateableText.js +2 -2
- package/www/dist/frontend/runtime/VisibilityService.js +1 -1
- package/www/dist/frontend/runtime/controls.js +1 -1
- package/www/dist/frontend/runtime/init.js +1 -1
- package/www/dist/frontend/scripting/IobrokerWebuiScriptSystem.js +1 -1
- package/www/dist/frontend/scripting/blockly/OpenScreen.js +1 -1
- package/www/dist/frontend/scripting/blockly/webuiBlocklyToolbox.js +1 -1
- package/www/dist/frontend/services/DynamicPropertiesHelper.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiBindableLocalObjectsService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiBindableObjectDragDropService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiBindableObjectsForPropertiesService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiBindableObjectsService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiConfigButtonProvider.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiCopyPasteService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiCustomControlEventsService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiCustomElementContextMenu.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiDemoProviderService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiDynamicPropertiesService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiEventsService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiExternalDragDropService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiLitPropertiesService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiPropertiesService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiPropertyGroupsService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiRefactorService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiScreenContextMenu.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiSpecialPropertiesService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiSpectrumEditorService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiVisibilityPropertiesService.js +1 -1
- package/www/dist/frontend/services/LayoutComponentsPropertiesService.js +1 -1
- package/www/dist/frontend/widgets/OrthoFlowLineTool.js +1 -1
- package/www/dist/frontend/widgets/customElementsObserver.js +1 -1
- package/www/dist/frontend/widgets/importWidgetFiles.js +1 -1
- package/www/dist/frontend/widgets/importWidgetFilesRuntime.js +1 -1
- package/www/dist/frontend/widgets/layout-components.js +1 -1
- package/www/dist/frontend/widgets/layout-placement-services.js +1 -1
- package/www/dist/frontend/widgets/testElement.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"properties": {"jsonsignal": {"type": "signal", "default": "myalarm.0.info.AlarmJson"}, "acksignal": {"type": "signal", "default": "myalarm.0.info.AcknowledgeId"}, "adapterinstance": {"type": "string", "default": "myalarm.0"}, "mode": {"type": "enum", "default": "live", "values": ["live", "history"]}, "showfilter": {"type": "enum", "default": "true", "values": ["true", "false"]}, "soundenabled": {"type": "enum", "default": "false", "values": ["true", "false"]}, "soundurl": {"type": "string", "default": ""}, "maxrows": {"type": "number", "default": 500}}, "settings": {"width": "1000px", "height": "420px"}, "html": "<div id=\"wrap\" class=\"av\"><audio id=\"snd\" loop style=\"display:none\"></audio><div class=\"av-bar\"><span class=\"av-title\"><t-t>alarm.title</t-t></span><span class=\"av-count\" css:display=\"[[(this.unacked||0)>0?'':'none']]\">[[this.unacked||0]]</span><span class=\"av-grow\"></span><div class=\"av-hist\" css:display=\"[[this.mode=='history'?'flex':'none']]\"><input id=\"from\" type=\"datetime-local\" class=\"av-inp\"><input id=\"to\" type=\"datetime-local\" class=\"av-inp\"><button class=\"av-btn\" @click=\"[[this._loadHistory()]]\"><t-t>alarm.Getalarms</t-t></button></div><button class=\"av-btn\" @click=\"[[this._exportCsv()]]\"><t-t>alarm.export</t-t></button><button class=\"av-btn av-accent\" css:display=\"[[this.mode=='live'?'':'none']]\" @click=\"[[this._ackAll()]]\"><t-t>alarm.ackall</t-t></button></div><div class=\"av-scroll\"><div class=\"av-grid av-head\"><span><t-t>alarm.id</t-t></span><span><t-t>alarm.tagname</t-t></span><span><t-t>alarm.type</t-t></span><span><t-t>alarm.time</t-t></span><span><t-t>alarm.description</t-t></span><span><t-t>alarm.limitvalue</t-t></span><span><t-t>alarm.limitmsg</t-t></span><span><t-t>alarm.highlow</t-t></span><span><t-t>alarm.value</t-t></span><span><t-t>alarm.ack</t-t></span><span><t-t>alarm.acktime</t-t></span><span><t-t>alarm.ackbtn</t-t></span></div><div class=\"av-grid av-filters\" css:display=\"[[this.showfilter=='false'?'none':'grid']]\"><input class=\"av-f\" data-f=\"id\"><input class=\"av-f\" data-f=\"Tagname\"><input class=\"av-f\" data-f=\"Alarmtype\"><input class=\"av-f\" data-f=\"alarmtime\"><input class=\"av-f\" data-f=\"Description\"><input class=\"av-f\" data-f=\"LimitValue\"><input class=\"av-f\" data-f=\"Limitmessage\"><input class=\"av-f\" data-f=\"HIGH_LOW\"><input class=\"av-f\" data-f=\"AlarmValue\"><input class=\"av-f\" data-f=\"Acknowledge\"><input class=\"av-f\" data-f=\"acknowledgetime\"><span></span></div><div class=\"av-body\"><template repeat:row=\"[[this.rows||[]]]\"><div class=\"av-grid av-row\" class:unack=\"[[String(row.Acknowledge)!='true']]\" class:talarm=\"[[row.Alarmtype=='alarm']]\" class:twarning=\"[[row.Alarmtype=='warning']]\" class:tinfo=\"[[row.Alarmtype=='info']]\"><span title=\"[[row.id]]\">[[row.id]]</span><span title=\"[[row.Tagname]]\">[[row.Tagname]]</span><span title=\"[[row.Alarmtype]]\">[[row.Alarmtype]]</span><span title=\"[[row.alarmtime]]\">[[row.alarmtime]]</span><span title=\"[[row.Description]]\">[[row.Description]]</span><span title=\"[[row.LimitValue]]\">[[row.LimitValue]]</span><span title=\"[[row.Limitmessage]]\">[[row.Limitmessage]]</span><span title=\"[[row.HIGH_LOW]]\">[[row.HIGH_LOW]]</span><span title=\"[[row.AlarmValue]]\">[[row.AlarmValue]]</span><span>[[String(row.Acknowledge)=='true'?'\\u2713':'\\u2014']]</span><span title=\"[[row.acknowledgetime]]\">[[row.acknowledgetime]]</span><button class=\"av-ack\" @click=\"[[this._ack(row)]]\" css:visibility=\"[[String(row.Acknowledge)=='true'?'hidden':'visible']]\"><t-t>alarm.ackbtn</t-t></button></div></template><div class=\"av-empty\" css:display=\"[[(this.rows||[]).length?'none':'block']]\"><t-t>alarm.noalarms</t-t></div></div></div></div>", "style": ":host{display:block;width:100%;height:100%;font-family:'Segoe UI',system-ui,sans-serif;font-size:12px;}.av{display:flex;flex-direction:column;height:100%;box-sizing:border-box;border:1px solid var(--ui-border,#3b4250);border-radius:10px;overflow:hidden;background:var(--ui-surface,#252b38);color:var(--ui-text,#e2e6ec);-webkit-backdrop-filter:var(--ui-backdrop,none);backdrop-filter:var(--ui-backdrop,none);}.av-bar{display:flex;align-items:center;gap:8px;padding:8px 12px;flex:none;border-bottom:1px solid var(--ui-border,#3b4250);background:var(--ui-surface-2,#2f3545);}.av-title{font-size:14px;font-weight:700;}.av-grow{flex:1;}.av-count{background:var(--ui-error,#ef4d5e);color:#fff;font-weight:700;border-radius:999px;padding:1px 8px;font-size:11px;}.av-hist{display:flex;align-items:center;gap:6px;}.av-inp{background:var(--ui-input,#3a3f4b);color:var(--ui-text,#e2e6ec);border:1px solid var(--ui-border,#3b4250);border-radius:5px;padding:3px 6px;font-size:11px;color-scheme:inherit;}.av-btn{appearance:none;cursor:pointer;border-radius:6px;padding:4px 12px;font-size:12px;font-weight:600;background:color-mix(in srgb,var(--ui-text,#fff) 8%,transparent);color:var(--ui-text,#e2e6ec);border:1px solid var(--ui-border,#3b4250);}.av-btn:hover{background:color-mix(in srgb,var(--ui-text,#fff) 14%,transparent);}.av-accent{background:color-mix(in srgb,var(--accent,#2680eb) 25%,transparent);border-color:color-mix(in srgb,var(--accent,#2680eb) 55%,transparent);}.av-scroll{flex:1;overflow:auto;min-height:0;}.av-grid{display:grid;grid-template-columns:52px 120px 86px 150px minmax(140px,1fr) 86px 130px 80px 90px 58px 150px 74px;gap:0;align-items:center;min-width:1200px;}.av-grid>*{padding:5px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.av-head{position:sticky;top:0;z-index:2;background:var(--ui-surface-2,#2f3545);font-weight:700;font-size:11px;text-transform:uppercase;letter-spacing:.4px;color:var(--ui-dim,#9aa3b0);border-bottom:1px solid var(--ui-border,#3b4250);}.av-filters{position:sticky;top:26px;z-index:2;background:var(--ui-surface,#252b38);border-bottom:1px solid var(--ui-border,#3b4250);}.av-f{width:100%;box-sizing:border-box;background:var(--ui-input,#3a3f4b);color:var(--ui-text,#e2e6ec);border:1px solid var(--ui-border,#3b4250);border-radius:4px;padding:2px 5px;font-size:11px;margin:3px 4px;}.av-row{border-bottom:1px solid color-mix(in srgb,var(--ui-border,#3b4250) 55%,transparent);}.av-row:hover{background:color-mix(in srgb,var(--ui-text,#fff) 6%,transparent);}.av-row.talarm{background:color-mix(in srgb,var(--ui-error,#ef4d5e) 16%,transparent);}.av-row.twarning{background:color-mix(in srgb,var(--ui-warn,#f6b73c) 14%,transparent);}.av-row.tinfo{background:color-mix(in srgb,var(--ui-info,#2b8bff) 12%,transparent);}.av-row.unack{font-weight:700;}.av-row.unack.talarm{background:color-mix(in srgb,var(--ui-error,#ef4d5e) 30%,transparent);}.av-row.unack.twarning{background:color-mix(in srgb,var(--ui-warn,#f6b73c) 26%,transparent);}.av-ack{appearance:none;cursor:pointer;margin:2px 4px;padding:2px 8px;font-size:11px;font-weight:700;border-radius:5px;background:color-mix(in srgb,var(--ui-ok,#37d67a) 25%,transparent);color:var(--ui-text,#e2e6ec);border:1px solid color-mix(in srgb,var(--ui-ok,#37d67a) 55%,transparent);}.av-ack:hover{background:color-mix(in srgb,var(--ui-ok,#37d67a) 40%,transparent);}.av-empty{text-align:center;padding:26px;color:var(--ui-dim,#9aa3b0);}", "script": "function num(v,d){v=parseInt(v);return isNaN(v)?d:v;}\nfunction updateSound(instance){\n const a=instance._getDomElement('snd');\n if(!a) return;\n const on = instance.soundenabled==='true' && instance.unacked>0 && instance.soundurl;\n if(on){ if(a.getAttribute('src')!==instance.soundurl) a.setAttribute('src',instance.soundurl);\n a.play().catch(()=>{}); }\n else { a.pause(); }\n}\nfunction applyFilters(instance){\n let rows=instance._raw||[];\n const f=instance._filters||{};\n for(const k in f){ const v=String(f[k]||'').toLowerCase(); if(!v) continue;\n rows=rows.filter(r=>String(r[k]??'').toLowerCase().includes(v)); }\n instance.unacked=(instance._raw||[]).filter(r=>String(r.Acknowledge)!=='true').length;\n instance.rows=rows.slice(0,num(instance.maxrows,500));\n try{ instance._bindingsRefresh?.(); }catch(e){}\n updateSound(instance);\n}\nfunction setRows(instance,arr){ instance._raw=Array.isArray(arr)?arr:[]; applyFilters(instance); }\nfunction parseVal(instance,val){\n let arr=[]; try{ arr=JSON.parse(val||'[]'); }catch(e){ arr=[]; }\n setRows(instance,arr);\n}\nfunction inst(instance){ return instance.adapterinstance||'myalarm.0'; }\nexport function init(instance){\n // designer control-editor runs scripts with a plain design-surface instance that has\n // no control APIs (_getDomElement/_bindingsRefresh) - do nothing there\n if(!instance || typeof instance._getDomElement!=='function' || typeof instance._getDomElements!=='function') return;\n instance.rows=[]; instance._filters={}; instance.unacked=0; instance._raw=[];\n instance._ack=(row)=>{\n if(!row||row.id==null) return;\n try{ window.IOB.connection._socket.emit('sendTo',inst(instance),'ackAlarm',{alarmId:row.id},()=>{}); }catch(e){}\n if(instance.acksignal){ try{ window.IOB.setState(instance.acksignal,{val:row.id}); }catch(e){} }\n };\n instance._ackAll=()=>{ for(const r of (instance._raw||[])) if(String(r.Acknowledge)!=='true') instance._ack(r); };\n instance._loadHistory=()=>{\n const f=instance._getDomElement('from')?.value, t=instance._getDomElement('to')?.value;\n try{ window.IOB.connection._socket.emit('sendTo',inst(instance),'getlog',{startdate:f,enddate:t},(cb)=>{\n let d=(cb&&cb.result!==undefined)?cb.result:cb;\n if(typeof d==='string'){ try{ d=JSON.parse(d); }catch(e){} }\n setRows(instance, Array.isArray(d)?d:(d&&d.rows)||[]);\n }); }catch(e){ console.warn('[alarm-viewer] getlog failed',e); }\n };\n instance._exportCsv=()=>{\n const cols=['id','Tagname','Alarmtype','alarmtime','Description','LimitValue','Limitmessage','HIGH_LOW','AlarmValue','Acknowledge','acknowledgetime'];\n const esc=(v)=>{ v=String(v??''); return (v.includes(',')||v.includes('\"')||v.includes('\\n'))?'\"'+v.replaceAll('\"','\"\"')+'\"':v; };\n const lines=[cols.join(',')];\n for(const r of instance.rows) lines.push(cols.map(c=>esc(r[c])).join(','));\n const blob=new Blob([''+lines.join('\\r\\n')],{type:'text/csv;charset=utf-8'});\n const a=document.createElement('a');\n a.href=URL.createObjectURL(blob); a.download='alarms.csv'; a.click();\n setTimeout(()=>URL.revokeObjectURL(a.href),2000);\n };\n for(const inp of (instance._getDomElements?.('.av-f')||[])){\n inp.addEventListener('input',()=>{ instance._filters[inp.dataset.f]=inp.value; applyFilters(instance); });\n }\n const sig=instance.jsonsignal||'myalarm.0.info.AlarmJson';\n try{ window.IOB.getState(sig).then(s=>parseVal(instance,s&&s.val)).catch(()=>{}); }catch(e){}\n instance.__avCb=(_id,s)=>parseVal(instance,s&&s.val);\n if((instance.mode||'live')==='live'){ try{ window.IOB.subscribeState(sig,instance.__avCb); }catch(e){} }\n}\nexport function disconnectedCallback(instance){\n try{ window.IOB.unsubscribeState(instance.jsonsignal||'myalarm.0.info.AlarmJson',instance.__avCb); }catch(e){}\n try{ instance._getDomElement('snd')?.pause(); }catch(e){}\n}", "translations": {"az": {"alarm": {"id": "No", "time": "Alarm Vaxtı", "type": "Alarm Tipi", "tagname": "Teq Adı", "description": "Açıqlama", "highlow": "Tip", "limitvalue": "Limit Dəyəri", "limitmsg": "Limit Mesajı", "value": "Alarm Dəyəri", "ack": "Təsdiq", "acktime": "Təsdiq Vaxtı", "ackbtn": "Təsdiqlə", "yes": "Bəli", "no": "Xeyr", "Getalarms": "Alarmları Gətir", "DownloadXLSX": "XLSX Yüklə", "DownloadCSV": "CSV Yüklə", "DownloadPDF": "PDF Yüklə", "selectdate": "Tarix aralığı seçin", "header": "Aktiv Alarmlar", "ackall": "Hamısını təsdiqlə", "clear": "Təsdiqlənənləri Sil", "mute": "Səsi Kəs", "unmute": "Səsi Aç", "title": "Alarmlar", "export": "CSV yüklə", "noalarms": "Alarm yoxdur"}}, "en": {"alarm": {"id": "ID", "time": "Alarm Time", "type": "Alarm Type", "tagname": "Tag Name", "description": "Description", "highlow": "Type", "limitvalue": "Limit Value", "limitmsg": "Limit Message", "value": "Alarm Value", "ack": "Acknowledge", "acktime": "Ack Time", "ackbtn": "ACK", "yes": "Yes", "no": "No", "Getalarms": "Get Alarms", "DownloadXLSX": "Download XLSX", "DownloadCSV": "Download CSV", "DownloadPDF": "Download PDF", "selectdate": "Select date range", "header": "Active Alarms", "ackall": "Acknowledge all", "clear": "Clear Acknowledged", "mute": "Mute Sound", "unmute": "Unmute Sound", "title": "Alarms", "export": "Export CSV", "noalarms": "No alarms"}}, "ru": {"alarm": {"id": "No", "time": "Время аларма", "type": "Тип аларма", "tagname": "Тег", "description": "Описание", "highlow": "Тип", "limitvalue": "Предел", "limitmsg": "Сообщение", "value": "Значение", "ack": "Квитирование", "acktime": "Время квит.", "ackbtn": "Квит.", "yes": "Да", "no": "Нет", "Getalarms": "Получить аларма", "DownloadXLSX": "Скачать XLSX", "DownloadCSV": "Скачать CSV", "DownloadPDF": "Скачать PDF", "selectdate": "Выберите дату", "header": "Активные аларма", "ackall": "Квитировать все", "clear": "Очистить", "mute": "Отключить звук", "unmute": "Включить звук", "title": "Алармы", "export": "Скачать CSV", "noalarms": "Нет алармов"}}, "de": {"alarm": {"id": "Nr", "time": "Alarmzeit", "type": "Alarmtyp", "tagname": "Tag-Name", "description": "Beschreibung", "highlow": "Typ", "limitvalue": "Grenzwert", "limitmsg": "Grenznachricht", "value": "Alarmwert", "ack": "Quittierung", "acktime": "Quitt.-Zeit", "ackbtn": "Quitt.", "yes": "Ja", "no": "Nein", "Getalarms": "Alarme abrufen", "DownloadXLSX": "XLSX laden", "DownloadCSV": "CSV laden", "DownloadPDF": "PDF laden", "selectdate": "Datumsbereich wählen", "header": "Aktive Alarme", "ackall": "Alle quittieren", "clear": "Bestätigte löschen", "mute": "Ton stumm", "unmute": "Ton ein", "title": "Alarme", "export": "CSV exportieren", "noalarms": "Keine Alarme"}}, "tr": {"alarm": {"id": "No", "time": "Alarm Zamanı", "type": "Alarm Tipi", "tagname": "Etiket Adı", "description": "Açıklama", "highlow": "Tip", "limitvalue": "Limit Değeri", "limitmsg": "Limit Mesajı", "value": "Alarm Değeri", "ack": "Onay", "acktime": "Onay Zamanı", "ackbtn": "Onayla", "yes": "Evet", "no": "Hayır", "Getalarms": "Alarmları Getir", "DownloadXLSX": "XLSX İndir", "DownloadCSV": "CSV İndir", "DownloadPDF": "PDF İndir", "selectdate": "Tarih Aralığı Seçin", "header": "Aktif Alarmlar", "ackall": "Tümünü onayla", "clear": "Onaylanları Sil", "mute": "Sesi Kapat", "unmute": "Sesi Aç", "title": "Alarmlar", "export": "CSV indir", "noalarms": "Alarm yok"}}}}
|
|
1
|
+
{"properties": {"jsonsignal": {"type": "signal", "default": "myalarm.0.info.AlarmJson"}, "acksignal": {"type": "signal", "default": "myalarm.0.info.AcknowledgeId"}, "adapterinstance": {"type": "string", "default": "myalarm.0"}, "mode": {"type": "enum", "default": "live", "values": ["live", "history"]}, "showfilter": {"type": "enum", "default": "true", "values": ["true", "false"]}, "soundenabled": {"type": "enum", "default": "false", "values": ["true", "false"]}, "soundurl": {"type": "string", "default": ""}, "maxrows": {"type": "number", "default": 500}}, "settings": {"width": "1000px", "height": "420px"}, "html": "<div id=\"wrap\" class=\"av\"><audio id=\"snd\" loop style=\"display:none\"></audio><div class=\"av-bar\"><span class=\"av-title\"><t-t>alarm.title</t-t></span><span class=\"av-count\" css:display=\"[[(this.unacked||0)>0?'':'none']]\">[[this.unacked||0]]</span><span class=\"av-grow\"></span><div class=\"av-hist\" css:display=\"[[this.mode=='history'?'flex':'none']]\"><input id=\"from\" type=\"datetime-local\" class=\"av-inp\"><input id=\"to\" type=\"datetime-local\" class=\"av-inp\"><button class=\"av-btn\" @click=\"[[this._loadHistory()]]\"><t-t>alarm.Getalarms</t-t></button></div><button class=\"av-btn\" @click=\"[[this._exportCsv()]]\"><t-t>alarm.export</t-t></button><button class=\"av-btn av-accent\" css:display=\"[[this.mode=='live'?'':'none']]\" @click=\"[[this._ackAll()]]\"><t-t>alarm.ackall</t-t></button></div><div class=\"av-scroll\"><div class=\"av-grid av-head\"><span><t-t>alarm.id</t-t></span><span><t-t>alarm.tagname</t-t></span><span><t-t>alarm.type</t-t></span><span><t-t>alarm.time</t-t></span><span><t-t>alarm.description</t-t></span><span><t-t>alarm.limitvalue</t-t></span><span><t-t>alarm.limitmsg</t-t></span><span><t-t>alarm.highlow</t-t></span><span><t-t>alarm.value</t-t></span><span><t-t>alarm.ack</t-t></span><span><t-t>alarm.acktime</t-t></span><span><t-t>alarm.ackbtn</t-t></span></div><div class=\"av-grid av-filters\" css:display=\"[[this.showfilter=='false'?'none':'grid']]\"><input class=\"av-f\" data-f=\"id\"><input class=\"av-f\" data-f=\"Tagname\"><input class=\"av-f\" data-f=\"Alarmtype\"><input class=\"av-f\" data-f=\"alarmtime\"><input class=\"av-f\" data-f=\"Description\"><input class=\"av-f\" data-f=\"LimitValue\"><input class=\"av-f\" data-f=\"Limitmessage\"><input class=\"av-f\" data-f=\"HIGH_LOW\"><input class=\"av-f\" data-f=\"AlarmValue\"><input class=\"av-f\" data-f=\"Acknowledge\"><input class=\"av-f\" data-f=\"acknowledgetime\"><span></span></div><div class=\"av-body\"><template repeat:row=\"[[this.rows||[]]]\"><div class=\"av-grid av-row\" class:unack=\"[[String(row.Acknowledge)!='true']]\" class:talarm=\"[[row.Alarmtype=='alarm']]\" class:twarning=\"[[row.Alarmtype=='warning']]\" class:tinfo=\"[[row.Alarmtype=='info']]\"><span title=\"[[row.id]]\">[[row.id]]</span><span title=\"[[row.Tagname]]\">[[row.Tagname]]</span><span title=\"[[row.Alarmtype]]\">[[row.Alarmtype]]</span><span title=\"[[row.alarmtime]]\">[[row.alarmtime]]</span><span title=\"[[row.Description]]\">[[row.Description]]</span><span title=\"[[row.LimitValue]]\">[[row.LimitValue]]</span><span title=\"[[row.Limitmessage]]\">[[row.Limitmessage]]</span><span title=\"[[row.HIGH_LOW]]\">[[row.HIGH_LOW]]</span><span title=\"[[row.AlarmValue]]\">[[row.AlarmValue]]</span><span>[[String(row.Acknowledge)=='true'?'\\u2713':'\\u2014']]</span><span title=\"[[row.acknowledgetime]]\">[[row.acknowledgetime]]</span><button class=\"av-ack\" @click=\"[[this._ack(row)]]\" css:visibility=\"[[String(row.Acknowledge)=='true'?'hidden':'visible']]\"><t-t>alarm.ackbtn</t-t></button></div></template><div class=\"av-empty\" css:display=\"[[(this.rows||[]).length?'none':'block']]\"><t-t>alarm.noalarms</t-t></div></div></div></div>", "style": ":host{display:block;width:100%;height:100%;font-family:'Segoe UI',system-ui,sans-serif;font-size:12px;}.av{display:flex;flex-direction:column;height:100%;box-sizing:border-box;border:1px solid var(--ui-border,#3b4250);border-radius:10px;overflow:hidden;background:var(--ui-surface,#252b38);color:var(--ui-text,#e2e6ec);-webkit-backdrop-filter:var(--ui-backdrop,none);backdrop-filter:var(--ui-backdrop,none);}.av-bar{display:flex;align-items:center;gap:8px;padding:8px 12px;flex:none;border-bottom:1px solid var(--ui-border,#3b4250);background:var(--ui-surface-2,#2f3545);}.av-title{font-size:14px;font-weight:700;}.av-grow{flex:1;}.av-count{background:var(--ui-error,#ef4d5e);color:#fff;font-weight:700;border-radius:999px;padding:1px 8px;font-size:11px;}.av-hist{display:flex;align-items:center;gap:6px;}.av-inp{background:var(--ui-input,#3a3f4b);color:var(--ui-text,#e2e6ec);border:1px solid var(--ui-border,#3b4250);border-radius:5px;padding:3px 6px;font-size:11px;color-scheme:inherit;}.av-btn{appearance:none;cursor:pointer;border-radius:6px;padding:4px 12px;font-size:12px;font-weight:600;background:color-mix(in srgb,var(--ui-text,#fff) 8%,transparent);color:var(--ui-text,#e2e6ec);border:1px solid var(--ui-border,#3b4250);}.av-btn:hover{background:color-mix(in srgb,var(--ui-text,#fff) 14%,transparent);}.av-accent{background:color-mix(in srgb,var(--accent,#2680eb) 25%,transparent);border-color:color-mix(in srgb,var(--accent,#2680eb) 55%,transparent);}.av-scroll{flex:1;overflow:auto;min-height:0;}.av-grid{display:grid;grid-template-columns:52px 120px 86px 150px minmax(140px,1fr) 86px 130px 80px 90px 58px 150px 74px;gap:0;align-items:center;min-width:1200px;}.av-grid>*{padding:5px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.av-head{position:sticky;top:0;z-index:2;background:var(--ui-surface-2,#2f3545);font-weight:700;font-size:11px;text-transform:uppercase;letter-spacing:.4px;color:var(--ui-dim,#9aa3b0);border-bottom:1px solid var(--ui-border,#3b4250);}.av-filters{position:sticky;top:26px;z-index:2;background:var(--ui-surface,#252b38);border-bottom:1px solid var(--ui-border,#3b4250);}.av-f{width:100%;box-sizing:border-box;background:var(--ui-input,#3a3f4b);color:var(--ui-text,#e2e6ec);border:1px solid var(--ui-border,#3b4250);border-radius:4px;padding:2px 5px;font-size:11px;margin:3px 4px;}.av-row{border-bottom:1px solid color-mix(in srgb,var(--ui-border,#3b4250) 55%,transparent);}.av-row:hover{background:color-mix(in srgb,var(--ui-text,#fff) 6%,transparent);}.av-row.talarm{background:color-mix(in srgb,var(--ui-error,#ef4d5e) 16%,transparent);}.av-row.twarning{background:color-mix(in srgb,var(--ui-warn,#f6b73c) 14%,transparent);}.av-row.tinfo{background:color-mix(in srgb,var(--ui-info,#2b8bff) 12%,transparent);}.av-row.unack{font-weight:700;}.av-row.unack.talarm{background:color-mix(in srgb,var(--ui-error,#ef4d5e) 30%,transparent);}.av-row.unack.twarning{background:color-mix(in srgb,var(--ui-warn,#f6b73c) 26%,transparent);}.av-ack{appearance:none;cursor:pointer;margin:2px 4px;padding:2px 8px;font-size:11px;font-weight:700;border-radius:5px;background:color-mix(in srgb,var(--ui-ok,#37d67a) 25%,transparent);color:var(--ui-text,#e2e6ec);border:1px solid color-mix(in srgb,var(--ui-ok,#37d67a) 55%,transparent);}.av-ack:hover{background:color-mix(in srgb,var(--ui-ok,#37d67a) 40%,transparent);}.av-empty{text-align:center;padding:26px;color:var(--ui-dim,#9aa3b0);}.av-noack .av-ack,.av-noack .av-ackall{display:none !important;}", "script": "function num(v,d){v=parseInt(v);return isNaN(v)?d:v;}\nfunction updateSound(instance){\n const a=instance._getDomElement('snd');\n if(!a) return;\n const on = instance.soundenabled==='true' && instance.unacked>0 && instance.soundurl;\n if(on){ if(a.getAttribute('src')!==instance.soundurl) a.setAttribute('src',instance.soundurl);\n a.play().catch(()=>{}); }\n else { a.pause(); }\n}\nfunction applyFilters(instance){\n let rows=instance._raw||[];\n const f=instance._filters||{};\n for(const k in f){ const v=String(f[k]||'').toLowerCase(); if(!v) continue;\n rows=rows.filter(r=>String(r[k]??'').toLowerCase().includes(v)); }\n instance.unacked=(instance._raw||[]).filter(r=>String(r.Acknowledge)!=='true').length;\n instance.rows=rows.slice(0,num(instance.maxrows,500));\n try{ instance._bindingsRefresh?.(); }catch(e){}\n updateSound(instance);\n}\nfunction setRows(instance,arr){ instance._raw=Array.isArray(arr)?arr:[]; applyFilters(instance); }\nfunction parseVal(instance,val){\n let arr=[]; try{ arr=JSON.parse(val||'[]'); }catch(e){ arr=[]; }\n setRows(instance,arr);\n}\nfunction inst(instance){ return instance.adapterinstance||'myalarm.0'; }\nexport function init(instance){\n // designer control-editor runs scripts with a plain design-surface instance that has\n // no control APIs (_getDomElement/_bindingsRefresh) - do nothing there\n if(!instance || typeof instance._getDomElement!=='function' || typeof instance._getDomElements!=='function') return;\n instance.rows=[]; instance._filters={}; instance.unacked=0; instance._raw=[];\n // PlantPAx-style security: ACK buttons only for users allowed the ackAlarm action in\n // this element's area (data-area ancestor). No model configured -> permissive.\n instance._canAck = (window.IOB && typeof window.IOB.secCan==='function') ? window.IOB.secCan('ackAlarm', instance) : true;\n if(!instance._canAck) instance._getDomElement('wrap')?.classList.add('av-noack');\n try{ window.IOB?.securityChanged?.on?.(()=>{\n instance._canAck = window.IOB.secCan('ackAlarm', instance);\n instance._getDomElement('wrap')?.classList.toggle('av-noack', !instance._canAck);\n }); }catch(e){}\n instance._ack=(row)=>{\n if(!row||row.id==null||!instance._canAck) return;\n try{ window.IOB.connection._socket.emit('sendTo',inst(instance),'ackAlarm',{alarmId:row.id},()=>{}); }catch(e){}\n if(instance.acksignal){ try{ window.IOB.setState(instance.acksignal,{val:row.id}); }catch(e){} }\n };\n instance._ackAll=()=>{ if(!instance._canAck) return; for(const r of (instance._raw||[])) if(String(r.Acknowledge)!=='true') instance._ack(r); };\n instance._loadHistory=()=>{\n const f=instance._getDomElement('from')?.value, t=instance._getDomElement('to')?.value;\n try{ window.IOB.connection._socket.emit('sendTo',inst(instance),'getlog',{startdate:f,enddate:t},(cb)=>{\n let d=(cb&&cb.result!==undefined)?cb.result:cb;\n if(typeof d==='string'){ try{ d=JSON.parse(d); }catch(e){} }\n setRows(instance, Array.isArray(d)?d:(d&&d.rows)||[]);\n }); }catch(e){ console.warn('[alarm-viewer] getlog failed',e); }\n };\n instance._exportCsv=()=>{\n const cols=['id','Tagname','Alarmtype','alarmtime','Description','LimitValue','Limitmessage','HIGH_LOW','AlarmValue','Acknowledge','acknowledgetime'];\n const esc=(v)=>{ v=String(v??''); return (v.includes(',')||v.includes('\"')||v.includes('\\n'))?'\"'+v.replaceAll('\"','\"\"')+'\"':v; };\n const lines=[cols.join(',')];\n for(const r of instance.rows) lines.push(cols.map(c=>esc(r[c])).join(','));\n const blob=new Blob([''+lines.join('\\r\\n')],{type:'text/csv;charset=utf-8'});\n const a=document.createElement('a');\n a.href=URL.createObjectURL(blob); a.download='alarms.csv'; a.click();\n setTimeout(()=>URL.revokeObjectURL(a.href),2000);\n };\n for(const inp of (instance._getDomElements?.('.av-f')||[])){\n inp.addEventListener('input',()=>{ instance._filters[inp.dataset.f]=inp.value; applyFilters(instance); });\n }\n const sig=instance.jsonsignal||'myalarm.0.info.AlarmJson';\n try{ window.IOB.getState(sig).then(s=>parseVal(instance,s&&s.val)).catch(()=>{}); }catch(e){}\n instance.__avCb=(_id,s)=>parseVal(instance,s&&s.val);\n if((instance.mode||'live')==='live'){ try{ window.IOB.subscribeState(sig,instance.__avCb); }catch(e){} }\n}\nexport function disconnectedCallback(instance){\n try{ window.IOB.unsubscribeState(instance.jsonsignal||'myalarm.0.info.AlarmJson',instance.__avCb); }catch(e){}\n try{ instance._getDomElement('snd')?.pause(); }catch(e){}\n}", "translations": {"az": {"alarm": {"id": "No", "time": "Alarm Vaxtı", "type": "Alarm Tipi", "tagname": "Teq Adı", "description": "Açıqlama", "highlow": "Tip", "limitvalue": "Limit Dəyəri", "limitmsg": "Limit Mesajı", "value": "Alarm Dəyəri", "ack": "Təsdiq", "acktime": "Təsdiq Vaxtı", "ackbtn": "Təsdiqlə", "yes": "Bəli", "no": "Xeyr", "Getalarms": "Alarmları Gətir", "DownloadXLSX": "XLSX Yüklə", "DownloadCSV": "CSV Yüklə", "DownloadPDF": "PDF Yüklə", "selectdate": "Tarix aralığı seçin", "header": "Aktiv Alarmlar", "ackall": "Hamısını təsdiqlə", "clear": "Təsdiqlənənləri Sil", "mute": "Səsi Kəs", "unmute": "Səsi Aç", "title": "Alarmlar", "export": "CSV yüklə", "noalarms": "Alarm yoxdur"}}, "en": {"alarm": {"id": "ID", "time": "Alarm Time", "type": "Alarm Type", "tagname": "Tag Name", "description": "Description", "highlow": "Type", "limitvalue": "Limit Value", "limitmsg": "Limit Message", "value": "Alarm Value", "ack": "Acknowledge", "acktime": "Ack Time", "ackbtn": "ACK", "yes": "Yes", "no": "No", "Getalarms": "Get Alarms", "DownloadXLSX": "Download XLSX", "DownloadCSV": "Download CSV", "DownloadPDF": "Download PDF", "selectdate": "Select date range", "header": "Active Alarms", "ackall": "Acknowledge all", "clear": "Clear Acknowledged", "mute": "Mute Sound", "unmute": "Unmute Sound", "title": "Alarms", "export": "Export CSV", "noalarms": "No alarms"}}, "ru": {"alarm": {"id": "No", "time": "Время аларма", "type": "Тип аларма", "tagname": "Тег", "description": "Описание", "highlow": "Тип", "limitvalue": "Предел", "limitmsg": "Сообщение", "value": "Значение", "ack": "Квитирование", "acktime": "Время квит.", "ackbtn": "Квит.", "yes": "Да", "no": "Нет", "Getalarms": "Получить аларма", "DownloadXLSX": "Скачать XLSX", "DownloadCSV": "Скачать CSV", "DownloadPDF": "Скачать PDF", "selectdate": "Выберите дату", "header": "Активные аларма", "ackall": "Квитировать все", "clear": "Очистить", "mute": "Отключить звук", "unmute": "Включить звук", "title": "Алармы", "export": "Скачать CSV", "noalarms": "Нет алармов"}}, "de": {"alarm": {"id": "Nr", "time": "Alarmzeit", "type": "Alarmtyp", "tagname": "Tag-Name", "description": "Beschreibung", "highlow": "Typ", "limitvalue": "Grenzwert", "limitmsg": "Grenznachricht", "value": "Alarmwert", "ack": "Quittierung", "acktime": "Quitt.-Zeit", "ackbtn": "Quitt.", "yes": "Ja", "no": "Nein", "Getalarms": "Alarme abrufen", "DownloadXLSX": "XLSX laden", "DownloadCSV": "CSV laden", "DownloadPDF": "PDF laden", "selectdate": "Datumsbereich wählen", "header": "Aktive Alarme", "ackall": "Alle quittieren", "clear": "Bestätigte löschen", "mute": "Ton stumm", "unmute": "Ton ein", "title": "Alarme", "export": "CSV exportieren", "noalarms": "Keine Alarme"}}, "tr": {"alarm": {"id": "No", "time": "Alarm Zamanı", "type": "Alarm Tipi", "tagname": "Etiket Adı", "description": "Açıklama", "highlow": "Tip", "limitvalue": "Limit Değeri", "limitmsg": "Limit Mesajı", "value": "Alarm Değeri", "ack": "Onay", "acktime": "Onay Zamanı", "ackbtn": "Onayla", "yes": "Evet", "no": "Hayır", "Getalarms": "Alarmları Getir", "DownloadXLSX": "XLSX İndir", "DownloadCSV": "CSV İndir", "DownloadPDF": "PDF İndir", "selectdate": "Tarih Aralığı Seçin", "header": "Aktif Alarmlar", "ackall": "Tümünü onayla", "clear": "Onaylanları Sil", "mute": "Sesi Kapat", "unmute": "Sesi Aç", "title": "Alarmlar", "export": "CSV indir", "noalarms": "Alarm yok"}}}}
|