• 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

    How to include another HTML file on the end of another?

    Dashboard Designer & Custom AngularJS Pages
    3
    6
    2.2k
    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.
    • V
      v8dave
      last edited by

      Basically I want to create a dashboard where I have different data. In the page1.html or home.html I would setup all of the data from XID's and then load a common HTML that would display the data. This would save me having to duplicate all the HTML pages and makes making changes to them all easy.

      Is this possible?

      I did find this but not sure if this will work with the dashboards?

      http://www.w3schools.com/howto/howto_html_include.asp

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire
        last edited by Jared Wiltshire

        Hi v8dave, could you tell me a bit more about what exactly you are trying to achieve? I think we can help you out here but I'm not clear exactly on how you want your page to behave..

        I will say that I would stay well clear of the instructions in that w3schools link.
        To just include a HTML file AngularJS does have a similar functionality - https://docs.angularjs.org/api/ng/directive/ngInclude
        But I think that what you may actually want is to add another UI router view - http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.directive:ui-view
        This means adding another state to your app.js

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • V
          v8dave
          last edited by

          Hi Jared,

          Thanks for the advice on w3schools.

          What I am trying to do is use the same webpage for all of the remote devices. What I have done is give each one a unique device ID and then I have created a copy of each http receiver and this means they all have the same data point names but different XID values.

          What I want is to create a page with the XID's so that the point names are now available for the included file. eg.

          <ma-get-point-value point-xid="DP_997239" point="oilbbl1" realtime="realtime"></ma-get-point-value>
          <ma-get-point-value point-xid="DP_873659" point="oilbbl2" realtime="realtime"></ma-get-point-value>
          
          <ma-get-point-value point-xid="DP_910714" point="waterbbl1" realtime="realtime"></ma-get-point-value>
          
          

          The point names are now allocated from the XID. Each page would have their own and I can hopefully import the rest of the page with would use them.

          Does this make sense?

          1 Reply Last reply Reply Quote 0
          • JoelHaggarJ
            JoelHaggar
            last edited by

            Hi Dave,

            I think what you are looking for is the templating features we have created. This is actually a very common use case. Check in the examples for this page: /modules/dashboards/web/mdAdmin/#/dashboard/examples/point-arrays/templating

            The idea is that you query for a group of data points and then use filters on the point names to bind each data point to each widget you are using. This way you can have a single page and easily switch from one device to the other all using the same HTML.

            1 Reply Last reply Reply Quote 0
            • V
              v8dave
              last edited by

              I can see how to use this where the user can select the device. I would like to preset the device on entry to that page.

              What we are doing with Mango is to have a number of different clients upload the data from the remote sites and when they log in, they get their own dashboard view and this only shows their data to them. We don't want them having access to any other client data.

              We have modified the dashboard based on permissions so that they cannot access the events page and thereby seeing all the data points. Their only view is via the Dashboard.

              1 Reply Last reply Reply Quote 0
              • JoelHaggarJ
                JoelHaggar
                last edited by

                You could do that a few ways.

                1. Use the username or users group in the RQL query for the data points.

                2. Do an RQL query to get a list of unique Device Names the users has permissions for and then use those in the drop down. It would default to the first one but if they had permissions for more then one they could still use a selector.

                3. Put all the data points in a point hierarchy folder that matches the username and use the username in a point hierarchy query.

                There are probably more ways but I think this should give you some ideas. This is probably something we could put some examples together on in the coming weeks.

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