Skip to content

Commit

Permalink
NAS-131316 / 25.04 / Rename SMART Test Results Fields (#10768)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKarpov98 authored Oct 3, 2024
1 parent 4dbf9e6 commit fe686fc
Show file tree
Hide file tree
Showing 90 changed files with 103 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('SmartTestResultListComponent', () => {
tests: [{
num: 1,
description: 'Background long',
status_verbose: 'Completed',
status_verbose: null,
segment_number: null,
lifetime: 15959,
lba_of_first_error: null,
Expand All @@ -41,7 +41,7 @@ describe('SmartTestResultListComponent', () => {
lifetime: 15929,
lba_of_first_error: null,
status: SmartTestResultStatus.Success,
remaining: null,
remaining: 50,
},
{
num: 3,
Expand Down Expand Up @@ -73,7 +73,7 @@ describe('SmartTestResultListComponent', () => {
lifetime: 15929,
lba_of_first_error: null,
status: SmartTestResultStatus.Success,
remaining: null,
remaining: 0.5,
},
{
num: 3,
Expand All @@ -83,7 +83,7 @@ describe('SmartTestResultListComponent', () => {
lifetime: 16939,
lba_of_first_error: null,
status: SmartTestResultStatus.Success,
remaining: null,
remaining: 0,
}],
}];

Expand Down Expand Up @@ -114,13 +114,13 @@ describe('SmartTestResultListComponent', () => {

it('should show table rows', async () => {
const expectedRows = [
['Disk', 'Description', 'Status', 'Remaining', 'Lifetime', 'Error'],
['sda', 'Background long', 'SUCCESS', 'Completed', '15959', 'No errors'],
['sda', 'Background short', 'SUCCESS', 'Completed', '15929', 'No errors'],
['Disk', 'Description', 'Status', 'Remaining', 'Lifetime', 'LBA of First Error'],
['sda', 'Background long', 'SUCCESS', '0%', '15959', 'No errors'],
['sda', 'Background short', 'SUCCESS', '50%', '15929', 'No errors'],
['sda', 'Background short', 'SUCCESS', 'Completed', '16939', 'No errors'],
['sdb', 'Background long', 'SUCCESS', 'Completed', '15959', 'No errors'],
['sdb', 'Background short', 'SUCCESS', 'Completed', '15929', 'No errors'],
['sdb', 'Background short', 'SUCCESS', 'Completed', '16939', 'No errors'],
['sdb', 'Background short', 'SUCCESS', '0.5%', '15929', 'No errors'],
['sdb', 'Background short', 'SUCCESS', '0%', '16939', 'No errors'],
];

const cells = await table.getCellTexts();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ export class SmartTestResultListComponent implements OnInit {
title: this.translate.instant('Remaining'),
propertyName: 'remaining',
getValue: (row) => {
return row.remaining || row.status_verbose;
if (typeof row.remaining === 'number' && row.remaining >= 0) {
return `${row.remaining}%`;
}

return row.status_verbose ? this.translate.instant(row.status_verbose) : '0%';
},
}),
textColumn({
Expand All @@ -63,7 +67,7 @@ export class SmartTestResultListComponent implements OnInit {
},
}),
textColumn({
title: this.translate.instant('Error'),
title: this.translate.instant('LBA of First Error'),
propertyName: 'lba_of_first_error',
getValue: (row) => {
return row.lba_of_first_error || this.translate.instant('No errors');
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/af.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/ast.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/az.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/be.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/bn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/br.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/bs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1635,6 +1635,7 @@
"Keys for {id} datasets": "",
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
"LDAP Realm": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/dsb.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/en-au.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/en-gb.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/eo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/es-ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP Domain": "",
"LDAP Realm": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/es-co.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/es-mx.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/es-ni.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/es-ve.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2133,6 +2133,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/et.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@
"Keychain Credential Write": "",
"Keypairs": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP Domain": "",
"LDAP Realm": "",
"LDAP Server": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/fy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/ga.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"Incoming / Outgoing network traffic": "",
"Install NVIDIA Drivers": "",
"Install via YAML": "",
"LBA of First Error": "",
"Languages other than <i>English</i> are provided by the community and may be incomplete. <a href=\"https://github.com/truenas/webui/blob/master/TRANSLATING.md\" target=\"_blank\">Learn how to contribute.</a>": "",
"Latest version": "",
"Legacy OS: Extent block size 512b, TPC enabled, no Xen compat mode, SSD speed": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/gd.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/hsb.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@
"Keys pending to be synced between KMIP server and TN database were cleared.": "",
"Keywords": "",
"LACPDU Rate": "",
"LBA of First Error": "",
"LDAP": "",
"LDAP - Primary Domain": "",
"LDAP Domain": "",
Expand Down
Loading

0 comments on commit fe686fc

Please sign in to comment.