Merge remote branch 'pm/master'
This commit is contained in:
@@ -505,47 +505,52 @@ function run_workspace_backup($args, $opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function run_workspace_restore($args, $opts) {
|
function run_workspace_restore($args, $opts) {
|
||||||
$filename = $args[0];
|
if (sizeof($args) > 0) {
|
||||||
|
|
||||||
G::verifyPath(PATH_DATA . 'upgrade', true);
|
$filename = $args[0];
|
||||||
|
|
||||||
if (strpos($filename, "/") === false && strpos($filename, '\\') === false) {
|
G::verifyPath(PATH_DATA . 'upgrade', true);
|
||||||
$filename = PATH_DATA . "backups/$filename";
|
|
||||||
if (!file_exists($filename) && substr_compare($filename, ".tar", -4, 4, true) != 0)
|
if (strpos($filename, "/") === false && strpos($filename, '\\') === false) {
|
||||||
$filename .= ".tar";
|
$filename = PATH_DATA . "backups/$filename";
|
||||||
}
|
if (!file_exists($filename) && substr_compare($filename, ".tar", -4, 4, true) != 0)
|
||||||
$info = array_key_exists("info", $opts);
|
$filename .= ".tar";
|
||||||
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
|
}
|
||||||
$port = array_key_exists("port", $opts) ? $opts['port'] : '';
|
$info = array_key_exists("info", $opts);
|
||||||
if ($info) {
|
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
|
||||||
workspaceTools::getBackupInfo($filename);
|
$port = array_key_exists("port", $opts) ? $opts['port'] : '';
|
||||||
|
if ($info) {
|
||||||
|
workspaceTools::getBackupInfo($filename);
|
||||||
|
} else {
|
||||||
|
CLI::logging("Restoring from $filename\n");
|
||||||
|
$workspace = array_key_exists("workspace", $opts) ? $opts['workspace'] : NULL;
|
||||||
|
$overwrite = array_key_exists("overwrite", $opts);
|
||||||
|
$multiple = array_key_exists("multiple", $opts);
|
||||||
|
$dstWorkspace = isset($args[1]) ? $args[1] : null;
|
||||||
|
if(!empty($multiple)){
|
||||||
|
if(!Bootstrap::isLinuxOs()){
|
||||||
|
CLI::error("This is not a Linux enviroment, cannot use this multiple [-m] feature.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
multipleFilesBackup::letsRestore ($filename,$workspace,$dstWorkspace,$overwrite);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$anotherExtention = ".*"; //if there are files with and extra extention: e.g. <file>.tar.number
|
||||||
|
$multiplefiles = glob($filename . $anotherExtention);// example: //shared/workflow_data/backups/myWorkspace.tar.*
|
||||||
|
if(count($multiplefiles) > 0)
|
||||||
|
{
|
||||||
|
CLI::error("Processmaker found these files: .\n");
|
||||||
|
foreach($multiplefiles as $index => $value){
|
||||||
|
CLI::logging($value . "\n");
|
||||||
|
}
|
||||||
|
CLI::error("Please, you should use -m parameter to restore them.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
workspaceTools::restore($filename, $workspace, $dstWorkspace, $overwrite, $lang, $port );
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
CLI::logging("Restoring from $filename\n");
|
throw new Exception("No workspace specified for restore");
|
||||||
$workspace = array_key_exists("workspace", $opts) ? $opts['workspace'] : NULL;
|
|
||||||
$overwrite = array_key_exists("overwrite", $opts);
|
|
||||||
$multiple = array_key_exists("multiple", $opts);
|
|
||||||
$dstWorkspace = isset($args[1]) ? $args[1] : null;
|
|
||||||
if(!empty($multiple)){
|
|
||||||
if(!Bootstrap::isLinuxOs()){
|
|
||||||
CLI::error("This is not a Linux enviroment, cannot use this multiple [-m] feature.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
multipleFilesBackup::letsRestore ($filename,$workspace,$dstWorkspace,$overwrite);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$anotherExtention = ".*"; //if there are files with and extra extention: e.g. <file>.tar.number
|
|
||||||
$multiplefiles = glob($filename . $anotherExtention);// example: //shared/workflow_data/backups/myWorkspace.tar.*
|
|
||||||
if(count($multiplefiles) > 0)
|
|
||||||
{
|
|
||||||
CLI::error("Processmaker found these files: .\n");
|
|
||||||
foreach($multiplefiles as $index => $value){
|
|
||||||
CLI::logging($value . "\n");
|
|
||||||
}
|
|
||||||
CLI::error("Please, you should use -m parameter to restore them.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
workspaceTools::restore($filename, $workspace, $dstWorkspace, $overwrite, $lang, $port );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -594,7 +594,11 @@ class Cases
|
|||||||
$aFields['CURRENT_USER'][]= $oCurUser->getUsrFirstname() . ' ' . $oCurUser->getUsrLastname();
|
$aFields['CURRENT_USER'][]= $oCurUser->getUsrFirstname() . ' ' . $oCurUser->getUsrLastname();
|
||||||
$aFields['TAS_UID'].= $value['TAS_UID'].'-';
|
$aFields['TAS_UID'].= $value['TAS_UID'].'-';
|
||||||
}
|
}
|
||||||
$aFields['CURRENT_USER'] = implode(" - ", array_values($aFields['CURRENT_USER']));
|
$aFields['CURRENT_USER'] = implode(" - ", array_values($aFields['CURRENT_USER']));
|
||||||
|
$tasksArray = array_filter(explode("-",$aFields['TAS_UID']));
|
||||||
|
if(count($tasksArray) == 1) {
|
||||||
|
$aFields['TAS_UID'] = $tasksArray[0];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$oCurUser->load($aAppDel['USR_UID']);
|
$oCurUser->load($aAppDel['USR_UID']);
|
||||||
$aFields['CURRENT_USER'] = $oCurUser->getUsrFirstname() . ' ' . $oCurUser->getUsrLastname();
|
$aFields['CURRENT_USER'] = $oCurUser->getUsrFirstname() . ' ' . $oCurUser->getUsrLastname();
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ class multipleFilesBackup
|
|||||||
private $dir_to_compress = "";
|
private $dir_to_compress = "";
|
||||||
private $filename = "backUpProcessMaker.tar";
|
private $filename = "backUpProcessMaker.tar";
|
||||||
private $fileSize = "1000";
|
private $fileSize = "1000";
|
||||||
// 1 GB by default.
|
// 1 GB by default.
|
||||||
private $sizeDescriptor = "m";
|
private $sizeDescriptor = "m";
|
||||||
//megabytes
|
//megabytes
|
||||||
private $tempDirectories = array ();
|
private $tempDirectories = array ();
|
||||||
|
|
||||||
/* Constructor
|
/* Constructor
|
||||||
* @filename contains the path and filename of the comppress file(s).
|
* @filename contains the path and filename of the comppress file(s).
|
||||||
* @size got the Max size of the compressed files, by default if the $size less to zero will mantains 1000 Mb as Max size.
|
* @size got the Max size of the compressed files, by default if the $size less to zero will mantains 1000 Mb as Max size.
|
||||||
*/
|
*/
|
||||||
public function multipleFilesBackup ($filename, $size)
|
public function multipleFilesBackup ($filename, $size)
|
||||||
{
|
{
|
||||||
@@ -33,24 +33,24 @@ class multipleFilesBackup
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Gets workspace information enough to make its backup.
|
/* Gets workspace information enough to make its backup.
|
||||||
* @workspace contains the workspace to be add to the commpression process.
|
* @workspace contains the workspace to be add to the commpression process.
|
||||||
*/
|
*/
|
||||||
public function addToBackup ($workspace)
|
public function addToBackup ($workspace)
|
||||||
{
|
{
|
||||||
//verifing if workspace exists.
|
//verifing if workspace exists.
|
||||||
if (! $workspace->workspaceExists()) {
|
if (! $workspace->workspaceExists()) {
|
||||||
echo "Workspace {$workspace->name} not found\n";
|
echo "Workspace {$workspace->name} not found\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//create destination path
|
//create destination path
|
||||||
if (! file_exists( PATH_DATA . "upgrade/" )) {
|
if (! file_exists( PATH_DATA . "upgrade/" )) {
|
||||||
mkdir( PATH_DATA . "upgrade/" );
|
mkdir( PATH_DATA . "upgrade/" );
|
||||||
}
|
}
|
||||||
$tempDirectory = PATH_DATA . "upgrade/" . basename( tempnam( __FILE__, '' ) );
|
$tempDirectory = PATH_DATA . "upgrade/" . basename( tempnam( __FILE__, '' ) );
|
||||||
mkdir( $tempDirectory );
|
mkdir( $tempDirectory );
|
||||||
$metadata = $workspace->getMetadata();
|
$metadata = $workspace->getMetadata();
|
||||||
CLI::logging( "Temporing up database...\n" );
|
CLI::logging( "Creating temporary files on database...\n" );
|
||||||
$metadata["databases"] = $workspace->exportDatabase( $tempDirectory );
|
$metadata["databases"] = $workspace->exportDatabase( $tempDirectory );
|
||||||
$metadata["directories"] = array ("{$workspace->name}.files");
|
$metadata["directories"] = array ("{$workspace->name}.files");
|
||||||
$metadata["version"] = 1;
|
$metadata["version"] = 1;
|
||||||
@@ -65,8 +65,8 @@ class multipleFilesBackup
|
|||||||
$this->tempDirectories[] = $tempDirectory;
|
$this->tempDirectories[] = $tempDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add a directory containing Db files or info files to be commpressed
|
/* Add a directory containing Db files or info files to be commpressed
|
||||||
* @directory the name and path of the directory to be add to the commpression process.
|
* @directory the name and path of the directory to be add to the commpression process.
|
||||||
*/
|
*/
|
||||||
private function addDirToBackup ($directory)
|
private function addDirToBackup ($directory)
|
||||||
{
|
{
|
||||||
@@ -75,37 +75,37 @@ class multipleFilesBackup
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commpress the DB and files into a single or several files with numerical series extentions
|
// Commpress the DB and files into a single or several files with numerical series extentions
|
||||||
|
|
||||||
public function letsBackup ()
|
public function letsBackup ()
|
||||||
{
|
{
|
||||||
// creating command
|
// creating command
|
||||||
$CommpressCommand = "tar czv ";
|
$CommpressCommand = "tar czv ";
|
||||||
$CommpressCommand .= $this->dir_to_compress;
|
$CommpressCommand .= $this->dir_to_compress;
|
||||||
$CommpressCommand .= "| split -b ";
|
$CommpressCommand .= "| split -b ";
|
||||||
$CommpressCommand .= $this->fileSize;
|
$CommpressCommand .= $this->fileSize;
|
||||||
$CommpressCommand .= "m -d - ";
|
$CommpressCommand .= "m -d - ";
|
||||||
$CommpressCommand .= $this->filename . ".";
|
$CommpressCommand .= $this->filename . ".";
|
||||||
//executing command to create the files
|
//executing command to create the files
|
||||||
echo exec( $CommpressCommand );
|
echo exec( $CommpressCommand );
|
||||||
//Remove leftovers dirs.
|
//Remove leftovers dirs.
|
||||||
foreach ($this->tempDirectories as $tempDirectory) {
|
foreach ($this->tempDirectories as $tempDirectory) {
|
||||||
CLI::logging( "Deleting: " . $tempDirectory . "\n" );
|
CLI::logging( "Deleting: " . $tempDirectory . "\n" );
|
||||||
G::rm_dir( $tempDirectory );
|
G::rm_dir( $tempDirectory );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Restore from file(s) commpressed by letsBackup function, into a temporary directory
|
/* Restore from file(s) commpressed by letsBackup function, into a temporary directory
|
||||||
* @ filename got the name and path of the compressed file(s), if there are many files with file extention as a numerical series, the extention should be discriminated.
|
* @ filename got the name and path of the compressed file(s), if there are many files with file extention as a numerical series, the extention should be discriminated.
|
||||||
* @ srcWorkspace contains the workspace to be restored.
|
* @ srcWorkspace contains the workspace to be restored.
|
||||||
* @ dstWorkspace contains the workspace to be overwriting.
|
* @ dstWorkspace contains the workspace to be overwriting.
|
||||||
* @ overwrite got the option true if the workspace will be overwrite.
|
* @ overwrite got the option true if the workspace will be overwrite.
|
||||||
*/
|
*/
|
||||||
static public function letsRestore ($filename, $srcWorkspace, $dstWorkspace = null, $overwrite = true)
|
static public function letsRestore ($filename, $srcWorkspace, $dstWorkspace = null, $overwrite = true)
|
||||||
{
|
{
|
||||||
// Needed info:
|
// Needed info:
|
||||||
// TEMPDIR /shared/workflow_data/upgrade/
|
// TEMPDIR /shared/workflow_data/upgrade/
|
||||||
// BACKUPS /shared/workflow_data/backups/
|
// BACKUPS /shared/workflow_data/backups/
|
||||||
// Creating command cat myfiles_split.tgz_* | tar xz
|
// Creating command cat myfiles_split.tgz_* | tar xz
|
||||||
$DecommpressCommand = "cat " . $filename . ".* ";
|
$DecommpressCommand = "cat " . $filename . ".* ";
|
||||||
$DecommpressCommand .= " | tar xzv";
|
$DecommpressCommand .= " | tar xzv";
|
||||||
|
|
||||||
@@ -116,13 +116,13 @@ class multipleFilesBackup
|
|||||||
} else {
|
} else {
|
||||||
throw new Exception( "Could not create directory:" . $parentDirectory );
|
throw new Exception( "Could not create directory:" . $parentDirectory );
|
||||||
}
|
}
|
||||||
//Extract all backup files, including database scripts and workspace files
|
//Extract all backup files, including database scripts and workspace files
|
||||||
CLI::logging( "Restoring into " . $tempDirectory . "\n" );
|
CLI::logging( "Restoring into " . $tempDirectory . "\n" );
|
||||||
chdir( $tempDirectory );
|
chdir( $tempDirectory );
|
||||||
echo exec( $DecommpressCommand );
|
echo exec( $DecommpressCommand );
|
||||||
CLI::logging( "\nUncompressed into: " . $tempDirectory . "\n" );
|
CLI::logging( "\nUncompressed into: " . $tempDirectory . "\n" );
|
||||||
|
|
||||||
//Search for metafiles in the new standard (the old standard would contain meta files.
|
//Search for metafiles in the new standard (the old standard would contain meta files.
|
||||||
$metaFiles = glob( $tempDirectory . "/*.meta" );
|
$metaFiles = glob( $tempDirectory . "/*.meta" );
|
||||||
if (empty( $metaFiles )) {
|
if (empty( $metaFiles )) {
|
||||||
$metaFiles = glob( $tempDirectory . "/*.txt" );
|
$metaFiles = glob( $tempDirectory . "/*.txt" );
|
||||||
|
|||||||
@@ -150,20 +150,65 @@ TimeSeriesPresenter.prototype.historicData = function (indicator, periodicity, i
|
|||||||
var graphData = [];
|
var graphData = [];
|
||||||
$.each(data, function(index, originalObject) {
|
$.each(data, function(index, originalObject) {
|
||||||
var newObject = {datalabel: that.periodColumnName(periodicity, originalObject) + '/' + originalObject['YEAR'],
|
var newObject = {datalabel: that.periodColumnName(periodicity, originalObject) + '/' + originalObject['YEAR'],
|
||||||
value: originalObject.VALUE
|
value: originalObject.VALUE,
|
||||||
|
period: that.periodColumnName(periodicity, originalObject),
|
||||||
|
year: originalObject.YEAR
|
||||||
}
|
}
|
||||||
graphData.push(newObject);
|
graphData.push(newObject);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
for (var y = initYear; y <= endYear; y++) {
|
||||||
|
var periodRunFrom = (y == initYear) ? initPeriod : 1;
|
||||||
|
var periodRunTo = (y == endYear) ? endPeriod : that.periodsInAYear(periodicity);
|
||||||
|
for (var p = periodRunFrom; p <= periodRunTo; p++) {
|
||||||
|
var results = $.grep(graphData,
|
||||||
|
function(obj) {
|
||||||
|
return (obj.year == y && obj.period == p);
|
||||||
|
});
|
||||||
|
if (results.length == 0) {
|
||||||
|
var newObject = { datalabel: p + '/' + y,
|
||||||
|
value: 0,
|
||||||
|
period: p,
|
||||||
|
year: y
|
||||||
|
};
|
||||||
|
graphData.push(newObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
graphData = graphData.sort(function (a, b) {
|
||||||
|
return (a.year * 10 + a.period * 1) - (b.year * 10 + b.period * 1);
|
||||||
|
});
|
||||||
requestFinished.resolve(graphData);
|
requestFinished.resolve(graphData);
|
||||||
});
|
});
|
||||||
return requestFinished.promise();
|
return requestFinished.promise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.periodsInAYear = function (periodicity) {
|
||||||
|
var retval = "";
|
||||||
|
switch (periodicity * 1) {
|
||||||
|
case this.helper.ReportingPeriodicityEnum.MONTH:
|
||||||
|
retval = 12
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.QUARTER:
|
||||||
|
retval = 4;
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.SEMESTER:
|
||||||
|
retval = 2;
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.YEAR:
|
||||||
|
retval = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (retval == "") {
|
||||||
|
throw new Error("The periodicity " + periodicity + " is not supported.");
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TimeSeriesPresenter.prototype.periodColumnName = function (periodicity, object) {
|
TimeSeriesPresenter.prototype.periodColumnName = function (periodicity, object) {
|
||||||
var retval = "";
|
var retval = "";
|
||||||
switch (periodicity*1) {
|
switch (periodicity * 1) {
|
||||||
case this.helper.ReportingPeriodicityEnum.MONTH:
|
case this.helper.ReportingPeriodicityEnum.MONTH:
|
||||||
retval = object.MONTH;
|
retval = object.MONTH;
|
||||||
break;
|
break;
|
||||||
@@ -251,16 +296,16 @@ TimeSeriesPresenter.prototype.periodEndDate = function (periodicity, period, yea
|
|||||||
var retval = null;
|
var retval = null;
|
||||||
switch (periodicity * 1) {
|
switch (periodicity * 1) {
|
||||||
case this.helper.ReportingPeriodicityEnum.MONTH:
|
case this.helper.ReportingPeriodicityEnum.MONTH:
|
||||||
retval = new Date(year, period, 0);
|
retval = new Date(year, period, 0, 23,59,59);
|
||||||
break;
|
break;
|
||||||
case this.helper.ReportingPeriodicityEnum.QUARTER:
|
case this.helper.ReportingPeriodicityEnum.QUARTER:
|
||||||
retval = new Date(year, 3 * (period), 0);
|
retval = new Date(year, 3 * (period), 0, 23, 59, 59);
|
||||||
break;
|
break;
|
||||||
case this.helper.ReportingPeriodicityEnum.SEMESTER:
|
case this.helper.ReportingPeriodicityEnum.SEMESTER:
|
||||||
retval = new Date(year, 6 * (period), 0);
|
retval = new Date(year, 6 * (period), 0, 23, 59, 59);
|
||||||
break;
|
break;
|
||||||
case this.helper.ReportingPeriodicityEnum.YEAR:
|
case this.helper.ReportingPeriodicityEnum.YEAR:
|
||||||
retval = new Date(year, 11, 31);
|
retval = new Date(year, 11, 31, 23, 59, 59);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (retval == null) {
|
if (retval == null) {
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ $(document).ready(function() {
|
|||||||
$('#comparisonBreadcrumb').find('li').remove()
|
$('#comparisonBreadcrumb').find('li').remove()
|
||||||
$('#comparisonBreadcrumb')
|
$('#comparisonBreadcrumb')
|
||||||
.append ('<li><a class="bread-back-selector2" href="#"><i class="fa fa-chevron-left fa-fw"></i>Return to Indicator View</a>');
|
.append ('<li><a class="bread-back-selector2" href="#"><i class="fa fa-chevron-left fa-fw"></i>Return to Indicator View</a>');
|
||||||
|
|
||||||
tsPresenter.historicData(
|
tsPresenter.historicData(
|
||||||
$('#indicatorList').val(),
|
$('#indicatorList').val(),
|
||||||
$('#periodicityList').val(),
|
$('#periodicityList').val(),
|
||||||
@@ -49,8 +48,8 @@ $(document).ready(function() {
|
|||||||
showErrorBars: false
|
showErrorBars: false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$('#indicatorsView').hide();
|
$('#indicatorsView').hide();
|
||||||
|
$('#scrollImg').hide();
|
||||||
$('#compareDiv').show();
|
$('#compareDiv').show();
|
||||||
var graph1 = new LineChart(data, graphParams1, null, null);
|
var graph1 = new LineChart(data, graphParams1, null, null);
|
||||||
graph1.drawChart();
|
graph1.drawChart();
|
||||||
@@ -59,6 +58,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$('body').on('click','.bread-back-selector2', function() {
|
$('body').on('click','.bread-back-selector2', function() {
|
||||||
$('#indicatorsView').show();
|
$('#indicatorsView').show();
|
||||||
|
$('#scrollImg').show();
|
||||||
$('#compareDiv').hide();
|
$('#compareDiv').hide();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ ViewDashboardPresenter.prototype.statusViewModel = function(indicatorId, data) {
|
|||||||
};
|
};
|
||||||
var newObject3 = {
|
var newObject3 = {
|
||||||
datalabel : originalObject.taskTitle,
|
datalabel : originalObject.taskTitle,
|
||||||
value : originalObject.percentageTotalOnTime
|
value : 100 - (originalObject.percentageTotalOverdue + originalObject.percentageTotalAtRisk)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (newObject1.value > 0) {
|
if (newObject1.value > 0) {
|
||||||
|
|||||||
@@ -350,16 +350,6 @@ $(document).ready(function() {
|
|||||||
model.setPositionIndicator(dashboard);
|
model.setPositionIndicator(dashboard);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------clicks----------------------------*/
|
|
||||||
/*$('body').on('click','.btn-compare', function() {
|
|
||||||
presenter.getDashboardIndicators(window.currentDashboardId, defaultInitDate(), defaultEndDate())
|
|
||||||
.done(function(indicatorsVM) {
|
|
||||||
fillIndicatorWidgets(indicatorsVM);
|
|
||||||
loadIndicator(getFavoriteIndicator().id, defaultInitDate(), defaultEndDate());
|
|
||||||
});
|
|
||||||
});*/
|
|
||||||
|
|
||||||
$('#dashboardsList').on('click','.das-title-selector', function() {
|
$('#dashboardsList').on('click','.das-title-selector', function() {
|
||||||
var dashboardId = $(this).parent().data('dashboard-id');
|
var dashboardId = $(this).parent().data('dashboard-id');
|
||||||
window.currentDashboardId = dashboardId;
|
window.currentDashboardId = dashboardId;
|
||||||
@@ -491,6 +481,9 @@ var initialDraw = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var loadIndicator = function (indicatorId, initDate, endDate) {
|
var loadIndicator = function (indicatorId, initDate, endDate) {
|
||||||
|
$('#indicatorsView').show();
|
||||||
|
$('#scrollImg').show();
|
||||||
|
$('#compareDiv').hide();
|
||||||
if (indicatorId == null || indicatorId === undefined) {return;}
|
if (indicatorId == null || indicatorId === undefined) {return;}
|
||||||
var builder = new WidgetBuilder();
|
var builder = new WidgetBuilder();
|
||||||
window.currentIndicator = builder.getIndicatorLoadedById(indicatorId);
|
window.currentIndicator = builder.getIndicatorLoadedById(indicatorId);
|
||||||
@@ -569,6 +562,7 @@ var fillDashboardsList = function (presenterData) {
|
|||||||
window.loadedDashboards = presenterData;
|
window.loadedDashboards = presenterData;
|
||||||
for (key in presenterData) {
|
for (key in presenterData) {
|
||||||
var dashboard = presenterData[key];
|
var dashboard = presenterData[key];
|
||||||
|
dashboard.title = dashboard.title.replace(''', "'");
|
||||||
$('#dashboardsList').append(template(dashboard));
|
$('#dashboardsList').append(template(dashboard));
|
||||||
if (dashboard.isFavorite == 1) {
|
if (dashboard.isFavorite == 1) {
|
||||||
window.currentDashboardId = dashboard.id;
|
window.currentDashboardId = dashboard.id;
|
||||||
|
|||||||
@@ -169,6 +169,17 @@ try {
|
|||||||
|
|
||||||
/* Redirect to next step */
|
/* Redirect to next step */
|
||||||
unset( $_SESSION['bNoShowSteps'] );
|
unset( $_SESSION['bNoShowSteps'] );
|
||||||
|
|
||||||
|
/* Execute Before Triggers for first Task*/
|
||||||
|
$oStep = new Step;
|
||||||
|
$oStep = $oStep->loadByProcessTaskPosition($_SESSION['PROCESS'], $_SESSION['TASK'], 1);
|
||||||
|
if($oStep) {
|
||||||
|
$triggerFields["APP_DATA"] = $oCase->ExecuteTriggers( $_SESSION['TASK'], $oStep->getStepTypeObj(), $oStep->getStepUidObj(), 'BEFORE', $aFields['APP_DATA'] );
|
||||||
|
$oCase->updateCase( $_SESSION['APPLICATION'], $triggerFields );
|
||||||
|
$_SESSION['beforeTriggersExecuted'] = true;
|
||||||
|
}
|
||||||
|
/*end Execute Before Triggers for first Task*/
|
||||||
|
|
||||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
||||||
$sPage = $aNextStep['PAGE'];
|
$sPage = $aNextStep['PAGE'];
|
||||||
G::header( 'location: ' . $sPage );
|
G::header( 'location: ' . $sPage );
|
||||||
|
|||||||
@@ -159,7 +159,11 @@ if ($flagExecuteBeforeTriggers) {
|
|||||||
|
|
||||||
if (! isset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] )) {
|
if (! isset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] )) {
|
||||||
//Execute before triggers - Start
|
//Execute before triggers - Start
|
||||||
$Fields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], $_GET['TYPE'], $_GET['UID'], 'BEFORE', $Fields['APP_DATA'] );
|
if (!isset($_SESSION['beforeTriggersExecuted'])) {
|
||||||
|
$Fields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], $_GET['TYPE'], $_GET['UID'], 'BEFORE', $Fields['APP_DATA'] );
|
||||||
|
} else {
|
||||||
|
unset($_SESSION['beforeTriggersExecuted']);
|
||||||
|
}
|
||||||
//Execute before triggers - End
|
//Execute before triggers - End
|
||||||
} else {
|
} else {
|
||||||
unset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] );
|
unset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] );
|
||||||
|
|||||||
@@ -6,8 +6,12 @@ Ext.FlashComponent.EXPRESS_INSTALL_URL = '/images/expressinstall.swf';
|
|||||||
// The Quicktips are used for the toolbar and Tree mouseover tooltips!
|
// The Quicktips are used for the toolbar and Tree mouseover tooltips!
|
||||||
|
|
||||||
// Refresh treePanel
|
// Refresh treePanel
|
||||||
if (typeof(parent.timer) != 'undefined') {
|
try {
|
||||||
parent.timer();
|
if (typeof(parent.timer) != 'undefined') {
|
||||||
|
parent.timer();
|
||||||
|
}
|
||||||
|
} catch(theError) {
|
||||||
|
// This try-catch is for Zimbra error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -937,8 +937,7 @@ if (! defined( 'EXECUTE_BY_CRON' )) {
|
|||||||
Bootstrap::LoadClass( 'sessions' );
|
Bootstrap::LoadClass( 'sessions' );
|
||||||
$oSessions = new Sessions();
|
$oSessions = new Sessions();
|
||||||
if ($aSession = $oSessions->verifySession( $_GET['sid'] )) {
|
if ($aSession = $oSessions->verifySession( $_GET['sid'] )) {
|
||||||
$pathFile = $filter->validateInput('classes/model/Users.php','path');
|
require_once 'classes/model/Users.php';
|
||||||
require_once $pathFile;
|
|
||||||
$oUser = new Users();
|
$oUser = new Users();
|
||||||
$aUser = $oUser->load( $aSession['USR_UID'] );
|
$aUser = $oUser->load( $aSession['USR_UID'] );
|
||||||
$_SESSION['USER_LOGGED'] = $aUser['USR_UID'];
|
$_SESSION['USER_LOGGED'] = $aUser['USR_UID'];
|
||||||
|
|||||||
Reference in New Issue
Block a user