Logic Machine Forum
Alert Manager - Log Acknowledgement - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Alert Manager - Log Acknowledgement (/showthread.php?tid=4996)



Alert Manager - Log Acknowledgement - fgebelin - 28.09.2023

Hi

I just publish exchange w Erwin for information

------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------

Hi Erwin,

It is possible
- to acknowledge each individually alarm
- to log date/time of the acknowledgement (for one alarm or screen/group of alarms like now)

Thanks
Best regards
Frederic 


------------------------------------------------------------------------------------------------------------------------------------------
Hi,

Please ask questions on the forum so other forum users can benefit from the answers..

1) No not possible

2) Only when using visu with iframe so you can use custom js like this:
Code:
Code:
$(function(){
  $(document).ready(function() {     
    var f= $('iframe');
    f.load(function(){
      f.contents().find('#AcknowledgeButton').click(function() {
      grp.write('10/0/0', true)
      });
     });
   });
});

Now you can add an event based script to (in this case) 10/0/0 and create any log you like with LUA

------------------------------------------------------------------------------------------------------------------------------------------

Hi Erwin,

Thanks for your prompt answer

1) I create 2 virtual objects 
- 32/1/60 'alarm' with alert LUA event script and log
- 32/1/61 'last acknow' with log

2) I valid the @ip of lm in the google chrome

3) I write your custom js on lm:

$(function(){
  $(document).ready(function() {   
    var f= $('iframe');
    f.load(function(){
      f.contents().find('#AcknowledgeButton').click(function() {
      grp.write('32/1/61', true)
      });
    });
  });
});

==> and there is no log for 32/1/61

Thanks
Best regards

------------------------------------------------------------------------------------------------------------------------------------------

Do you have the alert manager in an iframe inside your visu’s plan?

------------------------------------------------------------------------------------------------------------------------------------------

Yes

------------------------------------------------------------------------------------------------------------------------------------------

Do you have selected the box "persistant" on your iframe, otherwise the source is unloaded when not visible and any JS handlers to the source are dropped..

------------------------------------------------------------------------------------------------------------------------------------------

I select the box and now ii's ok
thanks
best regards