-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
159 lines (142 loc) · 6.02 KB
/
Copy pathindex.html
File metadata and controls
159 lines (142 loc) · 6.02 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<script type="text/html" data-template-name="viteyss-config">
<div class="form-row">
<label for="node-config-input-iname">Name</label>
<input type="text" id="node-config-input-iname">
</div>
<div class="form-row">
<label for="node-config-input-hostpublicip">Host public ip</label>
<input type="text" id="node-config-input-hostpublicip" style="width:30%">
</div>
<div class="form-row">
<label for="node-config-input-runhttps">
As ssl
</label>
<input type="checkbox" id="node-config-input-runhttps"
placeholder="as https and wss ..."
style="margin-left: 10px; vertical-align: text-bottom; width: auto;"
>
</div>
<div class="form-row">
<label for="node-config-input-host">Http(s) bind</label>
<input type="text" id="node-config-input-host" style="width:30%"> :
<input type="text" id="node-config-input-port" style="width:10%">
</div>
<div class="form-row">
<label for="node-config-input-wshost">WebSocket bind</label>
<input type="text" id="node-config-input-wshost" style="width:30%"> :
<input type="text" id="node-config-input-wsport" style="width:10%">
</div>
<div class="form-row">
<label for="node-config-input-pathtoyss">Path to yss</label>
<input type="text" id="node-config-input-pathtoyss"><br>
<small>live blank so will use node-yss</small>
</div>
<div class="form-row">
<label for="node-config-input-sitesopts">Sites source</label>
<input type="text" id="node-config-input-sitesopts"><br>
<small>so it will add it to sites collection so serve</small>
</div>
<div class="form-row">
<label for="node-config-input-pathstosites">Other sites sources</label>
<input type="text" id="node-config-input-pathstosites"><br>
<small>separator for paths is ","</small>
</div>
<!--
<div class="form-row">
<label for="node-config-input-ysswsurl">WS visible at</label>
<input type="text" id="node-config-input-ysswsurl">
</div>
-->
</script>
<script type="text/html" data-help-name="viteyss-config">
is help
</script>
<script type="text/javascript">
RED.nodes.registerType('viteyss-config',{
category: 'config',
defaults: {
iname: {value:""},
hostpublicip: { value: "localhost" },
runhttps: { value: false },
host: {value:"localhost",required:true},
port: {value:8083,required:true},
wshost: {value:"localhost",required:true},
wsport: {value:3999,required:true},
pathstosites: {value:""},
pathtoyss: {value:""},
//ysswsurl: {value:"ws://localhost:3999/", required:true},
sitesopts: {value: ["plugins","node-yss","viteyss/sites","node-red","home"]},
},
label: function() {
return this.iname+' '+(this.runhttps?'(s) ':'')+this.host+":"+this.port;
},
getOnlyIname: function(){
return this.iname||'not set';
},
oneditprepare: function(){
$("#node-config-input-sitesopts").typedInput({
types: [
{
value: ["plugins","node-yss","viteyss/sites","node-red","home"],
multiple: "true",
options: [
{ value: "plugins", label: "plugins viteyss-site-..." },
{ value: "node-yss", label: "node-yss / sites" },
{ value: "viteyss/sites", label: "viteyss / sites" },
{ value: "node-red", label: "[~/.node-red]/sites" },
{ value: "home", label: "~/.viteyss/sites" },
/*{ value: "apple", label: "Apple"},
{ value: "banana", label: "Banana"},
{ value: "cherry", label: "Cherry"},*/
]
}
]
});
$("#node-config-input-sitesopts").typedInput('value',["plugins","node-yss","viteyss/sites","node-red","home"]);
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('viteyss-instance',{
category: 'ot',
defaults: {
name: { value:"" },
server: {
//value:""//
type:"viteyss-config"
}
},
icon: "ico_viteyss_32.png",
inputs: 1,
outputs: 1,
label: function() {
//console.log('this.config.serer------------------------------');
//console.log('this.config.serer',this.config);
return this.name || this.server.getIname() |this.iname || "viteyss - [no name]";
}
});
</script>
<script type="text/html" data-template-name="viteyss-instance">
<div class="form-row">
<label for="node-input-name">Name</label>
<input type="text" id="node-input-name">
</div>
<div class="form-row">
<label for="node-input-server">Server settings</label>
<input type="text" id="node-input-server">
</div>
</script>
<script type="text/html" data-help-name="viteyss-instance">
<p>Wrapper for viteyss. It hosts yss. <br>
- <a href="https://github.com/yOyOeK1/viteyss/tree/main/wikiSites">small wiki link ...</a><br><br>
- <a href="https://github.com/yOyOeK1/viteyss">viteyss link ...</a><br>
- <a href="https://github.com/yOyOeK1/oiyshTerminal/wiki/otdm-yss">Wiki otdm-yss link ...</a><br>
- <a href="https://github.com/yOyOeK1/oiyshTerminal/wiki/otdm-yss#otdm-family">yss-* (family) ...</a>
</p>
<img src="resources/node-red-contrib-viteyss/ico_viteyss_32.png"><br>
<br>
<hr>
If you see that this makes sense [ <a href="https://ko-fi.com/B0B0DFYGS">send me a ☕</a> ] |
[Master repository](https://github.com/yOyOeK1/oiyshTerminal) |
[About SvOiysh](https://www.youtube.com/@svoiysh)
</script>