• C
    CraigWeb

    Hi Sean

    1.On your original point you must make then event detector with your 2 minute duration.

    1. Then create a new binary virtual point.
    2. go to event handler page and make a event handler like the picture. use the meta point that you created.
      0_1546415410032_EV.jpg
    3. Now use <ma-get-point-value> on the new meta point and use that for your dashboard logic.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • C
    CraigWeb

    Hi Sbaik

    I decided to play around with my UI and explore the watchlist API a little. It is quite easy to achieve what you looking to do add the following code, to and your own date picker:

    <div class="ma-designer-root" id="dd507d66-beac-4c6b-9286-e8c1af134436" style="width: 1366px; height: 768px; position: relative;">
        
        <div layout="row" layout-xs="column">
        <md-input-container flex="">
            <label>Preset</label>
            <ma-date-range-picker from="from" to="to" preset="LAST_1_DAYS" update-interval="5 seconds"></ma-date-range-picker>
        </md-input-container>
        <md-input-container flex="">
            <label>From date</label>
            <ma-date-picker ng-model="from"></ma-date-picker>
        </md-input-container>
        <md-input-container flex="">
            <label>To date</label>
            <ma-date-picker ng-model="to"></ma-date-picker>
        </md-input-container>
        </div>
    

    Then in your watchlist html code edit the To and From attributes as follows.

       <ma-watch-list-chart id="436ab6ea-d020-4b10-9d30-deb74166780e" watch-list="designer.watchList" 
       points="designer.points" from="from" to="to" rollup-type="dateBar.rollupType" rollup- 
       intervals="dateBar.rollupIntervals" rollup-interval-period="dateBar.rollupIntervalPeriod" simplify- 
       tolerance="dateBar.simplifyTolerance" style="position: absolute; width: 400px; height: 200px; left: 155px; top: 201px;"> 
       </ma-watch-list-chart>
    

    You can then take your page back to the root level and you wont have the top Bar and your watchlist will use the new date picker you added.

    posted in User help read more
  • C
    CraigWeb

    @JoelHaggar Don't worry I figured it out.

    @pierjsap I went on Joels hint and it works quite nicely.

    you'll need to add parameters to your pages :
    0_1523779300319_Screen Shot 2018-04-15 at 09.57.24.png

    Then edit your navigation buttons to send the page that they origin from :

      <md-button id="cd4e96ca-a9b8-48b8-a333-63ab36d14bee" class="md-button md-raised 
     md-accent" ui-state="'ui.page2'" ui-state-params="{origin:'page1'}" style="position: absolute; 
     left: 79.2188px; top: 103px; width: 115.766px; height: 36px;">Link Text</md-button>
    

    The you'll need to edit your back button as such:

      <ma-ui-state-params  stateParams = $stateParams></ma-ui-state-params>
        
       <md-button id="cd4e96ca-a9b8-48b8-a333-63ab36d14bee" class="md-button md- 
      raised md-accent" ui-state="'ui.'+stateParams.origin" style="position: absolute; left:  79.2188px; top: 103px; width: 115.766px; height: 36px;">{{stateParams.origin}}</md-button>
    

    There is one catch that if you navigate straight to page 3 then origin will be null. so the back button wont work. You could make 2 buttons and use ng-show = stateParams.origin, & ng-show = !stateParams.origin on the 2nd button which will have its ui-state hard coded.
    I don't think the ui-state attribute is an {expression} so we cant put a or statement there.

    Edit: Just to clear up what I was trying to say here. Use 2 buttons. 1 button for 'Back' and one button for "Home". Ng-if decides wheather to render the element in the DOM.

     <md-button id="cd4e96ca-a9b8-48b8-a333-63ab36d14bee" ng-if="stateParams.origin" class="md-button md-raised md-accent" ui-state="'ui.'+stateParams.origin" style="position: absolute; left: 79.2188px; top: 103px; width: 115.766px; height: 36px;">{{stateParams.origin}}</md-button>
    
        <md-button ng-if="!stateParams.origin" id="cd4e96ca-a9b8-48b8-a333-63ab36d14bee" class="md-button md-raised md-accent" ui-state="'ui.Page1'" style="position: absolute; left: 79.2188px; top: 103px; width: 115.766px; height: 36px;">Home</md-button>
    
    

    Only 1 button will be rendered depending on if origin has a value or not.

    posted in User help read more
  • C
    CraigWeb

    I have a page with 5 watch lists and haven't had issues. My code looks like this :

    <ma-watch-list-get ng-model="designer.KNZ" parameters="designer.KNZ.parameters" on-points-change="designer.KNZ.points = $points" id="KNZ_ID" watch-list-xid="KNZQueryWL"  ></ma-watch-list-get>
    <ma-watch-list-get ng-model="designer.MAT" parameters="designer.MAT.parameters" on-points-change="designer.MAT.points = $points" id="MAT_ID" watch-list-xid="MATQueryWL"  ></ma-watch-list-get>
    <ma-watch-list-get ng-model="designer.WR" parameters="designer.WR.parameters" on-points-change="designer.WR.points = $points" id="WR_ID" watch-list-xid="WRQueryWL"  ></ma-watch-list-get>
    <ma-watch-list-get ng-model="designer.FM" parameters="designer.FM.parameters" on-points-change="designer.FM.points = $points" id="FM_ID" watch-list-xid="flowQueryWL"  ></ma-watch-list-get>
    <ma-watch-list-get ng-model="designer.KAR" parameters="designer.KAR.parameters" on-points-change="designer.KAR.points = $points" id="KAR_ID" watch-list-xid="KARQueryWL"  ></ma-watch-list-get>```

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • C
    CraigWeb

    Hi Craig

    you can add a suffix to your points if the unit you need is not in the list.
    0_1537964379345_units.png

    posted in User help read more
  • C
    CraigWeb

    Hi @iperry

    Do you plan on dynamically editing the SVG to add more elements or dynamically adding SVG's to the page.
    Not sure how you have structured your SVG and if new sensors have a relation to the existing sensors ie: connecting pipes or lines ect.

    You could do a ng-repeat and dynamically add smaller SVG's for each sensors data that comes from the pages query.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • C
    CraigWeb

    Hi chrapchp

    In order to make a new drop down you click on the orange + sign on edit menu and create a Menu item that with No content (folder only) chosen. As in the pic below.0_1541228545312_Screenshot 2018-11-03 at 08.56.38.png

    In order to put a custom page in that folder you. need to create a new menu item by clicking on the orange + sign again. This time you need to choose Link to custom page and choose you custom page from the drop down. In order to get the new custom page under the new drop down. you need to select correct parent item.
    0_1541228605702_Screenshot 2018-11-03 at 08.57.43.png

    Nothing is changed until you press the save button.
    0_1541228744161_Screenshot 2018-11-03 at 09.05.29.png

    posted in User help read more
  • C
    CraigWeb

    Excuse me for budding in, I think only IAS staff can really help you here...I'm just wondering are the permissions on the main server that get changed to null different to the permissions on the local mango? i.e. are the permissions on the local server also null and then that null permission is getting sent to the main server...
    Good Luck.

    posted in User help read more
  • C
    CraigWeb

    @pedro said in Script error: TypeError: Cannot read property "get" from undefined multistate:

    var bulk = 1;
    var stagePastDay = stage.past(DAY);
    var bulkHours = stagePastDay.data.get(bulk).runtime / (10006060);
    return bulkHours;

    The example on the help documents for the .get() is
    return b.past(MONTH, 2).get(false).proportion;
    try remove the .data on your .get call. 0_1541676206564_Screenshot 2018-11-08 at 13.22.36.png

    posted in Scripting general Discussion read more
  • C
    CraigWeb

    Hi Sean

    I'm not sure exactly what you asking. If you want to embed custom page into another custom page. You can use the following code. The XID will be the custom page XID you can find it in the file store.
    <ma-ui-page-view xid="7502a126-a683-42c5-9b2a-1d831bfccd8f" flex layout="column"></ma-ui-page-view>

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • C
    CraigWeb

    HI @bullitbd

    I used your rangeValues and was able to reproduce your problem. On the data point details page of that point you get the same problem...

    To fix it I changed the ranges as follows;
    from:1
    to:1
    ---->
    From: 0.9
    To: 1.9

    posted in Mango Automation general Discussion read more
  • C
    CraigWeb

    Hi @sky_watcher

    It is definitely possible. You will need to make a custom template tho. Have a look at this link. https://help.infiniteautomation.com/custom-email-templates/?rq=email
    You will be able to add additional points and access the names and value properties in your template.

    posted in Mango Automation read more
  • C
    CraigWeb

    Hi @joeselbiyoyo

    Firstly your data source is set to update at 5-minute intervals. You could reduce this to 5-10 seconds.
    your data points are logging the average at 1-minute intervals. There will only be one value to average out. So there will be 5 values that are the same in a 5 min period.

    you are then reporting the 1-hour average of these values smoothing them out even further.

    I would try the following:

    1.change the data source to 5-second poll rate.
    2.change data point logging to instant

    posted in Development general discussion read more
  • C
    CraigWeb

    Hi @bullitbd

    The following functions are available in the scripting enviroment. So you could use a meta point to watch if your process is running and then enable the relevant data source. then disable it when the process is not running. Data sources do take some time to start so you might need to look at how you could get a signal before the process starts.

    isDataSourceEnabled(xid)
    xid - Xid for a data source return true if enabled false if not or DNE

    enableDataSource(xid)
    xid - Xid for a data source, return status

    disableDataSource(xid)
    xid - Xid for a data source, return status

    isDataPointEnabled(xid)
    xid - Xid for a data point return true if enabled false if not or DNE or User does not have permissions

    posted in Development general discussion read more
  • C
    CraigWeb

    Hi Ramhuzani

    I see how that message can be misleading. You will need to look in your ma.log file to see what error you are getting.
    If you go to system settings --> email settings you can confirm your SMTP server setting and test it from there. Then have a look at your ma.log file to see if it is an authentication failure or host failer etc.
    Note that it will send a test email to the email address of the user logged in. So you will need to make sure your user has an email address.

    posted in User help read more