Statistics
| Branch: | Tag: | Revision:

mongoose / examples / connected_device_4 / web_root / index.shtml @ eaef5bd1

History | View | Annotate | Download (1.44 KB)

1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
  <meta charset="utf-8" />
5
  <title>Connected device demo</title>
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
  <link rel="stylesheet" type="text/css" href="style.css">
8
  <script type="text/javascript" src="jquery-1.11.3.min.js"></script>
9
  <script src="jquery.flot.min.js"></script>
10
  <script src="jquery.flot.time.js"></script>
11
  <script type="text/javascript" src="main.js"></script>
12
</head>
13
<body>
14
  <div class="content">
15
    <img src="logo.png" style="float:right; height: 50px; border-radius: 3px;">
16
    <h1>Connected device demo - Websocket push</h1>
17

    
18
    <p>
19
      This page is one of the series of examples that show how to make
20
      devices connected with Mongoose. Here we add a real-time Websocket
21
      server push, and update dashboard graph as data arrives.
22
    </p>
23

    
24
    <h1>Settings section</h1>
25
    <form method="POST" action="/save">
26
      <fieldset>
27
        <legend>Device settings</legend>
28
        <label>Setting 1:</label> <input type="text"
29
          name="setting1" value="<!--#call setting1 -->" >
30
        <label>Setting 2:</label> <input type="text"
31
          name="setting2" value="<!--#call setting2 -->" >
32

    
33
        <div>
34
          <button type="submit">Save Settings</button>
35
        </div>
36

    
37
      </fieldset>
38
    </form>
39

    
40
    <h1>Dashboard section</h1>
41
    <label>CPU usage:</label> <span id="cpu_usage">&nbsp;</span>
42
    <div id="graphs"></div>
43

    
44
  </div>
45
</body>
46
</html>