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 11:08:03 UTC

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

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

tex 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 5223718  [STREAMPIPES-79] fix order of images (newest to oldest), fix page display
5223718 is described below

commit 5223718b21cc9ce6a1623d8745cb6d56410f4a2e
Author: tex <te...@fzi.de>
AuthorDate: Mon Jun 8 13:07:46 2020 +0200

    [STREAMPIPES-79] fix order of images (newest to oldest), fix page display
---
 .../app/core-ui/image/image-categorize/image-categorize.component.html | 2 +-
 .../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.html      | 2 +-
 ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts        | 3 ++-
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/ui/src/app/core-ui/image/image-categorize/image-categorize.component.html b/ui/src/app/core-ui/image/image-categorize/image-categorize.component.html
index a5d6a0c..2b090d1 100644
--- a/ui/src/app/core-ui/image/image-categorize/image-categorize.component.html
+++ b/ui/src/app/core-ui/image/image-categorize/image-categorize.component.html
@@ -46,7 +46,7 @@
             </div>
         </div>
         <br />
-        <div fxLayout="row" fxLayoutAlign="center center"><div>{{pageIndex + 1}} / {{pageSum }}</div></div>
+        <div fxLayout="row" fxLayoutAlign="center center"><div>{{pageIndex + 1}} / {{pageSum}}</div></div>
         <sp-image-bar style="width: 100%"
                       [imagesSrcs]="imagesSrcs"
                       [selectedIndex]="imagesIndex"
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 c2c68f7..b83eab9 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.html b/ui/src/app/core-ui/image/image-viewer/image-viewer.component.html
index 60ca4a6..5990922 100644
--- a/ui/src/app/core-ui/image/image-viewer/image-viewer.component.html
+++ b/ui/src/app/core-ui/image/image-viewer/image-viewer.component.html
@@ -26,7 +26,7 @@
             </div>
         </div>
         <br />
-        <div fxLayout="row" fxLayoutAlign="center center"><div>{{pageIndex + 1}} / {{pageSum }}</div></div>
+        <div fxLayout="row" fxLayoutAlign="center center"><div>{{pageIndex + 1}} / {{pageSum}}</div></div>
         <sp-image-bar style="width: 100%"
                       [imagesSrcs]="imagesSrcs"
                       [selectedIndex]="imagesIndex"
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 4ac950d..68794d2 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;