Merge remote-tracking branch 'upstream/dashboards2' into dashboards2
This commit is contained in:
@@ -373,29 +373,60 @@ class indicatorsCalculator
|
||||
'$graph2' as graph2Type,
|
||||
'$freq2' as frequency2Type,";
|
||||
|
||||
$params = Array();
|
||||
|
||||
switch ($indicatorType) {
|
||||
//process inefficience
|
||||
case "1020":
|
||||
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_TIME_BY_TASK) / SUM(CONFIGURED_TASK_TIME) as value";
|
||||
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::USER
|
||||
, $indicatorProcessId, $periodicity
|
||||
, $initDate, $endDate
|
||||
, $calcField, $params);
|
||||
break;
|
||||
//employee inefficience
|
||||
case "1040":
|
||||
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_TIME_BY_TASK) / SUM(CONFIGURED_TASK_TIME) as value";
|
||||
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::USER
|
||||
, $indicatorProcessId, $periodicity
|
||||
, $initDate, $endDate
|
||||
, $calcField, $params);
|
||||
break;
|
||||
//overdue
|
||||
case "1050":
|
||||
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_CASES_OVERDUE) / SUM(TOTAL_CASES_ON_TIME + TOTAL_CASES_OVERDUE) as value";
|
||||
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::USER
|
||||
, $indicatorProcessId, $periodicity
|
||||
, $initDate, $endDate
|
||||
, $calcField, $params);
|
||||
break;
|
||||
//new cases
|
||||
case "1060":
|
||||
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_CASES_IN) / SUM(TOTAL_CASES_ON_TIME + TOTAL_CASES_OVERDUE) as value";
|
||||
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::PROCESS
|
||||
, $indicatorProcessId, $periodicity
|
||||
, $initDate, $endDate
|
||||
, $calcField, $params);
|
||||
break;
|
||||
//completed
|
||||
case "1070":
|
||||
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_CASES_OUT) / SUM(TOTAL_CASES_ON_TIME + TOTAL_CASES_OVERDUE) as value";
|
||||
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::PROCESS
|
||||
, $indicatorProcessId, $periodicity
|
||||
, $initDate, $endDate
|
||||
, $calcField, $params);
|
||||
break;
|
||||
case "1080":
|
||||
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_CASES_OPEN) / SUM(TOTAL_CASES_ON_TIME + TOTAL_CASES_OVERDUE) as value";
|
||||
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::PROCESS
|
||||
, $indicatorProcessId, $periodicity
|
||||
, $initDate, $endDate
|
||||
, $calcField, $params);
|
||||
break;
|
||||
default:
|
||||
throw new Exception(" The indicator id '$indicatorId' with type $indicatorType hasn't an associated operation.");
|
||||
}
|
||||
|
||||
$params = Array();
|
||||
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::PROCESS
|
||||
, $indicatorProcessId, $periodicity
|
||||
, $initDate, $endDate
|
||||
, $calcField, $params);
|
||||
|
||||
$retval = $this->pdoExecutor($sqlString, $params);
|
||||
//$returnValue = $this->propelExecutor($sqlString);
|
||||
return $retval;
|
||||
@@ -476,38 +507,7 @@ class indicatorsCalculator
|
||||
return $retval;
|
||||
}
|
||||
|
||||
/*private function propelExecutor($sqlString) {
|
||||
$con = Propel::getConnection(self::$connectionName);
|
||||
$qry = $con->PrepareStatement($sqlString);
|
||||
try {
|
||||
$dataSet = $qry->executeQuery();
|
||||
} catch (Exception $e) {
|
||||
throw new Exception("Can't execute query " . $sqlString);
|
||||
}
|
||||
|
||||
$rows = Array();
|
||||
while ($dataSet->next()) {
|
||||
$rows[] = $dataSet->getRow();
|
||||
}
|
||||
return $rows;
|
||||
}
|
||||
*/
|
||||
private function pdoExecutor($sqlString, $params) {
|
||||
/*G::loadClass('wsTools');
|
||||
$currentWS = defined('SYS_SYS') ? SYS_SYS : 'Wokspace Undefined';
|
||||
$workSpace = new workspaceTools($currentWS);
|
||||
$host = $workSpace->dbHost;
|
||||
$db = $workSpace->dbName;
|
||||
$user = $workSpace->dbUser;
|
||||
$pass = $workSpace->dbPass;
|
||||
|
||||
|
||||
$dbh = new PDO("mysql:host=".$host.";dbname=$db;charset=utf8", $user, $pass);
|
||||
|
||||
$statement = $dbh->prepare($sqlString);
|
||||
|
||||
$statement->execute($params);
|
||||
$result = $statement->fetchAll(PDO::FETCH_ASSOC); */
|
||||
|
||||
$connection = $this->pdoConnection ();
|
||||
$result = $this->pdoExecutorWithConnection($sqlString, $params, $connection);
|
||||
@@ -518,11 +518,9 @@ class indicatorsCalculator
|
||||
G::loadClass('wsTools');
|
||||
$currentWS = defined('SYS_SYS') ? SYS_SYS : 'Wokspace Undefined';
|
||||
$workSpace = new workspaceTools($currentWS);
|
||||
$host = $workSpace->dbHost;
|
||||
|
||||
$arrayHost = split(":", $workSpace->dbHost);
|
||||
$host = "host=".$arrayHost[0];
|
||||
$port = sizeof($arrayHost) > 0 ? ";port=".$arrayHost[1] : "";
|
||||
$port = count($arrayHost) > 1 ? ";port=".$arrayHost[1] : "";
|
||||
$db = ";dbname=".$workSpace->dbName;
|
||||
$user = $workSpace->dbUser;
|
||||
$pass = $workSpace->dbPass;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1060,6 +1060,8 @@
|
||||
var widget = userEffic;
|
||||
var id = "userEffic";
|
||||
break;
|
||||
case "1020":
|
||||
case "1040":
|
||||
case "1050":
|
||||
case "1060":
|
||||
case "1070":
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user