Unverified Commit d1040807 authored by bugclerk's avatar bugclerk Committed by GitHub
Browse files

NAS-124932 / 23.10.1 / Support for empty mointpoint (by undsoft) (#9231)


* Empty commit to create PR on github.

You should reset it

* NAS-124932: Support for empty mointpoint

---------
Co-authored-by: default avatarVladimir Vinogradenko <vladimirv@bugclerk.tys1.ixsystems.net>
Co-authored-by: default avatarEvgeny Stepanovych <undsoft@gmail.com>
Showing with 49 additions and 17 deletions
+49 -17
......@@ -43,6 +43,11 @@
</ng-container>
</ng-template>
</div>
<ix-entity-empty
*ngIf="!isLoading && !acl"
[conf]="isMissingMountpoint ? missionMountpointEmptyConfig : emptyConfig"
></ix-entity-empty>
</mat-card-content>
</mat-card>
......@@ -56,8 +61,3 @@
></ngx-skeleton-loader>
</div>
<ix-entity-empty
*ngIf="!isLoading && !acl"
[conf]="emptyConfig"
></ix-entity-empty>
......@@ -2,8 +2,8 @@ import {
ChangeDetectionStrategy, Component, Input, OnChanges, OnInit, ChangeDetectorRef,
} from '@angular/core';
import { Router } from '@angular/router';
import { marker as T } from '@biesbjerg/ngx-translate-extract-marker';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { TranslateService } from '@ngx-translate/core';
import { AclType } from 'app/enums/acl-type.enum';
import { EmptyType } from 'app/enums/empty-type.enum';
import { NfsAclTag } from 'app/enums/nfs-acl.enum';
......@@ -28,12 +28,18 @@ export class PermissionsCardComponent implements OnInit, OnChanges {
@Input() dataset: DatasetDetails;
isLoading: boolean;
isMissingMountpoint: boolean;
stat: FileSystemStat;
acl: Acl;
emptyConfig: EmptyConfig = {
type: EmptyType.NoPageData,
title: T('No Data'),
title: this.translate.instant('No Data'),
};
missionMountpointEmptyConfig: EmptyConfig = {
type: EmptyType.NoPageData,
title: this.translate.instant('Dataset has no mountpoint'),
};
readonly AclType = AclType;
......@@ -44,6 +50,7 @@ export class PermissionsCardComponent implements OnInit, OnChanges {
private errorHandler: ErrorHandlerService,
private dialogService: DialogService,
private router: Router,
private translate: TranslateService,
) {}
redirectToEditPermissions(): void {
......@@ -58,6 +65,10 @@ export class PermissionsCardComponent implements OnInit, OnChanges {
return this.acl && !isRootDataset(this.dataset) && !this.dataset.locked;
}
ngOnChanges(): void {
this.loadPermissions();
}
ngOnInit(): void {
this.store.state$
.pipe(untilDestroyed(this))
......@@ -88,7 +99,11 @@ export class PermissionsCardComponent implements OnInit, OnChanges {
});
}
ngOnChanges(): void {
private loadPermissions(): void {
this.isMissingMountpoint = !this.dataset.mountpoint;
if (this.isMissingMountpoint) {
return;
}
this.store.loadPermissions(this.dataset.mountpoint);
}
}
......@@ -29,7 +29,7 @@ export function isPasswordEncrypted(dataset: Pick<Dataset, 'key_format'>): boole
}
export function isIocageMounted(dataset: Pick<Dataset, 'mountpoint'>): boolean {
return dataset.mountpoint.split('/')[1] === 'iocage';
return dataset.mountpoint?.split('/')?.[1] === 'iocage';
}
export function isPropertyInherited(property: ZfsProperty<unknown>): boolean {
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -846,6 +846,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -635,6 +635,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......@@ -680,6 +681,7 @@
"Define whether the control channel, data channel, both channels, or neither channel of an FTP session must occur over SSL/TLS. The policies are described <a href=\"http://www.proftpd.org/docs/directives/linked/config_ref_TLSRequired.html\" target=\"_blank\">here</a>": "",
"Degraded": "",
"Delay VM Boot Until VNC Connects": "",
"Delete ": "",
"Delete <b>{deviceType} {device}</b>": "",
"Delete API Key": "",
"Delete All Selected": "",
......@@ -865,6 +867,7 @@
"Enable for TrueNAS to periodically review data blocks and identify empty blocks of obsolete blocks that can be deleted. Unset to incorporate day block overwrites when a device write is started (default).": "",
"Enable passwordless sudo for zfs commands": "",
"Enable support for the File Server Remote VSS Protocol (<a href=\"https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fsrvp\" target=\"_blank\">FSVRP</a>). This protocol allows RPC clients to manage snapshots for a specific SMB share. The share path must be a dataset mountpoint. Snapshots have the prefix <code>fss-</code> followed by a snapshot creation timestamp. A snapshot must have this prefix for an RPC user to delete it.": "",
"Enable this SMB share. Unset to disable this SMB share without deleting it.": "",
"Enable to use thin provisioning where disk space for this volume is allocated <b>‘on demand’</b> as new writes are received. Use caution when enabling this feature, as writes can fail when the pool is low on space.": "",
"Enable/Disable STP on the bridge interfaces configurable.": "",
"Enabled 'Time Machine'": "",
......@@ -2025,6 +2028,8 @@
"Run Manual Test": "",
"Run Once": "",
"Run job": "",
"Run this cloud sync now?": "",
"Run this rsync now?": "",
"Running": "",
"S.M.A.R.T. Enabled": "",
"S.M.A.R.T. Extra Options": "",
......@@ -2088,6 +2093,7 @@
"Scrub In Progress:": "",
"Scrub Paused": "",
"Scrub Pool": "",
"Scrub Task": "",
"Scrub Tasks": "",
"Scrub interval set to {scrubIntervalValue} days": "",
"Search": "",
......@@ -2589,6 +2595,7 @@
"Thread:": "",
"Threads": "",
"Threshold Days": "",
"Threshold days": "",
"Thursday": "",
"Ticket": "",
"Time": "",
......@@ -2690,6 +2697,7 @@
"Unshare": "",
"Unsupported Hardware": "",
"Up to date": "",
"Upcoming tasks": "",
"Update 'Time Machine'": "",
"Update All": "",
"Update Available": "",
......@@ -3158,7 +3166,7 @@
"Block size": "Blockgröße",
"Boot Environments": "Boot Umgebungen",
"Boot Loader Type": "Bootloadertyp",
"Boot Method": "Moot Methode",
"Boot Method": "Boot Methode",
"Boot environment name. Alphanumeric characters, dashes (-), underscores (_), and periods (.) are allowed.": "Name der Boot-Umgebung. Alphanumerische Zeichen, Bindestriche (-), Unterstriche (_) und Punkte (.) sind zulässig.",
"Boot environment to be cloned.": "Boot-Umgebung, die geklont werden soll.",
"Bridge Members": "Bridge-Mitglieder",
......@@ -3303,7 +3311,6 @@
"Define the target as *iSCSI*, *Fibre Channel*, or *Both*.": "Definieren Sie das Ziel als *iSCSI*, *Fibre Channel* oder *Both*.",
"Delay Updates": "Aktualisierungen verschieben",
"Delete": "Löschen",
"Delete ": "Löschen ",
"Delete Device": "Gerät löschen",
"Delete Virtual Machine": "Virtuelle Maschine löschen",
"Delete Virtual Machine Data?": "Daten der virtuellen Maschine löschen?",
......@@ -3425,7 +3432,6 @@
"Enable the SNMPv3 security model.": "Aktivieren Sie das SNMPv3-Sicherheitsmodell.",
"Enable this Cloud Sync Task. Unset to disable this Cloud Sync Task without deleting it.": "Aktivieren Sie diese Cloud-Sync-Aufgabe. Deaktivieren, um diesen Cloud-Sync-Task zu deaktivieren, ohne ihn zu löschen.",
"Enable this NFS share. Unset to disable this NFS share without deleting it.": "Aktivieren Sie diese NFS-Freigabe. Deaktivieren, um diese NFS-Freigabe zu deaktivieren, ohne sie zu löschen.",
"Enable this SMB share. Unset to disable this SMB share without deleting it.": "Aktivieren Sie diese SMB-Aktie. Deaktivieren, um diese SMB-Freigabe zu deaktivieren, ohne sie zu löschen.",
"Enable this cron job. When unset, disable the cron job without deleting it.": "Aktivieren Sie diesen Cron-Job. Deaktivieren Sie den Cron-Job, wenn er nicht gesetzt ist, ohne ihn zu löschen.",
"Enable this rsync task. Unset to disable this rsync task without deleting it.": "Aktivieren Sie diese Rsync-Aufgabe. Deaktivieren, um diesen rsync-Task zu deaktivieren, ohne ihn zu löschen.",
"Enable this service to start automatically.": "Aktivieren Sie diesen Dienst, damit er automatisch startet.",
......@@ -3870,9 +3876,7 @@
"Run Automatically": "Automatisch ausführen",
"Run Now": "Jetzt ausführen",
"Run On a Schedule": "Ausführen nach einem Zeitplan",
"Run this cloud sync now?": "Jetzt Cloud-Synchronisierung ausführen?",
"Run this job now?": "Jetzt Job ausführen?",
"Run this rsync now?": "Jetzt rsync ausführen?",
"S.M.A.R.T. Test": "S.M.A.R.T.-Test",
"S.M.A.R.T. extra options": "S.M.A.R.T. zusätzliche Optionen",
"SAVE": "Speichern",
......@@ -3911,7 +3915,6 @@
"Script to execute after running sync.": "Skript, das nach dem Ausführen der Synchronisierung ausgeführt werden soll.",
"Script to execute before running sync.": "Skript, das vor der Ausführung der Synchronisierung ausgeführt werden soll.",
"Scrub Started": "Scrub gestartet",
"Scrub Task": "Scrub-Aufgabe",
"Scrub interval (in days)": "Peeling-Intervall (in Tagen)",
"Secondary Contact": "Sekundärer Kontakt",
"Secondary DNS server.": "Sekundärer DNS Server.",
......@@ -4150,7 +4153,6 @@
"This is the OS_TENANT_NAME from an <a href=\"https://rclone.org/swift/#configuration-from-an-openstack-credentials-file\" target=\"_blank\">OpenStack credentials file</a>.": "This is the OS_TENANT_NAME from an <a href=\"https://rclone.org/swift/\\#configuration-from-an-openstack-credentials-file\" target=\"_blank\">OpenStack credentials file</a>.",
"This job will not run again until it is enabled.": "Dieser Job wird erst wieder ausgeführt, wenn er aktiviert ist.",
"This system will restart when the update completes.": "Dieses System wird nach Abschluss des Updates neu gestartet.",
"Threshold days": "Schwellentage",
"Threshold temperature in Celsius. If the drive temperature is higher than this value, a LOG_CRIT level log entry is created and an email is sent. <i>0</i> disables this check.": "Schwellentemperatur in Celsius. Wenn die Laufwerkstemperatur höher als dieser Wert ist, wird ein Protokolleintrag auf LOG_CRIT-Ebene erstellt und eine E-Mail gesendet. <i>0</i> deaktiviert diese Prüfung.",
"Thu": "Donnerstag",
"Time (in seconds) before the system stops attempting to establish a connection with the remote system.": "Zeit (in Sekunden), bevor das System aufhört, eine Verbindung mit dem Remote-System herzustellen.",
......@@ -4185,7 +4187,6 @@
"Unset to disable this service without deleting it.": "Deaktivieren Sie diese Option, um diesen Dienst zu deaktivieren ohne ihn zu löschen.",
"Unset to prepend the domain name to the username. Unset to prevent name collisions when Allow Trusted Domains is set and multiple domains use the same username.": "Deaktivieren Sie diese Option, um den Domainnamen vor den Benutzernamen zu stellen. Deaktivieren Sie diese Option, um Namenskollisionen zu verhindern, wenn Vertrauenswürdige Domänen zulassen festgelegt ist und mehrere Domänen denselben Benutzernamen verwenden.",
"Until": "Bis",
"Upcoming tasks": "Anstehende Aufgaben",
"Update": "Aktualisierung",
"Update File": "Aktualisiere Datei",
"Update File Temporary Storage Location": "Aktualisiere den Pfad des temporären Speicherortes",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
......@@ -917,6 +917,7 @@
"Dataset Passphrase": "",
"Dataset Rollback From Snapshot": "",
"Dataset Space Management": "",
"Dataset has no mountpoint": "",
"Dataset is currently locked": "",
"Dataset is shared via NFS": "",
"Dataset is shared via SMB": "",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment