Skip to content

Commit

Permalink
0.62 Fixes
Browse files Browse the repository at this point in the history
- Pull tls.reload out of the Reload API for now
- Fixed issues with uploading a certificate.  Users must restart Kamailio for a cert to become active
- Change the message bar slideup time from 3 secs to 10 seconds
- Fixed an issue with the CDR page giving a Failed alert when clicking on the CDR page
  • Loading branch information
root committed Jun 12, 2020
1 parent 9069634 commit d720a5e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
4 changes: 3 additions & 1 deletion gui/modules/api/api_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ def reloadKamailio():
else:
dsip_api_token = settings.DSIP_API_TOKEN

# Pulled tls.reload out of the reload process due to issues
#{'method': 'tls.reload', 'jsonrpc': '2.0', 'id': 1},

reload_cmds = [
{"method": "permissions.addressReload", "jsonrpc": "2.0", "id": 1},
{'method': 'drouting.reload', 'jsonrpc': '2.0', 'id': 1},
Expand All @@ -140,7 +143,6 @@ def reloadKamailio():
{'method': 'htable.reload', 'jsonrpc': '2.0', 'id': 1, 'params': ["inbound_failfwd"]},
{'method': 'htable.reload', 'jsonrpc': '2.0', 'id': 1, 'params': ["inbound_prefixmap"]},
{'method': 'uac.reg_reload', 'jsonrpc': '2.0', 'id': 1},
{'method': 'tls.reload', 'jsonrpc': '2.0', 'id': 1},
{'method': 'cfg.seti', 'jsonrpc': '2.0', 'id': 1,
'params': ['teleblock', 'gw_enabled', str(settings.TELEBLOCK_GW_ENABLED)]},
{'method': 'cfg.sets', 'jsonrpc': '2.0', 'id': 1, 'params': ['server', 'role', settings.ROLE]},
Expand Down
2 changes: 1 addition & 1 deletion gui/static/js/cdrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
// get endpoint group data
$.ajax({
type: "GET",
url: API_BASE_URL + "cdrs/endpointgroups",
url: API_BASE_URL + "endpointgroups",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (response, textStatus, jqXHR) {
Expand Down
24 changes: 13 additions & 11 deletions gui/static/js/certificates.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@

function addEntity(action) {
var selector, modal_body
var requestPayload = {};


// The default action is a POST
if (typeof action === "undefined") {
Expand All @@ -56,19 +58,17 @@
action = "POST";
selector = "#add";
modal_body = $(selector + ' .modal-body');
requestPayload.domain = modal_body.find("#domain").val();
requestPayload.domain = modal_body.find("#domain").val()

}
else if (action === "PUT") {
action = "PUT";
selector = "#edit";
modal_body = $(selector + ' .modal-body');
requestPayload.domain = modal_body.find("#domain2").val();
requestPayload.domain = modal_body.find("#domain2").val()

}

var requestPayload = {};
var type;


if (modal_body.find("#certtype_generate").is(':checked') || (modal_body.find("#certtype_generate2").is(':checked'))) {
Expand Down Expand Up @@ -276,15 +276,16 @@ $("#domain").keyup(function () {
console.log(value);
if (value.includes("*")) {

var command = "certonly --manual -d ";
var command = "certbot certonly --manual -d ";
command = command + value;
command = command + " --server https://acme-v02.api.letsencrypt.org/directory";
$("#terminalCommand").text(command);
$("#terminalDiv").removeClass("hide");
$("#certtype_upload").prop('checked', true);
$("#certtype_generated").prop('checked', false);
$("#certtype_generated").prop('checked', true);
var btn = $('#add .modal-footer').find('#addButton');
btn.attr('disabled', true);
}
else {
else{

$("#terminalDiv").addClass("hide");

Expand All @@ -297,13 +298,14 @@ $("#domain2").keyup(function () {
console.log(value);
if (value.includes("*")) {

var command = "certonly --manual -d ";
var command = "certbot certonly --manual -d ";
command = command + value;
command = command + " --server https://acme-v02.api.letsencrypt.org/directory";
$("#terminalCommand2").text(command);
$("#terminalDiv2").removeClass("hide");
$("#certtype_upload2").prop('checked', true);
$("#certtype_generated2").prop('checked', false);
$("#certtype_generated2").prop('checked', true);
var btn = $('#edit .modal-footer').find('#editButton');
btn.attr('disabled', true);
}
else {

Expand Down
2 changes: 1 addition & 1 deletion gui/static/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@

visible_modals.modal('hide');
top_bar.show();
top_bar.slideUp(3000, function() {
top_bar.slideUp(10000, function() {
top_bar.hide();
});
};
Expand Down

0 comments on commit d720a5e

Please sign in to comment.