From 0d0e5295f40d1d0a46dbe2e8daaddfc3530213db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 01:21:03 +0000 Subject: [PATCH 01/20] Bump json-schema from 0.2.5 to 0.4.0 in /docs Bumps [json-schema](https://github.com/kriszyp/json-schema) from 0.2.5 to 0.4.0. - [Release notes](https://github.com/kriszyp/json-schema/releases) - [Commits](https://github.com/kriszyp/json-schema/compare/v0.2.5...v0.4.0) --- updated-dependencies: - dependency-name: json-schema dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- docs/package.json | 2 +- docs/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/package.json b/docs/package.json index bd78e883a..dc28e5a0b 100644 --- a/docs/package.json +++ b/docs/package.json @@ -357,7 +357,7 @@ "jsbn": "^1.1.0", "jsesc": "^3.0.1", "json-parse-better-errors": "^1.0.2", - "json-schema": "^0.2.5", + "json-schema": "^0.4.0", "json-schema-traverse": "^0.4.1", "json-stringify-safe": "^5.0.1", "json3": "^3.3.3", diff --git a/docs/yarn.lock b/docs/yarn.lock index c051c9436..a6e319c5a 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -5719,10 +5719,10 @@ json-schema@0.2.3: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= -json-schema@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.5.tgz#97997f50972dd0500214e208c407efa4b5d7063b" - integrity sha512-gWJOWYFrhQ8j7pVm0EM8Slr+EPVq1Phf6lvzvD/WCeqkrx/f2xBI0xOsRRS9xCn3I4vKtP519dvs3TP09r24wQ== +json-schema@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" From eed40d095ea3ecf6322afcde22742f32696eedc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 01:22:20 +0000 Subject: [PATCH 02/20] Bump is-svg from 4.2.2 to 4.3.0 in /docs Bumps [is-svg](https://github.com/sindresorhus/is-svg) from 4.2.2 to 4.3.0. - [Release notes](https://github.com/sindresorhus/is-svg/releases) - [Commits](https://github.com/sindresorhus/is-svg/compare/v4.2.2...v4.3.0) --- updated-dependencies: - dependency-name: is-svg dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- docs/yarn.lock | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/yarn.lock b/docs/yarn.lock index c051c9436..967723799 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4117,6 +4117,13 @@ fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-xml-parser@^3.19.0: + version "3.21.1" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz#152a1d51d445380f7046b304672dd55d15c9e736" + integrity sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg== + dependencies: + strnum "^1.0.4" + fastq@^1.6.0: version "1.8.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" @@ -5535,11 +5542,11 @@ is-svg@^3.0.0: html-comment-regex "^1.1.0" is-svg@^4.2.1: - version "4.2.2" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-4.2.2.tgz#a4ea0f3f78dada7085db88f1e85b6f845626cfae" - integrity sha512-JlA7Mc7mfWjdxxTkJ094oUK9amGD7gQaj5xA/NCY0vlVvZ1stmj4VX+bRuwOMN93IHRZ2ctpPH/0FO6DqvQ5Rw== + version "4.3.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-4.3.0.tgz#3e46a45dcdb2780e42a3c8538154d7f7bfc07216" + integrity sha512-Np3TOGLVr0J27VDaS/gVE7bT45ZcSmX4pMmMTsPjqO8JY383fuPIcWmZr3QsHVWhqhZWxSdmW+tkkl3PWOB0Nw== dependencies: - html-comment-regex "^1.1.2" + fast-xml-parser "^3.19.0" is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.3" @@ -9085,6 +9092,11 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +strnum@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" + integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== + stylehacks@^4.0.0, stylehacks@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" From 5edb16f36e33df9fdb78a3dd4f893c1082e64432 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Mon, 17 Jan 2022 21:46:26 +1000 Subject: [PATCH 03/20] Fix failing pip installs, downgrade setuptools --- docker/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index a976ade2c..378fffbfc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -46,6 +46,11 @@ RUN rm -rf /etc/services.d/frontend /etc/nginx/conf.d/dev.conf # Change permission of logrotate config file RUN chmod 644 /etc/logrotate.d/nginx-proxy-manager +# fix for pip installs +# https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1769 +RUN pip uninstall --yes setuptools \ + && pip install "setuptools==58.0.0" + VOLUME [ "/data", "/etc/letsencrypt" ] ENTRYPOINT [ "/init" ] From 821432263aa4059e9b64d7b2a2672a5db4821d81 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Wed, 19 Jan 2022 07:36:49 +1000 Subject: [PATCH 04/20] Update certbot-dns-transip plugin --- global/certbot-dns-plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global/certbot-dns-plugins.js b/global/certbot-dns-plugins.js index 3243aec23..35228e6a8 100644 --- a/global/certbot-dns-plugins.js +++ b/global/certbot-dns-plugins.js @@ -476,7 +476,7 @@ aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`, transip: { display_name: 'TransIP', package_name: 'certbot-dns-transip', - version_requirement: '~=0.3.3', + version_requirement: '~=0.4.3', dependencies: '', credentials: `dns_transip_username = my_username dns_transip_key_file = /etc/letsencrypt/transip-rsa.key`, From 96e034aa757d3a13dcec45a8081e3334d1e416fc Mon Sep 17 00:00:00 2001 From: Ivan Kristianto Date: Sun, 30 Jan 2022 22:47:42 +0700 Subject: [PATCH 05/20] Add search function for redirection --- frontend/js/app/nginx/redirection/main.ejs | 8 ++++ frontend/js/app/nginx/redirection/main.js | 50 ++++++++++++++++------ 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/frontend/js/app/nginx/redirection/main.ejs b/frontend/js/app/nginx/redirection/main.ejs index 4345a7e8e..90f92ebe2 100644 --- a/frontend/js/app/nginx/redirection/main.ejs +++ b/frontend/js/app/nginx/redirection/main.ejs @@ -3,6 +3,14 @@

Redirection Hosts

+ <% if (showAddButton) { %> Add Redirection Host diff --git a/frontend/js/app/nginx/redirection/main.js b/frontend/js/app/nginx/redirection/main.js index f45f9a079..8d1a5da9f 100644 --- a/frontend/js/app/nginx/redirection/main.js +++ b/frontend/js/app/nginx/redirection/main.js @@ -14,7 +14,28 @@ module.exports = Mn.View.extend({ list_region: '.list-region', add: '.add-item', help: '.help', - dimmer: '.dimmer' + dimmer: '.dimmer', + search: '.search-form', + query: 'input[name="source-query"]' + }, + + fetch: App.Api.Nginx.RedirectionHosts.getAll, + + showData: function(response) { + this.showChildView('list_region', new ListView({ + collection: new RedirectionHostModel.Collection(response) + })); + }, + + showError: function(err) { + this.showChildView('list_region', new ErrorView({ + code: err.code, + message: err.message, + retry: function () { + App.Controller.showNginxRedirection(); + } + })); + console.error(err); }, regions: { @@ -30,6 +51,17 @@ module.exports = Mn.View.extend({ 'click @ui.help': function (e) { e.preventDefault(); App.Controller.showHelp(App.i18n('redirection-hosts', 'help-title'), App.i18n('redirection-hosts', 'help-content')); + }, + + 'submit @ui.search': function (e) { + e.preventDefault(); + let query = this.ui.query.val(); + + this.fetch(['owner', 'certificate'], query) + .then(response => this.showData(response)) + .catch(err => { + this.showError(err); + }); } }, @@ -40,13 +72,11 @@ module.exports = Mn.View.extend({ onRender: function () { let view = this; - App.Api.Nginx.RedirectionHosts.getAll(['owner', 'certificate']) + view.fetch(['owner', 'certificate']) .then(response => { if (!view.isDestroyed()) { if (response && response.length) { - view.showChildView('list_region', new ListView({ - collection: new RedirectionHostModel.Collection(response) - })); + view.showData(response); } else { let manage = App.Cache.User.canManage('redirection_hosts'); @@ -64,15 +94,7 @@ module.exports = Mn.View.extend({ } }) .catch(err => { - view.showChildView('list_region', new ErrorView({ - code: err.code, - message: err.message, - retry: function () { - App.Controller.showNginxRedirection(); - } - })); - - console.error(err); + view.showError(err); }) .then(() => { view.ui.dimmer.removeClass('active'); From 83e09ad5a78a25164dac984b324f2f99e2031936 Mon Sep 17 00:00:00 2001 From: lug-gh Date: Sat, 5 Feb 2022 20:59:21 +0100 Subject: [PATCH 06/20] Update current year for footer Update current year for footer --- frontend/js/i18n/messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/js/i18n/messages.json b/frontend/js/i18n/messages.json index c18e9be20..5e8f59581 100644 --- a/frontend/js/i18n/messages.json +++ b/frontend/js/i18n/messages.json @@ -60,7 +60,7 @@ }, "footer": { "fork-me": "Fork me on Github", - "copy": "© 2021 jc21.com.", + "copy": "© 2022 jc21.com.", "theme": "Theme by Tabler" }, "dashboard": { From 30a9d3ae8db27c8e699ff224eb8d35b93ed3e9f4 Mon Sep 17 00:00:00 2001 From: Ivan Kristianto Date: Sat, 12 Feb 2022 10:38:15 +0700 Subject: [PATCH 07/20] Add search feature to proxy host --- frontend/js/app/nginx/proxy/main.ejs | 8 +++ frontend/js/app/nginx/proxy/main.js | 79 +++++++++++++++++++--------- 2 files changed, 61 insertions(+), 26 deletions(-) diff --git a/frontend/js/app/nginx/proxy/main.ejs b/frontend/js/app/nginx/proxy/main.ejs index a5114de61..42f437529 100644 --- a/frontend/js/app/nginx/proxy/main.ejs +++ b/frontend/js/app/nginx/proxy/main.ejs @@ -3,6 +3,14 @@

<%- i18n('proxy-hosts', 'title') %>

+ <% if (showAddButton) { %> <%- i18n('proxy-hosts', 'add') %> diff --git a/frontend/js/app/nginx/proxy/main.js b/frontend/js/app/nginx/proxy/main.js index 83cedfbad..66f2ba6a2 100644 --- a/frontend/js/app/nginx/proxy/main.js +++ b/frontend/js/app/nginx/proxy/main.js @@ -14,7 +14,44 @@ module.exports = Mn.View.extend({ list_region: '.list-region', add: '.add-item', help: '.help', - dimmer: '.dimmer' + dimmer: '.dimmer', + search: '.search-form', + query: 'input[name="source-query"]' + }, + + fetch: App.Api.Nginx.ProxyHosts.getAll, + + showData: function(response) { + this.showChildView('list_region', new ListView({ + collection: new ProxyHostModel.Collection(response) + })); + }, + + showError: function(err) { + this.showChildView('list_region', new ErrorView({ + code: err.code, + message: err.message, + retry: function () { + App.Controller.showNginxProxy(); + } + })); + + console.error(err); + }, + + showEmpty: function() { + let manage = App.Cache.User.canManage('proxy_hosts'); + + this.showChildView('list_region', new EmptyView({ + title: App.i18n('proxy-hosts', 'empty'), + subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}), + link: manage ? App.i18n('proxy-hosts', 'add') : null, + btn_color: 'success', + permission: 'proxy_hosts', + action: function () { + App.Controller.showNginxProxyForm(); + } + })); }, regions: { @@ -30,6 +67,17 @@ module.exports = Mn.View.extend({ 'click @ui.help': function (e) { e.preventDefault(); App.Controller.showHelp(App.i18n('proxy-hosts', 'help-title'), App.i18n('proxy-hosts', 'help-content')); + }, + + 'submit @ui.search': function (e) { + e.preventDefault(); + let query = this.ui.query.val(); + + this.fetch(['owner', 'certificate'], query) + .then(response => this.showData(response)) + .catch(err => { + this.showError(err); + }); } }, @@ -40,39 +88,18 @@ module.exports = Mn.View.extend({ onRender: function () { let view = this; - App.Api.Nginx.ProxyHosts.getAll(['owner', 'access_list', 'certificate']) + view.fetch(['owner', 'access_list', 'certificate']) .then(response => { if (!view.isDestroyed()) { if (response && response.length) { - view.showChildView('list_region', new ListView({ - collection: new ProxyHostModel.Collection(response) - })); + view.showData(response); } else { - let manage = App.Cache.User.canManage('proxy_hosts'); - - view.showChildView('list_region', new EmptyView({ - title: App.i18n('proxy-hosts', 'empty'), - subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}), - link: manage ? App.i18n('proxy-hosts', 'add') : null, - btn_color: 'success', - permission: 'proxy_hosts', - action: function () { - App.Controller.showNginxProxyForm(); - } - })); + view.showEmpty(); } } }) .catch(err => { - view.showChildView('list_region', new ErrorView({ - code: err.code, - message: err.message, - retry: function () { - App.Controller.showNginxProxy(); - } - })); - - console.error(err); + view.showError(err); }) .then(() => { view.ui.dimmer.removeClass('active'); From 181f163cb559e4dd7420f95ed612f81253d08714 Mon Sep 17 00:00:00 2001 From: Ivan Kristianto Date: Sat, 12 Feb 2022 10:40:37 +0700 Subject: [PATCH 08/20] Move render showEmpty into function --- frontend/js/app/nginx/redirection/main.js | 28 +++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/frontend/js/app/nginx/redirection/main.js b/frontend/js/app/nginx/redirection/main.js index 8d1a5da9f..1f5351a73 100644 --- a/frontend/js/app/nginx/redirection/main.js +++ b/frontend/js/app/nginx/redirection/main.js @@ -38,6 +38,21 @@ module.exports = Mn.View.extend({ console.error(err); }, + showEmpty: function() { + let manage = App.Cache.User.canManage('redirection_hosts'); + + this.showChildView('list_region', new EmptyView({ + title: App.i18n('redirection-hosts', 'empty'), + subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}), + link: manage ? App.i18n('redirection-hosts', 'add') : null, + btn_color: 'yellow', + permission: 'redirection_hosts', + action: function () { + App.Controller.showNginxRedirectionForm(); + } + })); + }, + regions: { list_region: '@ui.list_region' }, @@ -78,18 +93,7 @@ module.exports = Mn.View.extend({ if (response && response.length) { view.showData(response); } else { - let manage = App.Cache.User.canManage('redirection_hosts'); - - view.showChildView('list_region', new EmptyView({ - title: App.i18n('redirection-hosts', 'empty'), - subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}), - link: manage ? App.i18n('redirection-hosts', 'add') : null, - btn_color: 'yellow', - permission: 'redirection_hosts', - action: function () { - App.Controller.showNginxRedirectionForm(); - } - })); + view.showEmpty(); } } }) From e141b5ff20a8270c26a316e1bc6aa4da2d6c69c0 Mon Sep 17 00:00:00 2001 From: Ivan Kristianto Date: Sat, 12 Feb 2022 11:36:59 +0700 Subject: [PATCH 09/20] Add search feature to stream --- frontend/js/app/nginx/stream/main.ejs | 8 +++ frontend/js/app/nginx/stream/main.js | 79 ++++++++++++++++++--------- 2 files changed, 61 insertions(+), 26 deletions(-) diff --git a/frontend/js/app/nginx/stream/main.ejs b/frontend/js/app/nginx/stream/main.ejs index c01414ce1..d08ed56a0 100644 --- a/frontend/js/app/nginx/stream/main.ejs +++ b/frontend/js/app/nginx/stream/main.ejs @@ -3,6 +3,14 @@

<%- i18n('streams', 'title') %>

+ <% if (showAddButton) { %> <%- i18n('streams', 'add') %> diff --git a/frontend/js/app/nginx/stream/main.js b/frontend/js/app/nginx/stream/main.js index a8eda92c3..8a86e5836 100644 --- a/frontend/js/app/nginx/stream/main.js +++ b/frontend/js/app/nginx/stream/main.js @@ -14,7 +14,44 @@ module.exports = Mn.View.extend({ list_region: '.list-region', add: '.add-item', help: '.help', - dimmer: '.dimmer' + dimmer: '.dimmer', + search: '.search-form', + query: 'input[name="source-query"]' + }, + + fetch: App.Api.Nginx.Streams.getAll, + + showData: function(response) { + this.showChildView('list_region', new ListView({ + collection: new StreamModel.Collection(response) + })); + }, + + showError: function(err) { + this.showChildView('list_region', new ErrorView({ + code: err.code, + message: err.message, + retry: function () { + App.Controller.showNginxStream(); + } + })); + + console.error(err); + }, + + showEmpty: function() { + let manage = App.Cache.User.canManage('streams'); + + this.showChildView('list_region', new EmptyView({ + title: App.i18n('streams', 'empty'), + subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}), + link: manage ? App.i18n('streams', 'add') : null, + btn_color: 'blue', + permission: 'streams', + action: function () { + App.Controller.showNginxStreamForm(); + } + })); }, regions: { @@ -30,6 +67,17 @@ module.exports = Mn.View.extend({ 'click @ui.help': function (e) { e.preventDefault(); App.Controller.showHelp(App.i18n('streams', 'help-title'), App.i18n('streams', 'help-content')); + }, + + 'submit @ui.search': function (e) { + e.preventDefault(); + let query = this.ui.query.val(); + + this.fetch(['owner'], query) + .then(response => this.showData(response)) + .catch(err => { + this.showError(err); + }); } }, @@ -40,39 +88,18 @@ module.exports = Mn.View.extend({ onRender: function () { let view = this; - App.Api.Nginx.Streams.getAll(['owner']) + view.fetch(['owner']) .then(response => { if (!view.isDestroyed()) { if (response && response.length) { - view.showChildView('list_region', new ListView({ - collection: new StreamModel.Collection(response) - })); + view.showData(response); } else { - let manage = App.Cache.User.canManage('streams'); - - view.showChildView('list_region', new EmptyView({ - title: App.i18n('streams', 'empty'), - subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}), - link: manage ? App.i18n('streams', 'add') : null, - btn_color: 'blue', - permission: 'streams', - action: function () { - App.Controller.showNginxStreamForm(); - } - })); + view.showEmpty(); } } }) .catch(err => { - view.showChildView('list_region', new ErrorView({ - code: err.code, - message: err.message, - retry: function () { - App.Controller.showNginxStream(); - } - })); - - console.error(err); + view.showError(err); }) .then(() => { view.ui.dimmer.removeClass('active'); From 49f350fb00be2bfb05e6f52a062a71694710e2de Mon Sep 17 00:00:00 2001 From: Ivan Kristianto Date: Sat, 12 Feb 2022 11:48:47 +0700 Subject: [PATCH 10/20] Add search feature to 404 hosts --- frontend/js/app/nginx/dead/main.ejs | 8 +++ frontend/js/app/nginx/dead/main.js | 79 +++++++++++++++++++---------- 2 files changed, 61 insertions(+), 26 deletions(-) diff --git a/frontend/js/app/nginx/dead/main.ejs b/frontend/js/app/nginx/dead/main.ejs index 508280ae6..324c48f23 100644 --- a/frontend/js/app/nginx/dead/main.ejs +++ b/frontend/js/app/nginx/dead/main.ejs @@ -3,6 +3,14 @@

<%- i18n('dead-hosts', 'title') %>

+ <% if (showAddButton) { %> <%- i18n('dead-hosts', 'add') %> diff --git a/frontend/js/app/nginx/dead/main.js b/frontend/js/app/nginx/dead/main.js index ac3cb7f14..e4d0c010e 100644 --- a/frontend/js/app/nginx/dead/main.js +++ b/frontend/js/app/nginx/dead/main.js @@ -14,7 +14,44 @@ module.exports = Mn.View.extend({ list_region: '.list-region', add: '.add-item', help: '.help', - dimmer: '.dimmer' + dimmer: '.dimmer', + search: '.search-form', + query: 'input[name="source-query"]' + }, + + fetch: App.Api.Nginx.DeadHosts.getAll, + + showData: function(response) { + this.showChildView('list_region', new ListView({ + collection: new DeadHostModel.Collection(response) + })); + }, + + showError: function(err) { + this.showChildView('list_region', new ErrorView({ + code: err.code, + message: err.message, + retry: function () { + App.Controller.showNginxDead(); + } + })); + + console.error(err); + }, + + showEmpty: function() { + let manage = App.Cache.User.canManage('dead_hosts'); + + this.showChildView('list_region', new EmptyView({ + title: App.i18n('dead-hosts', 'empty'), + subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}), + link: manage ? App.i18n('dead-hosts', 'add') : null, + btn_color: 'danger', + permission: 'dead_hosts', + action: function () { + App.Controller.showNginxDeadForm(); + } + })); }, regions: { @@ -30,6 +67,17 @@ module.exports = Mn.View.extend({ 'click @ui.help': function (e) { e.preventDefault(); App.Controller.showHelp(App.i18n('dead-hosts', 'help-title'), App.i18n('dead-hosts', 'help-content')); + }, + + 'submit @ui.search': function (e) { + e.preventDefault(); + let query = this.ui.query.val(); + + this.fetch(['owner', 'certificate'], query) + .then(response => this.showData(response)) + .catch(err => { + this.showError(err); + }); } }, @@ -40,39 +88,18 @@ module.exports = Mn.View.extend({ onRender: function () { let view = this; - App.Api.Nginx.DeadHosts.getAll(['owner', 'certificate']) + view.fetch(['owner', 'certificate']) .then(response => { if (!view.isDestroyed()) { if (response && response.length) { - view.showChildView('list_region', new ListView({ - collection: new DeadHostModel.Collection(response) - })); + view.showData(response); } else { - let manage = App.Cache.User.canManage('dead_hosts'); - - view.showChildView('list_region', new EmptyView({ - title: App.i18n('dead-hosts', 'empty'), - subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}), - link: manage ? App.i18n('dead-hosts', 'add') : null, - btn_color: 'danger', - permission: 'dead_hosts', - action: function () { - App.Controller.showNginxDeadForm(); - } - })); + view.showEmpty(); } } }) .catch(err => { - view.showChildView('list_region', new ErrorView({ - code: err.code, - message: err.message, - retry: function () { - App.Controller.showNginxDead(); - } - })); - - console.error(err); + view.showError(err); }) .then(() => { view.ui.dimmer.removeClass('active'); From 078114ee6768ca1b579861b2fce239b8aeb84883 Mon Sep 17 00:00:00 2001 From: Ivan Kristianto Date: Sat, 12 Feb 2022 11:52:47 +0700 Subject: [PATCH 11/20] Fix search query for proxy --- frontend/js/app/nginx/proxy/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/js/app/nginx/proxy/main.js b/frontend/js/app/nginx/proxy/main.js index 66f2ba6a2..baf671013 100644 --- a/frontend/js/app/nginx/proxy/main.js +++ b/frontend/js/app/nginx/proxy/main.js @@ -73,7 +73,7 @@ module.exports = Mn.View.extend({ e.preventDefault(); let query = this.ui.query.val(); - this.fetch(['owner', 'certificate'], query) + this.fetch(['owner', 'access_list', 'certificate'], query) .then(response => this.showData(response)) .catch(err => { this.showError(err); From de84d5d46383aa7e5089e91787004299ecf04ca1 Mon Sep 17 00:00:00 2001 From: Ivan Kristianto Date: Sat, 12 Feb 2022 12:17:45 +0700 Subject: [PATCH 12/20] Add search feature to Access Lists --- frontend/js/app/nginx/access/main.ejs | 8 +++ frontend/js/app/nginx/access/main.js | 79 ++++++++++++++++++--------- 2 files changed, 61 insertions(+), 26 deletions(-) diff --git a/frontend/js/app/nginx/access/main.ejs b/frontend/js/app/nginx/access/main.ejs index c245ff4ae..665d867b2 100644 --- a/frontend/js/app/nginx/access/main.ejs +++ b/frontend/js/app/nginx/access/main.ejs @@ -3,6 +3,14 @@

<%- i18n('access-lists', 'title') %>

+ <% if (showAddButton) { %> <%- i18n('access-lists', 'add') %> diff --git a/frontend/js/app/nginx/access/main.js b/frontend/js/app/nginx/access/main.js index d14a9eb49..513f58659 100644 --- a/frontend/js/app/nginx/access/main.js +++ b/frontend/js/app/nginx/access/main.js @@ -14,7 +14,44 @@ module.exports = Mn.View.extend({ list_region: '.list-region', add: '.add-item', help: '.help', - dimmer: '.dimmer' + dimmer: '.dimmer', + search: '.search-form', + query: 'input[name="source-query"]' + }, + + fetch: App.Api.Nginx.AccessLists.getAll, + + showData: function(response) { + this.showChildView('list_region', new ListView({ + collection: new AccessListModel.Collection(response) + })); + }, + + showError: function(err) { + this.showChildView('list_region', new ErrorView({ + code: err.code, + message: err.message, + retry: function () { + App.Controller.showNginxAccess(); + } + })); + + console.error(err); + }, + + showEmpty: function() { + let manage = App.Cache.User.canManage('access_lists'); + + this.showChildView('list_region', new EmptyView({ + title: App.i18n('access-lists', 'empty'), + subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}), + link: manage ? App.i18n('access-lists', 'add') : null, + btn_color: 'teal', + permission: 'access_lists', + action: function () { + App.Controller.showNginxAccessListForm(); + } + })); }, regions: { @@ -30,6 +67,17 @@ module.exports = Mn.View.extend({ 'click @ui.help': function (e) { e.preventDefault(); App.Controller.showHelp(App.i18n('access-lists', 'help-title'), App.i18n('access-lists', 'help-content')); + }, + + 'submit @ui.search': function (e) { + e.preventDefault(); + let query = this.ui.query.val(); + + this.fetch(['owner', 'items', 'clients'], query) + .then(response => this.showData(response)) + .catch(err => { + this.showError(err); + }); } }, @@ -40,39 +88,18 @@ module.exports = Mn.View.extend({ onRender: function () { let view = this; - App.Api.Nginx.AccessLists.getAll(['owner', 'items', 'clients']) + view.fetch(['owner', 'items', 'clients']) .then(response => { if (!view.isDestroyed()) { if (response && response.length) { - view.showChildView('list_region', new ListView({ - collection: new AccessListModel.Collection(response) - })); + view.showData(response); } else { - let manage = App.Cache.User.canManage('access_lists'); - - view.showChildView('list_region', new EmptyView({ - title: App.i18n('access-lists', 'empty'), - subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}), - link: manage ? App.i18n('access-lists', 'add') : null, - btn_color: 'teal', - permission: 'access_lists', - action: function () { - App.Controller.showNginxAccessListForm(); - } - })); + view.showEmpty(); } } }) .catch(err => { - view.showChildView('list_region', new ErrorView({ - code: err.code, - message: err.message, - retry: function () { - App.Controller.showNginxAccess(); - } - })); - - console.error(err); + view.showError(err); }) .then(() => { view.ui.dimmer.removeClass('active'); From 29c0fcbad6e2d52a9fb0dab8bc67309c17551938 Mon Sep 17 00:00:00 2001 From: Ivan Kristianto Date: Sat, 12 Feb 2022 12:45:29 +0700 Subject: [PATCH 13/20] Add search feature to SSL Certificates --- frontend/js/app/nginx/certificates/main.ejs | 8 +++ frontend/js/app/nginx/certificates/main.js | 79 ++++++++++++++------- 2 files changed, 61 insertions(+), 26 deletions(-) diff --git a/frontend/js/app/nginx/certificates/main.ejs b/frontend/js/app/nginx/certificates/main.ejs index cc3624d54..bbc50842d 100644 --- a/frontend/js/app/nginx/certificates/main.ejs +++ b/frontend/js/app/nginx/certificates/main.ejs @@ -3,6 +3,14 @@

<%- i18n('certificates', 'title') %>

+ <% if (showAddButton) { %> diff --git a/frontend/js/app/nginx/certificates/main.ejs b/frontend/js/app/nginx/certificates/main.ejs index bbc50842d..dbd6fa85d 100644 --- a/frontend/js/app/nginx/certificates/main.ejs +++ b/frontend/js/app/nginx/certificates/main.ejs @@ -8,7 +8,7 @@ - +
diff --git a/frontend/js/app/nginx/dead/main.ejs b/frontend/js/app/nginx/dead/main.ejs index 324c48f23..4c5d1ad1f 100644 --- a/frontend/js/app/nginx/dead/main.ejs +++ b/frontend/js/app/nginx/dead/main.ejs @@ -8,7 +8,7 @@ - +
diff --git a/frontend/js/app/nginx/proxy/main.ejs b/frontend/js/app/nginx/proxy/main.ejs index 42f437529..4ecb9036a 100644 --- a/frontend/js/app/nginx/proxy/main.ejs +++ b/frontend/js/app/nginx/proxy/main.ejs @@ -8,7 +8,7 @@ - +
diff --git a/frontend/js/app/nginx/redirection/main.ejs b/frontend/js/app/nginx/redirection/main.ejs index 90f92ebe2..87e28229a 100644 --- a/frontend/js/app/nginx/redirection/main.ejs +++ b/frontend/js/app/nginx/redirection/main.ejs @@ -1,19 +1,19 @@
-

Redirection Hosts

+

<%- i18n('redirection-hosts', 'title') %>

<% if (showAddButton) { %> - Add Redirection Host + <%- i18n('redirection-hosts', 'add') %> <% } %>
diff --git a/frontend/js/app/nginx/stream/main.ejs b/frontend/js/app/nginx/stream/main.ejs index d08ed56a0..7dc0dbe86 100644 --- a/frontend/js/app/nginx/stream/main.ejs +++ b/frontend/js/app/nginx/stream/main.ejs @@ -8,7 +8,7 @@ - +
diff --git a/frontend/js/app/users/main.ejs b/frontend/js/app/users/main.ejs index 2a75ecea6..892cb83f6 100644 --- a/frontend/js/app/users/main.ejs +++ b/frontend/js/app/users/main.ejs @@ -8,7 +8,7 @@ - +
<%- i18n('users', 'add') %> diff --git a/frontend/js/i18n/messages.json b/frontend/js/i18n/messages.json index c18e9be20..e0a6b730b 100644 --- a/frontend/js/i18n/messages.json +++ b/frontend/js/i18n/messages.json @@ -132,7 +132,8 @@ "access-list": "Access List", "allow-websocket-upgrade": "Websockets Support", "ignore-invalid-upstream-ssl": "Ignore Invalid SSL", - "custom-forward-host-help": "Add a path for sub-folder forwarding.\nExample: 203.0.113.25/path" + "custom-forward-host-help": "Add a path for sub-folder forwarding.\nExample: 203.0.113.25/path", + "search": "Search Host…" }, "redirection-hosts": { "title": "Redirection Hosts", @@ -146,7 +147,8 @@ "delete": "Delete Redirection Host", "delete-confirm": "Are you sure you want to delete the Redirection host for: {domains}?", "help-title": "What is a Redirection Host?", - "help-content": "A Redirection Host will redirect requests from the incoming domain and push the viewer to another domain.\nThe most common reason to use this type of host is when your website changes domains but you still have search engine or referrer links pointing to the old domain." + "help-content": "A Redirection Host will redirect requests from the incoming domain and push the viewer to another domain.\nThe most common reason to use this type of host is when your website changes domains but you still have search engine or referrer links pointing to the old domain.", + "search": "Search Host…" }, "dead-hosts": { "title": "404 Hosts", @@ -156,7 +158,8 @@ "delete": "Delete 404 Host", "delete-confirm": "Are you sure you want to delete this 404 Host?", "help-title": "What is a 404 Host?", - "help-content": "A 404 Host is simply a host setup that shows a 404 page.\nThis can be useful when your domain is listed in search engines and you want to provide a nicer error page or specifically to tell the search indexers that the domain pages no longer exist.\nAnother benefit of having this host is to track the logs for hits to it and view the referrers." + "help-content": "A 404 Host is simply a host setup that shows a 404 page.\nThis can be useful when your domain is listed in search engines and you want to provide a nicer error page or specifically to tell the search indexers that the domain pages no longer exist.\nAnother benefit of having this host is to track the logs for hits to it and view the referrers.", + "search": "Search Host…" }, "streams": { "title": "Streams", @@ -175,7 +178,8 @@ "delete": "Delete Stream", "delete-confirm": "Are you sure you want to delete this Stream?", "help-title": "What is a Stream?", - "help-content": "A relatively new feature for Nginx, a Stream will serve to forward TCP/UDP traffic directly to another computer on the network.\nIf you're running game servers, FTP or SSH servers this can come in handy." + "help-content": "A relatively new feature for Nginx, a Stream will serve to forward TCP/UDP traffic directly to another computer on the network.\nIf you're running game servers, FTP or SSH servers this can come in handy.", + "search": "Search Incoming Port…" }, "certificates": { "title": "SSL Certificates", @@ -201,7 +205,8 @@ "reachability-wrong-data": "There is a server found at this domain but it returned an unexpected data. Is it the NPM server? Please make sure your domain points to the IP where your NPM instance is running.", "reachability-other": "There is a server found at this domain but it returned an unexpected status code {code}. Is it the NPM server? Please make sure your domain points to the IP where your NPM instance is running.", "download": "Download", - "renew-title": "Renew Let'sEncrypt Certificate" + "renew-title": "Renew Let'sEncrypt Certificate", + "search": "Search Certificate…" }, "access-lists": { "title": "Access Lists", @@ -225,7 +230,8 @@ "satisfy-any": "Satisfy Any", "pass-auth": "Pass Auth to Host", "access-add": "Add", - "auth-add": "Add" + "auth-add": "Add", + "search": "Search Access…" }, "users": { "title": "Users", @@ -251,7 +257,8 @@ "perms-visibility-all": "All Items", "perm-manage": "Manage", "perm-view": "View Only", - "perm-hidden": "Hidden" + "perm-hidden": "Hidden", + "search": "Search User…" }, "audit-log": { "title": "Audit Log", @@ -272,7 +279,8 @@ "renewed": "Renewed {name}", "meta-title": "Details for Event", "view-meta": "View Details", - "date": "Date" + "date": "Date", + "search": "Search Log…" }, "settings": { "title": "Settings", From 9a854fd8fe495f6a913de79ce1f2bfdeec61a916 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 13 Feb 2022 08:02:46 +0000 Subject: [PATCH 18/20] Bump follow-redirects from 1.14.7 to 1.14.8 in /docs Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- docs/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/yarn.lock b/docs/yarn.lock index 1f1339cfa..f84c421d4 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4266,9 +4266,9 @@ flush-write-stream@^2.0.0: readable-stream "^3.1.1" follow-redirects@^1.0.0, follow-redirects@^1.12.1: - version "1.14.7" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" - integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== + version "1.14.8" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" + integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== for-in@^1.0.2: version "1.0.2" From 661f3d68993d10e6a0c93233b29b29d5a309a576 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Thu, 17 Feb 2022 13:15:15 +1000 Subject: [PATCH 19/20] Update repo path in docs --- docs/setup/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup/README.md b/docs/setup/README.md index 8fdad3b1d..b9c422747 100644 --- a/docs/setup/README.md +++ b/docs/setup/README.md @@ -107,7 +107,7 @@ you don't have to worry about doing anything special and you can follow the comm Check out the [dockerhub tags](https://hub.docker.com/r/jc21/nginx-proxy-manager/tags) for a list of supported architectures and if you want one that doesn't exist, -[create a feature request](https://github.com/jc21/nginx-proxy-manager/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=). +[create a feature request](https://github.com/NginxProxyManager/nginx-proxy-manager/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=). Also, if you don't know how to already, follow [this guide to install docker and docker-compose](https://manre-universe.net/how-to-run-docker-and-docker-compose-on-raspbian/) on Raspbian. From 59238d1dc1096f0001ac0bbeb341afb8cd12b5c0 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Thu, 17 Feb 2022 13:18:06 +1000 Subject: [PATCH 20/20] Bump version --- .version | 2 +- README.md | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.version b/.version index 54f72863f..3800eed08 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.9.15 +2.9.16 diff --git a/README.md b/README.md index 903e243df..ad5dfc2ac 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@



- + @@ -517,6 +517,12 @@ Special thanks to the following contributors:
Troy Kelly + + + +
Ivan Kristianto +
+