March 2018
Beginner to intermediate
410 pages
10h 40m
English
We also want to add a simple web interface to the actuator. It will just display the current state and provide a button we can use to toggle the state of the output. Note that we can embed HTML seamlessly into the Markdown to accomplish this. We embed the current value in a SPAN element with an id attribute, so that we can access it easily from JavaScript:
Title: Actuator Author: Peter Waher Description: This page displays the current state of the actuator. Cache-Control: max-age=0, no-cache, no-store CSS: Main.css Javascript: ToggleOutput.js Current state ============================ Output is currently turned **<span id='OutputState'>{ActuatorHttp.App.Output}</span>** <button onclick='ToggleOutput();'>Toggle ...Read now
Unlock full access