Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-128566 / 25.04 / Always display the Lock button on the encryption card #10900

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,15 @@ <h3 mat-card-title>{{ 'ZFS Encryption' | translate }}</h3>
}
</ng-container>
<ng-container *ixRequiresRoles="[Role.FullAdmin]">
@if (hasPassphrase) {
<button mat-button ixTest="lock" (click)="onLock()">
{{ 'Lock' | translate }}
</button>
}
<button
mat-button
ixTest="lock"
[matTooltip]="!hasPassphrase ? ('This dataset cannot be locked' | translate) : ''"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add full tooltip as described in the ticket.

[disabled]="!hasPassphrase"
(click)="onLock()"
>
{{ 'Lock' | translate }}
</button>
</ng-container>
</mat-card-actions>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ describe('ZfsEncryptionCardComponent', () => {
});

const buttons = await loader.getAllHarnesses(MatButtonHarness);
expect(buttons).toHaveLength(2);
expect(buttons).toHaveLength(3);
expect(await buttons[0].getText()).toBe('Edit');
expect(await buttons[1].getText()).toBe('Export Key');
expect(await buttons[2].getText()).toBe('Lock');
expect(await buttons[2].isDisabled()).toBeTruthy();
});

it('shows correct card state for password encrypted unlocked root', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatDialogModule } from '@angular/material/dialog';
import { MatDividerModule } from '@angular/material/divider';
import { MatTooltipModule } from '@angular/material/tooltip';
import { RouterModule } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive';
Expand Down Expand Up @@ -40,6 +41,7 @@ import { LockDatasetDialogComponent } from './components/lock-dataset-dialog/loc
MatButtonModule,
ReactiveFormsModule,
MatDialogModule,
MatTooltipModule,
IxIconComponent,
IxCheckboxComponent,
IxRadioGroupComponent,
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -3752,6 +3752,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -3184,6 +3184,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -2436,6 +2436,7 @@
"This action will set all dataset quotas for the removed or invalid groups to 0, virtually removing any dataset quota entires for such groups. Are you sure you want to proceed?": "",
"This action will set all dataset quotas for the removed or invalid users to 0, virtually removing any dataset quota entires for such users. Are you sure you want to proceed?": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
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 @@ -4416,6 +4416,7 @@
"This certificate's public key verifies digital signatures used for a non-repudiation service.": "",
"This change can interrupt connectivity and must be tested before making permanent. ": "",
"This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.": "",
"This dataset cannot be locked": "",
"This dataset has children with shares": "",
"This dataset is used by the system": "",
"This dataset is used by: {apps}": "",
Expand Down
Loading