Merge remote-tracking branch 'upstream/dashboards2' into dashboards2

This commit is contained in:
Marco Antonio Nina Mena
2015-05-07 08:38:43 -04:00
5 changed files with 33 additions and 25 deletions

File diff suppressed because one or more lines are too long

View File

@@ -75,11 +75,11 @@ class indicatorsCalculator
private $userGroupReportingMetadata = array("tableName" => "USR_REPORTING", "keyField" => "PRO_UID");
private $processCategoryReportingMetadata = array("tableName" => "PRO_REPORTING", "keyField" => "PRO_UID");
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 $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 $peiFormula = "SUM(TOTAL_CASES_OUT*CONFIGURED_TASK_TIME) / SUM(SDV_TIME * TOTAL_CASES_OUT + TOTAL_TIME_BY_TASK)";
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 $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 $ueiFormula = "SUM(TOTAL_CASES_OUT * CONFIGURED_TASK_TIME) / SUM(TOTAL_TIME_BY_TASK)";
public function getSkewOfDataDistribution($table, $field) {
/*$sqlString = "SET @median = (SELECT x.$field from $table x, $table y

View File

@@ -215,8 +215,8 @@ class StrategicDashboard extends Controller
$translation['ID_NO_INEFFICIENT_USER_GROUPS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USER_GROUPS');
$translation['ID_NO_INEFFICIENT_USERS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USERS');
$translation['ID_DISPLAY_EMPTY'] = G::LoadTranslation('ID_DISPLAY_EMPTY');
$translation['ID_EMPTY'] = G::LoadTranslation('ID_EMPTY');
$translation['ID_INBOX'] = G::LoadTranslation('ID_INBOX');
//text for inbox empty in status indicator
$translation['ID_INBOX_EMPTY'] = G::LoadTranslation('ID_INBOX_EMPTY');
$this->setVar('translation', $translation);
$this->render();
@@ -266,9 +266,7 @@ class StrategicDashboard extends Controller
$translation['ID_NO_INEFFICIENT_USER_GROUPS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USER_GROUPS');
$translation['ID_NO_INEFFICIENT_USERS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USERS');
$translation['ID_DISPLAY_EMPTY'] = G::LoadTranslation('ID_DISPLAY_EMPTY');
$translation['ID_EMPTY'] = G::LoadTranslation('ID_EMPTY');
$translation['ID_INBOX'] = G::LoadTranslation('ID_INBOX');
$translation['ID_INBOX_EMPTY'] = G::LoadTranslation('ID_INBOX_EMPTY');
$this->setVar('translation', $translation);
$this->render();

View File

@@ -192,7 +192,7 @@ ViewDashboardPresenter.prototype.setStatusButtonWidthsAndDisplayValues = functio
});
if (atRisk.valueToShow == 0 && overdue.valueToShow == 0 && onTime.valueToShow == 0) {
onTime.valueToShow = G_STRING['ID_INBOX'] + ' ' + G_STRING['ID_EMPTY'];
onTime.valueToShow = G_STRING['ID_INBOX_EMPTY'];
onTime.width = 100;
}
@@ -310,18 +310,18 @@ ViewDashboardPresenter.prototype.statusViewModel = function(indicatorId, data) {
$.each(data.dataList, function(index, originalObject) {
originalObject.taskTitle = that.helper.labelIfEmpty(originalObject.taskTitle);
var title = originalObject.taskTitle.substring(0,10);
//var title = originalObject.taskTitle.substring(0,10);
var newObject1 = {
datalabel : title,
datalabel : originalObject.taskTitle,
value : originalObject.percentageTotalOverdue
};
var newObject2 = {
datalabel : title,
datalabel : originalObject.taskTitle,
value : originalObject.percentageTotalAtRisk
};
var newObject3 = {
datalabel : title,
datalabel : originalObject.taskTitle,
value : originalObject.percentageTotalOnTime
};
@@ -338,6 +338,11 @@ ViewDashboardPresenter.prototype.statusViewModel = function(indicatorId, data) {
originalObject.indicatorId = indicatorId;
});
that.makeShortLabel(graph1Data, 10);
that.makeShortLabel(graph2Data, 10);
that.makeShortLabel(graph3Data, 10);
var retval = data;
retval.graph1Data = this.orderGraphData(graph1Data, "down").splice(0,7)
retval.graph2Data = this.orderGraphData(graph2Data, "down").splice(0,7)
@@ -517,10 +522,15 @@ ViewDashboardPresenter.prototype.adaptGraphData = function(listData) {
ViewDashboardPresenter.prototype.makeShortLabel = function(listData, labelLength) {
$.each(listData, function(index, item) {
var longLabel = (item.datalabel == null)
? ""
: item.datalabel.substring(0, 50);
var shortLabel = (item.datalabel == null)
? ""
: item.datalabel.substring(0,labelLength);
item.datalabel = shortLabel;
? ""
: item.datalabel.substring(0, labelLength);
item.datalabel = shortLabel;
item.longlabel = longLabel;
});
}

View File

@@ -590,7 +590,7 @@ var fillStatusIndicatorFirstView = function (presenterData) {
allowDrillDown:true,
allowTransition:true,
showTip: false,
showTip: true,
allowZoom: false,
showLabels: true
}
@@ -650,7 +650,7 @@ var fillSpecialIndicatorFirstView = function(presenterData) {
graph: {
allowDrillDown:false,
allowTransition:true,
showTip: false,
showTip: true,
allowZoom: false,
gapWidth:0.3,
useShadows: true,
@@ -674,7 +674,7 @@ var fillSpecialIndicatorFirstView = function(presenterData) {
axisY:{ showAxis: true, label: G_STRING['ID_COSTS']},
gridLinesX:false,
gridLinesY:true,
showTip: false,
showTip: true,
allowZoom: false,
useShadows: true,
paddingTop: 50,
@@ -747,7 +747,7 @@ var fillSpecialIndicatorSecondView = function(presenterData) {
graph: {
allowTransition: false,
allowDrillDown: true,
showTip: false,
showTip: true,
allowZoom: false,
useShadows: false,
gridLinesX: true,
@@ -837,7 +837,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
graph: {
allowTransition: false,
allowDrillDown: true,
showTip: false,
showTip: true,
allowZoom: false,
useShadows: false,
gridLinesX: true,
@@ -859,7 +859,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
graph: {
allowTransition: false,
allowDrillDown: true,
showTip: false,
showTip: true,
allowZoom: false,
useShadows: false,
gridLinesX: true,
@@ -885,7 +885,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS },
gridLinesX:false,
gridLinesY:true,
showTip: false,
showTip: true,
allowZoom: false,
useShadows: true,
paddingTop: 50,
@@ -907,7 +907,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS },
gridLinesX:false,
gridLinesY:true,
showTip: false,
showTip: true,
allowZoom: false,
useShadows: true,
paddingTop: 50,