This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

Clear the Alert page from the visualization
#1
there is a way to clear the alert page from visualization...??? 
maybe with a POST method..???

Thanks
Reply
#2
Hi Cekca,

Here is a post command to clear the alerts, it sends same command when pushing the button on the backend.

Code:
require('json')
require('socket.url')
require('socket.http')

fields = {
 alerts = true,
}

data = json.encode(fields)
post = 'data=' .. socket.url.escape(data)

ip = '127.0.0.1'
username = 'admin'
password = 'admin'

res, err = socket.http.request('http://' .. username .. ':' .. password .. '@' .. ip .. '/scada-main/general/reset', post)
log(res, err)

BR,

Erwin
Reply
#3
Thank you Erwin...
After the reset is possible to force the reload of the alerts page...??? i don't want to wait the refresh of the frame.

Marco
Reply
#4
Hi Marco,

Yes can be done but not simple..

Refresh is client side, so you must attach a listener to your button with custom javascript and make a function to find your iframe and perform the reload in that frame.

Can you do that?

BR,

Erwin
Reply
#5
no problem, i'll reduce the refresh time of the frame...
Reply
#6
I tried this script earlier but it was not working. Can anyone of you post a picture of how the page will look when it is made. I need to use an alert page in a project and it would be nice to see it Smile
Reply
#7
(01.02.2017, 21:26)PassivPluss Wrote: I tried this script earlier but it was not working. Can anyone of you post a picture of how the page will look when it is made. I need to use an alert page in a project and it would be nice to see it Smile

Hi PassivPluss,

The page will be blank (without any alert message)


Attached Files Image(s)
   
Reply
#8
Hi,

I have created a alert app for this, and send it to EMBS for appstore. I have no idea what the status is for publishing and if they are planning to publish it..

See screenshot (:

BR,

Erwin


Attached Files Image(s)
   
Reply
#9
Nice screen and for sure nice appWink
Reply
#10
AMAZING..!!! When will be available...??? Tongue
Reply
#11
we will adjust and place the app in the store very soon.
Reply
#12
Alerts Manager can be already downloaded from app store.
Reply
#13
(03.02.2017, 13:11)edgars Wrote: Alerts Manager can be already downloaded from app store.

Please wait or update again later, Edgars used a old version (oeps i probably never send latest version sorry) 

New version is on it's way!

BR,

Erwin
Reply
#14
Is there a script that we can sent a acknowledge
Reply
#15
Hi,

Yes you can do that with custom JS (in this sample by bit object with address 1/1/1) and used in a iframe:
Code:
$(function(){
 $(document).ready(function() {      
   var f= $('iframe');
   f.load(function(){
     if (typeof grp != 'undefined') {
          grp.listen('1/1/1', function(object, state) {
            if (state == 'value' && object.value == true ){
               f.contents().find('#AcknowledgeButton').click();
            }
         }, true);
     }
     });
  });
});
BR,

Erwin
Reply


Forum Jump: