Skip to content

Commit c688747

Browse files
authored
Merge pull request #1864 from NginxProxyManager/develop
v2.9.16
2 parents a233bc0 + 1a76f4e commit c688747

File tree

25 files changed

+530
-220
lines changed

25 files changed

+530
-220
lines changed

.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.9.15
1+
2.9.16

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p align="center">
22
<img src="https://nginxproxymanager.com/github.png">
33
<br><br>
4-
<img src="https://img.shields.io/badge/version-2.9.15-green.svg?style=for-the-badge">
4+
<img src="https://img.shields.io/badge/version-2.9.16-green.svg?style=for-the-badge">
55
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
66
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
77
</a>
@@ -517,6 +517,12 @@ Special thanks to the following contributors:
517517
<br /><sub><b>Troy Kelly</b></sub>
518518
</a>
519519
</td>
520+
<td align="center">
521+
<a href="https://github.com/ivankristianto">
522+
<img src="https://avatars.githubusercontent.com/u/656006?v=4" width="80" alt=""/>
523+
<br /><sub><b>Ivan Kristianto </b></sub>
524+
</a>
525+
</td>
520526
</tr>
521527
</table>
522528
<!-- markdownlint-enable -->

backend/internal/certificate.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ const internalCertificate = {
388388
zipFiles(source, out) {
389389
const archive = archiver('zip', { zlib: { level: 9 } });
390390
const stream = fs.createWriteStream(out);
391-
391+
392392
return new Promise((resolve, reject) => {
393393
source
394394
.map((fl) => {
@@ -399,7 +399,7 @@ const internalCertificate = {
399399
archive
400400
.on('error', (err) => reject(err))
401401
.pipe(stream);
402-
402+
403403
stream.on('close', () => resolve());
404404
archive.finalize();
405405
});
@@ -477,7 +477,7 @@ const internalCertificate = {
477477
// Query is used for searching
478478
if (typeof search_query === 'string') {
479479
query.where(function () {
480-
this.where('name', 'like', '%' + search_query + '%');
480+
this.where('nice_name', 'like', '%' + search_query + '%');
481481
});
482482
}
483483

@@ -1140,7 +1140,7 @@ const internalCertificate = {
11401140
if (domains.length === 0) {
11411141
throw new error.InternalValidationError('No domains provided');
11421142
}
1143-
1143+
11441144
// Create a test challenge file
11451145
const testChallengeDir = '/data/letsencrypt-acme-challenge/.well-known/acme-challenge';
11461146
const testChallengeFile = testChallengeDir + '/test-challenge';
@@ -1215,7 +1215,7 @@ const internalCertificate = {
12151215

12161216
// Remove the test challenge file
12171217
fs.unlinkSync(testChallengeFile);
1218-
1218+
12191219
return results;
12201220
}
12211221
};

docker/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ RUN rm -rf /etc/services.d/frontend /etc/nginx/conf.d/dev.conf
4646
# Change permission of logrotate config file
4747
RUN chmod 644 /etc/logrotate.d/nginx-proxy-manager
4848

49+
# fix for pip installs
50+
# https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1769
51+
RUN pip uninstall --yes setuptools \
52+
&& pip install "setuptools==58.0.0"
53+
4954
VOLUME [ "/data", "/etc/letsencrypt" ]
5055
ENTRYPOINT [ "/init" ]
5156

docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@
357357
"jsbn": "^1.1.0",
358358
"jsesc": "^3.0.1",
359359
"json-parse-better-errors": "^1.0.2",
360-
"json-schema": "^0.2.5",
360+
"json-schema": "^0.4.0",
361361
"json-schema-traverse": "^0.4.1",
362362
"json-stringify-safe": "^5.0.1",
363363
"json3": "^3.3.3",

docs/setup/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ you don't have to worry about doing anything special and you can follow the comm
107107

108108
Check out the [dockerhub tags](https://hub.docker.com/r/jc21/nginx-proxy-manager/tags)
109109
for a list of supported architectures and if you want one that doesn't exist,
110-
[create a feature request](https://github.com/jc21/nginx-proxy-manager/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=).
110+
[create a feature request](https://github.com/NginxProxyManager/nginx-proxy-manager/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=).
111111

112112
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/)
113113
on Raspbian.

docs/yarn.lock

+23-11
Original file line numberDiff line numberDiff line change
@@ -4117,6 +4117,13 @@ fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0:
41174117
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
41184118
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
41194119

4120+
fast-xml-parser@^3.19.0:
4121+
version "3.21.1"
4122+
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz#152a1d51d445380f7046b304672dd55d15c9e736"
4123+
integrity sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==
4124+
dependencies:
4125+
strnum "^1.0.4"
4126+
41204127
fastq@^1.6.0:
41214128
version "1.8.0"
41224129
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481"
@@ -4259,9 +4266,9 @@ flush-write-stream@^2.0.0:
42594266
readable-stream "^3.1.1"
42604267

42614268
follow-redirects@^1.0.0, follow-redirects@^1.12.1:
4262-
version "1.14.7"
4263-
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
4264-
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==
4269+
version "1.14.8"
4270+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc"
4271+
integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==
42654272

42664273
for-in@^1.0.2:
42674274
version "1.0.2"
@@ -5535,11 +5542,11 @@ is-svg@^3.0.0:
55355542
html-comment-regex "^1.1.0"
55365543

55375544
is-svg@^4.2.1:
5538-
version "4.2.2"
5539-
resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-4.2.2.tgz#a4ea0f3f78dada7085db88f1e85b6f845626cfae"
5540-
integrity sha512-JlA7Mc7mfWjdxxTkJ094oUK9amGD7gQaj5xA/NCY0vlVvZ1stmj4VX+bRuwOMN93IHRZ2ctpPH/0FO6DqvQ5Rw==
5545+
version "4.3.0"
5546+
resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-4.3.0.tgz#3e46a45dcdb2780e42a3c8538154d7f7bfc07216"
5547+
integrity sha512-Np3TOGLVr0J27VDaS/gVE7bT45ZcSmX4pMmMTsPjqO8JY383fuPIcWmZr3QsHVWhqhZWxSdmW+tkkl3PWOB0Nw==
55415548
dependencies:
5542-
html-comment-regex "^1.1.2"
5549+
fast-xml-parser "^3.19.0"
55435550

55445551
is-symbol@^1.0.2, is-symbol@^1.0.3:
55455552
version "1.0.3"
@@ -5719,10 +5726,10 @@ [email protected]:
57195726
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
57205727
integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
57215728

5722-
json-schema@^0.2.5:
5723-
version "0.2.5"
5724-
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.5.tgz#97997f50972dd0500214e208c407efa4b5d7063b"
5725-
integrity sha512-gWJOWYFrhQ8j7pVm0EM8Slr+EPVq1Phf6lvzvD/WCeqkrx/f2xBI0xOsRRS9xCn3I4vKtP519dvs3TP09r24wQ==
5729+
json-schema@^0.4.0:
5730+
version "0.4.0"
5731+
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5"
5732+
integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==
57265733

57275734
json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
57285735
version "5.0.1"
@@ -9085,6 +9092,11 @@ strip-json-comments@~2.0.1:
90859092
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
90869093
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
90879094

9095+
strnum@^1.0.4:
9096+
version "1.0.5"
9097+
resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db"
9098+
integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==
9099+
90889100
stylehacks@^4.0.0, stylehacks@^4.0.3:
90899101
version "4.0.3"
90909102
resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5"

frontend/js/app/audit-log/main.ejs

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
<div class="card-status bg-teal"></div>
33
<div class="card-header">
44
<h3 class="card-title"><%- i18n('audit-log', 'title') %></h3>
5+
<div class="card-options">
6+
<form class="search-form" role="search">
7+
<div class="input-icon">
8+
<span class="input-icon-addon">
9+
<i class="fe fe-search"></i>
10+
</span>
11+
<input name="source-query" type="text" value="" class="form-control form-control-sm" placeholder="<%- i18n('audit-log', 'search') %>" aria-label="<%- i18n('audit-log', 'search') %>">
12+
</div>
13+
</form>
14+
</div>
515
</div>
616
<div class="card-body no-padding min-100">
717
<div class="dimmer active">

frontend/js/app/audit-log/main.js

+47-18
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,68 @@ module.exports = Mn.View.extend({
1212

1313
ui: {
1414
list_region: '.list-region',
15-
dimmer: '.dimmer'
15+
dimmer: '.dimmer',
16+
search: '.search-form',
17+
query: 'input[name="source-query"]'
18+
},
19+
20+
fetch: App.Api.AuditLog.getAll,
21+
22+
showData: function(response) {
23+
this.showChildView('list_region', new ListView({
24+
collection: new AuditLogModel.Collection(response)
25+
}));
26+
},
27+
28+
showError: function(err) {
29+
this.showChildView('list_region', new ErrorView({
30+
code: err.code,
31+
message: err.message,
32+
retry: function () {
33+
App.Controller.showAuditLog();
34+
}
35+
}));
36+
37+
console.error(err);
38+
},
39+
40+
showEmpty: function() {
41+
this.showChildView('list_region', new EmptyView({
42+
title: App.i18n('audit-log', 'empty'),
43+
subtitle: App.i18n('audit-log', 'empty-subtitle')
44+
}));
1645
},
1746

1847
regions: {
1948
list_region: '@ui.list_region'
2049
},
2150

51+
events: {
52+
'submit @ui.search': function (e) {
53+
e.preventDefault();
54+
let query = this.ui.query.val();
55+
56+
this.fetch(['user'], query)
57+
.then(response => this.showData(response))
58+
.catch(err => {
59+
this.showError(err);
60+
});
61+
}
62+
},
63+
2264
onRender: function () {
2365
let view = this;
2466

25-
App.Api.AuditLog.getAll(['user'])
67+
view.fetch(['user'])
2668
.then(response => {
2769
if (!view.isDestroyed() && response && response.length) {
28-
view.showChildView('list_region', new ListView({
29-
collection: new AuditLogModel.Collection(response)
30-
}));
70+
view.showData(response);
3171
} else {
32-
view.showChildView('list_region', new EmptyView({
33-
title: App.i18n('audit-log', 'empty'),
34-
subtitle: App.i18n('audit-log', 'empty-subtitle')
35-
}));
72+
view.showEmpty();
3673
}
3774
})
3875
.catch(err => {
39-
view.showChildView('list_region', new ErrorView({
40-
code: err.code,
41-
message: err.message,
42-
retry: function () {
43-
App.Controller.showAuditLog();
44-
}
45-
}));
46-
47-
console.error(err);
76+
view.showError(err);
4877
})
4978
.then(() => {
5079
view.ui.dimmer.removeClass('active');

frontend/js/app/nginx/access/main.ejs

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
<div class="card-header">
44
<h3 class="card-title"><%- i18n('access-lists', 'title') %></h3>
55
<div class="card-options">
6+
<form class="search-form" role="search">
7+
<div class="input-icon">
8+
<span class="input-icon-addon">
9+
<i class="fe fe-search"></i>
10+
</span>
11+
<input name="source-query" type="text" value="" class="form-control form-control-sm" placeholder="<%- i18n('access-lists', 'search') %>" aria-label="<%- i18n('access-lists', 'search') %>">
12+
</div>
13+
</form>
614
<a href="#" class="btn btn-outline-secondary btn-sm ml-2 help"><i class="fe fe-help-circle"></i></a>
715
<% if (showAddButton) { %>
816
<a href="#" class="btn btn-outline-teal btn-sm ml-2 add-item"><%- i18n('access-lists', 'add') %></a>

frontend/js/app/nginx/access/main.js

+53-26
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,44 @@ module.exports = Mn.View.extend({
1414
list_region: '.list-region',
1515
add: '.add-item',
1616
help: '.help',
17-
dimmer: '.dimmer'
17+
dimmer: '.dimmer',
18+
search: '.search-form',
19+
query: 'input[name="source-query"]'
20+
},
21+
22+
fetch: App.Api.Nginx.AccessLists.getAll,
23+
24+
showData: function(response) {
25+
this.showChildView('list_region', new ListView({
26+
collection: new AccessListModel.Collection(response)
27+
}));
28+
},
29+
30+
showError: function(err) {
31+
this.showChildView('list_region', new ErrorView({
32+
code: err.code,
33+
message: err.message,
34+
retry: function () {
35+
App.Controller.showNginxAccess();
36+
}
37+
}));
38+
39+
console.error(err);
40+
},
41+
42+
showEmpty: function() {
43+
let manage = App.Cache.User.canManage('access_lists');
44+
45+
this.showChildView('list_region', new EmptyView({
46+
title: App.i18n('access-lists', 'empty'),
47+
subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}),
48+
link: manage ? App.i18n('access-lists', 'add') : null,
49+
btn_color: 'teal',
50+
permission: 'access_lists',
51+
action: function () {
52+
App.Controller.showNginxAccessListForm();
53+
}
54+
}));
1855
},
1956

2057
regions: {
@@ -30,6 +67,17 @@ module.exports = Mn.View.extend({
3067
'click @ui.help': function (e) {
3168
e.preventDefault();
3269
App.Controller.showHelp(App.i18n('access-lists', 'help-title'), App.i18n('access-lists', 'help-content'));
70+
},
71+
72+
'submit @ui.search': function (e) {
73+
e.preventDefault();
74+
let query = this.ui.query.val();
75+
76+
this.fetch(['owner', 'items', 'clients'], query)
77+
.then(response => this.showData(response))
78+
.catch(err => {
79+
this.showError(err);
80+
});
3381
}
3482
},
3583

@@ -40,39 +88,18 @@ module.exports = Mn.View.extend({
4088
onRender: function () {
4189
let view = this;
4290

43-
App.Api.Nginx.AccessLists.getAll(['owner', 'items', 'clients'])
91+
view.fetch(['owner', 'items', 'clients'])
4492
.then(response => {
4593
if (!view.isDestroyed()) {
4694
if (response && response.length) {
47-
view.showChildView('list_region', new ListView({
48-
collection: new AccessListModel.Collection(response)
49-
}));
95+
view.showData(response);
5096
} else {
51-
let manage = App.Cache.User.canManage('access_lists');
52-
53-
view.showChildView('list_region', new EmptyView({
54-
title: App.i18n('access-lists', 'empty'),
55-
subtitle: App.i18n('all-hosts', 'empty-subtitle', {manage: manage}),
56-
link: manage ? App.i18n('access-lists', 'add') : null,
57-
btn_color: 'teal',
58-
permission: 'access_lists',
59-
action: function () {
60-
App.Controller.showNginxAccessListForm();
61-
}
62-
}));
97+
view.showEmpty();
6398
}
6499
}
65100
})
66101
.catch(err => {
67-
view.showChildView('list_region', new ErrorView({
68-
code: err.code,
69-
message: err.message,
70-
retry: function () {
71-
App.Controller.showNginxAccess();
72-
}
73-
}));
74-
75-
console.error(err);
102+
view.showError(err);
76103
})
77104
.then(() => {
78105
view.ui.dimmer.removeClass('active');

0 commit comments

Comments
 (0)