From f6dbb7839777cb82faac65654fe6a775f95cb02b Mon Sep 17 00:00:00 2001 From: Marc Hagen Date: Mon, 15 Feb 2021 20:31:25 +0100 Subject: [PATCH] Ability to change the host port. --- CHANGELOG.md | 3 +++ index.js | 13 +++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3218e9c..6522482 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- ## [Unreleased] +## New Features +* Ability to change the host port. + --- ## [1.0.5] (2021-02-12) diff --git a/index.js b/index.js index eb7994a..a8a0be0 100644 --- a/index.js +++ b/index.js @@ -266,6 +266,14 @@ class EpiphanPearl extends instanceSkel { default: '127.0.0.1', regex: this.REGEX_IP, }, + { + type: 'textinput', + id: 'host_port', + label: 'Target Port', + width: 6, + default: '80', + regex: this.REGEX_PORT, + }, { type: 'textinput', id: 'username', @@ -278,7 +286,7 @@ class EpiphanPearl extends instanceSkel { id: 'password', label: 'Password', width: 6, - default: 'changeme', + default: '', }, ]; } @@ -606,7 +614,8 @@ class EpiphanPearl extends instanceSkel { }) { const self = this; const apiHost = this.config.host, - baseUrl = 'http://' + apiHost + ':8850'; + apiPort = this.config.host_port, + baseUrl = 'http://' + apiHost + ':' + apiPort; if (url === null || url === '') { this._setStatus(this.STATUS_ERROR, 'No URL given for _sendRequest');