• Jared Wiltshire

    @matwolff I reviewed the help article and it looks correct to me. I did however add a section on using token authentication which has been available since v3.3.0, this may interest you.

    posted in User help read more
  • Jared Wiltshire

    @Phillip-Weeks yes its already available and usable. You just need to call the .enable() method for a point object.

    Here's an example

    <div class="ma-designer-root" id="379e6c43-3a47-4ea8-8d92-b999b6b25179" style="width: 1366px; height: 768px; position: relative;">
        <ma-get-point-value point-xid="voltage" point="myPoint"></ma-get-point-value>
        <ma-point-value id="62b0861d-53ef-4bab-ae69-825f60e3042c" enable-popup="hide" style="position: absolute; left: 210px; top: 100px;" point="myPoint"></ma-point-value>
        <md-button id="dc9944e5-bd98-48ff-aa2c-c99db8416012" class="md-raised md-primary" style="position: absolute; left: 170px; top: 208px;" ng-click="myPoint.enable()" ng-disabled="myPoint.enabled">
            <span>Enable</span>
        </md-button>
        <md-button id="cdba29de-31a5-473d-bf07-025effa6b55b" class="md-raised md-warn" style="position: absolute; left: 274px; top: 208px;" ng-click="myPoint.enable(false)" ng-disabled="!myPoint.enabled">
            <span>Disable</span>
        </md-button>
        <md-button id="276622a1-9238-4e0d-891e-589adb856b9f" class="md-raised" style="position: absolute; left: 378px; top: 208px;" ng-click="myPoint.enable(!myPoint.enabled)">
            <span>Toggle</span>
        </md-button>
    </div>
    

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

    @ordosays Can you please copy the full URL which is failing with the 400 Bad Request error and paste it here so I can see the full parameters (they are truncated in your image).

    Also there should definitely be more messages in your ma.log (I would expect the error in the REST API code to be logged and also the client side error should have been sent to the backend and logged). Can you post the full log file or send it to me privately.

    Can you please post your exact version numbers of -

    • Core
    • API module (mangoApi)
    • UI module (mangoUI)

    posted in User help read more
  • Jared Wiltshire

    @john-beer You could use a animated gif if you want to use the switch <ma-switch-img> component.

    Alternatively you could just style a div to look like a LED indicator using CSS. Here's an example. You can put everything between the <style> tags into a user style sheet if you want to re-use it on multiple pages (Administration, UI settings, User stylesheet URL).

    <div class="ma-designer-root" id="1b41b158-5dab-4cb8-8981-1f8861f58bcd" style="width: 1366px; height: 768px; position: relative;">
        
        <ma-get-point-value point-xid="binary" point="binaryPoint"></ma-get-point-value>
        
        <div id="eb9bf90f-9ca2-41f2-9eb1-755b5840c061" style="position: absolute; left: 172px; top: 40px; width: 50px; height: 50px;" class="led" ng-class="{'led-blink': binaryPoint.value}" ng-style="{'background-color': binaryPoint.value ? 'rgb(0, 255, 0)' : 'rgb(255, 0, 0)'}">
            <div class="led-inner"></div>
        </div>
        
        <div id="20040fcf-9884-4eb6-8e8d-43bf4f5e0a68" style="position: absolute; left: 262px; top: 40px; width: 50px; height: 50px; background-color: rgb(0, 255, 0);" class="led" ng-class="{'led-blink': binaryPoint.value}">
            <div class="led-inner"></div>
        </div>
    </div>
    
    <style>
    
    .led {
        border: 5px solid grey;
        border-radius: 50%;
        overflow: hidden;
        box-shadow: 5px 5px 5px rgba(30,30,30,0.7);
    }
    
    .led-inner {
        height: 100%;
        width: 100%;
        border-radius: inherit;
    }
    
    .led-inner:after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(rgba(255,255,255,0.3),rgba(0,0,0,0.3));
    }
    
    .led-blink .led-inner {
        animation: led-blink 1s ease-in-out infinite;
    }
    
    @keyframes led-blink {
        0% {
            background-color: rgba(0,0,0,0);
        }
        50% {
            background-color: rgba(0,0,0,1);
        }
    }
    
    </style>
    

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

    @timkk880 FYI by default it uses locale aware formatting. You can try changing the system wide locale (under system settings, language settings), or just change your user's locale.

    posted in Mango Automation general Discussion read more
  • Jared Wiltshire

    @pascal are you talking about Excel reports?

    The cron expression should be evaluated against the server timezone AFAIK (it uses the timezone from the OS/JVM by default, you can override this in your env.properties file).
    Are you sure you don't have your server timezone set to UTC?

    @pascal said in Use of CRON to schedule reports.:

    What is the behavior of the CRON expression when DST (daylight saving time) adjustments apply

    Good question. Our cron code is based on the Quartz scheduling library v2.1.0, so this should help -
    http://www.quartz-scheduler.org/documentation/faq.html#FAQ-daylightSavings

    Of course if its actually evaluating the expressions as UTC time then there is no DST.

    posted in Scripting general Discussion read more
  • Jared Wiltshire

    @JoHn-Beer I moved your post to a new topic. Please create a new topic when you ask new questions, it helps everyone (including us at IAS) find it.

    @john-beer said in Help with ma-switch-img:

    If the value is true, show the green light. If the value is false, show the red light.If the value is default, show the grey light

    The markup you posted looks correct for what you have described, except that if it is a binary data point then the value is always true or false, there is no scenario where the default would be shown (except before any point values are polled and there is no value).

    @john-beer said in Help with ma-switch-img:

    I want the light to blink between green and gray.Where do I set it? Or any component that works the way I want it?

    When do you want it to blink between green and grey? When the point value is true?

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

    @ordosays said in Charts disappear in watch list:

    I made sure to update all modules as soon as this started happening. no effect. Looking at the log, the only non-modbus error I'm seeing is this.

    That is unrelated. Thanks for posting the log.

    Can you answer my previous question -

    How do you know that the points are storing data to the H2 database? Are you using our TSDB (mangoNoSqlDatabase module)?

    @ordosays said in Charts disappear in watch list:

    Post restart, same issue, same errors. The machine is a raspi running raspian that I'm administering over ssh. I'm honestly not sure what I'm doing wrong.

    That is strange that a fresh install is playing up. Did you change anything in env.properties? Is it the free version of Mango?

    posted in User help read more