Skip to content

Commit b687548

Browse files
committed
Merge pull request 'Fork syncthing' (#1) from GitHub/nginx-proxy-manager:develop into develop
2 parents 8e5255a + 1a76f4e commit b687548

File tree

22 files changed

+503
-210
lines changed

22 files changed

+503
-210
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.9.15
1+
2.9.16

README.md

Lines changed: 7 additions & 1 deletion
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

Lines changed: 5 additions & 5 deletions
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
};

docs/setup/README.md

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4266,9 +4266,9 @@ flush-write-stream@^2.0.0:
42664266
readable-stream "^3.1.1"
42674267

42684268
follow-redirects@^1.0.0, follow-redirects@^1.12.1:
4269-
version "1.14.7"
4270-
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
4271-
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==
42724272

42734273
for-in@^1.0.2:
42744274
version "1.0.2"

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

Lines changed: 10 additions & 0 deletions
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

Lines changed: 47 additions & 18 deletions
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

Lines changed: 8 additions & 0 deletions
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

Lines changed: 53 additions & 26 deletions
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');

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
<div class="card-header">
44
<h3 class="card-title"><%- i18n('certificates', '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('certificates', 'search') %>" aria-label="<%- i18n('certificates', '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
<div class="dropdown">

0 commit comments

Comments
 (0)