Adds frontend improvements and fixes

This commit is contained in:
chaptergy
2020-10-06 14:49:02 +02:00
parent 2523424f68
commit 05f6a55a0b
12 changed files with 147 additions and 37 deletions

View File

@ -53,7 +53,7 @@ function fetch(verb, path, data, options) {
contentType: options.contentType || 'application/json; charset=UTF-8',
processData: options.processData || true,
crossDomain: true,
timeout: options.timeout ? options.timeout : 30000,
timeout: options.timeout ? options.timeout : 180000,
xhrFields: {
withCredentials: true
},
@ -586,8 +586,8 @@ module.exports = {
/**
* @param {Object} data
*/
create: function (data) {
return fetch('post', 'nginx/certificates', data);
create: function (data, timeout = 180000) {
return fetch('post', 'nginx/certificates', data, {timeout});
},
/**
@ -630,8 +630,8 @@ module.exports = {
* @param {Number} id
* @returns {Promise}
*/
renew: function (id) {
return fetch('post', 'nginx/certificates/' + id + '/renew');
renew: function (id, timeout = 180000) {
return fetch('post', 'nginx/certificates/' + id + '/renew', undefined, {timeout});
}
}
},