This repository has been archived by the owner on Feb 7, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialog_new_connection.html
101 lines (87 loc) · 3.51 KB
/
dialog_new_connection.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="./node_modules/animate.css/animate.min.css">
</head>
<body class="bg-light" style="padding-top: 20px;">
<title>New Connection</title>
<div class="container text-center">
<div class="container col-sm-10">
<h4>Select connection type</h4>
</div>
<div class="row">
<div class="container text-center col-sm-10">
<button id="btnCanal" type="button" class="btn btn-sm btn-warning"><strong>canal</strong></button>
<button id="btnTcpip" type="button" class="btn btn-sm btn-warning"><strong>tcp/ip</strong></button>
<button id="btnWebsocket" type="button"
class="btn btn-sm btn-warning"><strong>websockets</strong></button>
<button id="btnRest" type="button" class="btn btn-sm btn-warning"><strong>rest</strong></button>
</div>
</div>
<div class="row">
</div>
<div class="row">
<div class="container text-left col-lg-6">
<p>
<kbd>CANAL</kbd> - Interface CANAL hardware drivers (dl/dll).
</p>
<p>
<kbd>tcp/ip</kbd> - Connect to a VSCP daemon or other device that export the the VSCP tcp/ip
interface.
</p>
<p>
<kbd>websocket</kbd> - Connect to VSCP daemon or other device that export the websocket interface.
</p>
<p>
<kbd>rest</kbd> - Connect to a VSCP daemon or other device that export the VSCP rest interface.
</p>
</div>
</div>
</div>
<!-- Bootstrap Optional JavaScript -->
<!-- jQuery first, then popper.js, then Bootstrap JS -->
<script>let $ = jQuery = require('./node_modules/jquery/dist/jquery.min.js');</script>
<script>require('./node_modules/@popperjs/core/dist/cjs/popper.js');</script>
<script>require('./node_modules/bootstrap/dist/js/bootstrap.min.js');</script>
</body>
<script>
let valSelected = '';
const { remote, ipcRenderer } = require('electron');
const { app } = remote;
$(document).ready(function ($) {
// CANAL driver
$("#btnCanal").on('click', function (e) {
e.preventDefault();
valSelected = "canal";
ipcRenderer.send("dialog-close", valSelected);
remote.getCurrentWindow().close();
});
// tcpip driver
$("#btnTcpip").on('click', function (e) {
e.preventDefault();
valSelected = 'tcpip';
ipcRenderer.send("dialog-close", valSelected);
remote.getCurrentWindow().close();
});
// websocket driver
$("#btnWebsocket").on('click', function (e) {
e.preventDefault();
valSelected = "websocket"
ipcRenderer.send("dialog-close", valSelected);
remote.getCurrentWindow().close();
});
// REST driver
$("#btnRest").on('click', function (e) {
e.preventDefault();
valSelected = "rest"
ipcRenderer.send("dialog-close", valSelected);
remote.getCurrentWindow().close();
});
});
</script>
</html>