replace startDate + dateRange with start and end date
The new datetimepicker can be used to specify date ranges. We no longer need to define a start date and a range. This simplifies the code for zooming and shifting considerably.
This commit is contained in:
@@ -150,8 +150,7 @@ public class PdbController implements HardcodedValues, PropertyKeys {
|
||||
@RequestParam(name = "groupBy[]", defaultValue = "") final List<String> aGroupBy,
|
||||
@RequestParam(name = "limitBy.number", defaultValue = "10") final int limit,
|
||||
@RequestParam(name = "limitBy.selected", defaultValue = "NO_LIMIT") final Limit limitBy,
|
||||
@RequestParam(name = "dateFrom", defaultValue = "") final String dateFrom,
|
||||
@RequestParam(name = "dateRange", defaultValue = "1 week") final String dateRange,
|
||||
@RequestParam(name = "dateRange") final String dateRange,
|
||||
@RequestParam(name = "axisScale", defaultValue = "LINEAR") final AxisScale axisScale,
|
||||
@RequestParam(name = "aggregate", defaultValue = "NONE") final Aggregate aggregate,
|
||||
@RequestParam(name = "keyOutside", defaultValue = "false") final boolean keyOutside,
|
||||
@@ -163,6 +162,10 @@ public class PdbController implements HardcodedValues, PropertyKeys {
|
||||
throw new BadRequest("The query must not be empty!");
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(dateRange)) {
|
||||
throw new BadRequest("The parameter 'dateRange' must be set.");
|
||||
}
|
||||
|
||||
final PlotSettings plotSettings = new PlotSettings();
|
||||
plotSettings.setQuery(query);
|
||||
plotSettings.setGroupBy(aGroupBy);
|
||||
@@ -170,7 +173,6 @@ public class PdbController implements HardcodedValues, PropertyKeys {
|
||||
plotSettings.setWidth(hidth);
|
||||
plotSettings.setLimit(limit);
|
||||
plotSettings.setLimitBy(limitBy);
|
||||
plotSettings.setDateFrom(dateFrom);
|
||||
plotSettings.setDateRange(dateRange);
|
||||
plotSettings.setYAxisScale(axisScale);
|
||||
plotSettings.setAggregate(PlotSettingsTransformer.toAggregateInternal(aggregate));
|
||||
|
||||
Reference in New Issue
Block a user