<?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[Is a directive or ability to enable and disable points from the new V3 UI available or in works?]]></title><description><![CDATA[<p dir="auto">I have read the year-old thread for this and it seemed like that is a feature coming.  Is there now any way to enable or disable from the new dashboard?</p>
]]></description><link>https://forum.mango-os.com/topic/3509/is-a-directive-or-ability-to-enable-and-disable-points-from-the-new-v3-ui-available-or-in-works</link><generator>RSS for Node</generator><lastBuildDate>Sat, 16 May 2026 15:17:08 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/3509.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 20 May 2018 16:06:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Tue, 04 Jun 2019 21:40:49 GMT]]></title><description><![CDATA[<p dir="auto">OK Thanks Jared I have it working now.  Thank-you very much for all your help and to the other guys as well.  That's great.</p>
]]></description><link>https://forum.mango-os.com/post/22304</link><guid isPermaLink="true">https://forum.mango-os.com/post/22304</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Tue, 04 Jun 2019 21:40:49 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Tue, 04 Jun 2019 15:34:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phillip-weeks" aria-label="Profile: Phillip-Weeks">@<bdi>Phillip-Weeks</bdi></a> This is how you add it as a user module - <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">If it is being loaded correctly you will see it on the sources tab of Chrome's dev tools (under /rest/v2/file-stores/public/userModule.js for example).</p>
<p dir="auto">You should also see the network request being issued on the network tab when you click the button.</p>
]]></description><link>https://forum.mango-os.com/post/22298</link><guid isPermaLink="true">https://forum.mango-os.com/post/22298</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Tue, 04 Jun 2019 15:34:27 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Tue, 04 Jun 2019 12:37:31 GMT]]></title><description><![CDATA[<p dir="auto">I don't believe it is doing anything.<br />
<img src="https://camo.nodebb.org/4bb7575e99416acca859df5c419d28e3a346596a?url=https%3A%2F%2Fi.imgur.com%2F14PwXmy.png" alt="0_1559652547166_81d1c7e6-b1e5-4e20-b6ae-9ebf020ea314-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mango-os.com/post/22297</link><guid isPermaLink="true">https://forum.mango-os.com/post/22297</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Tue, 04 Jun 2019 12:37:31 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Tue, 04 Jun 2019 11:52:23 GMT]]></title><description><![CDATA[<p dir="auto">It would be more helpful if you open console in the browser to see what errors you are having.</p>
<p dir="auto">Something like this:</p>
<p dir="auto"><img src="https://camo.nodebb.org/955f1dac03064afe41581ffe2a17754d02dff040?url=https%3A%2F%2Fi.imgur.com%2FndMXo0n.png" alt="0_1559649793677_6c1a50f2-c978-4f2f-8e12-4d01faa5e742-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mango-os.com/post/22296</link><guid isPermaLink="true">https://forum.mango-os.com/post/22296</guid><dc:creator><![CDATA[ThomasEinasto]]></dc:creator><pubDate>Tue, 04 Jun 2019 11:52:23 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Tue, 04 Jun 2019 11:46:52 GMT]]></title><description><![CDATA[<p dir="auto">Nope still not changing the DS.  How can I tell if the user-module I  added in UI settings is actually being called?</p>
]]></description><link>https://forum.mango-os.com/post/22295</link><guid isPermaLink="true">https://forum.mango-os.com/post/22295</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Tue, 04 Jun 2019 11:46:52 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Tue, 04 Jun 2019 01:56:29 GMT]]></title><description><![CDATA[<p dir="auto">What Jared has written here I'm pretty certain extends the DataSource module in the dashboard.<br />
Once it's added to the user module, For example</p>
<pre><code>&lt;ma-data-source-list ng-model="myDataSource" auto-init="false" query="{name: 'meta'}" sort="['-name']" start="3"
limit="6" show-clear="true"&gt;&lt;/ma-data-source-list&gt;

&lt;ma-button label="Toggle Enable/Disable" ng-click="myDataSource.enable()"&gt;&lt;/ma-button&gt;

</code></pre>
<p dir="auto">I don't see any binding here allowing us to set the datasource to be either enabled or disabled. Just toggled between the two states. Can always change that by making a directive though.</p>
<p dir="auto">EDIT: Oops forgot the closing &lt;/ma-button&gt;!</p>
]]></description><link>https://forum.mango-os.com/post/22293</link><guid isPermaLink="true">https://forum.mango-os.com/post/22293</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Tue, 04 Jun 2019 01:56:29 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Tue, 04 Jun 2019 01:44:08 GMT]]></title><description><![CDATA[<p dir="auto">example please of calling it in html</p>
]]></description><link>https://forum.mango-os.com/post/22292</link><guid isPermaLink="true">https://forum.mango-os.com/post/22292</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Tue, 04 Jun 2019 01:44:08 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Mon, 03 Jun 2019 19:15:33 GMT]]></title><description><![CDATA[<p dir="auto">I've looked into it and this feature is not actually in 3.5.x, it is included with 3.6.</p>
<p dir="auto">Here's a user module with the backported feature that you can use -</p>
<pre><code>define(['angular', 'require'], function(angular, require) {
    'use strict';

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

    userModule.decorator('maDataSource', ['$delegate', '$http', function(DataSource, $http) {
        
        Object.assign(DataSource.prototype, {
            enable(enabled = true, restart = false) {
                this.$enableToggling = true;
                
                const url = '/rest/v1/data-sources/enable-disable/' + encodeURIComponent(this.xid);
                return $http({
                    url,
                    method: 'PUT',
                    params: {
                        enabled: !!enabled,
                        restart
                    }
                }).then(() =&gt; {
                    this.enabled = enabled;
                }).finally(() =&gt; {
                    delete this.$enableToggling;
                });
            }
        });
        
        return DataSource;
    }]);
    
    return userModule;
}); // define
</code></pre>
<p dir="auto">I'd recommend removing this when you upgrade to 3.6.x</p>
]]></description><link>https://forum.mango-os.com/post/22291</link><guid isPermaLink="true">https://forum.mango-os.com/post/22291</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Mon, 03 Jun 2019 19:15:33 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Mon, 03 Jun 2019 18:02:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phillip-weeks" aria-label="Profile: Phillip-Weeks">@<bdi>Phillip-Weeks</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/thomaseinasto" aria-label="Profile: ThomasEinasto">@<bdi>ThomasEinasto</bdi></a> Which version of Mango are you both using? I'm assuming 3.5.x. Make sure you are using the latest UI and API module. If you can post the exact error response from the Chrome developer console that would be helpful.</p>
]]></description><link>https://forum.mango-os.com/post/22290</link><guid isPermaLink="true">https://forum.mango-os.com/post/22290</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Mon, 03 Jun 2019 18:02:08 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Mon, 03 Jun 2019 13:58:02 GMT]]></title><description><![CDATA[<p dir="auto">Craig,</p>
<p dir="auto">Depending on the version it might not work. I have one instance here which is not beta and it issues out rejection to the POST made by $save().</p>
<p dir="auto">I think IAS staff might comment on this subject more.</p>
<p dir="auto">Thomas</p>
]]></description><link>https://forum.mango-os.com/post/22288</link><guid isPermaLink="true">https://forum.mango-os.com/post/22288</guid><dc:creator><![CDATA[ThomasEinasto]]></dc:creator><pubDate>Mon, 03 Jun 2019 13:58:02 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Mon, 03 Jun 2019 13:47:24 GMT]]></title><description><![CDATA[<p dir="auto">Hey, Phillip, I tested this and it does work. Did you refresh the data_sources page? the old UI does not have live updates.</p>
]]></description><link>https://forum.mango-os.com/post/22287</link><guid isPermaLink="true">https://forum.mango-os.com/post/22287</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Mon, 03 Jun 2019 13:47:24 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Mon, 03 Jun 2019 10:14:38 GMT]]></title><description><![CDATA[<p dir="auto">Thomas, I tried this code but it does not change the datasource to disabled.  It does disable and enable the data source selected in the array however it does not change the data source status in reality when I switch to the data_sources page it is still enabled.</p>
]]></description><link>https://forum.mango-os.com/post/22284</link><guid isPermaLink="true">https://forum.mango-os.com/post/22284</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Mon, 03 Jun 2019 10:14:38 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Sun, 02 Jun 2019 20:22:25 GMT]]></title><description><![CDATA[<p dir="auto">Ideally one could use ma-data-source-query to get desired datasource and then toggle .enabled property and issue $save() on the queried datasource.</p>
<p dir="auto">i.e using Jared's last example</p>
<pre><code>&lt;ma-data-source-query data-sources="dataSourcesArray" query="{name: 'meter'}" limit="1"&gt;&lt;/ma-data-source-query&gt;

