From a4a46d50c3d35191dc2e8d72514d4045776f87d9 Mon Sep 17 00:00:00 2001 From: Matthew Burgess Date: Fri, 29 Oct 2021 14:24:34 -0400 Subject: [PATCH] NIFI-9316: Registry Sort by label should be 'Last Updated (newest)' not 'Newest (update)' NIFI-9316: Incorporated review comments Signed-off-by: Matthew Burgess This closes #5496 --- .../src/main/webapp/services/nf-registry.service.js | 4 ++-- .../main/webapp/services/nf-registry.service.spec.js | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.js b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.js index 6b126dc171..dec1a69130 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.js +++ b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.js @@ -389,7 +389,7 @@ NfRegistryService.prototype = { var label = ''; switch (sortByColumn.label) { case 'Updated': - label = (sortByColumn.sortOrder === 'ASC') ? 'Oldest (update)' : 'Newest (update)'; + label = (sortByColumn.sortOrder === 'ASC') ? 'Last Updated (oldest)' : 'Last Updated (newest)'; break; case 'Name': label = (sortByColumn.sortOrder === 'ASC') ? 'Name (a - z)' : 'Name (z - a)'; @@ -414,7 +414,7 @@ NfRegistryService.prototype = { var label = ''; switch (col.label) { case 'Updated': - label = (col.sortOrder !== 'ASC') ? 'Oldest (update)' : 'Newest (update)'; + label = (col.sortOrder !== 'ASC') ? 'Last Updated (oldest)' : 'Last Updated (newest)'; break; case 'Name': label = (col.sortOrder !== 'ASC') ? 'Name (a - z)' : 'Name (z - a)'; diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.spec.js b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.spec.js index cecf2ec3ef..624fcca085 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.spec.js +++ b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.spec.js @@ -67,7 +67,7 @@ describe('NfRegistry Service isolated unit tests', function () { expect(label).toBe('Name (a - z)'); }); - it('should get the `Newest (update)` sort by label', function () { + it('should get the `Last Updated (newest)` sort by label', function () { //Setup the nfRegistryService state for this test nfRegistryService.dropletColumns[0].active = false; nfRegistryService.dropletColumns[1].active = true; @@ -76,10 +76,10 @@ describe('NfRegistry Service isolated unit tests', function () { const label = nfRegistryService.getSortByLabel(); //assertions - expect(label).toBe('Newest (update)'); + expect(label).toBe('Last Updated (newest)'); }); - it('should get the `Oldest (update)` sort by label', function () { + it('should get the `Last Updated (oldest)` sort by label', function () { //Setup the nfRegistryService state for this test nfRegistryService.dropletColumns[0].active = false; nfRegistryService.dropletColumns[1].active = true; @@ -121,7 +121,7 @@ describe('NfRegistry Service isolated unit tests', function () { expect(label).toBe('Oldest (update)'); }); - it('should generate the sort menu\'s `Newest (update)` label', function () { + it('should generate the sort menu\'s `Last Updated (newest)` label', function () { // The function to test const label = nfRegistryService.generateSortMenuLabels({ name: 'updated', @@ -131,7 +131,7 @@ describe('NfRegistry Service isolated unit tests', function () { }); //assertions - expect(label).toBe('Newest (update)'); + expect(label).toBe('Last Updated (newest)'); }); it('should sort `droplets` by `column`', function () {