fixed linting

This commit is contained in:
Rahul Somasundaram 2021-08-24 07:28:17 +05:30
parent be87c45f27
commit 8944609b63
No known key found for this signature in database
GPG Key ID: B8520CB207DD49D3
4 changed files with 7 additions and 9 deletions

View File

@ -343,7 +343,6 @@ const internalCertificate = {
* @returns {Promise}
*/
download: (access, data) => {
return new Promise((resolve, reject) => {
access.can('certificates:get', data)
.then(() => {
@ -366,8 +365,6 @@ const internalCertificate = {
fileName: opName
};
resolve(resp);
}).catch((err) => {
reject(err);
});
} else {
throw new error.ValidationError('Only Let\'sEncrypt certificates can be renewed');
@ -377,10 +374,10 @@ const internalCertificate = {
},
/**
* @param {String} source
* @param {String} out
* @returns {Promise}
*/
* @param {String} source
* @param {String} out
* @returns {Promise}
*/
zipDirectory(source, out) {
const archive = archiver('zip', { zlib: { level: 9 } });
const stream = fs.createWriteStream(out);

View File

@ -41,7 +41,7 @@
<span class="dropdown-header"><%- i18n('audit-log', 'certificate') %> #<%- id %></span>
<% if (provider === 'letsencrypt') { %>
<a href="#" class="renew dropdown-item"><i class="dropdown-icon fe fe-refresh-cw"></i> <%- i18n('certificates', 'force-renew') %></a>
<a href="#" class="download dropdown-item"><i class="dropdown-icon fe fe-download"></i><%- i18n('certificates', 'download') %></a>
<a href="#" class="download dropdown-item"><i class="dropdown-icon fe fe-download"></i> <%- i18n('certificates', 'download') %></a>
<div class="dropdown-divider"></div>
<% } %>
<a href="#" class="delete dropdown-item"><i class="dropdown-icon fe fe-trash-2"></i> <%- i18n('str', 'delete') %></a>

View File

@ -31,6 +31,7 @@ module.exports = Mn.View.extend({
let win = window.open($(e.currentTarget).attr('rel'), '_blank');
win.focus();
},
'click @ui.download': function (e) {
e.preventDefault();
App.Api.Nginx.Certificates.download(this.model.get('id'))

View File

@ -188,7 +188,7 @@
"other-certificate-key": "Certificate Key",
"other-intermediate-certificate": "Intermediate Certificate",
"force-renew": "Renew Now",
"download":"Download",
"download": "Download",
"renew-title": "Renew Let'sEncrypt Certificate"
},
"access-lists": {