tool tips correction
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,10 +1,11 @@
|
|||||||
var ViewDashboardModel = function (oauthToken, server, workspace) {
|
var ViewDashboardModel = function (oauthToken, server, workspace, moneySymbol) {
|
||||||
this.server = server;
|
this.server = server;
|
||||||
this.workspace = workspace;
|
this.workspace = workspace;
|
||||||
this.baseUrl = "/api/1.0/" + workspace + "/";
|
this.baseUrl = "/api/1.0/" + workspace + "/";
|
||||||
//this.baseUrl = "http://127.0.0.1:8080/api/1.0/workflow/";
|
//this.baseUrl = "http://127.0.0.1:8080/api/1.0/workflow/";
|
||||||
this.oauthToken = oauthToken;
|
this.oauthToken = oauthToken;
|
||||||
this.helper = new ViewDashboardHelper();
|
this.helper = new ViewDashboardHelper();
|
||||||
|
this.moneySymbol = moneySymbol;
|
||||||
};
|
};
|
||||||
|
|
||||||
ViewDashboardModel.prototype.userDashboards = function(userId) {
|
ViewDashboardModel.prototype.userDashboards = function(userId) {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
var ViewDashboardPresenter = function (model) {
|
var ViewDashboardPresenter = function (model) {
|
||||||
this.helper = new ViewDashboardHelper();
|
this.helper = new ViewDashboardHelper();
|
||||||
this.helper.assert(model != null, "A model must be passed for the presenter work.")
|
this.helper.assert(model != null, "A model must be passed for the presenter work.")
|
||||||
@@ -40,7 +38,6 @@ ViewDashboardPresenter.prototype.userDashboardsViewModel = function(data) {
|
|||||||
if (!hasFavorite && returnList.length > 0 ) {
|
if (!hasFavorite && returnList.length > 0 ) {
|
||||||
returnList[0].isFavorite = 1;
|
returnList[0].isFavorite = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return returnList;
|
return returnList;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -263,6 +260,8 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) {
|
|||||||
"inefficiencyCost" : "value"
|
"inefficiencyCost" : "value"
|
||||||
};
|
};
|
||||||
var newObject = that.helper.merge(originalObject, {}, map);
|
var newObject = that.helper.merge(originalObject, {}, map);
|
||||||
|
//the values do not come with a minus and moneny symbol, so we add them
|
||||||
|
newObject.valuePrefix = that.model.moneySymbol + " -";
|
||||||
graphData.push(newObject);
|
graphData.push(newObject);
|
||||||
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
|
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
|
||||||
//rounded to 1 decimal
|
//rounded to 1 decimal
|
||||||
@@ -294,6 +293,7 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) {
|
|||||||
"deviationTime" : "dispersion"
|
"deviationTime" : "dispersion"
|
||||||
};
|
};
|
||||||
var newObject = that.helper.merge(originalObject, {}, map);
|
var newObject = that.helper.merge(originalObject, {}, map);
|
||||||
|
newObject.valuePrefix = that.model.moneySymbol + " -";
|
||||||
graphData.push(newObject);
|
graphData.push(newObject);
|
||||||
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10)/10;
|
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10)/10;
|
||||||
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
|
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
|
||||||
@@ -429,6 +429,7 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelPei = function(modelD
|
|||||||
"deviationTime" : "dispersion"
|
"deviationTime" : "dispersion"
|
||||||
};
|
};
|
||||||
var newObject = that.helper.merge(originalObject, {}, map);
|
var newObject = that.helper.merge(originalObject, {}, map);
|
||||||
|
newObject.valuePrefix = that.model.moneySymbol + " -";
|
||||||
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10) / 10;
|
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10) / 10;
|
||||||
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
|
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
|
||||||
originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime);
|
originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime);
|
||||||
@@ -456,6 +457,7 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelUei = function(modelD
|
|||||||
"deviationTime" : "dispersion"
|
"deviationTime" : "dispersion"
|
||||||
};
|
};
|
||||||
var newObject = that.helper.merge(originalObject, {}, map);
|
var newObject = that.helper.merge(originalObject, {}, map);
|
||||||
|
newObject.valuePrefix = that.model.moneySymbol + " -";
|
||||||
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10) / 10;
|
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10) / 10;
|
||||||
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
|
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
|
||||||
originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime);
|
originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime);
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ WidgetBuilder.prototype.setColorForInefficiency = function ($widget, indicatorDa
|
|||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
helper = new ViewDashboardHelper();
|
helper = new ViewDashboardHelper();
|
||||||
var ws = urlProxy.split('/');
|
var ws = urlProxy.split('/');
|
||||||
model = new ViewDashboardModel(token, urlProxy, ws[3]);
|
model = new ViewDashboardModel(token, urlProxy, ws[3], moneyUnit);
|
||||||
presenter = new ViewDashboardPresenter(model);
|
presenter = new ViewDashboardPresenter(model);
|
||||||
|
|
||||||
window.loadedIndicators = []; //updated in das-title-selector.click->fillIndicatorWidgets, ready->fillIndicatorWidgets
|
window.loadedIndicators = []; //updated in das-title-selector.click->fillIndicatorWidgets, ready->fillIndicatorWidgets
|
||||||
|
|||||||
Reference in New Issue
Block a user