Merge remote branch 'upstream/master'

This commit is contained in:
dheeyi
2015-04-06 11:47:06 -04:00
13 changed files with 538 additions and 563 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -207,18 +207,13 @@ class pmDynaform
if ($this->lang === null && $key === "language" && isset($json->language)) {
$this->lang = $json->language;
}
if ($key === "label" && isset($json->label) && $this->langs !== null && isset($this->langs->{$this->lang})) {
$langs = $this->langs->{$this->lang}->Labels;
foreach ($langs as $langsValue) {
if ($json->label === $langsValue->msgid)
$json->label = $langsValue->msgstr;
}
}
if ($key === "title" && isset($json->title) && $this->langs !== null && isset($this->langs->{$this->lang})) {
$langs = $this->langs->{$this->lang}->Labels;
foreach ($langs as $langsValue) {
if ($json->title === $langsValue->msgid)
$json->title = $langsValue->msgstr;
if ($this->langs !== null) {
if (($key === "label" || $key === "hint" || $key === "placeholder" || $key === "validateMessage" || $key === "alternateText" || $key === "comment" || $key === "alt") && isset($json->{$key}) && isset($this->langs->{$this->lang})) {
$langs = $this->langs->{$this->lang}->Labels;
foreach ($langs as $langsValue) {
if ($json->{$key} === $langsValue->msgid)
$json->{$key} = $langsValue->msgstr;
}
}
}
}
@@ -644,9 +639,26 @@ class pmDynaform
}
if (!$sw1 && !$sw2) {
if ($key === "label") {
$json->label;
array_push($this->dyn_conten_labels, $json->label);
}
if ($key === "hint") {
array_push($this->dyn_conten_labels, $json->hint);
}
if ($key === "placeholder") {
array_push($this->dyn_conten_labels, $json->placeholder);
}
if ($key === "validateMessage") {
array_push($this->dyn_conten_labels, $json->validateMessage);
}
if ($key === "alternateText") {
array_push($this->dyn_conten_labels, $json->alternateText);
}
if ($key === "comment") {
array_push($this->dyn_conten_labels, $json->comment);
}
if ($key === "alt") {
array_push($this->dyn_conten_labels, $json->alt);
}
}
}
}

View File

@@ -1793,67 +1793,52 @@ class AppCacheView extends BaseAppCacheView
return $criteria;
}
/*----------------------------------********---------------------------------*/
function fillReportByUser ()
{
try {
global $sFilter;
global $dateInit;
global $dateFinish;
if (strpos($sFilter, 'report_by_user') === false) {
return false;
}
if ($dateInit == null) {
eprintln("You must enter the starting date.", "red");
eprintln('Example: +init-date"YYYY-MM-DD HH:MM:SS" +finish-date"YYYY-MM-DD HH:MM:SS"', "red");
return false;
}
$dateFinish = ($dateFinish != null) ? $dateFinish : date("Y-m-d H:i:s");
$appcv = new AppCacheView();
$appcv->setPathToAppCacheFiles( PATH_METHODS . 'setup' . PATH_SEP . 'setupSchemas' . PATH_SEP );
setExecutionMessage("Calculating data to fill the 'User Reporting'...");
$appcv->fillReportByUser($dateInit, $dateFinish);
setExecutionResultMessage("DONE");
} catch (Exception $e) {
setExecutionResultMessage("WITH ERRORS", "error");
eprintln(" '-" . $e->getMessage(), "red");
saveLog("fillReportByUser", "error", "Error in fill report by user: " . $e->getMessage());
}
}
function fillReportByProcess ()
{
try {
global $sFilter;
global $dateInit;
global $dateFinish;
if (strpos($sFilter, 'report_by_process') === false) {
return false;
}
if ($dateInit == null) {
eprintln("You must enter the starting date.", "red");
eprintln('Example: +init-date"YYYY-MM-DD HH:MM:SS" +finish-date"YYYY-MM-DD HH:MM:SS"', "red");
return false;
}
$dateFinish = ($dateFinish != null) ? $dateFinish : date("Y-m-d H:i:s");
$appcv = new AppCacheView();
$appcv->setPathToAppCacheFiles( PATH_METHODS . 'setup' . PATH_SEP . 'setupSchemas' . PATH_SEP );
setExecutionMessage("Calculating data to fill the 'Process Reporting'...");
$appcv->fillReportByProcess($dateInit, $dateFinish);
setExecutionResultMessage("DONE");
} catch (Exception $e) {
setExecutionResultMessage("WITH ERRORS", "error");
eprintln(" '-" . $e->getMessage(), "red");
saveLog("fillReportByProcess", "error", "Error in fill report by process: " . $e->getMessage());
}
}
/*----------------------------------********---------------------------------*/
public function fillReportByUser ($dateInit, $dateFinish)
{
$con = Propel::getConnection("workflow");
$stmt = $con->createStatement();
$filenameSql = $this->pathToAppCacheFiles . "triggerFillReportByUser.sql";
if (!file_exists($filenameSql)) {
throw (new Exception("file triggerFillReportByUser.sql doesn't exist"));
}
$sql = "TRUNCATE TABLE USR_REPORTING";
$stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC);
$sql = explode(';', file_get_contents($filenameSql));
foreach ($sql as $key => $val) {
$val = str_replace('{init_date}', $dateInit, $val);
$val = str_replace('{finish_date}', $dateFinish, $val);
$stmt->executeQuery($val);
}
}
public function fillReportByProcess ($dateInit, $dateFinish)
{
$con = Propel::getConnection("workflow");
$stmt = $con->createStatement();
$filenameSql = $this->pathToAppCacheFiles . "triggerFillReportByProcess.sql";
if (!file_exists($filenameSql)) {
throw (new Exception("file triggerFillReportByProcess.sql doesn't exist"));
}
$sql = "TRUNCATE TABLE PRO_REPORTING";
$stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC);
$sql = explode(';', file_get_contents($filenameSql));
foreach ($sql as $key => $val) {
$val = str_replace('{init_date}', $dateInit, $val);
$val = str_replace('{finish_date}', $dateFinish, $val);
$stmt->executeQuery($val);
}
}
/*----------------------------------********---------------------------------*/
}

View File

@@ -322,7 +322,7 @@ class Installer extends Controller
if (is_dir( $aux['dirname'] )) {
if (! file_exists( $_REQUEST['pathLogFile'] )) {
@file_put_contents( $_REQUEST['pathLogFile'], '' );
chmod($_REQUEST['pathShared'], 0770);
@chmod($_REQUEST['pathShared'], 0770);
}
}
}

View File

