• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. moinmoin
    3. Posts

    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
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 10
    • Posts 32
    • Groups 0

    Posts

    Recent Best Controversial
    • Return svg in HTML component

      Say I have some .js in WebContent/resources. Now this code can generate svg via Raphael.js and also return it as a string. Now I thought of doing

      <script type="text/javascript">someFunction(someArg)</script>
      

      where the `someFunction' returns the "<svg>...</svg>" string. This naive approach does not work. What is needed so that the HTML component div has the svg as a child? Am I missing something?

      Best Regards,
      moinmoin

      posted in Development general discussion
      M
      moinmoin
    • RE: Return svg in HTML component

      Say I have some .js in WebContent/resources. Now this code can generate svg via Raphael.js and also return it as a string. Now I thought of doing

      <script type="text/javascript">someFunction(someArg)</script>
      

      where the `someFunction' returns the "<svg>...</svg>" string. This naive approach does not work. What is needed so that the HTML component div has the svg as a child? Am I missing something?

      Best Regards,
      moinmoin

      posted in Development general discussion
      M
      moinmoin
    • RE: Multiple selection and move in Point Hierarchy

      I also implemented it a while ago using jsTree. If someone is interested (since it is an old Mango 1.12.4) just PM me.

      posted in Development general discussion
      M
      moinmoin
    • Multiple selection and move in Point Hierarchy

      Dear Mango Users and Developers,

      how would I go about on implementing multiple point selection, e.g. via control-click, and moving of multiple point selections to another folder in the point hierarchy page?

      I gather from the pointHierarchy.jsp that a click on a point is handled by the onTitleClick function in TreeNode.js. Now I am thinking whether this click could handle a key-modified click... Problem is mainly: old version, no doc. I am running a rather old version of mango 1.12.2 with dojo 0.4.2. Do you think it would be better to load a more recent dojo for this task? I tried loading a recent and compressed dojo in the pointHierarchy.jsp, but that one fails - I assume because dojo is already loaded in the parent tag:page. Did someone already implement a similar feature using the old dojo?

      Thanks and Best Regards,
      Michael Bach

      posted in Development general discussion
      M
      moinmoin
    • RE: Multiple selection and move in Point Hierarchy

      Dear Mango Users and Developers,

      how would I go about on implementing multiple point selection, e.g. via control-click, and moving of multiple point selections to another folder in the point hierarchy page?

      I gather from the pointHierarchy.jsp that a click on a point is handled by the onTitleClick function in TreeNode.js. Now I am thinking whether this click could handle a key-modified click... Problem is mainly: old version, no doc. I am running a rather old version of mango 1.12.2 with dojo 0.4.2. Do you think it would be better to load a more recent dojo for this task? I tried loading a recent and compressed dojo in the pointHierarchy.jsp, but that one fails - I assume because dojo is already loaded in the parent tag:page. Did someone already implement a similar feature using the old dojo?

      Thanks and Best Regards,
      Michael Bach

      posted in Development general discussion
      M
      moinmoin
    • RE: Custom event creation best practice

      My last post was kind of confused - must be because it was just before lunch break...

      I got it to work by now, though. I used the EventManager and my existing acknowledge actions. The 'missing link' was my misunderstanding that the private EventManager.setHandlers() is not a 'simple' setter, but instead creates the runtimes from EventHandlerVO's for a given EventInstance. With it, I was able to generate a Map<Integer, List<EventHandlerRT>> that maps events to their handlers. The acknowledge actions of the EventHandlerRT's matching a given eventId are then run in the manner of the existing actions.

      I do not know whether my approach is a wise one - it works atm, but untested.

      Thanks for the event manager hint Matthew.

      Best Regards,
      Michael

      posted in Development general discussion
      M
      moinmoin
    • RE: Custom event creation best practice

      Hum. I get the picture. Thanks for the explanation! I do not think I could make it in a reasonable amount of time though. While your suggestion is a generic one, I just need to set a point on an ack event...

      In the meantime, I succeeded with another approach in adding an 'acknowledged' action to the EventHandlerVO (in the fashion of active and inactive actions) including saving (serialization). Next step would be to set the associated data point (in case of SET_POINT action) with a DWR method called from ackEvent() through the onclick in the green checkmark div.

      The further processing: eventId -> dataPointId associated with event -> eventHandler associated with event and dataPointId (how?) -> call SET_POINT actions derived from matching event handlers.

      The missing link is: How to test whether an event handler is associated with a given data point and a given event? Could you point me in the right direction?

      posted in Development general discussion
      M
      moinmoin
    • RE: Custom event creation best practice

      Hi Matthew,

      I see your point with the snake :) The acknowledgement would most certainly cause a point (preferably to be chosen by the user) to be set in a meta data source so I thought of the SET_POINT type event approach. As an aside, it would be nice to have the acknowledgement listed in the event log...

      Regarding implementation of your notification approach, would you add the notification to the event as a string or integer - that would then be tested by the event handler? Is there a notification mechanism implemented in Mango Automation 2.x where I could have a look at how experts would solve such a problem? Could you give me any hint implementation-wise?

      Thanks for your comment, much appreciated.

      Best Regards,
      Michael

      posted in Development general discussion
      M
      moinmoin
    • Custom event creation best practice

      Dear Mango Users and Developers,

      DISCLAIMER: Not sure whether this is the right place for my thread, but the section "Mango 1.12.5 and earlier" does not have a development subsection. Please move it to 'general discussion' if needed.

      I am using a legacy version of Mango M2M 1.12.2 and would like to enhance the event handler (+listener?) to handle acknowledge events that would be triggered if a user acknowledges an alarm (by pressing the green check-mark).

      I am trying it along the lines of the 'active' and 'inactive' events in the event handlers menu. I looked into various classes, e.g. EventHandlerVO, EventHandlersDwr, EventHandlerRT and related ones. I can already save an 'acknowledge' action in the event handlers .js interface.

      As a next step I need to create the 'acknowledge' event. I searched for an example of event generation, but could not find any. Could anyone point me to an example where an event is triggered? Where to begin?

      A gentle shove is much appreciated :)

      Best Regards,
      Michael Bach

      posted in Development general discussion
      M
      moinmoin
    • RE: Custom event creation best practice

      Dear Mango Users and Developers,

      DISCLAIMER: Not sure whether this is the right place for my thread, but the section "Mango 1.12.5 and earlier" does not have a development subsection. Please move it to 'general discussion' if needed.

      I am using a legacy version of Mango M2M 1.12.2 and would like to enhance the event handler (+listener?) to handle acknowledge events that would be triggered if a user acknowledges an alarm (by pressing the green check-mark).

      I am trying it along the lines of the 'active' and 'inactive' events in the event handlers menu. I looked into various classes, e.g. EventHandlerVO, EventHandlersDwr, EventHandlerRT and related ones. I can already save an 'acknowledge' action in the event handlers .js interface.

      As a next step I need to create the 'acknowledge' event. I searched for an example of event generation, but could not find any. Could anyone point me to an example where an event is triggered? Where to begin?

      A gentle shove is much appreciated :)

      Best Regards,
      Michael Bach

      posted in Development general discussion
      M
      moinmoin
    • Custom Views: Relative Positioning

      Dear Mango Users and Developers,

      We are running Mango M2M 1.13.

      We are trying to produce a custom view with relative positioning of elements, so that the graphical view may be viewable on displays for which it was not optimized (i.e. it should scale on resizing).

      I created a toy graphical view with a button and found the corresponding <div> element. I noticed the style field inside the div element:
      <div> id="c4" class="selectable" onclick="markViewComponent(this, event);" style="position: absolute; left: 394px; top: 114px; z-index: 0;" >

      Now I wanted to ask if someone already thought on / implemented already a relative positioning feature. If not, could you give me hints or tips on where to look next? I am thinking of something along the lines of style="position: relative; ...". But then this is not relative to window size but to its "normal" position AFAIK... I would like to get more familiar with Mango and web development in general by solving this problem.

      Ideally, there should be the ability to set the positioning from the settings editor in p.u. (per unit), e.g. x=0.5, y=0.6, z=0 relative to the current browser window size. As it is now, there are three forms for absolute positioning in the simple point settings editor.

      If I was more proficient in JavaScript and knew the Mango system better I would also consider calculating the positions on the fly after the window has been resized, i.e. update absolute position values for each view component (?).

      Best Regards,
      Michael

      posted in Development general discussion
      M
      moinmoin
    • RE: Custom Views: Relative Positioning

      Dear Mango Users and Developers,

      We are running Mango M2M 1.13.

      We are trying to produce a custom view with relative positioning of elements, so that the graphical view may be viewable on displays for which it was not optimized (i.e. it should scale on resizing).

      I created a toy graphical view with a button and found the corresponding <div> element. I noticed the style field inside the div element:
      <div> id="c4" class="selectable" onclick="markViewComponent(this, event);" style="position: absolute; left: 394px; top: 114px; z-index: 0;" >

      Now I wanted to ask if someone already thought on / implemented already a relative positioning feature. If not, could you give me hints or tips on where to look next? I am thinking of something along the lines of style="position: relative; ...". But then this is not relative to window size but to its "normal" position AFAIK... I would like to get more familiar with Mango and web development in general by solving this problem.

      Ideally, there should be the ability to set the positioning from the settings editor in p.u. (per unit), e.g. x=0.5, y=0.6, z=0 relative to the current browser window size. As it is now, there are three forms for absolute positioning in the simple point settings editor.

      If I was more proficient in JavaScript and knew the Mango system better I would also consider calculating the positions on the fly after the window has been resized, i.e. update absolute position values for each view component (?).

      Best Regards,
      Michael

      posted in Development general discussion
      M
      moinmoin
    • RE: Custom views

      Sorry for getting back this late.

      MA already has a reports module, with which you can generate certain types of reports. I assume that you know this and need something else, in which case you are probably out of luck at the moment

      As you said, I know these. I use them for daily emailed monitoring reports to check operation. Apart from that, we would like to use our existing reporting facilities (statistical stuff implemented in GNU R) on the MA data.

      maybe you can let us know whether this is something that would be useful for you
      Great, this is exactly what I was looking for. This API would help us greatly in building a custom report infrastructure. Thus, a +1 from my side.

      posted in Development general discussion
      M
      moinmoin
    • RE: Custom views

      The first thing that comes to mind is how to add custom view components and/or more useful for us: generate custom reports.

      Eventually, we plan to integrate an interface for report generation with the GNU R system. This would be done via Rserve from Java. Specifically, it would be good to know how to retrieve data point values in a similar manner as with the reports, i.e. easy selection and JavaScript examples.

      Are interfaces to external report engines planned? I am thinking of something similar to the DGLux interface for reports instead of graphical views.

      posted in Development general discussion
      M
      moinmoin
    • RE: Custom views

      While the customViewExample.jsp is a good starting point, the essential thing to be able to experiment IMHO is to have a means of getting at the data point values to do something meaningful with them (other than plotting them or return their values as in the examples).

      This brings me to a general issue: I can see that it is a huge effort to document these and other things, but interested contributors (hinting at MA 2.0) often have no clue of the internals so figuring things out in a reasonable time is not possible...

      posted in Development general discussion
      M
      moinmoin
    • RE: [SOLVED] Acknowledge *ALL* events

      Hi Matthew,

      I totally agree on the points that you mentioned.

      I did as I said in my original post and dumped the events table without data from the MySQL data base. I then reimported the empty events table and all works well. Would be nice if the "users" could do something similar as you suggested via "ack all" if They Know What They Are Doing... but that would only be convenience in this case.

      Marking as solved since there is no priority and procedure works in the few cases where an "ack all" is needed.

      Thanks
      Michael

      posted in User help
      M
      moinmoin
    • [SOLVED] Acknowledge *ALL* events

      Hello!

      How can I just acknowledge all and every event that is recorded in the data base? The "Acknowledge all" button just runs MiscDwr.acknowledgeAllPendingEvents() which only acknowledges a fixed amount of events. I have got many, many events due to a hardware outage, so they hold no valuable information. I thought of exporting the events data base table without data and reimporting it. Are there any ID relations that could get messed up?

      Thanks in advance,
      Michael

      posted in User help
      M
      moinmoin
    • RE: [SOLVED] Acknowledge *ALL* events

      Hello!

      How can I just acknowledge all and every event that is recorded in the data base? The "Acknowledge all" button just runs MiscDwr.acknowledgeAllPendingEvents() which only acknowledges a fixed amount of events. I have got many, many events due to a hardware outage, so they hold no valuable information. I thought of exporting the events data base table without data and reimporting it. Are there any ID relations that could get messed up?

      Thanks in advance,
      Michael

      posted in User help
      M
      moinmoin
    • RE: Merge two Mango data bases

      Just thinking aloud whether the following could work:

      Turn off auto-increment and delete the ids on a destination db pointvalues table. Then import the old db data. Delete the ID column from the destination db. Then re-create the ID column with auto-increment and primary key.

      The thing that breaks of course are the pointvalues annotations (what is their use?) and the image file names.

      Is this correct? I would greatly appreciate some advice/help.

      Thanks,
      Michael

      posted in User help
      M
      moinmoin
    • RE: Merge two Mango data bases

      Thanks for your comment Matthew.

      A compound key, as you mentioned, would make things way easier merging-wise. Sadly, the paid support is no option due to lack of budget (sound familiar?).

      For now I will have to do my analysis on the distributed old data bases and the running one.

      In the meantime I would appreciate any hints or ideas for a solution.

      Thanks and Best Regards,
      Michael

      posted in User help
      M
      moinmoin