• Recent
    • Tags
    • Popular
    • Register
    • Login

    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

    Angular JS - Point Hierarchy – Display Tree

    Dashboard Designer & Custom AngularJS Pages
    4
    6
    2.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      LarryE
      last edited by

      In the Angular JS - Point Hierarchy – Display Tree.
      When testing the code I can’t get a list. I see the tree with my point count. But the table is blank under the headings?????? I was trying to use this as a way to list XID’s on a page. I tried using the play area but same thing. No points or XID’s. Any help would be nice.
      Larry

      1 Reply Last reply Reply Quote 0
      • Will GellerW
        Will Geller
        last edited by

        I think this example is more demonstrating of what could be built based on the <ma-point-hierarchy> to query and how you could display these points. The display tree itself isn't exactly a ready to go UI component but I guess you could use it and modify it to your needs.

        I think the key thing with using the display tree is you use the checkboxes to drill down into the hierarchy structure, and you click on a folder name to display the points under it in the table below.

        Infinite Automation - UI Developer

        K 1 Reply Last reply Reply Quote 0
        • L
          LarryE
          last edited by

          Will, You are so right! I didn't click on the folder name. It works well. Thanks so much.
          Larry

          1 Reply Last reply Reply Quote 0
          • K
            KKS @Will Geller
            last edited by KKS

            HI,

            I was extending this example to print point value- but it is not showing up.

            <h3>Points table</h3>
            <md-table-container ng-init="page.tableOrder='name'">
            <table md-table="">
            <thead md-head="" md-order="page.tableOrder">
            <tr>
            <th md-column="" md-order-by="name">Point name</th>
            <th md-column="" md-order-by="value">Point value</th>
            <th md-column="" md-order-by="xid">XID</th>
            </tr>
            </thead>
            <tbody md-body="" ng-init="total = 0">
            <tr ng-repeat="point in page.points | orderBy: page.tableOrder">

                        <td md-cell="">
                             <img ng-src="{{point.deviceName.indexOf('Meta') > -1 ? '/rest/v2/file-stores/default/xximages/ye.png' : '/rest/v2/file-stores/default/xximages/yerat.png'}}" width="16px" height="16px">
                            {{point.name}}</td>
                        <ma-get-point-value point="point"></ma-get-point-value>
                        <td md-cell="">{{point.value}}</td>
                        <td md-cell="">{{point.xid}}</td>
                    </tr>
                    </tbody>
                </table>
            </md-table-container>
            
            1 Reply Last reply Reply Quote 0
            • phildunlapP
              phildunlap
              last edited by

              Hi KKS,

              The "page.points" object modeled by the hierarchy are DataPointSummary objects instead of full points. So, in the cell where you're wanting the value displayed you could do,

              <ma-point-value point-xid="{{point.xid}}"></ma-point-value>
              

              And it'll load the point and its value behind the scenes and put the value there... which isn't really the most efficient way to go about this. If you can create a watchlist from your hierarchy folder, then you can use the watchlist directives to load the points and their values from that reference instead. But, in the context of this example fetching the value as I showed should work fine.

              1 Reply Last reply Reply Quote 0
              • K
                KKS
                last edited by

                Thank you so much. I appreciate you help.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post