Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (1.38 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 type="text/javascript" src="main.js"></script>
10
</head>
11
<body>
12
  <div class="content">
13
    <img src="logo.png" style="float:right; height: 50px; border-radius: 3px;">
14
    <h1>Connected device demo - RESTful call</h1>
15

    
16
    <p>
17
      This page is one of the series of examples that show how to make
18
      devices connected with Mongoose. Here we add a RESTful call
19
      to the Mongoose to show CPU usage stats on a dashboard.
20
      RESTful call is done using Jquery's <code>ajax</code> call.
21
    </p>
22

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

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

    
36
      </fieldset>
37
    </form>
38

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

    
42
  </div>
43
</body>
44
</html>