From fe077af7b49d19dfd94e947f8b5ea0892a3d18fd Mon Sep 17 00:00:00 2001 From: sumitdaga Date: Wed, 16 Jan 2019 16:19:22 +0530 Subject: [PATCH] fixes issue 374 --- src/app/components/data-viewer/data-viewer.component.ts | 8 ++++---- .../instance-root-panel/instance-root-panel.component.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/components/data-viewer/data-viewer.component.ts b/src/app/components/data-viewer/data-viewer.component.ts index 4dd5a81..a10e17d 100644 --- a/src/app/components/data-viewer/data-viewer.component.ts +++ b/src/app/components/data-viewer/data-viewer.component.ts @@ -208,14 +208,14 @@ export class DataViewerComponent implements OnInit, OnChanges { this.redisService.call(instanceId, [['SMEMBERS', key]]).subscribe(ret => { this.setCachedData = injectValuesToArray(ret[0]); this.page.totalSize = this.setCachedData.length; - this.data = this.setCachedData.slice(start, end); + this.data = this.setCachedData.slice(start, end + 1); this.loadingPageData = false; this.showPagination = true; }); } else { this.showPagination = true; this.page.totalSize = this.setCachedData.length; - this.data = this.setCachedData.slice(start, end); + this.data = this.setCachedData.slice(start, end + 1); } } else if (type === 'hash') { if (!this.hashCachedData) { @@ -230,7 +230,7 @@ export class DataViewerComponent implements OnInit, OnChanges { i += 2; } this.page.totalSize = this.hashCachedData.length; - this.data = this.hashCachedData.slice(start, end); + this.data = this.hashCachedData.slice(start, end + 1); this.loadingPageData = false; this.showPagination = true; } @@ -238,7 +238,7 @@ export class DataViewerComponent implements OnInit, OnChanges { } else { this.showPagination = true; this.page.totalSize = this.hashCachedData.length; - this.data = this.hashCachedData.slice(start, end); + this.data = this.hashCachedData.slice(start, end + 1); } } else if (type === 'string') { this.stringValue = this.pageData.item.value; diff --git a/src/app/components/instance-root-panel/instance-root-panel.component.ts b/src/app/components/instance-root-panel/instance-root-panel.component.ts index d550958..1c24351 100644 --- a/src/app/components/instance-root-panel/instance-root-panel.component.ts +++ b/src/app/components/instance-root-panel/instance-root-panel.component.ts @@ -44,7 +44,7 @@ export class InstanceRootPanelComponent implements OnInit { */ getData() { const start = this.page.pageIndex * this.page.pageSize; - return this.pageData.item.slice(start, start + this.page.pageSize - 1); + return this.pageData.item.slice(start, start + this.page.pageSize); } /** pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy