Merge remote-tracking branch 'upstream/dashboards2' into dashboards2
This commit is contained in:
@@ -311,11 +311,7 @@ class G
|
|||||||
array_push( $folder_path, dirname( end( $folder_path ) ) ); //var_dump($folder_path); die;
|
array_push( $folder_path, dirname( end( $folder_path ) ) ); //var_dump($folder_path); die;
|
||||||
}
|
}
|
||||||
|
|
||||||
G::LoadSystem('inputfilter');
|
|
||||||
$filter = new InputFilter();
|
|
||||||
|
|
||||||
while ($parent_folder_path = array_pop( $folder_path )) {
|
while ($parent_folder_path = array_pop( $folder_path )) {
|
||||||
$parent_folder_path = $filter->validateInput($parent_folder_path,"path");
|
|
||||||
if (! @is_dir( $parent_folder_path )) {
|
if (! @is_dir( $parent_folder_path )) {
|
||||||
if (! @mkdir( $parent_folder_path, $rights)) {
|
if (! @mkdir( $parent_folder_path, $rights)) {
|
||||||
error_log( "Can't create folder \"$parent_folder_path\"");
|
error_log( "Can't create folder \"$parent_folder_path\"");
|
||||||
|
|||||||
@@ -75,10 +75,10 @@ class indicatorsCalculator
|
|||||||
private $userGroupReportingMetadata = array("tableName" => "USR_REPORTING", "keyField" => "PRO_UID");
|
private $userGroupReportingMetadata = array("tableName" => "USR_REPORTING", "keyField" => "PRO_UID");
|
||||||
private $processCategoryReportingMetadata = array("tableName" => "PRO_REPORTING", "keyField" => "PRO_UID");
|
private $processCategoryReportingMetadata = array("tableName" => "PRO_REPORTING", "keyField" => "PRO_UID");
|
||||||
|
|
||||||
private $peiCostFormula = " SUM(case when TOTAL_TIME_BY_TASK >0 then TOTAL_CASES_OUT * CONFIGURED_TASK_TIME - TOTAL_TIME_BY_TASK * USER_HOUR_COST else 0 end)";
|
private $peiCostFormula = "USER_HOUR_COST * SUM(case when TOTAL_TIME_BY_TASK >0 then TOTAL_CASES_OUT * CONFIGURED_TASK_TIME - TOTAL_TIME_BY_TASK * USER_HOUR_COST else 0 end)";
|
||||||
private $peiFormula = "SUM(TOTAL_CASES_OUT*CONFIGURED_TASK_TIME) / SUM(SDV_TIME * TOTAL_CASES_OUT + TOTAL_TIME_BY_TASK)";
|
private $peiFormula = "SUM(TOTAL_CASES_OUT*CONFIGURED_TASK_TIME) / SUM(SDV_TIME * TOTAL_CASES_OUT + TOTAL_TIME_BY_TASK)";
|
||||||
|
|
||||||
private $ueiCostFormula = " SUM(case when TOTAL_TIME_BY_TASK >0 then TOTAL_CASES_OUT * CONFIGURED_TASK_TIME - TOTAL_TIME_BY_TASK * USER_HOUR_COST else 0 end)";
|
private $ueiCostFormula = " USER_HOUR_COST * SUM(case when TOTAL_TIME_BY_TASK >0 then TOTAL_CASES_OUT * CONFIGURED_TASK_TIME - TOTAL_TIME_BY_TASK * USER_HOUR_COST else 0 end)";
|
||||||
private $ueiFormula = "SUM(TOTAL_CASES_OUT * CONFIGURED_TASK_TIME) / SUM(TOTAL_TIME_BY_TASK * USER_HOUR_COST)";
|
private $ueiFormula = "SUM(TOTAL_CASES_OUT * CONFIGURED_TASK_TIME) / SUM(TOTAL_TIME_BY_TASK * USER_HOUR_COST)";
|
||||||
|
|
||||||
public function getSkewOfDataDistribution($table, $field) {
|
public function getSkewOfDataDistribution($table, $field) {
|
||||||
|
|||||||
@@ -87,40 +87,19 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) {
|
|||||||
: "normal";
|
: "normal";
|
||||||
|
|
||||||
//rounding
|
//rounding
|
||||||
newObject.comparative = Math.round(newObject.comparative*1000)/1000;
|
newObject.comparative = Math.round(newObject.comparative*100)/100;
|
||||||
newObject.comparative = ((newObject.comparative > 0)? "+": "") + newObject.comparative;
|
newObject.comparative = ((newObject.comparative > 0)? "+": "") + newObject.comparative;
|
||||||
|
|
||||||
newObject.percentComparative = (newObject.percentComparative != '--')
|
newObject.percentComparative = (newObject.percentComparative != '--')
|
||||||
? '(' + newObject.percentComparative + '%)'
|
? '(' + newObject.percentComparative + '%)'
|
||||||
: "";
|
: "";
|
||||||
|
newObject.percentComparative = (newObject.comparative == 0)
|
||||||
|
? "(0%)"
|
||||||
//newObject.value = (newObject.category == "normal")
|
: newObject.percentComparative;
|
||||||
//? Math.round(newObject.value) + ""
|
|
||||||
//: Math.round(newObject.value*100)/100 + ""
|
|
||||||
|
|
||||||
newObject.value = that.roundedIndicatorValue(newObject.value);
|
newObject.value = that.roundedIndicatorValue(newObject.value);
|
||||||
newObject.favorite = 0;
|
newObject.favorite = 0;
|
||||||
|
|
||||||
/*newObject.percentageOverdueWidth = Math.round(newObject.percentageOverdue);
|
|
||||||
newObject.percentageAtRiskWidth = Math.round(newObject.percentageAtRisk);
|
|
||||||
//to be sure that percentages sum up to 100 (the rounding will lose decimals)%
|
|
||||||
newObject.percentageOnTimeWidth = 100 - newObject.percentageOverdueWidth - newObject.percentageAtRiskWidth;
|
|
||||||
|
|
||||||
newObject.percentageOverdueToShow = ((newObject.percentageOverdue == null || newObject.percentageOverdue <= 20 )
|
|
||||||
? ""
|
|
||||||
: newObject.percentageOverdueWidth + "%");
|
|
||||||
|
|
||||||
newObject.percentageAtRiskToShow = ((newObject.percentageAtRisk == null || newObject.percentageAtRisk == 0)
|
|
||||||
? ""
|
|
||||||
: newObject.percentageAtRiskWidth + "%");
|
|
||||||
|
|
||||||
newObject.percentageOnTimeToShow = ((newObject.percentageOnTime == 0
|
|
||||||
&& newObject.percentageAtRisk == 0
|
|
||||||
&& newObject.percentageOverdue == 0)
|
|
||||||
? G_STRING['ID_INBOX'] + ' ' + G_STRING['ID_EMPTY']
|
|
||||||
: newObject.percentageOnTimeWidth + "%");
|
|
||||||
*/
|
|
||||||
that.setStatusButtonWidthsAndDisplayValues(newObject);
|
that.setStatusButtonWidthsAndDisplayValues(newObject);
|
||||||
newObject.overdueVisibility = (newObject.percentageOverdueWidth > 0) ? "visible" : "hidden";
|
newObject.overdueVisibility = (newObject.percentageOverdueWidth > 0) ? "visible" : "hidden";
|
||||||
newObject.atRiskVisibility = (newObject.percentageAtRiskWidth > 0) ? "visible" : "hidden";
|
newObject.atRiskVisibility = (newObject.percentageAtRiskWidth > 0) ? "visible" : "hidden";
|
||||||
@@ -144,10 +123,10 @@ ViewDashboardPresenter.prototype.roundedIndicatorValue = function (value) {
|
|||||||
if (value == 0) {
|
if (value == 0) {
|
||||||
return "0";
|
return "0";
|
||||||
}
|
}
|
||||||
if (value > 0 && value < 0.1) {
|
/*if (value > 0 && value < 0.1) {
|
||||||
return "<0.1";
|
return "<0.1";
|
||||||
}
|
}*/
|
||||||
return Math.round(value*100)/100 + ""
|
return Math.round(value*100)/100 + "";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -288,7 +267,7 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) {
|
|||||||
retval.dataToDraw = this.adaptGraphData(graphData);
|
retval.dataToDraw = this.adaptGraphData(graphData);
|
||||||
|
|
||||||
retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost);
|
retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost);
|
||||||
retval.efficiencyIndexToShow = that.roundedIndicatorValue(retval.efficiencyIndex)
|
retval.efficiencyIndexToShow = that.roundedIndicatorValue(retval.efficiencyIndex);
|
||||||
return retval;
|
return retval;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -317,7 +296,7 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) {
|
|||||||
retval.dataToDraw = this.adaptGraphData(graphData);
|
retval.dataToDraw = this.adaptGraphData(graphData);
|
||||||
|
|
||||||
retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost);
|
retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost);
|
||||||
retval.efficiencyIndexToShow = that.roundedIndicatorValue(retval.efficiencyIndex)
|
retval.efficiencyIndexToShow = that.roundedIndicatorValue(retval.efficiencyIndex);
|
||||||
return retval;
|
return retval;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user