<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Events Table refreshing]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I have just started to learn and check if Mango would be a good choice for my current project. I think I'll have lots of questions because I'm not familiar with HTML programming... :)</p>
<p dir="auto">But the first thing I really need is to refresh Events Table when the new event occurs. Now I can see only “a clock with number” on right top corner. Is it possible to add new row into table immediately? Is it possible to show some popup window and/or play sound if new event occurs?</p>
<p dir="auto">Now I’m using free-m2m2-core-3.2.1.</p>
<p dir="auto">Best Regards,<br />
Dovydas</p>
]]></description><link>https://forum.mango-os.com/topic/2986/events-table-refreshing</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Nov 2026 09:45:40 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2986.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 04 Oct 2017 06:25:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Events Table refreshing on Wed, 04 Oct 2017 15:45:43 GMT]]></title><description><![CDATA[<p dir="auto">So you will need to add a custom AngularJS module as per this link - <a href="https://help.infiniteautomation.com/getting-started-with-a-user-module/" rel="nofollow ugc">https://help.infiniteautomation.com/getting-started-with-a-user-module/</a></p>
<p dir="auto">This component will just watch for new events of a certain level and play the sound, you can customize it to your needs.</p>
<pre><code>define(['angular', 'require'], function(angular, require) {
'use strict';

var userModule = angular.module('userModule', ['maUiApp']);

userModule.component('eventAudio', {
    bindings: {
        audioFile: '@',
        eventLevel: '@'
    },
    controller: ['maEvents', '$scope', function(maEvents, $scope) {
        this.$onInit = () =&gt; {
            maEvents.notificationManager.subscribe((event, mangoEvent) =&gt; {
                if (mangoEvent.alarmLevel === this.eventLevel) {
                    new Audio(this.audioFile).play();
                }
            }, $scope, ['RAISED']);
        };
    }]
});

return userModule;

}); // define
</code></pre>
<p dir="auto">Use it like this</p>
<pre><code>&lt;event-audio audio-file="/audio/critical.mp3" event-level="CRITICAL"&gt;&lt;/event-audio&gt;
</code></pre>
<p dir="auto">If this is all too complicated, I might add something similar to this into the UI module for the next release so sit tight.</p>
]]></description><link>https://forum.mango-os.com/post/15736</link><guid isPermaLink="true">https://forum.mango-os.com/post/15736</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Wed, 04 Oct 2017 15:45:43 GMT</pubDate></item><item><title><![CDATA[Reply to Events Table refreshing on Wed, 04 Oct 2017 15:26:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dovydasz" aria-label="Profile: dovydasz">@<bdi>dovydasz</bdi></a> said in <a href="/post/15733">Events Table refreshing</a>:</p>
<blockquote>
<p dir="auto">Sorry, just found that there is an upgrade for MangoUI and it seems that now it works like I want. But would be great to play some alarm sound if there is a new event.</p>
</blockquote>
<p dir="auto">Glad you found the update, we did add immediate updates via WebSockets recently.</p>
<p dir="auto">We don't currently have a built in way to play a sound but it shouldn't be too difficult to implement yourself. I'll put together a quick example.</p>
]]></description><link>https://forum.mango-os.com/post/15735</link><guid isPermaLink="true">https://forum.mango-os.com/post/15735</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Wed, 04 Oct 2017 15:26:27 GMT</pubDate></item><item><title><![CDATA[Reply to Events Table refreshing on Wed, 04 Oct 2017 07:20:49 GMT]]></title><description><![CDATA[<p dir="auto">Sorry, just found that there is an upgrade for MangoUI and it seems that now it works like I want. But would be great to play some alarm sound if there is a new event.</p>
]]></description><link>https://forum.mango-os.com/post/15733</link><guid isPermaLink="true">https://forum.mango-os.com/post/15733</guid><dc:creator><![CDATA[dovydasz]]></dc:creator><pubDate>Wed, 04 Oct 2017 07:20:49 GMT</pubDate></item></channel></rss>