• Jared Wiltshire

    So I guess the relevant documentation for the $save methods etc are listed here, notice the link to the AngularJS $resource documentation.

    0_1544217924401_b11ccbaa-bf9f-411c-8a28-a0194284c723-image.png

    And yeah one definite advantage of logging something to the console like you did is that Chrome debugger will show you the methods/functions on the prototype of an object.

    push() is a JavaScript built in Array method which has been around since the start of time, you will notice I previously linked to the MDN documentation for this function. MDN is an extremely useful resource for JavaScript. We have no intentions on trying to replicate it in our documentation :)
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference

    posted in User help read more
  • Jared Wiltshire

    @psysak said in Implementing project tracking sheet:

    You know what I find very useful, and maybe someone else would too, just seeing somewhere all the objects which are available to me from the dashboard designer.

    The dashboard designer does have a pretty complete list of available components on the left, some of them do not have very good descriptions though I know.

    I don't know if you have seen this also, you can also browse the component API docs through the menu if you enable the menu item.
    0_1544212327566_aff12bdc-2cd0-4e29-ad57-e158ab763145-image.png

    The "Element specific" attributes should also give you some idea of what attributes are available for each element/component.

    0_1544212416091_e67a3602-5d57-475d-ba97-b57916ab448c-image.png

    @psysak said in Implementing project tracking sheet:

    figured out how I could console log from the ng-click and printed the myItem object which allowed me to see what I can do to it

    Another good way of doing this is adding a <pre> tag to inspect a variable on your page.

    <pre ng-bind="$ctrl.varName | json"></pre>
    

    posted in User help read more
  • Jared Wiltshire

    @sstuhlmann check your Chrome dev tools betwork tab to see what REST API requests for data points are actually issued.

    If it is like you say you can stop the query running until you retrieve your device name by using a ng-if e.g.

    <ma-point-query ng-if="$ctrl.devName">
    

    Alternatively do something like this, so that if devName is undefined it queries for the deviceName being null instead (which should return 0 results)

    <ma-point-query query="{deviceName:$ctrl.devName || null}">
    

    Although what I suspect is actually happening is that the query is not exact, I think that type of query is actually a fuzzy query, it will search for deviceName LIKE %devName% in the SQL database.

    Try this -

    <ma-point-query query="{deviceName:$ctrl.devName, $exact: true}">
    

    posted in Development general discussion read more
  • Jared Wiltshire

    @Pikey4 You are probably just missing the * at the end, documentation may not cover this :(

    0_1544203481275_35fdf009-795a-4e0c-b19c-8a071d6e3042-image.png

    posted in How-To read more
  • Jared Wiltshire

    @psysak The help pages are the best resource - https://help.infiniteautomation.com/introduction-to-html5-web-apps/

    The videos should be helpful too. Also look at the examples built into Mango, it looks like you already found these however.

    @psysak said in Implementing project tracking sheet:

    Also, is there a resource available from you guys which maybe maps out the structure of mango and how things interact?

    Basic infrastructure:
    Mango backend -> REST API / WebSockets -> HTMl5 / AngularJS frontend

    For developing a dashboard you don't really need to know much about the backend, REST API or WebSockets. That is abstracted through the use of AngularJS services and components.

    The big picture things you need to know about the backend are

    • Data sources connect to devices and read individual pieces of data into data points
    • Data points generally store long term time series data (i.e. trends)
    • The JSON data store can be used to store tabular data and configuration information for your dashboards
    • If you need to store user inputted data from your dashboard into a time series you can use a virtual data source / data points

    The front end -

    • <ma-point-value> retrieves and displays the current data point value using WebSockets to get live updates
    • <ma-point-values> retrieves historical point values for a given time range for use on charts/tables (via REST)
    • <ma-json-store> retrieves the contents of a JSON store via REST and keeps it up to date via WebSockets

    And then obviously the plethora of components used to display this information on the dashboards. Check the examples / dashboard designer / API documentation for more information on these.

    @psysak said in Implementing project tracking sheet:

    it would be really really useful for you guys to have something which can nudge people in the right direction without having to bug you all the time :)

    Hopefully the help site and examples satisfies this somewhat. We are happy to answer specific questions in the forum.

    posted in User help read more
  • Jared Wiltshire

    @BG we are still looking into it. Could you also send your env.properties file from overrides (reply to the same support email where you sent the thread dump). I want to check a couple of setttings. Also include the type of processor you are using and how many CPU cores.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • Jared Wiltshire

    @psysak

    <md-button ng-click="jsonStoreData.rows.push({myProperty: 'someValue'})">Add row</md-button>
    

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push

    posted in User help read more
  • Jared Wiltshire

    @psysak said in Implementing project tracking sheet:

    So would the idea be to create a single JSON Store XID for a particular site, for example, and then start storing multiple items?

    You can store any arbitrary JSON data in each JSON store item. e.g. an array of rows. The permissions however can only be set per item so it would make sense to partition your into different JSON store items depending on your access requirements.

    posted in User help read more
  • Jared Wiltshire

    OK thanks for the additional details, that makes sense. The old watchlist page does not use websockets, the chart on the new watchlist page also does not. The table does.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • Jared Wiltshire

    OK that's interesting, can you download the thread dump and post it for me when you see the blocked thread again (I'm assuming you might have restarted Mango to clear it).

    @bg said in Dashboard refresh speed?:

    Do I need to upgrade my java version?
    Your Linux installation page says JDK 1.8 is required but not the build number.

    Its unlikely that this is related to your Java version. We do no recommend any particular build number, the latest is usually advisable.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • Jared Wiltshire

    Definitely possible, I'd suggest the JSON store will be a good bet for you.

    posted in User help read more
  • Jared Wiltshire

    @Robmalone In that case I think your best option is to create a Meta data source and meta data points which ingest the integer data point values and return the divided value.

    https://help.infiniteautomation.com/meta-data-source/

    We have plans to make this easier by providing the multiplier option on all data points, or a script expression which can manipulate the value.

    posted in User help read more
  • Jared Wiltshire

    Any errors in your browsers console? (Open the Chrome debugger)

    How do you know the data source is updating correctly? Can you see the point value continue to change on the Data Point Details page for example?

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • Jared Wiltshire

    Edit the data point at /data_sources.shtm

    0_1544027675134_d2b17d49-e366-4dd6-8001-de25ef2c8482-image.png

    posted in User help read more
  • Jared Wiltshire

    Edit the data point and set its multiplier to 0.01. You will probably want to change its text renderer format too.

    posted in User help read more
  • Jared Wiltshire

    You need to use <ma-get-point-value> to get a point via its XID and store it in a variable. You can then use the .value property of the variable you create in your ng-class attribute.

    posted in How-To read more
  • Jared Wiltshire

    @MattFox the permissions system is quite clunky for sure. An overhaul is on our roadmap.

    @mattfox said in Applying specific permissions to a user.:

    I cannot seem to work out what other permissions I have available for me to use

    The permissions are arbitrary strings, you can give the user any permission you want. In fact the "permissions" field of a user would be more correctly described as "roles" or "groups".

    @mattfox said in Applying specific permissions to a user.:

    I want to be able to generate JSON objects to save in the database on the fly by individual users but do not have the create jsonData permission.

    I'm not exactly following your intention here. A user either has permission to create JSON data or they don't. You can set this up under "Administration", "System settings", "Permissions". The setting is labelled "Permission to create a JSON data entry".

    posted in User help read more
  • Jared Wiltshire

    @BG You have not copied the example exactly, check your <ma-get-point-value> attributes.

    posted in How-To read more
  • Jared Wiltshire

    @chrapchp The extra point values you are seeing are "bookend" values that are added at the start and end of the time period you are querying over. These are inserted for ease of charting.

    The <ma-point-values> component always fetches these bookend values, there is no option to exclude them. I will add in an attribute so you can choose to exclude them for the next UI module release.

    In the meantime, you can remove the first and last elements of the array using values.slice(1, -1) or write your own component in a user module.

    posted in User help read more