Skip to content

Commit

Permalink
Merge branch 'master' into NAS-132767
Browse files Browse the repository at this point in the history
  • Loading branch information
denysbutenko committed Dec 5, 2024
2 parents 063dadb + e896f51 commit c8972fa
Show file tree
Hide file tree
Showing 161 changed files with 1,419 additions and 2,144 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"@biesbjerg/ngx-translate-extract-marker": "~1.0.0",
"@bugsplat/angular-tree-component": "~18.0.0",
"@codemirror/autocomplete": "~6.18.1",
"@codemirror/commands": "~6.7.1",
"@codemirror/lang-json": "~6.0.1",
"@codemirror/lang-yaml": "~6.1.1",
"@codemirror/language": "~6.10.1",
Expand Down Expand Up @@ -114,6 +115,7 @@
"@types/randomcolor": "~0.5.9",
"@types/svg-sprite": "~0.0.39",
"@types/vinyl": "~2.0.12",
"@uiw/codemirror-theme-material": "~4.23.6",
"@vendure/ngx-translate-extract": "~9.2.1",
"@xterm/addon-fit": "~0.10.0",
"@xterm/xterm": "~5.5.0",
Expand Down
42 changes: 0 additions & 42 deletions src/app/directives/app-let.directive.ts

This file was deleted.

