view integration corrections
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
var ViewDashboardHelper = function () {
|
var ViewDashboardHelper = function () {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ViewDashboardHelper.prototype.userDashboards = function(userId, callBack) {
|
ViewDashboardHelper.prototype.userDashboards = function(userId, callBack) {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
var ViewDashboardModel = function (oauthToken, server, workspace) {
|
var ViewDashboardModel = function (oauthToken, server, workspace) {
|
||||||
this.server = server;
|
this.server = server;
|
||||||
this.workspace = workspace;
|
this.workspace = workspace;
|
||||||
|
|||||||
@@ -314,7 +314,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.datalabel = newObject.datalabel.substring(0, 7);
|
newObject.datalabel = ((newObject.datalabel == null) ? "" : newObject.datalabel.substring(0, 7));
|
||||||
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost);
|
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost);
|
||||||
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
|
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
|
||||||
graphData.push(newObject);
|
graphData.push(newObject);
|
||||||
|
|||||||
@@ -175,8 +175,6 @@ WidgetBuilder.prototype.buildGeneralIndicatorFirstView = function (indicatorData
|
|||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
helper = new ViewDashboardHelper();
|
helper = new ViewDashboardHelper();
|
||||||
var ws = urlProxy.split('/');
|
var ws = urlProxy.split('/');
|
||||||
console.log(urlProxy);
|
|
||||||
console.log(ws);
|
|
||||||
model = new ViewDashboardModel(token, urlProxy, ws[3]);
|
model = new ViewDashboardModel(token, urlProxy, ws[3]);
|
||||||
presenter = new ViewDashboardPresenter(model);
|
presenter = new ViewDashboardPresenter(model);
|
||||||
|
|
||||||
@@ -291,20 +289,20 @@ $(document).ready(function() {
|
|||||||
.done(function(indicatorsVM) {
|
.done(function(indicatorsVM) {
|
||||||
fillIndicatorWidgets(indicatorsVM);
|
fillIndicatorWidgets(indicatorsVM);
|
||||||
//TODO use real data
|
//TODO use real data
|
||||||
loadIndicator(getFavoriteIndicator().id, '2010-01-01' , '2016-12-31');
|
loadIndicator(getFavoriteIndicator().id, defaultInitDate(), defaultEndDate());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#indicatorsGridStack').on('click','.ind-button-selector', function() {
|
$('#indicatorsGridStack').on('click','.ind-button-selector', function() {
|
||||||
var indicatorId = $(this).data('indicator-id');
|
var indicatorId = $(this).data('indicator-id');
|
||||||
//TODO use real data
|
//TODO use real data
|
||||||
loadIndicator(indicatorId, '2012-01-01', '2016-01-01');
|
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
|
||||||
});
|
});
|
||||||
|
|
||||||
$('body').on('click','.bread-back-selector', function() {
|
$('body').on('click','.bread-back-selector', function() {
|
||||||
var indicatorId = window.currentIndicator.id;
|
var indicatorId = window.currentIndicator.id;
|
||||||
//TODO use real data
|
//TODO use real data
|
||||||
loadIndicator(indicatorId, '2011-01-01', '2017-01-01');
|
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -317,7 +315,7 @@ $(document).ready(function() {
|
|||||||
"name":$(this).data('detail-name')
|
"name":$(this).data('detail-name')
|
||||||
};
|
};
|
||||||
//TODO PASS REAL VALUES
|
//TODO PASS REAL VALUES
|
||||||
presenter.getSpecialIndicatorSecondLevel(detailId, '1030', '2012-11-01', '2019-11-05')
|
presenter.getSpecialIndicatorSecondLevel(detailId, window.currentIndicator.type, defaultInitDate(), defaultEndDate())
|
||||||
.done(function (viewModel) {
|
.done(function (viewModel) {
|
||||||
fillSpecialIndicatorSecondView(viewModel);
|
fillSpecialIndicatorSecondView(viewModel);
|
||||||
});
|
});
|
||||||
@@ -621,7 +619,7 @@ function fillSpecialIndicatorSecondView (presenterData) {
|
|||||||
var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(window.currentEntityData.indicatorId);
|
var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(window.currentEntityData.indicatorId);
|
||||||
|
|
||||||
if (window.currentIndicator.type == "1010") {
|
if (window.currentIndicator.type == "1010") {
|
||||||
var graph = new Pie3DChart(presenterData.dataToDraw, detailParams, null, null);
|
var graph = new BarChart(presenterData.dataToDraw, detailParams, null, null);
|
||||||
graph.drawChart();
|
graph.drawChart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user