• ThomasEinasto

    As reading through the help :

    When point value changes is the default logging setting. The point value and its time of occurrence is written to the database only if the value of the point actually changes. This setting provides the best compromise of quality of historical information vs storage space efficiency. For Numeric points, a Tolerance, or "deadband", can also be provided; the value will be logged if the absolute value of the difference between the present value and the previous value equals or exceeds the given tolerance.

    I would suggest to use The When point timestamp changes setting which is similar in behaviour to the on value change setting, but the timestamp of the sample is compared instead of the value to save all triggers to Mango database.

    Thomas

    posted in User help read more
  • ThomasEinasto

    Hi @phildunlap ,

    Thanks for pointing me to the right direction. I forgot to add permissions to the newly created JSONStore. After adding permissions correctly no error is present.

    Thanks!

    Thomas

    posted in User help read more
  • ThomasEinasto

    Dear Mango Forum,

    Looking through new patch notes there is a line : Restrict json-data POST endpoint to only let users with the global Create JSON Data permission to create new entries.

    I noticed that the new UI permissions page is not updated but legacy version does have : Permission to create a JSON data entry. By default it has superadmin rights. As my user has user rights I added next to the superadmin group also an user group.

    Still having trouble creating JSONstore entities to the database with this group of users. After trying to save the entity I get following error to the browser console:

    POST http://mango-instance/rest/v1/json-data/SavedReportData-10?editPermission=&name=SavedReportData-10&publicData=false&readPermission=user 422 (Unprocessable Entity)
    
    Possibly unhandled rejection: {"data":{"xid":"SavedReportData-10","name":"SavedReportData-10","modelType":"JSON_DATA","validationMessages":[{"level":"ERROR","message":"Must have edit permission to save data","property":"editPermission"}],"publicData":false,"jsonData":{"reportNo":10,"approved":"testingstation","name":"fds","address":"dfsadfs","equipment":"dfsadf"},"readPermission":"user","editPermission":"","id":-1},"status":422,"config":{"method":"POST","transformResponse":[null],"jsonpCallbackParam":"callback","data":{"xid":"SavedReportData-10","name":"SavedReportData-10","readPermission":"user","editPermission":"","publicData":false,"jsonData":{"reportNo":10,"approved":"testingstation","name":"fds","address":"dfsadfs","equipment":"dfsadf"},"isNew":true,"dataPath":null},"url":"/rest/v1/json-data/SavedReportData-10","params":{"name":"SavedReportData-10","readPermission":"user","editPermission":"","publicData":false},"headers":{"Accept":"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest","Content-Type":"application/json;charset=utf-8","X-XSRF-TOKEN":"e09a9bb1-b155-4291-a8f5-b0a11fb8b847"},"cached":false,"timeout":30000},"statusText":"Unprocessable Entity","xhrStatus":"complete","mangoStatusText":"Validation error — Validation error","resource":{"xid":"SavedReportData-10","name":"SavedReportData-10","readPermission":"user","editPermission":"","publicData":false,"jsonData":"...","isNew":true,"dataPath":null}}
    

    Before changing the permissions the user was not allowed and had following error in console:

    POST http://mango-instance/rest/v1/json-data/SavedReportData-11?editPermission=&name=SavedReportData-11&publicData=false&readPermission=user 403 (Forbidden)
    
    Possibly unhandled rejection: {"data":{"cause":"PermissionException: User BennetGrupp does not have permission to create a JSON data entry","mangoStatusCode":4004,"mangoStatusName":"ACCESS_DENIED","localizedMessage":"User BennetGrupp does not have permission to create a JSON data entry"},"status":403,"config":{"method":"POST","transformResponse":[null],"jsonpCallbackParam":"callback","data":{"xid":"SavedReportData-11","name":"SavedReportData-11","readPermission":"user","editPermission":"","publicData":false,"jsonData":{"reportNo":11,"name":"dasdas","approved":"testingstation","address":"asdas","equipment":"dasd"},"isNew":true,"dataPath":null},"url":"/rest/v1/json-data/SavedReportData-11","params":{"name":"SavedReportData-11","readPermission":"user","editPermission":"","publicData":false},"headers":{"Accept":"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest","Content-Type":"application/json;charset=utf-8","X-XSRF-TOKEN":"e09a9bb1-b155-4291-a8f5-b0a11fb8b847"},"cached":false,"timeout":30000},"statusText":"Forbidden","xhrStatus":"complete","mangoStatusText":"User BennetGrupp does not have permission to create a JSON data entry","resource":{"xid":"SavedReportData-11","name":"SavedReportData-11","readPermission":"user","editPermission":"","publicData":false,"jsonData":"...","isNew":true,"dataPath":null}}
    

    Creating JSONstore entities with superadmin works. I would prefer not to give user admin access as permissions are quite needed :). This would be great to solve as I am using JSONStore with JSPDF, AMCharts and ma-statistics to create pdf exports of the data and all settings of these exports are in the JsonStores which the user modifies through the session.

    Mango version: Latest 3.5.0b3 updated 21.09.2018.
    Running on MangoES.
    Used browser: Chrome

    Thanks,
    Thomas

    posted in User help read more
  • ThomasEinasto

    I would also suggest searching the forum as there are many posts regarding this functionality and explanation on how to achieve this in Angular.

    Here is one.
    https://forum.infiniteautomation.com/topic/3639/ma-serial-chart-can-not-run/4

    posted in User help read more
  • ThomasEinasto

    @mattfox said

    instead and with the point attribute use: {{parseInt(point.value)}} for only one decimal place use {{ point.value.toFixed(1)}}

    Oh, you can use javascript functions inside the brackets of html ? I thought that you can only do basic math functions inside the brackets.

    Good to know @MattFox :)

    posted in How-To read more
  • ThomasEinasto

    Thats due to elements having position:absolute.

    I would suggest using flex while building your page as it would make your pages more flexible and compatible with mobile devices and smaller devices which have less pixels on screen.

    See for an example on how @Jared-Wiltshire has made the admin home page here : https://github.com/infiniteautomation/ma-dashboards/blob/main/UI/web-src/ui/views/home.html

    See these for understanding flexing

    https://material.angularjs.org/latest/layout/options
    https://material.angularjs.org/1.1.4/layout/children

    Thomas

    posted in How-To read more
  • ThomasEinasto

    Not to say something but the link has the source code of all the dialogs if you click on top right corner of each example md-card. To make it more dynamic you should program it with Angular components/directives.

    posted in Wishlist read more
  • ThomasEinasto

    Hi @sky_watcher

    I assume your external IP which you provided is your own modem IP (router). And your MangoES is connected into your local network. You should first see port forwarding to make it secure and to make your router forward remote connections to your ES. This is not good practice as you will be providing to everyone your router which is not a server per say.

    See, for more information-> https://portforward.com/

    Secondly you should buy a domain to get an human understandable address. https://www.sky_watcher.net for an example.

    After buying a domain you can assign this domain dns to be linked with your ip address. Then you would have to wait for a few hours after your dns settings have been updated through all dns servers.

    Then if you go to your bought domain name through your browser then the dns server which you are using for your computer will connect you remotely to your assigned IP address.

    More information is in available like this.
    https://www.ntchosting.com/encyclopedia/dns/ip-address/

    Thomas

    posted in Mango Automation read more
  • ThomasEinasto

    Several options are available like @phildunlap said.

    Following way is more functional by using ng-init to define units and rounding and then using .value on the filter... This way you do not need to slice off the units on the text...

    <ma-svg ng-init="units='kW'; rounding=3" ng-include="'/rest/v2/file-stores/default/BuildingA.svg'">
    <!-- Mains -->
        <div ma-selector="#amainac tspan" ng-bind="(acmain.value | number:rounding) + units"></div>
    </ma-svg>
    <!-- AC Power -->
        <ma-get-point-value point-xid="DP_797e71a8-87e8-4b30-984f-4dcdbdd0d80e" point="acmain"></ma-get-point-value>
    
    

    Thomas

    posted in User help read more
  • ThomasEinasto

    Why cant you make for an example a meta datapoint which has 2 binary points one which is set true through an event and another through user execution after which this meta datapoint will leave "alarm state" and system can continue after the issue has been resolved? >> i.e both points are true

    Thomas

    posted in Wishlist read more