@@ -20,11 +20,17 @@ class StrategicDashboard extends Controller
{
global $RBAC;
if ($RBAC->userCanAccess('PM_DASHBOARD') != 1) {
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header( 'location: login/login' );
exit(0);
}
$licensedFeatures = & PMLicensedFeatures::getSingleton();
if (!$licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
}
$this->usrId = $RBAC->aUserInfo['USER_INFO']['USR_UID'];
$this->urlProxy = '/api/1.0/' . SYS_SYS . '/';
//change

View File

@@ -59952,7 +59952,6 @@ INSERT INTO CATALOG (CAT_UID, CAT_LABEL_ID, CAT_TYPE, CAT_FLAG, CAT_OBSERVATION,
('300','ID_SEMESTER','PERIODICITY','','','2015-03-04','2015-03-04'),
('400','ID_YEAR','PERIODICITY','','','2015-03-04','2015-03-04'),
('1010','ID_PROCESS_EFFICIENCE','INDICATOR','','','2015-03-04','2015-03-04'),
('1020','ID_PROCESS_INEFFICIENCE','INDICATOR','','','2015-03-04','2015-03-04'),
('1030','ID_EMPLYEE_EFFICIENCIE','INDICATOR','','','2015-03-04','2015-03-04'),
('1040','ID_USER_INEFFICIENCE','INDICATOR','','','2015-03-04','2015-03-04'),
('1050','ID_OVER_DUE','INDICATOR','%','Unit for displaying','2015-03-04','2015-03-04'),

View File

@@ -255,7 +255,7 @@
//Items by each type:
var proEffic = '<div class="col-lg-3 col-md-6 dashPro" id="proEfficItem" data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">\
<div class="proGreen panel panel-green grid-stack-item-content">\
<div class="proGreen panel panel-green grid-stack-item-content" style="min-width: 200px;">\
<a data-toggle="collapse" href="#efficiencyindex" aria-expanded="false" aria-controls="efficiencyindex">\
<div class="panel-heading">\
<div class="row">\
@@ -273,7 +273,7 @@
</div>';
var userEffic = '<div class="col-lg-3 col-md-6 dashUsr" id="userEfficItem" data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">\
<div class="proRed panel panel-red grid-stack-item-content">\
<div class="proRed panel panel-red grid-stack-item-content" style="min-width: 200px;">\
<a data-toggle="collapse" href="#userefficiency" aria-expanded="false" aria-controls="userefficiency">\
<div class="panel-heading">\
<div class="row">\
@@ -291,7 +291,7 @@
</div>';
var compCases = '<div class="col-lg-3 col-md-6" id="generalLowItem" data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">\
<div class="panel ie-panel panel-primary grid-stack-item-content">\
<div class="panel ie-panel panel-primary grid-stack-item-content" style="min-width: 200px;">\
<a data-toggle="collapse" href="#completedcases" aria-expanded="false" aria-controls="completedcases">\
<div class="panel-heading">\
<div class="row">\
@@ -312,7 +312,7 @@
</div>';
var numCases = '<div class="col-lg-3 col-md-6" id="generalGreatItem" data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">\
<div class="panel ie-panel panel-yellow grid-stack-item-content">\
<div class="panel ie-panel panel-yellow grid-stack-item-content" style="min-width: 200px;">\
<a data-toggle="collapse" href="#numbercases" aria-expanded="false" aria-controls="numbercases">\
<div class="panel-heading">\
<div class="row">\
@@ -333,11 +333,44 @@
</div>';
//Data by Indicator elements:
var proEfficDataGen = '<div class="process-div well" id="proEfficiencyData" data-gs-no-resize="true" style="height:auto;"><div class="panel-heading greenbg"><span id="proEfficTitle"> '+ G_STRING.ID_PRO_EFFICIENCY_INDEX +' </span></div><div class="text-center huge"><div class="col-xs-3 vcenter"><div id="proEfficIndex" class="green">26%</div><div class="small grey">'+ G_STRING.ID_EFFICIENCY_INDEX +'</div></div><div class="col-xs-3 vcenter"><div id="proEfficCost" class="red">$1813.50</div><div class="small grey">'+ G_STRING.ID_INEFFICIENCY_COST +'</div></div><div class="col-xs-6" id="proEfficGenGraph" style="width:500px;height:300px; margin-left:80px;"><img src="../dist/img/graph.png"/></div></div><div class="clearfix"></div></div>';
var proEfficDataGen = '<div class="process-div well" id="proEfficiencyData" data-gs-no-resize="true" style="clear:both;position:relative;height:auto;">\
<div class="panel-heading greenbg"><span id="proEfficTitle"> '+ G_STRING.ID_PRO_EFFICIENCY_INDEX +' </span></div>\
<div class="text-center huge">\
<div class="col-xs-3 vcenter">\
<div id="proEfficIndex" class="green">26%</div>\
<div class="small grey">'+ G_STRING.ID_EFFICIENCY_INDEX +'</div>\
</div>\
<div class="col-xs-3 vcenter">\
<div id="proEfficCost" class="red">$1813.50</div>\
<div class="small grey">'+ G_STRING.ID_INEFFICIENCY_COST +'</div>\
</div>\
<div class="col-xs-6" id="proEfficGenGraph" style="width:500px;height:300px; margin-left:80px;"><img src="../dist/img/graph.png" /></div>\
</div>\
<div class="clearfix"></div>\
</div>';
var proEfficData = '<div class="process-div well" id="proEfficiencyData" data-gs-no-resize="true"><div class="panel-heading greenbg"><ol class="breadcrumb"><li><a id="link" href="javascript:back();"><i class="fa fa-chevron-left fa-fw"></i><span id="proEfficTitle"> '+ G_STRING.ID_PRO_EFFICIENCY_INDEX +' </span></a></li><li id="proDetName">Process 1 name</li></ol></div><div class="text-center huge"><div class="col-xs-3 vcenter"><div id="proEfficIndex" class="green">26%</div><div class="small grey">'+ G_STRING.ID_EFFICIENCY_INDEX +'</div></div><div class="col-xs-3 vcenter"><div id="proEfficCost" class="red">$1813.50</div><div class="small grey">'+ G_STRING.ID_INEFFICIENCY_COST +'</div></div><div class="col-xs-6" id="proEfficGraph" style="width:570px; height:300px; margin-left:70px; "><img src="../dist/img/graph.png"/></div></div><div class="clearfix"></div></div>';
var proEfficData = '<div class="process-div well" id="proEfficiencyData" data-gs-no-resize="true" style="clear:both;position:relative;">\
<div class="panel-heading greenbg">\
<ol class="breadcrumb">\
<li><a id="link" href="javascript:back();"><i class="fa fa-chevron-left fa-fw"></i><span id="proEfficTitle"> '+ G_STRING.ID_PRO_EFFICIENCY_INDEX +' </span></a></li>\
<li id="proDetName">Process 1 name</li>\
</ol>\
</div>\
<div class="text-center huge">\
<div class="col-xs-3 vcenter">\
<div id="proEfficIndex" class="green">26%</div>\
<div class="small grey">'+ G_STRING.ID_EFFICIENCY_INDEX +'</div>\
</div>\
<div class="col-xs-3 vcenter">\
<div id="proEfficCost" class="red">$1813.50</div>\
<div class="small grey">'+ G_STRING.ID_INEFFICIENCY_COST +'</div>\
</div>\
<div class="col-xs-6" id="proEfficGraph" style="width:570px; height:300px; margin-left:70px; "><img src="../dist/img/graph.png" /></div>\
</div>\
<div class="clearfix"></div>\
</div>';
var proEfficDetail = '<div id="process" class="process-div well hideme" data-gs-no-resize="true">\
var proEfficDetail = '<div id="process" class="process-div well hideme" data-gs-no-resize="true" style="clear:both;position:relative;">\
<div class="col-lg-12 vcenter-task">\
<a href="#" class="process-button">\
<div class="col-xs-3 text-left title-process">\
@@ -402,11 +435,32 @@
</div>\
</div>';
var generalDataLow = '<div class="process-div well" data-gs-no-resize="true"><div class="panel-heading bluebg"><ol class="breadcrumb"><li id="generalLowTitle">'+ G_STRING.ID_COMPLETED_CASES +'</li></ol></div><div class="text-center huge"><div class="col-xs-6" id="generalGraph1" style="width:600px; height:300px;"><img src="../dist/img/graph.png"/></div><div class="col-xs-6" id="generalGraph2" style="width:600px; height:300px;margin-left:60px;"><img src="../dist/img/graph.png"/></div></div><div class="clearfix"></div></div>';
var generalDataLow = '<div class="process-div well" data-gs-no-resize="true" style="clear:both;position:relative;height:auto;">\
<div class="panel-heading bluebg">\
<ol class="breadcrumb">\
<li id="generalLowTitle">'+ G_STRING.ID_COMPLETED_CASES +'</li>\
</ol>\
</div>\
<div class="text-center huge">\
<div class="col-xs-6" id="generalGraph1" style="width:600px; height:300px;"><img src="../dist/img/graph.png" /></div>\
<div class="col-xs-6" id="generalGraph2" style="width:600px; height:300px;margin-left:60px;"><img src="../dist/img/graph.png" /></div>\
</div>\
<div class="clearfix"></div>\
</div>';
var generalDataGreat = ' <div class="process-div well" data-gs-no-resize="true"><div class="panel-heading yellowbg"><ol class="breadcrumb"><li id="generalGreatTitle">'+ G_STRING.ID_NUMBER_CASES +'</li></ol></div><div class="text-center huge"><div class="col-xs-6" id="generalGraph1" style="width:600px; height:300px;"><img src="../dist/img/graph.png"/></div><div class="col-xs-6" id="generalGraph2" style="width:600px; height:300px; margin-left:60px;"><img src="../dist/img/graph.png"/></div></div><div class="clearfix"></div></div>';
var generalDataGreat = '<div class="process-div well" data-gs-no-resize="true" style="clear:both;position:relative;height:auto;">\
<div class="panel-heading yellowbg">\
<ol class="breadcrumb">\
<li id="generalGreatTitle">'+ G_STRING.ID_NUMBER_CASES +'</li>\
</ol>\
</div>\
<div class="text-center huge">\
<div class="col-xs-6" id="generalGraph1" style="width:600px; height:300px;"><img src="../dist/img/graph.png" /></div>\
<div class="col-xs-6" id="generalGraph2" style="width:600px; height:300px; margin-left:60px;"><img src="../dist/img/graph.png" /></div>\
</div>\
<div class="clearfix"></div>\
</div>';
var oType;
var actualDashId;

View File

@@ -55,7 +55,7 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1 || $RBAC->userCanAccess('PM_USERS') ==
// NEW DASHBOARD MODULE
$licensedFeatures = & PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=') && ($RBAC->userCanAccess('PM_SETUP') == 1 || $RBAC->userCanAccess('PM_USERS') == 1)) {
$G_TMP_MENU->AddIdRawOption('DASHBOARD+', 'strategicDashboard/main', G::LoadTranslation('ID_DASHBOARD'), '', '', '', 'x-pm-dashboard');
$G_TMP_MENU->AddIdRawOption('DASHBOARD+', 'strategicDashboard/main', G::LoadTranslation('ID_STRATEGIC_DASHBOARD'), '', '', '', 'x-pm-dashboard');
}
/*----------------------------------********---------------------------------*/

View File

@@ -20,7 +20,6 @@ INSERT INTO PRO_REPORTING (
TOTAL_CASES_OVERDUE,
TOTAL_CASES_ON_TIME
)
SELECT
APPLICATION.PRO_UID,
DATE_FORMAT(APPLICATION.APP_INIT_DATE, '%m') AS `MONTH`,

View File

@@ -24,6 +24,13 @@
$RBAC->requirePermissions( 'PM_DASHBOARD' );
$licensedFeatures = & PMLicensedFeatures::getSingleton();
if (!$licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
}
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'DASHBOARD+';

File diff suppressed because it is too large Load Diff

View File

@@ -29,16 +29,15 @@
<script type="text/javascript" src="/js/d3/d3.js" ></script>
<script type="text/javascript" src="/js/d3/d3.tip.js"></script>
<script type="text/javascript" src="/js/pmchart/pmCharts.js"></script>
<script>
<script type="text/javascript" >
var urlProxy = '{$urlProxy}';
var usrId = '{$usrId}';
var token = '{$credentials.access_token}';
var G_STRING = [];
{foreach from=$translation key=index item=option}
G_STRING['{$index}'] = '{$option}';
G_STRING['{$index}'] = "{$option}";
{/foreach}
</script>
<script type="text/javascript" src="/jscore/strategicDashboard/dashboardProxyTest.js"></script>
<script type="text/javascript" src="/jscore/strategicDashboard/dashboard.js"></script>
<script type="text/javascript" src="/jscore/strategicDashboard/dashboardProxy.js"></script>
</head>
@@ -56,37 +55,47 @@
<i class="fa fa-chevron-down fa-1x"></i>
</a>
<h4 id="titleH4" class="header-dashboard">{translate label="ID_MANAGERS_DASHBOARDS"}</h4>
<div class="pull-right dashboard-right">
<h5 class="pull-left">{translate label="ID_DASH_COMPARE_MONTH"}:</h5>
<button type="button" class="btn btn-compare btn-success pull-right btn-date">{translate label="ID_DASH_COMPARE"}</button>
<div class="pull-right dashboard-right container-fluid">
<select id="year" class="form-control pull-right ">
{literal}
<script>
now = new Date();
anio = now.getFullYear();
for(a=anio;a>=anio-7;a--){
document.write('<option value="'+a+'">'+a+'</option>');
}
</script>
{/literal}
</select>
<div class="row pull-left">
<div class="span4 pull-left">
<h5 class="pull-left">{translate label="ID_DASH_COMPARE_MONTH"}:</h5>
</div>
<select id="mounth" class="form-control pull-right ">
<option value="1">{translate label="ID_MONTH_ABB_1"}</option>
<option value="2">{translate label="ID_MONTH_ABB_2"}</option>
<option value="3">{translate label="ID_MONTH_ABB_3"}</option>
<option value="4">{translate label="ID_MONTH_ABB_4"}</option>
<option value="5">{translate label="ID_MONTH_ABB_5"}</option>
<option value="6">{translate label="ID_MONTH_ABB_6"}</option>
<option value="7">{translate label="ID_MONTH_ABB_7"}</option>
<option value="8">{translate label="ID_MONTH_ABB_8"}</option>
<option value="9">{translate label="ID_MONTH_ABB_9"}</option>
<option value="10">{translate label="ID_MONTH_ABB_10"}</option>
<option value="11">{translate label="ID_MONTH_ABB_11"}</option>
<option value="12">{translate label="ID_MONTH_ABB_12"}</option>
</select>
<div class="span4 pull-left">
<button type="button" class="btn btn-compare btn-success pull-right btn-date">{translate label="ID_DASH_COMPARE"}</button>
</div>
<div class="span4 pull-left">
<select id="year" class="form-control pull-right ">
{literal}
<script>
now = new Date();
anio = now.getFullYear();
for(a=anio;a>=anio-7;a--){
document.write('<option value="'+a+'">'+a+'</option>');
}
</script>
{/literal}
</select>
<select id="mounth" class="form-control pull-right ">
<option value="1">{translate label="ID_MONTH_ABB_1"}</option>
<option value="2">{translate label="ID_MONTH_ABB_2"}</option>
<option value="3">{translate label="ID_MONTH_ABB_3"}</option>
<option value="4">{translate label="ID_MONTH_ABB_4"}</option>
<option value="5">{translate label="ID_MONTH_ABB_5"}</option>
<option value="6">{translate label="ID_MONTH_ABB_6"}</option>
<option value="7">{translate label="ID_MONTH_ABB_7"}</option>
<option value="8">{translate label="ID_MONTH_ABB_8"}</option>
<option value="9">{translate label="ID_MONTH_ABB_9"}</option>
<option value="10">{translate label="ID_MONTH_ABB_10"}</option>
<option value="11">{translate label="ID_MONTH_ABB_11"}</option>
<option value="12">{translate label="ID_MONTH_ABB_12"}</option>
</select>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="collapse" id="collapseExample">

View File

@@ -7,7 +7,7 @@
<body id="page-top" class="index">
<div id="wrapper">
//Change xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
For better compatibility with Internet Explorer, a new tab with the KPIs has been opened. Please select this tab on the tab list above to see all the KPI's functionality.
</div>