Skip to content

Commit

Permalink
NAS-131317: Addressed requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aiden3c committed Oct 11, 2024
1 parent 44a1b27 commit f770d5d
Show file tree
Hide file tree
Showing 94 changed files with 109 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/app/interfaces/smart-test.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface SmartTestResult {
status: SmartTestResultStatus;
status_verbose: string;
segment_number: number;
poh_ago: number;
power_on_hours_ago: number;
}

export interface ManualSmartTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@for (column of displayedColumns; track column; let idx = $index) {
<th
[ngClass]="column.cssClass || ''"
[matTooltip]="column.toolTip ? column.toolTip : column.title"
(click)="onSort(idx)"
>
<div class="title-container" [ngStyle]="{ cursor: !column.disableSorting ? 'pointer' : 'auto' }">
Expand All @@ -12,6 +11,12 @@
[dataProvider]="dataProvider"
[column]="column"
></ng-template>
@if (column.headerTooltip) {
<ix-tooltip
class="tooltip"
[message]="column.headerTooltip | translate">
</ix-tooltip>
}
</div>
@if (!column.disableSorting) {
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { NgClass, NgStyle } from '@angular/common';
import {
AfterViewInit, ChangeDetectorRef, ChangeDetectionStrategy, Component, Input,
} from '@angular/core';
import { MatTooltip } from '@angular/material/tooltip';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { TranslateModule } from '@ngx-translate/core';
import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component';
import { IxTableHeaderCellDirective } from 'app/modules/ix-table/directives/ix-header-cell.directive';
import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum';
import { Column, ColumnComponent } from 'app/modules/ix-table/interfaces/column-component.class';
import { DataProvider } from 'app/modules/ix-table/interfaces/data-provider.interface';
import { TestDirective } from 'app/modules/test-id/test.directive';
import { TooltipComponent } from 'app/modules/tooltip/tooltip.component';

@UntilDestroy()
@Component({
Expand All @@ -20,11 +21,12 @@ import { TestDirective } from 'app/modules/test-id/test.directive';
standalone: true,
imports: [
NgClass,
MatTooltip,
NgStyle,
IxTableHeaderCellDirective,
IxIconComponent,
TestDirective,
TooltipComponent,
TranslateModule,
],
})
export class IxTableHeadComponent<T> implements AfterViewInit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { DataProvider } from 'app/modules/ix-table/interfaces/data-provider.inte
export abstract class ColumnComponent<T> {
propertyName?: keyof T;
title?: string;
toolTip?: string;
headerTooltip?: string;
cssClass?: string;
uniqueRowTag: (row: T) => string;
ariaLabels: (row: T) => string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('SmartTestResultListComponent', () => {
lba_of_first_error: null,
status: SmartTestResultStatus.Success,
remaining: null,
poh_ago: 0,
power_on_hours_ago: 1,
},
{
num: 2,
Expand All @@ -43,7 +43,7 @@ describe('SmartTestResultListComponent', () => {
lba_of_first_error: null,
status: SmartTestResultStatus.Success,
remaining: 50,
poh_ago: 0,
power_on_hours_ago: 25,
},
{
num: 3,
Expand All @@ -54,7 +54,7 @@ describe('SmartTestResultListComponent', () => {
lba_of_first_error: null,
status: SmartTestResultStatus.Success,
remaining: null,
poh_ago: 0,
power_on_hours_ago: 49,
}],
}, {
disk: 'sdb',
Expand All @@ -67,7 +67,7 @@ describe('SmartTestResultListComponent', () => {
lba_of_first_error: null,
status: SmartTestResultStatus.Success,
remaining: null,
poh_ago: 0,
power_on_hours_ago: 1,
},
{
num: 2,
Expand All @@ -78,7 +78,7 @@ describe('SmartTestResultListComponent', () => {
lba_of_first_error: null,
status: SmartTestResultStatus.Success,
remaining: 0.5,
poh_ago: 0,
power_on_hours_ago: 25,
},
{
num: 3,
Expand All @@ -89,7 +89,7 @@ describe('SmartTestResultListComponent', () => {
lba_of_first_error: null,
status: SmartTestResultStatus.Success,
remaining: 0,
poh_ago: 0,
power_on_hours_ago: 49,
}],
}];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ export class SmartTestResultListComponent implements OnInit {
}),
textColumn({
title: this.translate.instant('Power On Hours Ago'),
propertyName: 'poh_ago',
toolTip: '"Power On Hours" are how many hours have passed while the disk has been powered on. "Power On Hours Ago" is how many power on hours have passed since each test.',
propertyName: 'power_on_hours_ago',
headerTooltip: this.translate.instant('"Power On Hours" are how many hours have passed while the disk has been powered on. "Power On Hours Ago" is how many power on hours have passed since each test.'),
getValue: (row) => {
return row.poh_ago || this.translate.instant('N/A');
return row.power_on_hours_ago || this.translate.instant('N/A');
},
}),
textColumn({
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/cs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"<a href=\"https://forums.truenas.com/\" target=\"_blank\"> TrueNAS Forums</a> - Find answers from other users in the forums.": "",
"<a href=\"https://tools.ietf.org/html/rfc8095\" target=\"_blank\">Transport Protocol</a> for the remote system log server connection. Choosing Transport Layer Security (TLS) also requires selecting a preconfigured system Certificate.": "",
"<a href=\"https://www.ixsystems.com/support/truenas-arrays/\" target=\"_blank\"> TrueNAS Licensing</a> - Learn more about enterprise-grade support.": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -4,6 +4,7 @@
" Est. Usable Raw Capacity": "",
" as of {dateTime}": "",
" bytes.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
"(No description)": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -4,6 +4,7 @@
" Est. Usable Raw Capacity": "",
" as of {dateTime}": "",
" bytes.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
"(No description)": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
"(No description)": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"({n, plural, =1 {# widget} other {# widgets}})": "",
"...": "",
"1m Average": "",
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 @@ -6,6 +6,7 @@
" as of {dateTime}": "",
" bytes.": "",
" seconds.": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"% of all cores": "",
"'Hosts Allow' or 'Hosts Deny' has been set": "",
"'Hosts Allow' or 'Hosts Deny' has been updated": "",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/ga.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"": "",
"\"Power On Hours\" are how many hours have passed while the disk has been powered on. \"Power On Hours Ago\" is how many power on hours have passed since each test.": "",
"1m Average": "",
"Add Custom App": "",
"Add to trusted store": "",
Expand Down
Loading

0 comments on commit f770d5d

Please sign in to comment.