You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2020/05/18 14:42:17 UTC

[incubator-streampipes] branch STREAMPIPES-79 updated: Fix image labeling for a data size smaller then 10

This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch STREAMPIPES-79
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


The following commit(s) were added to refs/heads/STREAMPIPES-79 by this push:
     new aa92c7b  Fix image labeling for a data size smaller then 10
     new 238d94a  Merge branch 'STREAMPIPES-79' of github.com:apache/incubator-streampipes into STREAMPIPES-79
aa92c7b is described below

commit aa92c7ba600a56a979c950ea86f2e90652e378dc
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon May 18 16:41:14 2020 +0200

    Fix image labeling for a data size smaller then 10
---
 .../streampipes/rest/impl/datalake/DataLakeManagementV3.java       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeManagementV3.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeManagementV3.java
index 4f8fbff..ff62440 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeManagementV3.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeManagementV3.java
@@ -225,7 +225,12 @@ public class DataLakeManagementV3 {
   }
 
   public PageResult getEvents(String index, int itemsPerPage) throws IOException {
-    int page = getMaxPage(index, itemsPerPage) - 1;
+    int page = getMaxPage(index, itemsPerPage);
+
+    if (page > 0) {
+      page = page -1;
+    }
+
     return getEvents(index, itemsPerPage, page);
   }