Bring time KPI "Estimation accuracy" to the UI.
FEA: ItEr75S27PerProjectDashboard
This commit is contained in:
parent
02482368b1
commit
26857d667b
2 changed files with 34 additions and 0 deletions
|
|
@ -21,6 +21,9 @@ package org.libreplan.web.dashboard;
|
|||
|
||||
import static org.libreplan.web.I18nHelper._;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.libreplan.business.orders.entities.Order;
|
||||
import org.libreplan.web.common.Util;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -54,6 +57,7 @@ public class DashboardController extends GenericForwardComposer {
|
|||
private Chart progressKPItaskStatusChart;
|
||||
private Chart progressKPItaskDeadlineViolationStatusChart;
|
||||
private Chart timeKPImarginWithDeadlineChart;
|
||||
private Chart timeKPIEstimationAccuracyChart;
|
||||
|
||||
public DashboardController() {
|
||||
}
|
||||
|
|
@ -82,6 +86,13 @@ public class DashboardController extends GenericForwardComposer {
|
|||
generateProgressKPItaskStatusChart();
|
||||
generateProgressKPItaskDeadlineViolationStatusChart();
|
||||
generateTimeKPImarginWithDeadlineChart();
|
||||
generateTimeKPIEstimationAccuracyChart();
|
||||
}
|
||||
|
||||
private void generateTimeKPIEstimationAccuracyChart() {
|
||||
CategoryModel categoryModel;
|
||||
categoryModel = refreshTimeKPIEstimationAccuracyCategoryModel();
|
||||
timeKPIEstimationAccuracyChart.setModel(categoryModel);
|
||||
}
|
||||
|
||||
private void generateTimeKPImarginWithDeadlineChart() {
|
||||
|
|
@ -147,4 +158,19 @@ public class DashboardController extends GenericForwardComposer {
|
|||
return result;
|
||||
}
|
||||
|
||||
private CategoryModel refreshTimeKPIEstimationAccuracyCategoryModel() {
|
||||
CategoryModel result = new SimpleCategoryModel();
|
||||
List<Double> values = dashboardModel.getFinishedTasksEstimationAccuracyHistogram();
|
||||
Iterator<Double> it = values.iterator();
|
||||
for(int ii= DashboardModel.EA_STRETCHES_MIN_VALUE;
|
||||
ii < DashboardModel.EA_STRETCHES_MAX_VALUE;
|
||||
ii += DashboardModel.EA_STRETCHES_PERCENTAGE_STEP) {
|
||||
result.setValue(_("None"), _(String.valueOf(ii)), it.next());
|
||||
}
|
||||
result.setValue(_("None"),
|
||||
_(">"+DashboardModel.EA_STRETCHES_MAX_VALUE),
|
||||
it.next());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,14 @@
|
|||
<div self="@{define(content)}">
|
||||
<window id="dashboardWindow" apply="${dsController}">
|
||||
<vbox>
|
||||
<hbox>
|
||||
<chart id="timeKPIEstimationAccuracyChart"
|
||||
height="200px" width="1200px" type="bar"
|
||||
xAxis="deviation class [i, i+1) (%)"
|
||||
threeD="false" yAxis="probability" orient="vertical"
|
||||
title="${i18n:_('Estimation Accuracy')}"
|
||||
paneColor="#FFFFFF" showLegend="false" />
|
||||
</hbox>
|
||||
<hbox>
|
||||
<chart id="progressKPIglobalProgressChart"
|
||||
height="400px" width="600px" type="bar"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue