Skip to content

Commit ba7bb57

Browse files
Incorporate feedback
- Empty function removed - Placeholder and Maxlength restored - Validation improved - Typo fixed
1 parent 389fd15 commit ba7bb57

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

backend/migrations/20210423103500_stream_domain.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const migrate_name = 'scream-___domain';
1+
const migrate_name = 'stream_domain';
22
const logger = require('../logger').migrate;
33

44
/**

backend/schema/endpoints/streams.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,19 @@
2121
"maximum": 65535
2222
},
2323
"forwarding_host": {
24-
"type": "string",
25-
"minLength": 1,
26-
"maxLength": 255
24+
"oneOf": [
25+
{
26+
"$ref": "../definitions.json#/definitions/domain_name"
27+
},
28+
{
29+
"type": "string",
30+
"format": "ipv4"
31+
},
32+
{
33+
"type": "string",
34+
"format": "ipv6"
35+
}
36+
]
2737
},
2838
"forwarding_port": {
2939
"type": "integer",

frontend/js/app/nginx/stream/form.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<div class="col-sm-8 col-md-8">
1616
<div class="form-group">
1717
<label class="form-label"><%- i18n('streams', 'forwarding-host') %><span class="form-required">*</span></label>
18-
<input type="text" name="forwarding_host" class="form-control text-monospace" value="<%- forwarding_host %>" autocomplete="off" required>
18+
<input type="text" name="forwarding_host" class="form-control text-monospace" placeholder="example.com or 10.0.0.1 or 2001:db8:3333:4444:5555:6666:7777:8888" value="<%- forwarding_host %>" autocomplete="off" maxlength="255" required>
1919
</div>
2020
</div>
2121
<div class="col-sm-4 col-md-4">

frontend/js/app/nginx/stream/form.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ module.exports = Mn.View.extend({
7676
}
7777
},
7878

79-
onRender: function () {
80-
},
81-
8279
initialize: function (options) {
8380
if (typeof options.model === 'undefined' || !options.model) {
8481
this.model = new StreamModel.Model();

0 commit comments

Comments
 (0)