|
|
@ -76,7 +76,7 @@ $(function() {
|
|
|
|
function cleanUp() {
|
|
|
|
function cleanUp() {
|
|
|
|
clearInterval(updateTimerID);
|
|
|
|
clearInterval(updateTimerID);
|
|
|
|
$("#spinner2").hide();
|
|
|
|
$("#spinner2").hide();
|
|
|
|
$("#updateFinished").removeClass("hidden");
|
|
|
|
$("#DialogFinished").removeClass("hidden");
|
|
|
|
$("#check_for_update").removeClass("hidden");
|
|
|
|
$("#check_for_update").removeClass("hidden");
|
|
|
|
$("#perform_update").addClass("hidden");
|
|
|
|
$("#perform_update").addClass("hidden");
|
|
|
|
$("#message").alert("close");
|
|
|
|
$("#message").alert("close");
|
|
|
@ -93,13 +93,13 @@ $(function() {
|
|
|
|
url: window.location.pathname + "/../../get_updater_status",
|
|
|
|
url: window.location.pathname + "/../../get_updater_status",
|
|
|
|
success: function success(data) {
|
|
|
|
success: function success(data) {
|
|
|
|
// console.log(data.status);
|
|
|
|
// console.log(data.status);
|
|
|
|
$("#Updatecontent").html(updateText[data.status]);
|
|
|
|
$("#DialogContent").html(updateText[data.status]);
|
|
|
|
if (data.status > 6) {
|
|
|
|
if (data.status > 6) {
|
|
|
|
cleanUp();
|
|
|
|
cleanUp();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
error: function error() {
|
|
|
|
error: function error() {
|
|
|
|
$("#Updatecontent").html(updateText[7]);
|
|
|
|
$("#DialogContent").html(updateText[7]);
|
|
|
|
cleanUp();
|
|
|
|
cleanUp();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
timeout: 2000
|
|
|
|
timeout: 2000
|
|
|
@ -158,8 +158,8 @@ $(function() {
|
|
|
|
var $this = $(this);
|
|
|
|
var $this = $(this);
|
|
|
|
var buttonText = $this.html();
|
|
|
|
var buttonText = $this.html();
|
|
|
|
$this.html("...");
|
|
|
|
$this.html("...");
|
|
|
|
$("#Updatecontent").html("");
|
|
|
|
$("#DialogContent").html("");
|
|
|
|
$("#updateFinished").addClass("hidden");
|
|
|
|
$("#DialogFinished").addClass("hidden");
|
|
|
|
$("#update_error").addClass("hidden");
|
|
|
|
$("#update_error").addClass("hidden");
|
|
|
|
if ($("#message").length) {
|
|
|
|
if ($("#message").length) {
|
|
|
|
$("#message").alert("close");
|
|
|
|
$("#message").alert("close");
|
|
|
@ -201,13 +201,24 @@ $(function() {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$("#restart_database").click(function() {
|
|
|
|
$("#restart_database").click(function() {
|
|
|
|
|
|
|
|
$("#DialogHeader").addClass("hidden");
|
|
|
|
|
|
|
|
$("#DialogFinished").addClass("hidden");
|
|
|
|
|
|
|
|
$("#DialogContent").html("");
|
|
|
|
|
|
|
|
$("#spinner2").show();
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
dataType: "json",
|
|
|
|
dataType: "json",
|
|
|
|
url: window.location.pathname + "/../../shutdown",
|
|
|
|
url: window.location.pathname + "/../../shutdown",
|
|
|
|
data: {"parameter":2}
|
|
|
|
data: {"parameter":2},
|
|
|
|
|
|
|
|
success: function success(data) {
|
|
|
|
|
|
|
|
$("#spinner2").hide();
|
|
|
|
|
|
|
|
ResultText = data.text;
|
|
|
|
|
|
|
|
$("#DialogContent").html(ResultText);
|
|
|
|
|
|
|
|
$("#DialogFinished").removeClass("hidden");
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$("#perform_update").click(function() {
|
|
|
|
$("#perform_update").click(function() {
|
|
|
|
|
|
|
|
$("#DialogHeader").removeClass("hidden");
|
|
|
|
$("#spinner2").show();
|
|
|
|
$("#spinner2").show();
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
type: "POST",
|
|
|
@ -216,7 +227,7 @@ $(function() {
|
|
|
|
url: window.location.pathname + "/../../get_updater_status",
|
|
|
|
url: window.location.pathname + "/../../get_updater_status",
|
|
|
|
success: function success(data) {
|
|
|
|
success: function success(data) {
|
|
|
|
updateText = data.text;
|
|
|
|
updateText = data.text;
|
|
|
|
$("#Updatecontent").html(updateText[data.status]);
|
|
|
|
$("#DialogContent").html(updateText[data.status]);
|
|
|
|
// console.log(data.status);
|
|
|
|
// console.log(data.status);
|
|
|
|
updateTimerID = setInterval(updateTimer, 2000);
|
|
|
|
updateTimerID = setInterval(updateTimer, 2000);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -288,17 +299,23 @@ $(function() {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('#import_ldap_users').click(function() {
|
|
|
|
$('#import_ldap_users').click(function() {
|
|
|
|
|
|
|
|
$("#DialogHeader").addClass("hidden");
|
|
|
|
|
|
|
|
$("#DialogFinished").addClass("hidden");
|
|
|
|
|
|
|
|
$("#DialogContent").html("");
|
|
|
|
|
|
|
|
$("#spinner2").show();
|
|
|
|
var pathname = document.getElementsByTagName("script"), src = pathname[pathname.length - 1].src;
|
|
|
|
var pathname = document.getElementsByTagName("script"), src = pathname[pathname.length - 1].src;
|
|
|
|
var path = src.substring(0, src.lastIndexOf("/"));
|
|
|
|
var path = src.substring(0, src.lastIndexOf("/"));
|
|
|
|
/*$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
method:"get",
|
|
|
|
method:"get",
|
|
|
|
|
|
|
|
dataType: "json",
|
|
|
|
url: path + "/../../import_ldap_users",
|
|
|
|
url: path + "/../../import_ldap_users",
|
|
|
|
});*/
|
|
|
|
success: function success(data) {
|
|
|
|
$.getJSON(path + "/../../import_ldap_users",
|
|
|
|
$("#spinner2").hide();
|
|
|
|
function(data) {
|
|
|
|
ResultText = data.text;
|
|
|
|
location.reload();
|
|
|
|
$("#DialogContent").html(ResultText);
|
|
|
|
|
|
|
|
$("#DialogFinished").removeClass("hidden");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$(".author-expand").click(function() {
|
|
|
|
$(".author-expand").click(function() {
|
|
|
|