&lt;!-- Assuming first datasource in the query is desired datasource --&gt;
&lt;md-button id="dc9944e5-bd98-48ff-aa2c-c99db8416012" class="md-raised md-primary" style="position: absolute; left: 170px; top: 208px;" ng-click="dataSourcesArray[0].enabled = true" ng-disabled="dataSourcesArray[0].enabled"&gt;
        &lt;span&gt;Enable&lt;/span&gt;
    &lt;/md-button&gt;
    &lt;md-button id="cdba29de-31a5-473d-bf07-025effa6b55b" class="md-raised md-warn" style="position: absolute; left: 274px; top: 208px;" ng-click="dataSourcesArray[0].enabled = false" ng-disabled="!dataSourcesArray[0].enabled"&gt;
        &lt;span&gt;Disable&lt;/span&gt;
    &lt;/md-button&gt;

    &lt;md-button id="276622a1-9238-4e0d-891e-589adb856b9f" class="md-raised" style="position: absolute; left: 378px; top: 208px;" ng-click="dataSourcesArray[0].enabled = !dataSourcesArray[0].enabled"&gt;
        &lt;span&gt;Toggle&lt;/span&gt;
    &lt;/md-button&gt;

    &lt;md-button id="cdba29de-31a5-473d-bf07-025effa6b55b" class="md-raised md-warn" style="position: absolute; left: 274px; top: 208px;" ng-click="dataSourcesArray[0].$save()" &gt;
        &lt;span&gt;Save&lt;/span&gt;
    &lt;/md-button&gt;
</code></pre>
]]></description><link>https://forum.mango-os.com/post/22283</link><guid isPermaLink="true">https://forum.mango-os.com/post/22283</guid><dc:creator><![CDATA[ThomasEinasto]]></dc:creator><pubDate>Sun, 02 Jun 2019 20:22:25 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Sat, 01 Jun 2019 17:08:03 GMT]]></title><description><![CDATA[<p dir="auto">Why can't we enable disable a Data Source same way as a point?  DS.enable()  I would like to control it same as datapoint</p>
]]></description><link>https://forum.mango-os.com/post/22282</link><guid isPermaLink="true">https://forum.mango-os.com/post/22282</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Sat, 01 Jun 2019 17:08:03 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Tue, 22 May 2018 10:01:51 GMT]]></title><description><![CDATA[<p dir="auto">Awesome, thank-you!!</p>
]]></description><link>https://forum.mango-os.com/post/18541</link><guid isPermaLink="true">https://forum.mango-os.com/post/18541</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Tue, 22 May 2018 10:01:51 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Mon, 21 May 2018 19:00:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phillip-weeks" aria-label="Profile: Phillip-Weeks">@<bdi>Phillip-Weeks</bdi></a> yes its already available and usable. You just need to call the <code>.enable()</code> method for a point object.</p>
<p dir="auto">Here's an example</p>
<pre><code>&lt;div class="ma-designer-root" id="379e6c43-3a47-4ea8-8d92-b999b6b25179" style="width: 1366px; height: 768px; position: relative;"&gt;
    &lt;ma-get-point-value point-xid="voltage" point="myPoint"&gt;&lt;/ma-get-point-value&gt;
    &lt;ma-point-value id="62b0861d-53ef-4bab-ae69-825f60e3042c" enable-popup="hide" style="position: absolute; left: 210px; top: 100px;" point="myPoint"&gt;&lt;/ma-point-value&gt;
    &lt;md-button id="dc9944e5-bd98-48ff-aa2c-c99db8416012" class="md-raised md-primary" style="position: absolute; left: 170px; top: 208px;" ng-click="myPoint.enable()" ng-disabled="myPoint.enabled"&gt;
        &lt;span&gt;Enable&lt;/span&gt;
    &lt;/md-button&gt;
    &lt;md-button id="cdba29de-31a5-473d-bf07-025effa6b55b" class="md-raised md-warn" style="position: absolute; left: 274px; top: 208px;" ng-click="myPoint.enable(false)" ng-disabled="!myPoint.enabled"&gt;
        &lt;span&gt;Disable&lt;/span&gt;
    &lt;/md-button&gt;
    &lt;md-button id="276622a1-9238-4e0d-891e-589adb856b9f" class="md-raised" style="position: absolute; left: 378px; top: 208px;" ng-click="myPoint.enable(!myPoint.enabled)"&gt;
        &lt;span&gt;Toggle&lt;/span&gt;
    &lt;/md-button&gt;
&lt;/div&gt;
</code></pre>
]]></description><link>https://forum.mango-os.com/post/18533</link><guid isPermaLink="true">https://forum.mango-os.com/post/18533</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Mon, 21 May 2018 19:00:47 GMT</pubDate></item><item><title><![CDATA[Reply to Is a directive or ability to enable and disable points from the new V3 UI available or in works? on Sun, 20 May 2018 22:09:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phillip-weeks" aria-label="Profile: phillip-weeks">@<bdi>phillip-weeks</bdi></a> there is something in the API that allows you to do it:<br />
<code>/v1/data-points/enable-disable/{xid}</code><br />
Would not be impossible to make a component to do it using a $http.put request. Unless of course you'd rather not have to code something, but if it's there in the API it can't be far off...</p>
]]></description><link>https://forum.mango-os.com/post/18513</link><guid isPermaLink="true">https://forum.mango-os.com/post/18513</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Sun, 20 May 2018 22:09:06 GMT</pubDate></item></channel></rss>