-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.html
81 lines (79 loc) · 3.84 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="Andras Barthazi">
<title>mcumgr web</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/mcumgr.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css" rel="stylesheet">
<meta name="theme-color" content="#563d7c">
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#">
<span id="device-name">Connect your device</span>
</a>
</nav>
<main role="main" class="container">
<div class="starter-template">
<h1>mcumgr web</h1>
<div class="content" id="initial-screen">
<div class="alert alert-primary" role="alert" id="bluetooth-is-available">
<b><span id="bluetooth-is-available-message"></span></b>
This tool is compatible with desktops (or laptops) with the <b>latest Chrome, Opera and Edge</b> browsers, and working
Bluetooth connection (most laptops have them these days). You can also try it from Chrome on Android, or Bluefy on iOS/iPadOS.
</div>
<div id="connect-block" style="display: none;">
<div class="form-group form-inline">
<div class="col-auto">
<input id="device-name-input" type="text" class="form-control" id="device-name-input" placeholder="Device name (optional)">
</div>
<div class="col-auto">
<button id="button-connect" type="submit" class="btn btn-primary"><i class="bi-bluetooth"></i> Connect</button>
</div>
</div>
</div>
</div>
<div class="content" id="connecting-screen" style="display: none;">
<div class="alert alert-primary" role="alert">
Connecting...
</div>
</div>
<div class="content" id="connected-screen" style="display: none;">
<div class="container">
<div>
<button id="button-echo" type="submit" class="btn btn-primary"><i class="bi-soundwave"></i> Echo</button>
<button id="button-disconnect" type="submit" class="btn btn-secondary"><i class="bi-x-square"></i> Disconnect</button>
<button id="button-reset" type="submit" class="btn btn-info"><i class="bi-arrow-clockwise"></i> Reset</button>
</div>
<hr />
<h3>Images</h3>
<div id="image-list"></div>
<div>
<button id="button-image-state" type="submit" class="btn btn-info"><i class="bi-arrow-down-circle"></i> Refresh</button>
<button id="button-erase" type="submit" class="btn btn-warning"><i class="bi-eraser-fill"></i> Erase</button>
<button id="button-test" type="submit" class="btn btn-primary" disabled><i class="bi-question-square"></i> Test</button>
<button id="button-confirm" type="submit" class="btn btn-success" disabled><i class="bi-check2-square"></i> Confirm</button>
</div>
<hr />
<h3>Image Upload</h3>
<div class="form-group">
<input type="file" class="form-control" id="file-image" />
</div>
<div class="image">
<div class="form-group">
<div id="file-status">Select image file (.img)</div>
<div id="file-info"></div>
</div>
<button class="btn btn-primary" id="file-upload" disabled><i class="bi-upload"></i> Upload</button>
</div>
</div>
</div>
</div>
<script src="js/cbor.js"></script>
<script src="js/mcumgr.js?v=6"></script>
<script src="js/index.js?v=6"></script>
</main>