增加配置同步信息界面,配置同步过程中,不允许用户操作业务配置。
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
$(function(){
|
||||
// var leff =$("span[class~='le-ca-fo']").attr("data-original-title")
|
||||
|
||||
getConfigSyncStatus();
|
||||
$("#contentTable").not(".logTb").find("tbody tr").each(function(i){
|
||||
if($(this).find("input[type='checkbox']").attr("value")==3){
|
||||
var ids = $(this).find("input").attr("id");
|
||||
@@ -1551,6 +1551,41 @@ function openHelp(url){
|
||||
title: "online help", buttons:{ "close":true}
|
||||
});
|
||||
}
|
||||
//查询系统当前是否在进行配置同步,如果正在同步,界面不允许配置操作
|
||||
function getConfigSyncStatus(){
|
||||
var currentStatus = getSyncStatus();
|
||||
//3成功,-1服务端同步失败,-2界面端同步失败
|
||||
if(currentStatus!=3 && currentStatus!=-1 && currentStatus!=-2){
|
||||
$.jBox.defaults = {
|
||||
id:'syncStatusTip',
|
||||
zIndex: 9999
|
||||
};
|
||||
var tipId = top.$.jBox.tip("The system is being maintained and temporarily inaccessible.",'loading',{opacity:0.5,persistent:true});
|
||||
var t1 = setInterval(function() {
|
||||
currentStatus = getSyncStatus();
|
||||
alert(currentStatus);
|
||||
if(currentStatus==3 || currentStatus==-1 || currentStatus==-2){//3表示同步完成,-1表示服务端同步失败,-2表示界面端同步失败
|
||||
window.clearInterval(t1);
|
||||
top.$.jBox.closeTip('syncStatusTip');
|
||||
}
|
||||
},5000);
|
||||
}
|
||||
}
|
||||
function getSyncStatus(){
|
||||
//获取当前是否有配置同步任务
|
||||
var currentStatus = 3;
|
||||
var pathName = window.document.location.pathname.substring(0,window.document.location.pathname.lastIndexOf("/nis")+4);
|
||||
$.ajax({
|
||||
type:'get',
|
||||
async:false,
|
||||
url:pathName+'/config/synchronization/getStatus',
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
currentStatus = data.status;
|
||||
}
|
||||
});
|
||||
return currentStatus;
|
||||
}
|
||||
function heightDiv(type){
|
||||
var hei=document.documentElement.clientHeight;
|
||||
hei=hei-91;
|
||||
|
||||
Reference in New Issue
Block a user