• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. KroniK907
    3. Topics

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    K
    • Profile
    • Following 0
    • Followers 1
    • Topics 3
    • Posts 4
    • Best 0
    • Controversial 0
    • Groups 0

    Topics created by KroniK907

    • K

      v3 Watchlist doesn't show live point data

      User help
      • • • KroniK907
      2
      0
      Votes
      2
      Posts
      903
      Views

      phildunlapP

      Hi KroniK907,

      Have you checked the log file for any errors? What about your developer console? Do you have a proxy involved in accessing this server?

      It sounds to me like it's a problem with the websockets, and I would guess there is a proxy involved.

    • K

      Google Alternative Registration for this forum is broken.

      Mango feedback
      • • • KroniK907
      2
      0
      Votes
      2
      Posts
      1.0k
      Views

      phildunlapP

      Hi KroniK907

      Thanks for bringing that to our attention! It should be working again.

    • K

      Can you create a global script that will enable the maintenance mode module when a binary data point is true?

      How-To
      • • • KroniK907
      4
      0
      Votes
      4
      Posts
      1.3k
      Views

      phildunlapP

      You could use that function, but it returns a ProcessResult which would require figuring out how to work with that object. Also you would have to use the package path to the DWR and have an instance of the DWR. Instead, you should get the rt I was referring to the way I did,

      function getMaintenanceEvent(xid) { var id = com.serotonin.m2m2.maintenanceEvents.MaintenanceEventDao.instance.getIdByXid(xid); if(id === null) throw "Maintenance Event with XID:" + xid + " not found" var rt = com.serotonin.m2m2.maintenanceEvents.RTMDefinition.instance.getRunningMaintenanceEvent(id); if(rt === null) return { "isEventActive": function() { return false }}; //disabled events considered inactive? else return rt; }

      and then your code could look like,

      var maintEvt = getMaintenanceEvent("MNT_123"); if (maintEvt.isEventActive()) maintEvt.toggle();

      Also the timing of the original question was inopportune as we added a script utility for Maintenance Events shortly after. It can be used like,

      MaintenanceEventsUtility.isEventActive(xid); //requires maintenance events 3.5.1 MaintenanceEventsUtility.toggle(xid); MaintenanceEventsUtility.setState(xid, boolean); //in 3.5.0 this happens even during validation //in 3.5.0 the context name is maintenanceEventsUtility

      It also has some CRUD functions exposed, which I would direct you to the code for: https://github.com/infiniteautomation/ma-modules-public/blob/main/Maintenance Events/src/com/infiniteautomation/mango/maintenanceEvents/MaintenanceEventsJavascriptUtility.java