21 changes: 0 additions & 21 deletions src/app/enums/docker-nvidia-status.enum.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/app/enums/explorer-type.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export enum ExplorerNodeType {
Directory = 'directory',
File = 'file',
Symlink = 'symlink',
}
3 changes: 1 addition & 2 deletions src/app/interfaces/api/api-call-directory.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { CloudsyncTransferSetting } from 'app/enums/cloudsync-transfer-setting.e
import { DatasetRecordSize, DatasetType } from 'app/enums/dataset.enum';
import { DeviceType } from 'app/enums/device-type.enum';
import { DockerConfig, DockerStatusData } from 'app/enums/docker-config.interface';
import { DockerNvidiaStatusResponse } from 'app/enums/docker-nvidia-status.enum';
import { FailoverDisabledReason } from 'app/enums/failover-disabled-reason.enum';
import { FailoverStatus } from 'app/enums/failover-status.enum';
import { OnOff } from 'app/enums/on-off.enum';
Expand Down Expand Up @@ -596,7 +595,7 @@ export interface ApiCallDirectory {
// Docker
'docker.config': { params: void; response: DockerConfig };
'docker.status': { params: void; response: DockerStatusData };
'docker.nvidia_status': { params: void; response: DockerNvidiaStatusResponse };
'docker.nvidia_present': { params: void; response: boolean };

// LDAP
'ldap.config': { params: void; response: LdapConfig };
Expand Down
5 changes: 5 additions & 0 deletions src/app/interfaces/iscsi.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,8 @@ export interface IscsiTargetExtent {
}

export type IscsiTargetExtentUpdate = Omit<IscsiTargetExtent, 'id'>;

export interface AssociatedTargetDialogData {
target: IscsiTarget;
extents: IscsiExtent[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,57 +55,57 @@ <h4 class="message">
</h4>
</div>
}
<div *appLet="unreadAlerts$ | async as unreadAlerts">
@if (!unreadAlerts.length) {
<div class="no-alerts">
<ix-icon class="icon" name="info"></ix-icon>
<h4 class="message">{{ 'There are no alerts.' | translate }}</h4>
</div>
} @else {
<div class="alert-list unread-alerts">
@for (alert of unreadAlerts; track alert.id; let last = $last) {
<div
class="alert"
role="listitem"
[class.alert-last]="last"
>
<ix-alert [alert]="alert" [isHaLicensed]="isHaLicensed"></ix-alert>
</div>
}
</div>
<button
*ixRequiresRoles="requiredRoles"
matRipple
class="button-row"
ixTest="dismiss-all-alerts"
(click)="onDismissAll()"
>
{{ 'Dismiss All Alerts' | translate }}
</button>
}
</div>
<div *appLet="dismissedAlerts$ | async as dismissedAlerts">
@if (dismissedAlerts.length) {
<div class="alert-list dismissed-alerts">
@for (alert of dismissedAlerts; track alert.id; let last = $last) {
<div
class="alert"
role="listitem"
[class.alert-last]="last"
>
<ix-alert [alert]="alert" [isHaLicensed]="isHaLicensed"></ix-alert>
</div>
}
</div>
<button
*ixRequiresRoles="requiredRoles"
class="button-row"
matRipple
ixTest="reopen-all-alerts"
(click)="onReopenAll()"
>
{{ 'Re-Open All Alerts' | translate }}
</button>
}
</div>

@let unreadAlerts = unreadAlerts$ | async;
@if (!unreadAlerts.length) {
<div class="no-alerts">
<ix-icon class="icon" name="info"></ix-icon>
<h4 class="message">{{ 'There are no alerts.' | translate }}</h4>
</div>
} @else {
<div class="alert-list unread-alerts">
@for (alert of unreadAlerts; track alert.id; let last = $last) {
<div
class="alert"
role="listitem"
[class.alert-last]="last"
>
<ix-alert [alert]="alert" [isHaLicensed]="isHaLicensed"></ix-alert>
</div>
}
</div>
<button
*ixRequiresRoles="requiredRoles"
matRipple
class="button-row"
ixTest="dismiss-all-alerts"
(click)="onDismissAll()"
>
{{ 'Dismiss All Alerts' | translate }}
</button>
}

@let dismissedAlerts = dismissedAlerts$ | async;
@if (dismissedAlerts.length) {
<div class="alert-list dismissed-alerts">
@for (alert of dismissedAlerts; track alert.id; let last = $last) {
<div
class="alert"
role="listitem"
[class.alert-last]="last"
>
<ix-alert [alert]="alert" [isHaLicensed]="isHaLicensed"></ix-alert>
</div>
}
</div>
<button
*ixRequiresRoles="requiredRoles"
class="button-row"
matRipple
ixTest="reopen-all-alerts"
(click)="onReopenAll()"
>
{{ 'Re-Open All Alerts' | translate }}
</button>
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { MockComponent } from 'ng-mocks';
import { MockApiService } from 'app/core/testing/classes/mock-api.service';
import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils';
import { mockAuth } from 'app/core/testing/utils/mock-auth.utils';
import { LetDirective } from 'app/directives/app-let.directive';
import { NavigateAndInteractDirective } from 'app/directives/navigate-and-interact/navigate-and-interact.directive';
import { AlertLevel } from 'app/enums/alert-level.enum';
import { IncomingApiMessageType } from 'app/enums/api-message-type.enum';
Expand Down Expand Up @@ -77,7 +76,6 @@ describe('AlertsPanelComponent', () => {
}),
EffectsModule.forRoot([AlertEffects]),
NavigateAndInteractDirective,
LetDirective,
],
declarations: [
MockComponent(AlertComponent),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { Store } from '@ngrx/store';
import { TranslateModule } from '@ngx-translate/core';
import { map } from 'rxjs/operators';
import { LetDirective } from 'app/directives/app-let.directive';
import { NavigateAndInteractDirective } from 'app/directives/navigate-and-interact/navigate-and-interact.directive';
import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive';
import { Role } from 'app/enums/role.enum';
Expand Down Expand Up @@ -48,7 +47,6 @@ import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors';
MatMenuItem,
NavigateAndInteractDirective,
MatProgressBar,
LetDirective,
AlertComponent,
MatRipple,
TranslateModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ <h3 mat-dialog-title class="dialog-title">
<span [innerHTML]="contentText.message | translate"></span>
</p>
</div>
<div *appLet="selectRunningJobs$ | async as jobs" class="jobs">

@let jobs = selectRunningJobs$ | async;
<div class="jobs">
@if (jobs.length) {
<div>
@for (job of jobs; track job) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { MatDialogContent, MatDialogTitle } from '@angular/material/dialog';
import { UntilDestroy } from '@ngneat/until-destroy';
import { Store } from '@ngrx/store';
import { TranslateModule } from '@ngx-translate/core';
import { LetDirective } from 'app/directives/app-let.directive';
import { JobItemComponent } from 'app/modules/jobs/components/job-item/job-item.component';
import { JobsState } from 'app/modules/jobs/store/job.reducer';
import { selectUpdateJob } from 'app/modules/jobs/store/job.selectors';
Expand All @@ -21,7 +20,6 @@ import { selectUpdateJob } from 'app/modules/jobs/store/job.selectors';
MatDialogTitle,
TranslateModule,
AsyncPipe,
LetDirective,
JobItemComponent,
],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ import {
} from '@angular/core';
import { ControlValueAccessor, NgControl } from '@angular/forms';
import { MatHint } from '@angular/material/form-field';
import { defaultKeymap, history, historyKeymap } from '@codemirror/commands';
import { Compartment } from '@codemirror/state';
import { oneDark } from '@codemirror/theme-one-dark';
import { EditorView, EditorViewConfig, placeholder } from '@codemirror/view';
import {
EditorView, EditorViewConfig, keymap, lineNumbers, placeholder,
} from '@codemirror/view';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { material } from '@uiw/codemirror-theme-material';
import { basicSetup } from 'codemirror';
import {
BehaviorSubject, Observable, combineLatest, filter, take, tap,
Expand Down Expand Up @@ -142,7 +145,10 @@ export class IxCodeEditorComponent implements OnChanges, OnInit, AfterViewInit,
basicSetup,
updateListener,
languageFunctionsMap[this.language()](),
oneDark,
lineNumbers(),
history(),
keymap.of([...defaultKeymap as unknown[], ...historyKeymap]),
material,
this.editableCompartment.of(EditorView.editable.of(true)),
placeholder(this.placeholder()),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
>
@if (node.data.type === ExplorerNodeType.File) {
<ix-icon name="insert_drive_file"></ix-icon>
} @else if (node.data.type === ExplorerNodeType.Symlink) {
<ix-icon [name]="'mdi-database'"></ix-icon>
} @else {
@if (node.data.isLock) {
<ix-icon name="mdi-folder-lock"></ix-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,24 @@ <h3>{{ 'Running Jobs' | translate }}</h3>
></mat-progress-bar>
</div>
} @else {
<div *appLet="availableJobs$ | async as jobs">
@if (jobs.length) {
<div class="jobs-list">
@for (job of jobs; track job.id) {
<ix-job-item
[job]="job"
[clickable]="true"
(aborted)="onAbort(job)"
(opened)="openJobDialog(job)"
></ix-job-item>
}
</div>
} @else {
<div class="no-jobs">
<ix-icon name="info"></ix-icon>
<h4 class="message">{{ 'No jobs running.' | translate }}</h4>
</div>
}
</div>
@let jobs = availableJobs$ | async;
@if (jobs.length) {
<div class="jobs-list">
@for (job of jobs; track job.id) {
<ix-job-item
[job]="job"
[clickable]="true"
(aborted)="onAbort(job)"
(opened)="openJobDialog(job)"
></ix-job-item>
}
</div>
} @else {
<div class="no-jobs">
<ix-icon name="info"></ix-icon>
<h4 class="message">{{ 'No jobs running.' | translate }}</h4>
</div>
}
}

@if (error$ | async; as error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Store, StoreModule } from '@ngrx/store';
import { of } from 'rxjs';
import { FakeFormatDateTimePipe } from 'app/core/testing/classes/fake-format-datetime.pipe';
import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils';
import { LetDirective } from 'app/directives/app-let.directive';
import { JobState } from 'app/enums/job-state.enum';
import { Job } from 'app/interfaces/job.interface';
import { DialogService } from 'app/modules/dialog/dialog.service';
Expand Down Expand Up @@ -87,7 +86,6 @@ describe('JobsPanelComponent', () => {
},
}),
EffectsModule.forRoot([JobEffects]),
LetDirective,
],
declarations: [
JobItemComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { Store } from '@ngrx/store';
import { TranslateService, TranslateModule } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import { LetDirective } from 'app/directives/app-let.directive';
import { ApiJobMethod, ApiJobResponse } from 'app/interfaces/api/api-job-directory.interface';
import { Job } from 'app/interfaces/job.interface';
import { DialogService } from 'app/modules/dialog/dialog.service';
Expand Down Expand Up @@ -43,7 +42,6 @@ import { ErrorHandlerService } from 'app/services/error-handler.service';
MatTooltip,
IxIconComponent,
MatProgressBar,
LetDirective,
JobItemComponent,
MatDialogActions,
MatButton,
Expand Down
Loading

0 comments on commit c8972fa

Please sign in to comment.