mirror of https://github.com/apache/nifi.git
NIFI-9316: Registry Sort by label should be 'Last Updated (newest)' not 'Newest (update)'
NIFI-9316: Incorporated review comments Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes #5496
This commit is contained in:
parent
a0fc7f5e61
commit
a4a46d50c3
|
@ -389,7 +389,7 @@ NfRegistryService.prototype = {
|
||||||
var label = '';
|
var label = '';
|
||||||
switch (sortByColumn.label) {
|
switch (sortByColumn.label) {
|
||||||
case 'Updated':
|
case 'Updated':
|
||||||
label = (sortByColumn.sortOrder === 'ASC') ? 'Oldest (update)' : 'Newest (update)';
|
label = (sortByColumn.sortOrder === 'ASC') ? 'Last Updated (oldest)' : 'Last Updated (newest)';
|
||||||
break;
|
break;
|
||||||
case 'Name':
|
case 'Name':
|
||||||
label = (sortByColumn.sortOrder === 'ASC') ? 'Name (a - z)' : 'Name (z - a)';
|
label = (sortByColumn.sortOrder === 'ASC') ? 'Name (a - z)' : 'Name (z - a)';
|
||||||
|
@ -414,7 +414,7 @@ NfRegistryService.prototype = {
|
||||||
var label = '';
|
var label = '';
|
||||||
switch (col.label) {
|
switch (col.label) {
|
||||||
case 'Updated':
|
case 'Updated':
|
||||||
label = (col.sortOrder !== 'ASC') ? 'Oldest (update)' : 'Newest (update)';
|
label = (col.sortOrder !== 'ASC') ? 'Last Updated (oldest)' : 'Last Updated (newest)';
|
||||||
break;
|
break;
|
||||||
case 'Name':
|
case 'Name':
|
||||||
label = (col.sortOrder !== 'ASC') ? 'Name (a - z)' : 'Name (z - a)';
|
label = (col.sortOrder !== 'ASC') ? 'Name (a - z)' : 'Name (z - a)';
|
||||||
|
|
|
@ -67,7 +67,7 @@ describe('NfRegistry Service isolated unit tests', function () {
|
||||||
expect(label).toBe('Name (a - z)');
|
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
|
//Setup the nfRegistryService state for this test
|
||||||
nfRegistryService.dropletColumns[0].active = false;
|
nfRegistryService.dropletColumns[0].active = false;
|
||||||
nfRegistryService.dropletColumns[1].active = true;
|
nfRegistryService.dropletColumns[1].active = true;
|
||||||
|
@ -76,10 +76,10 @@ describe('NfRegistry Service isolated unit tests', function () {
|
||||||
const label = nfRegistryService.getSortByLabel();
|
const label = nfRegistryService.getSortByLabel();
|
||||||
|
|
||||||
//assertions
|
//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
|
//Setup the nfRegistryService state for this test
|
||||||
nfRegistryService.dropletColumns[0].active = false;
|
nfRegistryService.dropletColumns[0].active = false;
|
||||||
nfRegistryService.dropletColumns[1].active = true;
|
nfRegistryService.dropletColumns[1].active = true;
|
||||||
|
@ -121,7 +121,7 @@ describe('NfRegistry Service isolated unit tests', function () {
|
||||||
expect(label).toBe('Oldest (update)');
|
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
|
// The function to test
|
||||||
const label = nfRegistryService.generateSortMenuLabels({
|
const label = nfRegistryService.generateSortMenuLabels({
|
||||||
name: 'updated',
|
name: 'updated',
|
||||||
|
@ -131,7 +131,7 @@ describe('NfRegistry Service isolated unit tests', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
//assertions
|
//assertions
|
||||||
expect(label).toBe('Newest (update)');
|
expect(label).toBe('Last Updated (newest)');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should sort `droplets` by `column`', function () {
|
it('should sort `droplets` by `column`', function () {
|
||||||
|
|
Loading…
Reference in New Issue