Skip to content

Commit

Permalink
Merge pull request #1322 from franciscovn/b4.0.0-release-candidate-3
Browse files Browse the repository at this point in the history
Fix dcp analysis icon
  • Loading branch information
janosimas authored Oct 24, 2017
2 parents 807ec4d + a99d259 commit e3ffc9f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions webapp/controllers/api/DataSeries.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,20 @@ module.exports = function(app) {
DataManager.listAnalysis({}).then(function(analysisList){
dataSeriesList.forEach(function(dataSeries) {
var isAnalysis = false;
var analysisType = {};
analysisList.map(function(analysis){
dataSeries.dataSets.map(function(dataSet){
if(analysis.dataset_output == dataSet.id) {
isAnalysis = true;
analysisType = analysis.type;
return;
}
});
});
var dataSeriesRaw = dataSeries.rawObject();
dataSeriesRaw.isAnalysis = isAnalysis;
if (isAnalysis)
dataSeriesRaw.type = analysisType;
output.push(dataSeriesRaw);
});
response.json(output);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ define([], function() {
break;
}
case DataSeriesService.DataSeriesType.ANALYSIS_MONITORED_OBJECT:
return BASE_URL + "images/analysis/monitored-object/monitored-object_analysis.png";
if (dataSeries.type.id == 1)
return BASE_URL + "images/analysis/dcp/dcp_analysis.png";
else
return BASE_URL + "images/analysis/monitored-object/monitored-object_analysis.png";
break;
case DataSeriesService.DataSeriesType.POSTGIS:
case DataSeriesService.DataSeriesType.GEOMETRIC_OBJECT:
Expand Down
4 changes: 2 additions & 2 deletions webapp/views/configuration/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@
ng-change="ctrl.onDataSeriesChanged(ctrl.view.data_series_id, dSeries)"
required>
<ui-select-match>
<img ng-src="{{ctrl.getImageUrl($select.selected)}}" style="width: 20px; margin-top: -9px"/>
<img ng-src="{{ctrl.getImageUrl($select.selected)}}" style="max-width: 20px; height: 20px; margin-top: -9px"/>
<span ng-bind="$select.selected.name"></span>
</ui-select-match>
<ui-select-choices repeat="dSeries.id as dSeries in (ctrl.dataSeries | filter:ctrl.filterByType | orderBy: 'name') track by dSeries.id">
<img ng-src="{{ctrl.getImageUrl(dSeries)}}" style="width: 20px;"/>
<img ng-src="{{ctrl.getImageUrl(dSeries)}}" style="max-width: 20px; height: 20px;"/>
<span ng-bind="dSeries.name"></span>
</ui-select-choices>
</ui-select>
Expand Down

0 comments on commit e3ffc9f

Please sign in to comment.