-
Notifications
You must be signed in to change notification settings - Fork 6
/
ssh.html
executable file
·110 lines (89 loc) · 3.36 KB
/
ssh.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
102
103
104
105
106
107
108
109
110
<script type="text/javascript">
RED.nodes.registerType('ssh-conf',{
category: 'config',
defaults: {
ssh: { value: "" },
name: { value: "" },
userlabel: { value: "" }
},
credentials: {
username: { type: "text" },
password: { type: "password" },
hostname: { value: "" },
port: { value: "22" },
},
//color: '#7fff00',
label: function () {
return this.userlabel;
},
oneditsave: function(d) {
//let u = $("#node-config-input-name").val();
//let h = $("#node-config-input-hostname").val();
//this.userlabel = (u?u+"@":"")+ (h?h:"");
this.userlabel = $("#node-config-input-name").val();
}
});
</script>
<script type="text/html" data-template-name="ssh-conf">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> name</label>
<input type="text" id="node-config-input-name" placeholder="127.0.0.1">
</div>
<div class="form-row">
<label for="node-config-input-hostname"><i class="fa fa-desktop"></i> Hostname</label>
<input type="text" id="node-config-input-hostname" placeholder="127.0.0.1">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="fa fa-random"></i> Port</label>
<input type="text" id="node-config-input-port" placeholder="set default (22) or another port">
</div>
<div class="form-row">
<label for="node-config-input-username"><i class="fa fa-user"></i> Username</label>
<input type="text" id="node-config-input-username" placeholder="$USER">
</div>
<div class="form-row">
<label for="node-config-input-password"><i class="fa fa-key"></i> Password</label>
<input type="password" id="node-config-input-password" placeholder="$PASS">
</div>
<div class="form-row">
<label for="node-config-input-ssh"><i class="fa fa-podcast"></i> Ssh</label>
<input type="text" id="node-config-input-ssh" placeholder="/home/user/.ssh/id_rsa">
</div>
</script>
<script type="text/x-red" data-help-name="ssh-conf">
<p> ssh configuration</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('ssh-v3', {
category: 'server',
color: '#7fff00',
defaults: {
name: { value: "" },
conf: { value: "", type: "ssh-conf" },
debug: { value: false },
},
inputs: 1,
outputs: 1,
icon: "font-awesome/fa-server",
label: function () {
return this.name || "ssh-v3";
}
});
</script>
<script type="text/x-red" data-template-name="ssh-v3">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-conf"><i class="fa fa-globe"></i> server</label>
<input type="text" id="node-input-conf">
</div>
<!-- <div class="form-row">
<label for="node-input-debug"><i class="fa fa-bug"></i> Debug</label>
<input type="checkbox" id="node-input-debug" placeholder="">
</div> -->
</script>
<script type="text/x-red" data-help-name="ssh-v3">
<p>ssh connection</p>
</script>