Skip to content
Permalink
Browse files

Merge branch 'develop' into feature/metricFinderLineChart

  • Loading branch information...
j0weiss committed May 16, 2019
2 parents fd1eef2 + f937ce5 commit e35439464e7941f0496bb2b3c654994faa815e07
Showing with 239 additions and 143 deletions.
  1. +5 −5 frontend/package-lock.json
  2. +3 −3 frontend/src/app/modules/landing/landing.component.ts
  3. +1 −1 grails-app/assets/javascripts/_resultSelection/resultSelection.js
  4. +4 −0 grails-app/assets/javascripts/aggregation/aggregation.js
  5. +3 −3 ...pp/assets/javascripts/{pageAggregation/pageAggregationChart.js → aggregation/aggregationChart.js}
  6. +4 −4 ...s/javascripts/{pageAggregation/pageAggregationChartData.js → aggregation/aggregationChartData.js}
  7. +9 −9 ...vascripts/{pageAggregation/pageAggregationGuiHandling.js → aggregation/aggregationGuiHandling.js}
  8. +2 −2 ...regation/pageAggregationHistoryStateHandling.js → aggregation/aggregationHistoryStateHandling.js}
  9. +1 −1 grails-app/assets/javascripts/chartSwitch.js
  10. +0 −4 grails-app/assets/javascripts/pageAggregation/pageAggregation.js
  11. 0 grails-app/assets/stylesheets/{pageAggregation → aggregation}/show.less
  12. +2 −2 grails-app/conf/application.yml
  13. +2 −2 grails-app/controllers/de/iteratec/osm/measurement/schedule/JobController.groovy
  14. +8 −8 ...trollers/de/iteratec/osm/result/{PageAggregationController.groovy → AggregationController.groovy}
  15. +1 −0 grails-app/services/de/iteratec/osm/barchart/BarchartAggregationService.groovy
  16. +1 −1 grails-app/services/de/iteratec/osm/measurement/schedule/JobService.groovy
  17. +2 −2 grails-app/views/_common/_jsGlobals.gsp
  18. +1 −1 grails-app/views/_menu/_gotoPage.gsp
  19. +3 −3 grails-app/views/_menu/_navbar.gsp
  20. +2 −2 grails-app/views/{pageAggregation → aggregation}/_adjustBarchartModal.gsp
  21. +2 −2 grails-app/views/{pageAggregation → aggregation}/_barChart.gsp
  22. +2 −2 grails-app/views/{pageAggregation → aggregation}/show.gsp
  23. +1 −1 grails-app/views/job/_jobTable.gsp
  24. +1 −1 grails-app/views/pageComparison/show.gsp
  25. +67 −0 ...ation-test/groovy/de/iteratec/osm/result/dao/EventResultQueryBuilderAverageIntegrationSpec.groovy
  26. +29 −1 src/main/groovy/de/iteratec/osm/result/dao/EventResultQueryBuilder.groovy
  27. +2 −2 ...n/groovy/de/iteratec/osm/result/dto/{PageAggregationChartDTO.groovy → AggregationChartDTO.groovy}
  28. +1 −1 ...iteratec/osm/result/dto/{PageAggregationChartSeriesDTO.groovy → AggregationChartSeriesDTO.groovy}
  29. +7 −7 .../de/iteratec/osm/result/{PageAggregationControllerSpec.groovy → AggregationControllerSpec.groovy}
  30. +1 −1 src/test/js/karma.conf.js
  31. +72 −72 src/test/js/specs/{pageAggregationChartDataSpec.js → aggregationChartDataSpec.js}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -26,11 +26,11 @@ export class LandingComponent {
);
this.applications$ = combineLatest(this.applicationService.applications$, this.applicationService.applicationCsiById$).pipe(
filter(([applications]) => !applications.isLoading && !!applications.data),
map(([applications, csiById]) => applications.data.map(app => new ApplicationWithCsi(app, csiById[app.id], csiById.isLoading)).sort((a, b) => {
map(([applications, csiById]) => applications.data.map(app => new ApplicationWithCsi(app, csiById[app.id], csiById.isLoading)).sort(function (a, b) {
if (!b.recentCsi.csiDocComplete) {
return -1;
} else if (!a.recentCsi.csiDocComplete && !b.recentCsi.csiDocComplete) {
return 0;
} else if(!a.recentCsi.csiDocComplete){
return 1;
} else {
return b.recentCsi.csiDocComplete - a.recentCsi.csiDocComplete;
}
@@ -61,7 +61,7 @@ OpenSpeedMonitor.resultSelection = (function () {
});
}

// if caller is pageAggregation there is a need for a eventListener on removing and adding measurand series
// if caller is aggregation there is a need for a eventListener on removing and adding measurand series
$(".removeMeasurandSeriesButton").on('click', function () {
validateForm();
});
@@ -0,0 +1,4 @@
//= require aggregationChart.js
//= require aggregationGuiHandling.js
//= require aggregationHistoryStateHandling.js
//= require_self
@@ -7,22 +7,22 @@
//= require /chartComponents/chartHeader.js
//= require /chartComponents/common.js
//= require /d3/chartLabelUtil.js
//= require /pageAggregation/pageAggregationChartData.js
//= require /aggregation/aggregationChartData.js
//= require_self

"use strict";

var OpenSpeedMonitor = OpenSpeedMonitor || {};
OpenSpeedMonitor.ChartModules = OpenSpeedMonitor.ChartModules || {};

OpenSpeedMonitor.ChartModules.PageAggregation = (function (selector) {
OpenSpeedMonitor.ChartModules.Aggregation = (function (selector) {
var svg = d3.select(selector);
var chartBarsComponents = {};
var chartLegendComponent = OpenSpeedMonitor.ChartComponents.ChartLegend();
var chartBarScoreComponent = OpenSpeedMonitor.ChartComponents.ChartBarScore();
var chartSideLabelsComponent = OpenSpeedMonitor.ChartComponents.ChartSideLabels();
var chartHeaderComponent = OpenSpeedMonitor.ChartComponents.ChartHeader();
var data = OpenSpeedMonitor.ChartModules.PageAggregationData(svg);
var data = OpenSpeedMonitor.ChartModules.AggregationData(svg);
var transitionDuration = OpenSpeedMonitor.ChartComponents.common.transitionDuration;

chartLegendComponent.on("select", function (selectEvent) {
@@ -4,7 +4,7 @@
var OpenSpeedMonitor = OpenSpeedMonitor || {};
OpenSpeedMonitor.ChartModules = OpenSpeedMonitor.ChartModules || {};

OpenSpeedMonitor.ChartModules.PageAggregationData = (function (svgSelection) {
OpenSpeedMonitor.ChartModules.AggregationData = (function (svgSelection) {
var svg = svgSelection;
var chartSideLabelsWidth = 200;
var chartBarsWidth = 700;
@@ -179,7 +179,7 @@ OpenSpeedMonitor.ChartModules.PageAggregationData = (function (svgSelection) {
};

var sortByMeasurandOrder = function (measurandList) {
var measurandOrder = OpenSpeedMonitor.ChartModules.PageAggregationData.MeasurandOrder;
var measurandOrder = OpenSpeedMonitor.ChartModules.AggregationData.MeasurandOrder;
measurandList.sort(function (a, b) {
var idxA = measurandOrder.indexOf(a);
var idxB = measurandOrder.indexOf(b);
@@ -271,7 +271,7 @@ OpenSpeedMonitor.ChartModules.PageAggregationData = (function (svgSelection) {
};

var getMeasurandDataForSorting = function () {
var measurandOrder = OpenSpeedMonitor.ChartModules.PageAggregationData.MeasurandOrder;
var measurandOrder = OpenSpeedMonitor.ChartModules.AggregationData.MeasurandOrder;
for (var i = 0; i < measurandOrder.length; i++) {
var curMeasurandData = allMeasurandDataMap[measurandOrder[i]];
if (curMeasurandData) {
@@ -421,7 +421,7 @@ OpenSpeedMonitor.ChartModules.PageAggregationData = (function (svgSelection) {
sortByMeasurandOrder: sortByMeasurandOrder
}
});
OpenSpeedMonitor.ChartModules.PageAggregationData.MeasurandOrder = [
OpenSpeedMonitor.ChartModules.AggregationData.MeasurandOrder = [
"CS_BY_WPT_VISUALLY_COMPLETE",
"CS_BY_WPT_DOC_COMPLETE",
"FULLY_LOADED_TIME",
@@ -1,4 +1,4 @@
//= require pageAggregationChart.js
//= require aggregationChart.js
//= require_self

"use strict";
@@ -57,8 +57,8 @@ OpenSpeedMonitor.ChartModules.GuiHandling.handleComparativeTimeframeConstraints

})();

OpenSpeedMonitor.ChartModules.GuiHandling.pageAggregation = (function () {
var pageAggregationChart = OpenSpeedMonitor.ChartModules.PageAggregation("#page-aggregation-svg");
OpenSpeedMonitor.ChartModules.GuiHandling.aggregation = (function () {
var aggregationChart = OpenSpeedMonitor.ChartModules.Aggregation("#aggregation-svg");
var spinner = OpenSpeedMonitor.Spinner("#chart-container");
var drawGraphButton = $("#graphButtonHtmlId");
var stackBarSwitch = $("#stackBarSwitch");
@@ -85,7 +85,7 @@ OpenSpeedMonitor.ChartModules.GuiHandling.pageAggregation = (function () {
loadData(false);
});
$(window).on('resize', function () {
if (pageAggregationChart.isDataAvailable()) {
if (aggregationChart.isDataAvailable()) {
renderChart({}, false);
}
});
@@ -244,19 +244,19 @@ OpenSpeedMonitor.ChartModules.GuiHandling.pageAggregation = (function () {
spinner.stop()
}
if (data && !noDataAvailable) {
pageAggregationChart.setData(data);
aggregationChart.setData(data);
if (isStateChange) {
$(window).trigger("historyStateChanged");
}
}
if (!data.series) pageAggregationChart.render(isAggregationValueChange);
if (!data.series) aggregationChart.render(isAggregationValueChange);
if (data.series && percentileLoaded && avgLoaded) {
pageAggregationChart.render(isAggregationValueChange);
aggregationChart.render(isAggregationValueChange);
}
};

var loadData = function (isStateChange) {
pageAggregationChart.resetData();
aggregationChart.resetData();
avgLoaded = false;
percentileLoaded = false;

@@ -303,7 +303,7 @@ OpenSpeedMonitor.ChartModules.GuiHandling.pageAggregation = (function () {
$.ajax({
type: 'POST',
data: queryData,
url: OpenSpeedMonitor.urls.pageAggregationGetData,
url: OpenSpeedMonitor.urls.aggregationGetData,
dataType: "json",
success: function (data) {
if (aggregationValue === "avg") {
@@ -6,11 +6,11 @@ var OpenSpeedMonitor = OpenSpeedMonitor || {};
OpenSpeedMonitor.ChartModules = OpenSpeedMonitor.ChartModules || {};
OpenSpeedMonitor.ChartModules.UrlHandling = OpenSpeedMonitor.ChartModules.UrlHandling || {};

OpenSpeedMonitor.ChartModules.UrlHandling.PageAggregation = (function () {
OpenSpeedMonitor.ChartModules.UrlHandling.Aggregation = (function () {
var loadedState = "";

var initWaitForPostload = function () {
var dependencies = ["pageAggregation", "selectIntervalTimeframeCard"];
var dependencies = ["aggregation", "selectIntervalTimeframeCard"];
OpenSpeedMonitor.postLoader.onLoaded(dependencies, function () {
loadState(OpenSpeedMonitor.ChartModules.UrlHandling.UrlHelper.getUrlParameter());
addEventHandlers();
@@ -104,7 +104,7 @@ OpenSpeedMonitor.ChartModules.UrlHandling.ChartSwitch = (function () {
var params = $.param(updatedMap, true);
var showLinks = true;
updateUrl("#timeSeriesWithDataLink", OpenSpeedMonitor.urls.eventResultDashboardShowAll + "?" + params, showLinks);
updateUrl("#pageAggregationWithDataLink", OpenSpeedMonitor.urls.pageAggregationShow + "?" + params, showLinks);
updateUrl("#aggregationWithDataLink", OpenSpeedMonitor.urls.aggregationShow + "?" + params, showLinks);
updateUrl("#distributionWithDataLink", OpenSpeedMonitor.urls.distributionChartShow + "?" + params, showLinks);
updateUrl("#detailAnalysisWithDataLink", OpenSpeedMonitor.urls.detailAnalysisShow + "?" + params, showLinks);
updateUrl("#resultListWithDataLink", OpenSpeedMonitor.urls.tabularResultPresentation + "?" + params, showLinks);

This file was deleted.

Oops, something went wrong.
@@ -283,7 +283,7 @@ grails:
{pattern: '/csiBenchmark/**', access: ['permitAll']},
{pattern: '/detailAnalysis/**', access: ['permitAll']},
{pattern: '/distributionChart/**', access: ['permitAll']},
{pattern: '/pageAggregation/**', access: ['permitAll']},
{pattern: '/aggregation/**', access: ['permitAll']},
{pattern: '/pageComparison/**', access: ['permitAll']},
{pattern: '/eventResultDashboard/**', access: ['permitAll']},
{pattern: '/tabularResultPresentation/**', access: ['permitAll']},
@@ -300,7 +300,7 @@ grails:
{pattern: '/job/getLastRun', access: ['permitAll']},
{pattern: '/job/getTagsForJobs', access: ['permitAll']},
{pattern: '/job/showLastResultForJob/**', access: ['permitAll']},
{pattern: '/job/showLastPageAggregationForJob/**', access: ['permitAll']},
{pattern: '/job/showLastAggregationForJob/**', access: ['permitAll']},
{pattern: '/jobResult/**', access: ['permitAll']},
{pattern: '/script/list', access: ['permitAll']},
{pattern: '/register/*', access: ['permitAll']},
@@ -521,8 +521,8 @@ class JobController {
redirect(controller: 'eventResultDashboard', action: 'showAll', params: jobService.createTimeSeriesParamsFor(job))
}

def showLastPageAggregationForJob(Long id) {
def showLastAggregationForJob(Long id) {
Job job = Job.get(id)
redirect(controller: 'PageAggregation', action: 'show', params: jobService.createPageAggregationParamsFor(job))
redirect(controller: 'aggregation', action: 'show', params: jobService.createAggregationParamsFor(job))
}
}
@@ -13,15 +13,15 @@ import de.iteratec.osm.measurement.schedule.JobGroupService
import de.iteratec.osm.measurement.script.PlaceholdersUtility
import de.iteratec.osm.measurement.script.Script
import de.iteratec.osm.measurement.script.ScriptParser
import de.iteratec.osm.result.dto.PageAggregationChartDTO
import de.iteratec.osm.result.dto.PageAggregationChartSeriesDTO
import de.iteratec.osm.result.dto.AggregationChartDTO
import de.iteratec.osm.result.dto.AggregationChartSeriesDTO
import de.iteratec.osm.util.ControllerUtils
import de.iteratec.osm.util.ExceptionHandlerController
import de.iteratec.osm.util.I18nService
import de.iteratec.osm.util.PerformanceLoggingService
import org.springframework.http.HttpStatus

class PageAggregationController extends ExceptionHandlerController {
class AggregationController extends ExceptionHandlerController {

public final static String DATE_FORMAT_STRING_FOR_HIGH_CHART = 'dd.mm.yyyy';
public final static int MONDAY_WEEKSTART = 1
@@ -74,7 +74,7 @@ class PageAggregationController extends ExceptionHandlerController {
/**
* Rest Method for ajax call.
* @param cmd The requested data.
* @return PageAggregationChartDTO as JSON or string message if an error occurred
* @return AggregationChartDTO as JSON or string message if an error occurred
*/
@RestAction
def getBarchartData(GetBarchartCommand cmd) {
@@ -103,14 +103,14 @@ class PageAggregationController extends ExceptionHandlerController {
return
}

PageAggregationChartDTO chartDto = new PageAggregationChartDTO(hasComparativeData: hasComparativeData)
AggregationChartDTO chartDto = new AggregationChartDTO(hasComparativeData: hasComparativeData)
chartDto.i18nMap.put("measurand", i18nService.msg("de.iteratec.result.measurand.label", "Measurand"))
chartDto.i18nMap.put("jobGroup", i18nService.msg("de.iteratec.isr.wptrd.labels.filterFolder", "JobGroup"))
chartDto.i18nMap.put("page", i18nService.msg("de.iteratec.isr.wptrd.labels.filterPage", "Page"))
chartDto.i18nMap.put("comparativeImprovement", i18nService.msg("de.iteratec.osm.chart.comparative.improvement", "Improvement"))
chartDto.i18nMap.put("comparativeDeterioration", i18nService.msg("de.iteratec.osm.chart.comparative.deterioration", "Deterioration"))

chartDto.series.addAll(convertToPageAggregationChartSeriesDTOs(barchartAggregations))
chartDto.series.addAll(convertToAggregationChartSeriesDTOs(barchartAggregations))

// TODO: see ticket [IT-1614]
chartDto.filterRules = createFilterRules(allPages, allJobGroups)
@@ -142,12 +142,12 @@ class PageAggregationController extends ExceptionHandlerController {
}
}

private List<PageAggregationChartSeriesDTO> convertToPageAggregationChartSeriesDTOs(List<BarchartAggregation> barchartAggregations) {
private List<AggregationChartSeriesDTO> convertToAggregationChartSeriesDTOs(List<BarchartAggregation> barchartAggregations) {
return barchartAggregations.collectMany {
if (!it.value) {
return []
} else {
return [new PageAggregationChartSeriesDTO(
return [new AggregationChartSeriesDTO(
unit: it.selectedMeasurand.getMeasurandGroup().unit.label,
measurandLabel: i18nService.msg("de.iteratec.isr.measurand.${it.selectedMeasurand.name}", it.selectedMeasurand.name),
measurand: it.selectedMeasurand.name,
@@ -7,6 +7,7 @@ import de.iteratec.osm.measurement.environment.Browser
import de.iteratec.osm.measurement.environment.Location
import de.iteratec.osm.measurement.schedule.JobGroup
import de.iteratec.osm.result.CachedView
import de.iteratec.osm.result.DeviceType
import de.iteratec.osm.result.SelectedMeasurand
import de.iteratec.osm.result.dao.EventResultProjection
import de.iteratec.osm.result.dao.EventResultQueryBuilder
@@ -140,7 +140,7 @@ class JobService {
return params
}

Map createPageAggregationParamsFor(Job job) {
Map createAggregationParamsFor(Job job) {
Map params = createCommonParams(job)
Set<Long> pageIds = []
new ScriptParser(pageService, job.script.navigationScript, job.script.label).eventNames.each {
@@ -60,8 +60,8 @@
addTagToJobs: "${createLink(controller: 'job', action: 'addTagToJobs')}"
},
eventResultDashboardShowAll: "${createLink(action: 'showAll', controller: 'eventResultDashboard')}",
pageAggregationShow: "${createLink(action: 'show', controller: 'pageAggregation')}",
pageAggregationGetData: "${createLink(controller: 'pageAggregation', action: 'getBarchartData')}",
aggregationShow: "${createLink(action: 'show', controller: 'aggregation')}",
aggregationGetData: "${createLink(controller: 'aggregation', action: 'getBarchartData')}",
tabularResultPresentation: "${createLink(action: 'listResults', controller: 'tabularResultPresentation')}",
getPagesForMeasuredEvents: "${createLink(action: 'getPagesForMeasuredEvents', controller: 'page')}",
detailAnalysisShow: "${createLink(action: 'show', controller: 'detailAnalysis')}",
@@ -34,7 +34,7 @@
<g:message code="eventResultDashboard.label" default="Time Series"/></g:link>
</li>
<li class="controller">
<g:link controller="pageAggregation" action="showAll"><i class="fas fa-chart-bar"></i>
<g:link controller="aggregation" action="showAll"><i class="fas fa-chart-bar"></i>
<g:message code="de.iteratec.isocsi.aggregationChart" default="Aggregation"/></g:link>
</li>
<li class="controller">
Oops, something went wrong.

0 comments on commit e354394

Please sign in to comment.
You can’t perform that action at this time.