Incorporate feedback

- Empty function removed
- Placeholder and Maxlength restored
- Validation improved
- Typo fixed
This commit is contained in:
Björn Heinrichs 2021-08-13 11:32:01 +02:00 committed by GitHub
parent 389fd158ad
commit ba7bb57ca2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 8 deletions

View File

@ -1,4 +1,4 @@
const migrate_name = 'scream-domain';
const migrate_name = 'stream_domain';
const logger = require('../logger').migrate;
/**

View File

@ -21,9 +21,19 @@
"maximum": 65535
},
"forwarding_host": {
"type": "string",
"minLength": 1,
"maxLength": 255
"oneOf": [
{
"$ref": "../definitions.json#/definitions/domain_name"
},
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
}
]
},
"forwarding_port": {
"type": "integer",

View File

@ -15,7 +15,7 @@
<div class="col-sm-8 col-md-8">
<div class="form-group">
<label class="form-label"><%- i18n('streams', 'forwarding-host') %><span class="form-required">*</span></label>
<input type="text" name="forwarding_host" class="form-control text-monospace" value="<%- forwarding_host %>" autocomplete="off" required>
<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>
</div>
</div>
<div class="col-sm-4 col-md-4">

View File

@ -76,9 +76,6 @@ module.exports = Mn.View.extend({
}
},
onRender: function () {
},
initialize: function (options) {
if (typeof options.model === 'undefined' || !options.model) {
this.model = new StreamModel.Model();