BUG 9530 HeartBeat SOLVED
- HeartBeat not checked. - HeartBeat works in skin classic and uxmodern.
This commit is contained in:
@@ -192,27 +192,25 @@ class Main extends Controller
|
||||
|
||||
$availableLangArray = $this->getLanguagesList();
|
||||
|
||||
//$G_PUBLISH = new Publisher ();
|
||||
//$G_PUBLISH->AddContent ('xmlform', 'xmlform', 'login/login', '', $aFields, SYS_URI .
|
||||
//'login/authentication.php');
|
||||
|
||||
G::LoadClass ('serverConfiguration');
|
||||
|
||||
if (($nextBeatDate = $this->memcache->get('nextBeatDate')) === false) {
|
||||
//get the serverconf singleton, and check if we can send the heartbeat
|
||||
$oServerConf = & serverConf::getSingleton ();
|
||||
|
||||
$sflag = $oServerConf->getHeartbeatProperty('HB_OPTION','HEART_BEAT_CONF');
|
||||
$sflag = (trim($sflag)!='')?$sflag:'1';
|
||||
$flagHeartBeat = '';
|
||||
$sflag = $oServerConf->getHeartbeatProperty('HB_OPTION', 'HEART_BEAT_CONF');
|
||||
$sflag = (trim($sflag) != '') ? $sflag : '1';
|
||||
|
||||
//get date of next beat
|
||||
$nextBeatDate = $oServerConf->getHeartbeatProperty('HB_NEXT_BEAT_DATE','HEART_BEAT_CONF');
|
||||
$this->memcache->set('nextBeatDate', $nextBeatDate, 1*3600);
|
||||
$nextBeatDate = $oServerConf->getHeartbeatProperty('HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF');
|
||||
|
||||
//if flag to send heartbeat is enabled, and it is time to send heartbeat, sent it using asynchronous beat.
|
||||
if (($sflag == "1") && ((strtotime("now") > $nextBeatDate) || is_null($nextBeatDate))) {
|
||||
//To do: we need to change to ExtJs
|
||||
$this->setJSVar('flagHeartBeat', ($flagHeartBeat == 1));
|
||||
} else {
|
||||
$this->setJSVar('flagHeartBeat', ($flagHeartBeat == 0));
|
||||
}
|
||||
|
||||
$sflag = 1;
|
||||
//check if we show the panel with the getting started info
|
||||
if (($flagGettingStarted = $this->memcache->get('flagGettingStarted')) === false) {
|
||||
require_once 'classes/model/Configuration.php';
|
||||
$oConfiguration = new Configuration ();
|
||||
$oCriteria = new Criteria ('workflow');
|
||||
@@ -223,10 +221,11 @@ class Main extends Controller
|
||||
$oCriteria->add (ConfigurationPeer::USR_UID, '');
|
||||
$oCriteria->add (ConfigurationPeer::APP_UID, '');
|
||||
$flagGettingStarted = ConfigurationPeer::doCount ($oCriteria);
|
||||
$this->memcache->set('flagGettingStarted', $flagGettingStarted, 8*3600) ;
|
||||
}
|
||||
|
||||
if ($flagGettingStarted == 0) {
|
||||
$this->setJSVar('flagGettingStarted', ($flagGettingStarted == 1));
|
||||
} else {
|
||||
$this->setJSVar('flagGettingStarted', ($flagGettingStarted == 0));
|
||||
}
|
||||
|
||||
G::loadClass('configuration');
|
||||
$oConf = new Configurations;
|
||||
|
||||
@@ -160,7 +160,6 @@ $sflag = (trim($sflag) != '') ? $sflag : '1';
|
||||
|
||||
//get date of next beat
|
||||
$nextBeatDate = $oServerConf->getHeartbeatProperty('HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF');
|
||||
$sflag = 1;
|
||||
|
||||
//if flag to send heartbeat is enabled, and it is time to send heartbeat, sent it using asynchronous beat.
|
||||
if (($sflag == "1") && ((strtotime("now") > $nextBeatDate) || is_null($nextBeatDate))) {
|
||||
|
||||
@@ -72,6 +72,9 @@ var Login = function() {
|
||||
if (flagGettingStarted) {
|
||||
this.gettingStartedWindow.show();
|
||||
}
|
||||
if (flagHeartBeat) {
|
||||
processHbInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
}();
|
||||
@@ -374,6 +377,19 @@ Login.initComponents = function()
|
||||
//Ext.getCmp('login-form').hide();
|
||||
}
|
||||
|
||||
processHbInfo = function() {
|
||||
Ext.Ajax.request({
|
||||
url : '../services/processHeartBeat_Ajax' ,
|
||||
params : {action:'processInformation'},
|
||||
success: function ( result, request ) {
|
||||
//console.info("");
|
||||
},
|
||||
failure: function ( result, request) {
|
||||
//Ext.MessageBox.alert(_('ID_FAILED'), result.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Login.forgotPassword = function()
|
||||
{
|
||||
this.window.hide();
|
||||
|
||||
Reference in New Issue
Block a user