fixed linting
This commit is contained in:
parent
be87c45f27
commit
8944609b63
@ -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);
|
||||
|
@ -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>
|
||||
|
@ -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'))
|
||||
|
@ -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": {
|
||||
|
Loading…
Reference in New Issue
Block a user