From ba7bb57ca257e570de3ff6d341e220b846a7e8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Heinrichs?= Date: Fri, 13 Aug 2021 11:32:01 +0200 Subject: [PATCH] Incorporate feedback - Empty function removed - Placeholder and Maxlength restored - Validation improved - Typo fixed --- .../migrations/20210423103500_stream_domain.js | 2 +- backend/schema/endpoints/streams.json | 16 +++++++++++++--- frontend/js/app/nginx/stream/form.ejs | 2 +- frontend/js/app/nginx/stream/form.js | 3 --- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/backend/migrations/20210423103500_stream_domain.js b/backend/migrations/20210423103500_stream_domain.js index 8e415e71..a894ca5e 100644 --- a/backend/migrations/20210423103500_stream_domain.js +++ b/backend/migrations/20210423103500_stream_domain.js @@ -1,4 +1,4 @@ -const migrate_name = 'scream-domain'; +const migrate_name = 'stream_domain'; const logger = require('../logger').migrate; /** diff --git a/backend/schema/endpoints/streams.json b/backend/schema/endpoints/streams.json index 4083faa3..7d4878a8 100644 --- a/backend/schema/endpoints/streams.json +++ b/backend/schema/endpoints/streams.json @@ -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", diff --git a/frontend/js/app/nginx/stream/form.ejs b/frontend/js/app/nginx/stream/form.ejs index a95e61c4..eb80c373 100644 --- a/frontend/js/app/nginx/stream/form.ejs +++ b/frontend/js/app/nginx/stream/form.ejs @@ -15,7 +15,7 @@
- +
diff --git a/frontend/js/app/nginx/stream/form.js b/frontend/js/app/nginx/stream/form.js index 3a4f1ea2..be8fc8bc 100644 --- a/frontend/js/app/nginx/stream/form.js +++ b/frontend/js/app/nginx/stream/form.js @@ -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();