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); } /**