You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by te...@apache.org on 2020/06/08 17:00:46 UTC

[incubator-streampipes] branch dev updated: fix order of images (newest to oldest), fix page number display

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

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


The following commit(s) were added to refs/heads/dev by this push:
     new 48e9e97  fix order of images (newest to oldest), fix page number display
48e9e97 is described below

commit 48e9e9782d1cf50ea866e4f1ce3e3bb7a67a7caa
Author: tex <te...@fzi.de>
AuthorDate: Mon Jun 8 19:00:23 2020 +0200

    fix order of images (newest to oldest), fix page number display
---
 .../app/core-ui/image/image-categorize/image-categorize.component.ts   | 3 ++-
 ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts    | 3 ++-
 ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts        | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts b/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts
index e04195c..9d39b8a 100644
--- a/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts
+++ b/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts
@@ -95,8 +95,9 @@ export class ImageCategorizeComponent implements OnInit, AfterViewInit {
 
   processData(pageResult) {
     if (pageResult.rows === undefined) {
-      this.pageIndex = pageResult.pageSum;
+      this.pageIndex = pageResult.pageSum - 1;
     } else {
+      pageResult.rows = pageResult.rows.reverse();
       this.pageIndex = pageResult.page;
       this.pageSum = pageResult.pageSum;
 
diff --git a/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts b/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts
index d090457..2d74f25 100644
--- a/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts
+++ b/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts
@@ -137,9 +137,10 @@ export class ImageLabelingComponent implements OnInit, AfterViewInit, OnChanges
 
   processData(pageResult) {
     if (pageResult.rows === undefined) {
-      this.pageIndex = pageResult.pageSum;
+      this.pageIndex = pageResult.pageSum - 1;
       this.openSnackBar('No new data found');
     } else {
+      pageResult.rows = pageResult.rows.reverse();
       this.pageIndex = pageResult.page;
       this.pageSum = pageResult.pageSum;
 
diff --git a/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts b/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts
index 16fa667..281eb21 100644
--- a/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts
+++ b/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts
@@ -87,8 +87,9 @@ export class ImageViewerComponent implements OnInit {
 
   processData(pageResult) {
     if (pageResult.rows === undefined) {
-      this.pageIndex = pageResult.pageSum;
+      this.pageIndex = pageResult.pageSum - 1;
     } else {
+      pageResult.rows = pageResult.rows.reverse();
       this.pageIndex = pageResult.page;
       this.pageSum = pageResult.pageSum;