Merge pull request #1451 from GNS3/upgrade-angular

Upgrade to Angular 14
This commit is contained in:
Jeremy Grossmann 2023-08-18 16:47:44 +10:00 committed by GitHub
commit 6322fea306
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
82 changed files with 3857 additions and 3538 deletions

View File

@ -3,11 +3,11 @@ __tests__
node_modules/*/test node_modules/*/test
node_modules/*/tests node_modules/*/tests
powered-test powered-test
e2e #e2e
# asset directories # asset directories
docs docs
doc #doc
website website
images images

View File

@ -27,7 +27,11 @@
"rxjs-compat/add/operator/map", "rxjs-compat/add/operator/map",
"classnames", "classnames",
"stylenames", "stylenames",
"source-map-js" "source-map-js",
"spark-md5",
"xterm",
"xterm-addon-attach",
"xterm-addon-fit"
], ],
"outputPath": "dist", "outputPath": "dist",
"index": "src/index.html", "index": "src/index.html",
@ -215,7 +219,6 @@
} }
} }
}, },
"defaultProject": "gns3-web-ui",
"schematics": { "schematics": {
"@schematics/angular:component": { "@schematics/angular:component": {
"prefix": "app", "prefix": "app",

View File

@ -36,22 +36,22 @@
"generate-licenses-file": "yarn license-checker --production --csv --out licenses.csv", "generate-licenses-file": "yarn license-checker --production --csv --out licenses.csv",
"prebuildforelectron": "node set-variables-in-env.js --set src/environments/environment.electron.prod.ts", "prebuildforelectron": "node set-variables-in-env.js --set src/environments/environment.electron.prod.ts",
"postbuildforelectron": "node set-variables-in-env.js --unset src/environments/environment.electron.prod.ts", "postbuildforelectron": "node set-variables-in-env.js --unset src/environments/environment.electron.prod.ts",
"postinstall": "ngcc --properties es5 browser module main --first-only --create-ivy-entry-points --tsconfig \"./src/tsconfig.app.json\" && ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points --tsconfig \"./src/tsconfig.app.json\"", "postinstall": "ngcc --properties es2020 browser module main --first-only --create-ivy-entry-points --tsconfig \"./src/tsconfig.app.json\" && ngcc --properties es2020 browser module main --first-only --create-ivy-entry-points --tsconfig \"./src/tsconfig.app.json\"",
"snyk-protect": "snyk-protect", "snyk-protect": "snyk-protect",
"prepare": "yarn run snyk-protect" "prepare": "yarn run snyk-protect"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^13.3.5", "@angular/animations": "^14.3.0",
"@angular/cdk": "^13.3.5", "@angular/cdk": "^14.2.7",
"@angular/common": "^13.3.5", "@angular/common": "^14.3.0",
"@angular/compiler": "^13.3.5", "@angular/compiler": "^14.3.0",
"@angular/core": "^13.3.5", "@angular/core": "^14.3.0",
"@angular/forms": "^13.3.5", "@angular/forms": "^14.3.0",
"@angular/material": "^13.3.5", "@angular/material": "^14.2.7",
"@angular/platform-browser": "^13.3.5", "@angular/platform-browser": "^14.3.0",
"@angular/platform-browser-dynamic": "^13.3.5", "@angular/platform-browser-dynamic": "^14.3.0",
"@angular/router": "^13.3.5", "@angular/router": "^14.3.0",
"@sentry/browser": "^6.14.1", "@sentry/browser": "^6.14.1",
"@snyk/protect": "^1.972.0", "@snyk/protect": "^1.972.0",
"@types/jest": "^27.0.2", "@types/jest": "^27.0.2",
@ -72,9 +72,9 @@
"material-design-icons": "^3.0.1", "material-design-icons": "^3.0.1",
"mousetrap": "^1.6.5", "mousetrap": "^1.6.5",
"ng-circle-progress": "^1.6.0", "ng-circle-progress": "^1.6.0",
"ng2-file-upload": "^1.4.0", "ng2-file-upload": "^3.0.0",
"ngx-childprocess": "^0.0.6", "ngx-childprocess": "^0.0.6",
"ngx-device-detector": "^3.0.0", "ngx-device-detector": "4.0.1",
"ngx-electron": "^2.2.0", "ngx-electron": "^2.2.0",
"node-fetch": "^3.2.10", "node-fetch": "^3.2.10",
"notosans-fontface": "^1.3.0", "notosans-fontface": "^1.3.0",
@ -95,10 +95,10 @@
"zone.js": "^0.11.5" "zone.js": "^0.11.5"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^13.3.4", "@angular-devkit/build-angular": "^14.2.12",
"@angular/cli": "^13.3.4", "@angular/cli": "^14.2.12",
"@angular/compiler-cli": "^13.3.5", "@angular/compiler-cli": "^14.3.0",
"@angular/language-service": "^13.3.5", "@angular/language-service": "^14.3.0",
"@sentry/cli": "^2.0.4", "@sentry/cli": "^2.0.4",
"@sentry/electron": "^3.0.7", "@sentry/electron": "^3.0.7",
"@types/jasmine": "^4.0.3", "@types/jasmine": "^4.0.3",
@ -137,4 +137,4 @@
] ]
}, },
"snyk": true "snyk": true
} }

View File

@ -326,393 +326,346 @@ import { ConfirmationDeleteAllProjectsComponent } from './components/projects/co
import { ProjectMapLockConfirmationDialogComponent } from './components/project-map/project-map-menu/project-map-lock-confirmation-dialog/project-map-lock-confirmation-dialog.component'; import { ProjectMapLockConfirmationDialogComponent } from './components/project-map/project-map-menu/project-map-lock-confirmation-dialog/project-map-lock-confirmation-dialog.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
LoggedUserComponent, LoggedUserComponent,
ProjectMapComponent, ProjectMapComponent,
LoginComponent, LoginComponent,
ControllersComponent, ControllersComponent,
AddControllerDialogComponent, AddControllerDialogComponent,
CreateSnapshotDialogComponent, CreateSnapshotDialogComponent,
SnapshotMenuItemComponent, SnapshotMenuItemComponent,
ProjectsComponent, ProjectsComponent,
AddBlankProjectDialogComponent, AddBlankProjectDialogComponent,
ImportProjectDialogComponent, ImportProjectDialogComponent,
ConfirmationDialogComponent, ConfirmationDialogComponent,
DefaultLayoutComponent, DefaultLayoutComponent,
ProgressDialogComponent, ProgressDialogComponent,
ContextMenuComponent, ContextMenuComponent,
ContextConsoleMenuComponent, ContextConsoleMenuComponent,
StartNodeActionComponent, StartNodeActionComponent,
IsolateNodeActionComponent, IsolateNodeActionComponent,
UnisolateNodeActionComponent, UnisolateNodeActionComponent,
StopNodeActionComponent, StopNodeActionComponent,
TemplateComponent, TemplateComponent,
TemplateListDialogComponent, TemplateListDialogComponent,
MoveLayerDownActionComponent, MoveLayerDownActionComponent,
MoveLayerUpActionComponent, MoveLayerUpActionComponent,
EditStyleActionComponent, EditStyleActionComponent,
EditLinkStyleActionComponent, EditLinkStyleActionComponent,
EditTextActionComponent, EditTextActionComponent,
DeleteActionComponent, DeleteActionComponent,
DuplicateActionComponent, DuplicateActionComponent,
PacketFiltersActionComponent, PacketFiltersActionComponent,
StartCaptureActionComponent, StartCaptureActionComponent,
StopCaptureActionComponent, StopCaptureActionComponent,
ResumeLinkActionComponent, ResumeLinkActionComponent,
SuspendLinkActionComponent, SuspendLinkActionComponent,
SettingsComponent, SettingsComponent,
PreferencesComponent, PreferencesComponent,
BundledControllerFinderComponent, BundledControllerFinderComponent,
ProgressComponent, ProgressComponent,
ControllerDiscoveryComponent, ControllerDiscoveryComponent,
NodeSelectInterfaceComponent, NodeSelectInterfaceComponent,
DrawLinkToolComponent, DrawLinkToolComponent,
InstalledSoftwareComponent, InstalledSoftwareComponent,
DrawingAddedComponent, DrawingAddedComponent,
DrawingResizedComponent, DrawingResizedComponent,
TextAddedComponent, TextAddedComponent,
TextEditedComponent, TextEditedComponent,
NodeDraggedComponent, NodeDraggedComponent,
NodeLabelDraggedComponent, NodeLabelDraggedComponent,
DrawingDraggedComponent, DrawingDraggedComponent,
LinkCreatedComponent, LinkCreatedComponent,
InterfaceLabelDraggedComponent, InterfaceLabelDraggedComponent,
InstallSoftwareComponent, InstallSoftwareComponent,
StyleEditorDialogComponent, StyleEditorDialogComponent,
LinkStyleEditorDialogComponent, LinkStyleEditorDialogComponent,
TextEditorDialogComponent, TextEditorDialogComponent,
PacketFiltersDialogComponent, PacketFiltersDialogComponent,
QemuPreferencesComponent, QemuPreferencesComponent,
QemuVmTemplatesComponent, QemuVmTemplatesComponent,
AddQemuVmTemplateComponent, AddQemuVmTemplateComponent,
QemuVmTemplateDetailsComponent, QemuVmTemplateDetailsComponent,
GeneralPreferencesComponent, GeneralPreferencesComponent,
VpcsPreferencesComponent, VpcsPreferencesComponent,
VpcsTemplatesComponent, VpcsTemplatesComponent,
AddVpcsTemplateComponent, AddVpcsTemplateComponent,
VpcsTemplateDetailsComponent, VpcsTemplateDetailsComponent,
VirtualBoxPreferencesComponent, VirtualBoxPreferencesComponent,
VirtualBoxTemplatesComponent, VirtualBoxTemplatesComponent,
VirtualBoxTemplateDetailsComponent, VirtualBoxTemplateDetailsComponent,
AddVirtualBoxTemplateComponent, AddVirtualBoxTemplateComponent,
BuiltInPreferencesComponent, BuiltInPreferencesComponent,
EthernetHubsTemplatesComponent, EthernetHubsTemplatesComponent,
EthernetHubsAddTemplateComponent, EthernetHubsAddTemplateComponent,
EthernetHubsTemplateDetailsComponent, EthernetHubsTemplateDetailsComponent,
CloudNodesTemplatesComponent, CloudNodesTemplatesComponent,
CloudNodesAddTemplateComponent, CloudNodesAddTemplateComponent,
CloudNodesTemplateDetailsComponent, CloudNodesTemplateDetailsComponent,
EthernetSwitchesTemplatesComponent, EthernetSwitchesTemplatesComponent,
EthernetSwitchesAddTemplateComponent, EthernetSwitchesAddTemplateComponent,
EthernetSwitchesTemplateDetailsComponent, EthernetSwitchesTemplateDetailsComponent,
DynamipsPreferencesComponent, DynamipsPreferencesComponent,
IosTemplatesComponent, IosTemplatesComponent,
IosTemplateDetailsComponent, IosTemplateDetailsComponent,
AddIosTemplateComponent, AddIosTemplateComponent,
SymbolsComponent, SymbolsComponent,
VmwarePreferencesComponent, VmwarePreferencesComponent,
VmwareTemplatesComponent, VmwareTemplatesComponent,
VmwareTemplateDetailsComponent, VmwareTemplateDetailsComponent,
AddVmwareTemplateComponent, AddVmwareTemplateComponent,
DeleteConfirmationDialogComponent, DeleteConfirmationDialogComponent,
HelpDialogComponent, HelpDialogComponent,
StartCaptureDialogComponent, StartCaptureDialogComponent,
DeleteTemplateComponent, DeleteTemplateComponent,
DockerTemplatesComponent, DockerTemplatesComponent,
AddDockerTemplateComponent, AddDockerTemplateComponent,
DockerTemplateDetailsComponent, DockerTemplateDetailsComponent,
IouTemplatesComponent, IouTemplatesComponent,
AddIouTemplateComponent, AddIouTemplateComponent,
IouTemplateDetailsComponent, IouTemplateDetailsComponent,
CopyQemuVmTemplateComponent, CopyQemuVmTemplateComponent,
CopyIosTemplateComponent, CopyIosTemplateComponent,
CopyIouTemplateComponent, CopyIouTemplateComponent,
CopyDockerTemplateComponent, CopyDockerTemplateComponent,
EmptyTemplatesListComponent, EmptyTemplatesListComponent,
SymbolsMenuComponent, SymbolsMenuComponent,
SearchFilter, SearchFilter,
DateFilter, DateFilter,
NameFilter, NameFilter,
DataSourceFilter, DataSourceFilter,
TemplateFilter, TemplateFilter,
ProjectsFilter, ProjectsFilter,
AuthImageFilter, AuthImageFilter,
ListOfSnapshotsComponent, ListOfSnapshotsComponent,
CustomAdaptersComponent, CustomAdaptersComponent,
NodesMenuComponent, NodesMenuComponent,
AdbutlerComponent, AdbutlerComponent,
ConsoleDeviceActionComponent, ConsoleDeviceActionComponent,
ShowNodeActionComponent, ShowNodeActionComponent,
ConsoleComponent, ConsoleComponent,
NodesMenuComponent, NodesMenuComponent,
ProjectMapMenuComponent, ProjectMapMenuComponent,
HelpComponent, HelpComponent,
ConfigEditorDialogComponent, ConfigEditorDialogComponent,
EditConfigActionComponent, EditConfigActionComponent,
LogConsoleComponent, LogConsoleComponent,
SaveProjectDialogComponent, SaveProjectDialogComponent,
TopologySummaryComponent, TopologySummaryComponent,
InfoDialogComponent, InfoDialogComponent,
BringToFrontActionComponent, BringToFrontActionComponent,
ExportConfigActionComponent, ExportConfigActionComponent,
ImportConfigActionComponent, ImportConfigActionComponent,
ConsoleDeviceActionBrowserComponent, ConsoleDeviceActionBrowserComponent,
ChangeSymbolDialogComponent, ChangeSymbolDialogComponent,
ChangeSymbolActionComponent, ChangeSymbolActionComponent,
EditProjectDialogComponent, EditProjectDialogComponent,
ReloadNodeActionComponent, ReloadNodeActionComponent,
SuspendNodeActionComponent, SuspendNodeActionComponent,
ConfigActionComponent, ConfigActionComponent,
ConfiguratorDialogVpcsComponent, ConfiguratorDialogVpcsComponent,
ConfiguratorDialogEthernetHubComponent, ConfiguratorDialogEthernetHubComponent,
ConfiguratorDialogEthernetSwitchComponent, ConfiguratorDialogEthernetSwitchComponent,
PortsComponent, PortsComponent,
ConfiguratorDialogSwitchComponent, ConfiguratorDialogSwitchComponent,
ConfiguratorDialogVirtualBoxComponent, ConfiguratorDialogVirtualBoxComponent,
CustomAdaptersTableComponent, CustomAdaptersTableComponent,
ConfiguratorDialogQemuComponent, ConfiguratorDialogQemuComponent,
ConfiguratorDialogCloudComponent, ConfiguratorDialogCloudComponent,
UdpTunnelsComponent, UdpTunnelsComponent,
ConfiguratorDialogAtmSwitchComponent, ConfiguratorDialogAtmSwitchComponent,
ConfiguratorDialogVmwareComponent, ConfiguratorDialogVmwareComponent,
ConfiguratorDialogIouComponent, ConfiguratorDialogIouComponent,
ConfiguratorDialogIosComponent, ConfiguratorDialogIosComponent,
ConfiguratorDialogDockerComponent, ConfiguratorDialogDockerComponent,
ConfiguratorDialogNatComponent, ConfiguratorDialogNatComponent,
QemuImageCreatorComponent, QemuImageCreatorComponent,
ChooseNameDialogComponent, ChooseNameDialogComponent,
StartCaptureOnStartedLinkActionComponent, StartCaptureOnStartedLinkActionComponent,
LockActionComponent, LockActionComponent,
NavigationDialogComponent, NavigationDialogComponent,
ScreenshotDialogComponent, ScreenshotDialogComponent,
PageNotFoundComponent, PageNotFoundComponent,
AlignHorizontallyActionComponent, AlignHorizontallyActionComponent,
AlignVerticallyActionComponent, AlignVerticallyActionComponent,
ConfirmationBottomSheetComponent, ConfirmationBottomSheetComponent,
ConfigDialogComponent, ConfigDialogComponent,
ImportApplianceComponent, ImportApplianceComponent,
DirectLinkComponent, DirectLinkComponent,
SystemStatusComponent, SystemStatusComponent,
StatusInfoComponent, StatusInfoComponent,
StatusChartComponent, StatusChartComponent,
OpenFileExplorerActionComponent, OpenFileExplorerActionComponent,
HttpConsoleActionComponent, HttpConsoleActionComponent,
WebConsoleComponent, WebConsoleComponent,
ConsoleWrapperComponent, ConsoleWrapperComponent,
HttpConsoleNewTabActionComponent, HttpConsoleNewTabActionComponent,
WebConsoleFullWindowComponent, WebConsoleFullWindowComponent,
NewTemplateDialogComponent, NewTemplateDialogComponent,
ChangeHostnameActionComponent, ChangeHostnameActionComponent,
ChangeHostnameDialogComponent, ChangeHostnameDialogComponent,
ApplianceInfoDialogComponent, ApplianceInfoDialogComponent,
ReadmeEditorComponent, ReadmeEditorComponent,
MarkedDirective, MarkedDirective,
InformationDialogComponent, InformationDialogComponent,
TemplateNameDialogComponent, TemplateNameDialogComponent,
ConfigureCustomAdaptersDialogComponent, ConfigureCustomAdaptersDialogComponent,
EditNetworkConfigurationDialogComponent, EditNetworkConfigurationDialogComponent,
UserManagementComponent, UserManagementComponent,
ProjectReadmeComponent, ProjectReadmeComponent,
AddGroupDialogComponent, AddGroupDialogComponent,
GroupFilterPipe, GroupFilterPipe,
GroupManagementComponent, GroupManagementComponent,
AddUserDialogComponent, AddUserDialogComponent,
UserFilterPipe, UserFilterPipe,
DeleteGroupDialogComponent, DeleteGroupDialogComponent,
DeleteUserDialogComponent, DeleteUserDialogComponent,
GroupDetailsComponent, GroupDetailsComponent,
UserDetailComponent, UserDetailComponent,
AddUserToGroupDialogComponent, AddUserToGroupDialogComponent,
RemoveToGroupDialogComponent, RemoveToGroupDialogComponent,
PaginatorPipe, PaginatorPipe,
MembersFilterPipe, MembersFilterPipe,
ManagementComponent, ManagementComponent,
RoleManagementComponent, RoleManagementComponent,
RoleFilterPipe, RoleFilterPipe,
AddRoleDialogComponent, AddRoleDialogComponent,
DeleteRoleDialogComponent, DeleteRoleDialogComponent,
RoleDetailComponent, RoleDetailComponent,
PermissionEditorComponent, PermissionEditorComponent,
EditablePermissionComponent, EditablePermissionComponent,
PermissionEditorValidateDialogComponent, PermissionEditorValidateDialogComponent,
RemoveToGroupDialogComponent, RemoveToGroupDialogComponent,
PermissionsManagementComponent, PermissionsManagementComponent,
AddRoleToGroupComponent, AddRoleToGroupComponent,
PermissionEditLineComponent, PermissionEditLineComponent,
AddPermissionLineComponent, AddPermissionLineComponent,
MethodButtonComponent, MethodButtonComponent,
ActionButtonComponent, ActionButtonComponent,
DeletePermissionDialogComponent, DeletePermissionDialogComponent,
PathAutoCompleteComponent, PathAutoCompleteComponent,
FilterCompletePipe, FilterCompletePipe,
UserPermissionsComponent, UserPermissionsComponent,
PermissionsFilterPipe, PermissionsFilterPipe,
RolePermissionsComponent, RolePermissionsComponent,
DisplayPathPipe, DisplayPathPipe,
ChangeUserPasswordComponent, ChangeUserPasswordComponent,
FilterCompletePipe, FilterCompletePipe,
DisplayPathPipe, DisplayPathPipe,
ChangeUserPasswordComponent, ChangeUserPasswordComponent,
ProjectReadmeComponent, ProjectReadmeComponent,
ImageManagerComponent, ImageManagerComponent,
AddImageDialogComponent, AddImageDialogComponent,
DeleteAllImageFilesDialogComponent, DeleteAllImageFilesDialogComponent,
UploadingProcessbarComponent, UploadingProcessbarComponent,
ExportPortableProjectComponent, ExportPortableProjectComponent,
NodesMenuConfirmationDialogComponent, NodesMenuConfirmationDialogComponent,
ConfirmationDeleteAllProjectsComponent, ConfirmationDeleteAllProjectsComponent,
ProjectMapLockConfirmationDialogComponent, ProjectMapLockConfirmationDialogComponent,
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
HttpClientModule, HttpClientModule,
AppRoutingModule, AppRoutingModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
BrowserAnimationsModule, BrowserAnimationsModule,
CdkTableModule, CdkTableModule,
CartographyModule, CartographyModule,
NgxElectronModule, NgxElectronModule,
FileUploadModule, FileUploadModule,
MatSidenavModule, MatSidenavModule,
MatFormFieldModule, MatFormFieldModule,
MatMenuModule, MatMenuModule,
ResizableModule, ResizableModule,
DragAndDropModule, DragAndDropModule,
DragDropModule, DragDropModule,
NgxChildProcessModule, NgxChildProcessModule,
MATERIAL_IMPORTS, MATERIAL_IMPORTS,
NgCircleProgressModule.forRoot(), NgCircleProgressModule.forRoot(),
OverlayModule, OverlayModule,
MatSlideToggleModule, MatSlideToggleModule,
MatCheckboxModule, MatCheckboxModule,
MatAutocompleteModule, MatAutocompleteModule,
], ],
providers: [ providers: [
SettingsService, SettingsService,
{provide: ErrorHandler, useClass: ToasterErrorHandler}, { provide: ErrorHandler, useClass: ToasterErrorHandler },
{provide: HTTP_INTERCEPTORS, useClass: HttpRequestsInterceptor, multi: true}, { provide: HTTP_INTERCEPTORS, useClass: HttpRequestsInterceptor, multi: true },
D3Service, VersionService,
VersionService, D3Service,
ProjectService, ProjectService,
SymbolService, SymbolService,
ControllerService, ControllerService,
TemplateService, TemplateService,
NodeService, NodeService,
LinkService, LinkService,
DrawingService, DrawingService,
HttpController, HttpController,
SnapshotService, SnapshotService,
ProgressDialogService, ProgressDialogService,
ToasterService, ToasterService,
ProgressService, ProgressService,
ProjectWebServiceHandler, ProjectWebServiceHandler,
LinksDataSource, LinksDataSource,
NodesDataSource, NodesDataSource,
SymbolsDataSource, SymbolsDataSource,
LogEventsDataSource, LogEventsDataSource,
SelectionManager, SelectionManager,
InRectangleHelper, InRectangleHelper,
DrawingsDataSource, DrawingsDataSource,
ControllerErrorHandler, ControllerErrorHandler,
ControllerDatabase, ControllerDatabase,
ProjectNameValidator, ProjectNameValidator,
ToolsService, ToolsService,
ControllerSettingsService, ControllerSettingsService,
QemuService, QemuService,
VpcsService, VpcsService,
TemplateMocksService, TemplateMocksService,
VirtualBoxService, VirtualBoxService,
BuiltInTemplatesService, BuiltInTemplatesService,
IosService, IosService,
InstalledSoftwareService, InstalledSoftwareService,
ExternalSoftwareDefinitionService, ExternalSoftwareDefinitionService,
PlatformService, PlatformService,
IosConfigurationService, IosConfigurationService,
QemuConfigurationService, QemuConfigurationService,
VirtualBoxConfigurationService, VirtualBoxConfigurationService,
VpcsConfigurationService, VpcsConfigurationService,
BuiltInTemplatesConfigurationService, BuiltInTemplatesConfigurationService,
VmwareService, VmwareService,
VmwareConfigurationService, VmwareConfigurationService,
DockerService, DockerService,
DockerConfigurationService, DockerConfigurationService,
IouService, IouService,
IouConfigurationService, IouConfigurationService,
RecentlyOpenedProjectService, RecentlyOpenedProjectService,
ControllerManagementService, ControllerManagementService,
MapScaleService, MapScaleService,
ConsoleService, ConsoleService,
DefaultConsoleService, DefaultConsoleService,
NodeCreatedLabelStylesFixer, NodeCreatedLabelStylesFixer,
NonNegativeValidator, NonNegativeValidator,
RotationValidator, RotationValidator,
MapSettingsService, MapSettingsService,
InfoService, InfoService,
ComputeService, ComputeService,
PacketCaptureService, PacketCaptureService,
NotificationService, NotificationService,
ThemeService, ThemeService,
GoogleAnalyticsService, GoogleAnalyticsService,
NodeConsoleService, NodeConsoleService,
ControllerResolve, ControllerResolve,
LoginGuard, LoginGuard,
ConsoleGuard, ConsoleGuard,
Title, Title,
ApplianceService, ApplianceService,
UpdatesService, UpdatesService,
LoginService, LoginService,
UserService UserService
], ],
entryComponents: [ bootstrap: [AppComponent]
AddControllerDialogComponent,
CreateSnapshotDialogComponent,
ProgressDialogComponent,
TemplateListDialogComponent,
AddBlankProjectDialogComponent,
ImportProjectDialogComponent,
ConfirmationDialogComponent,
StyleEditorDialogComponent,
PacketFiltersDialogComponent,
TextEditorDialogComponent,
SymbolsComponent,
DeleteConfirmationDialogComponent,
HelpDialogComponent,
StartCaptureDialogComponent,
ConfigEditorDialogComponent,
SaveProjectDialogComponent,
InfoDialogComponent,
ChangeSymbolDialogComponent,
EditProjectDialogComponent,
ConfiguratorDialogVpcsComponent,
ConfiguratorDialogEthernetHubComponent,
ConfiguratorDialogEthernetSwitchComponent,
ConfiguratorDialogSwitchComponent,
ConfiguratorDialogVirtualBoxComponent,
ConfiguratorDialogQemuComponent,
ConfiguratorDialogCloudComponent,
ConfiguratorDialogAtmSwitchComponent,
ConfiguratorDialogVmwareComponent,
ConfiguratorDialogIouComponent,
ConfiguratorDialogIosComponent,
ConfiguratorDialogDockerComponent,
ConfiguratorDialogNatComponent,
QemuImageCreatorComponent,
ChooseNameDialogComponent,
NavigationDialogComponent,
ScreenshotDialogComponent,
ConfirmationBottomSheetComponent,
ConfigDialogComponent,
AdbutlerComponent,
NewTemplateDialogComponent,
ChangeHostnameDialogComponent,
ApplianceInfoDialogComponent,
ConfigureCustomAdaptersDialogComponent,
EditNetworkConfigurationDialogComponent,
ProjectReadmeComponent
],
bootstrap: [AppComponent],
}) })
export class AppModule { export class AppModule {
constructor(protected _googleAnalyticsService: GoogleAnalyticsService) {} constructor(protected _googleAnalyticsService: GoogleAnalyticsService) {}

View File

@ -1,5 +1,5 @@
import { Component, Inject, OnInit } from '@angular/core'; import { Component, Inject, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { ElectronService } from 'ngx-electron'; import { ElectronService } from 'ngx-electron';
import { Controller } from '../../../models/controller'; import { Controller } from '../../../models/controller';
@ -17,14 +17,14 @@ export class AddControllerDialogComponent implements OnInit {
]; ];
locations = []; locations = [];
controllerForm = new FormGroup({ controllerForm = new UntypedFormGroup({
name: new FormControl('', [Validators.required]), name: new UntypedFormControl('', [Validators.required]),
location: new FormControl(''), location: new UntypedFormControl(''),
path: new FormControl(''), path: new UntypedFormControl(''),
ubridge_path: new FormControl(''), ubridge_path: new UntypedFormControl(''),
host: new FormControl('', [Validators.required]), host: new UntypedFormControl('', [Validators.required]),
port: new FormControl('', [Validators.required, Validators.min(1)]), port: new UntypedFormControl('', [Validators.required, Validators.min(1)]),
protocol: new FormControl('http:') protocol: new UntypedFormControl('http:')
}); });
constructor( constructor(

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import{ Controller } from '../../models/controller'; import{ Controller } from '../../models/controller';
import { ControllerDatabase } from '../../services/controller.database'; import { ControllerDatabase } from '../../services/controller.database';
@ -27,10 +27,10 @@ export class DirectLinkComponent implements OnInit {
{ key: 'remote', name: 'Remote' }, { key: 'remote', name: 'Remote' },
]; ];
controllerForm = new FormGroup({ controllerForm = new UntypedFormGroup({
name: new FormControl('', [Validators.required]), name: new UntypedFormControl('', [Validators.required]),
location: new FormControl(''), location: new UntypedFormControl(''),
protocol: new FormControl('http:') protocol: new UntypedFormControl('http:')
}); });
constructor( constructor(

View File

@ -1,5 +1,5 @@
import { Component, Inject, OnInit } from '@angular/core'; import { Component, Inject, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Project } from '../../models/project'; import { Project } from '../../models/project';
import{ Controller } from '../../models/controller'; import{ Controller } from '../../models/controller';
@ -11,7 +11,7 @@ import { ProjectService } from '../../services/project.service';
styleUrls: ['./export-portable-project.component.scss'], styleUrls: ['./export-portable-project.component.scss'],
}) })
export class ExportPortableProjectComponent implements OnInit { export class ExportPortableProjectComponent implements OnInit {
export_project_form: FormGroup; export_project_form: UntypedFormGroup;
chosenImage: string = ''; chosenImage: string = '';
compression_methods: any = []; compression_methods: any = [];
compression_level: any = []; compression_level: any = [];
@ -26,7 +26,7 @@ export class ExportPortableProjectComponent implements OnInit {
public dialogRef: MatDialogRef<ExportPortableProjectComponent>, public dialogRef: MatDialogRef<ExportPortableProjectComponent>,
@Inject(MAT_DIALOG_DATA) public data: any, @Inject(MAT_DIALOG_DATA) public data: any,
private projectService: ProjectService, private projectService: ProjectService,
private _fb: FormBuilder private _fb: UntypedFormBuilder
) {} ) {}
async ngOnInit() { async ngOnInit() {

View File

@ -15,7 +15,7 @@ import {ActivatedRoute} from "@angular/router";
import {Controller} from "@models/controller"; import {Controller} from "@models/controller";
import {Group} from "@models/groups/group"; import {Group} from "@models/groups/group";
import {User} from "@models/users/user"; import {User} from "@models/users/user";
import {FormControl, FormGroup} from "@angular/forms"; import {UntypedFormControl, UntypedFormGroup} from "@angular/forms";
import {MatDialog} from "@angular/material/dialog"; import {MatDialog} from "@angular/material/dialog";
import {AddUserToGroupDialogComponent} from "@components/group-details/add-user-to-group-dialog/add-user-to-group-dialog.component"; import {AddUserToGroupDialogComponent} from "@components/group-details/add-user-to-group-dialog/add-user-to-group-dialog.component";
import {RemoveToGroupDialogComponent} from "@components/group-details/remove-to-group-dialog/remove-to-group-dialog.component"; import {RemoveToGroupDialogComponent} from "@components/group-details/remove-to-group-dialog/remove-to-group-dialog.component";
@ -34,7 +34,7 @@ export class GroupDetailsComponent implements OnInit {
controller: Controller; controller: Controller;
group: Group; group: Group;
members: User[]; members: User[];
editGroupForm: FormGroup; editGroupForm: UntypedFormGroup;
pageEvent: PageEvent | undefined; pageEvent: PageEvent | undefined;
searchMembers: string; searchMembers: string;
roles: Role[]; roles: Role[];
@ -44,8 +44,8 @@ export class GroupDetailsComponent implements OnInit {
private groupService: GroupService, private groupService: GroupService,
private toastService: ToasterService) { private toastService: ToasterService) {
this.editGroupForm = new FormGroup({ this.editGroupForm = new UntypedFormGroup({
groupname: new FormControl(''), groupname: new UntypedFormControl(''),
}); });
this.route.data.subscribe((d: { controller: Controller; group: Group, members: User[], roles: Role[] }) => { this.route.data.subscribe((d: { controller: Controller; group: Group, members: User[], roles: Role[] }) => {

View File

@ -12,7 +12,7 @@
*/ */
import {Component, Inject, OnInit} from '@angular/core'; import {Component, Inject, OnInit} from '@angular/core';
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog'; import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';
import {FormBuilder, FormControl, FormGroup, Validators} from "@angular/forms"; import {UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from "@angular/forms";
import {groupNameAsyncValidator} from "@components/group-management/add-group-dialog/groupNameAsyncValidator"; import {groupNameAsyncValidator} from "@components/group-management/add-group-dialog/groupNameAsyncValidator";
import {GroupNameValidator} from "@components/group-management/add-group-dialog/GroupNameValidator"; import {GroupNameValidator} from "@components/group-management/add-group-dialog/GroupNameValidator";
import {GroupService} from "../../../services/group.service"; import {GroupService} from "../../../services/group.service";
@ -34,20 +34,20 @@ import {map, startWith} from "rxjs/operators";
}) })
export class AddGroupDialogComponent implements OnInit { export class AddGroupDialogComponent implements OnInit {
groupNameForm: FormGroup; groupNameForm: UntypedFormGroup;
controller: Controller; controller: Controller;
users: User[]; users: User[];
usersToAdd: Set<User> = new Set([]); usersToAdd: Set<User> = new Set([]);
filteredUsers: Observable<User[]> filteredUsers: Observable<User[]>
loading = false; loading = false;
autocompleteControl = new FormControl(); autocompleteControl = new UntypedFormControl();
constructor(private dialogRef: MatDialogRef<AddGroupDialogComponent>, constructor(private dialogRef: MatDialogRef<AddGroupDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: { controller: Controller }, @Inject(MAT_DIALOG_DATA) public data: { controller: Controller },
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private groupNameValidator: GroupNameValidator, private groupNameValidator: GroupNameValidator,
private groupService: GroupService, private groupService: GroupService,
private userService: UserService, private userService: UserService,
@ -57,7 +57,7 @@ export class AddGroupDialogComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.controller = this.data.controller; this.controller = this.data.controller;
this.groupNameForm = this.formBuilder.group({ this.groupNameForm = this.formBuilder.group({
groupName: new FormControl( groupName: new UntypedFormControl(
null, null,
[Validators.required, this.groupNameValidator.get], [Validators.required, this.groupNameValidator.get],
[groupNameAsyncValidator(this.data.controller, this.groupService)] [groupNameAsyncValidator(this.data.controller, this.groupService)]

View File

@ -10,14 +10,14 @@
* *
* Author: Sylvain MATHIEU, Elise LEBEAU * Author: Sylvain MATHIEU, Elise LEBEAU
*/ */
import { FormControl } from '@angular/forms'; import { UntypedFormControl } from '@angular/forms';
import { timer } from 'rxjs'; import { timer } from 'rxjs';
import { map, switchMap, tap } from 'rxjs/operators'; import { map, switchMap, tap } from 'rxjs/operators';
import { Controller } from "../../../models/controller"; import { Controller } from "../../../models/controller";
import { GroupService } from "../../../services/group.service"; import { GroupService } from "../../../services/group.service";
export const groupNameAsyncValidator = (controller: Controller, groupService: GroupService) => { export const groupNameAsyncValidator = (controller: Controller, groupService: GroupService) => {
return (control: FormControl) => { return (control: UntypedFormControl) => {
return timer(500).pipe( return timer(500).pipe(
switchMap(() => groupService.getGroups(controller)), switchMap(() => groupService.getGroups(controller)),
map((response) => { map((response) => {

View File

@ -36,9 +36,9 @@ export class AddImageDialogComponent implements OnInit {
) {} ) {}
public ngOnInit() { public ngOnInit() {
this.controller =this.data; this.controller = this.data;
this.uploaderImage = new FileUploader({}); this.uploaderImage = new FileUploader({url: ''});
this.uploaderImage.onAfterAddingFile = (file) => { this.uploaderImage.onAfterAddingFile = (file) => {
file.withCredentials = false; file.withCredentials = false;
}; };

View File

@ -1,5 +1,5 @@
import { Component, DoCheck, OnInit, ViewEncapsulation } from '@angular/core'; import { Component, DoCheck, OnInit, ViewEncapsulation } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { AuthResponse } from '../../models/authResponse'; import { AuthResponse } from '../../models/authResponse';
import{ Controller } from '../../models/controller'; import{ Controller } from '../../models/controller';
@ -26,9 +26,9 @@ export class LoginComponent implements OnInit, DoCheck {
public isRememberMe: boolean = false; public isRememberMe: boolean = false;
public isRememberMeCheked: boolean = false; public isRememberMeCheked: boolean = false;
loginForm = new FormGroup({ loginForm = new UntypedFormGroup({
username: new FormControl('', [Validators.required]), username: new UntypedFormControl('', [Validators.required]),
password: new FormControl('', [Validators.required]), password: new UntypedFormControl('', [Validators.required]),
}); });
constructor( constructor(

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import { Compute } from '../../../../../models/compute'; import { Compute } from '../../../../../models/compute';
@ -19,7 +19,7 @@ import { ToasterService } from '../../../../../services/toaster.service';
export class CloudNodesAddTemplateComponent implements OnInit { export class CloudNodesAddTemplateComponent implements OnInit {
controller:Controller ; controller:Controller ;
templateName: string = ''; templateName: string = '';
formGroup: FormGroup; formGroup: UntypedFormGroup;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -29,11 +29,11 @@ export class CloudNodesAddTemplateComponent implements OnInit {
private router: Router, private router: Router,
private toasterService: ToasterService, private toasterService: ToasterService,
private templateMocksService: TemplateMocksService, private templateMocksService: TemplateMocksService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private computeService: ComputeService private computeService: ComputeService
) { ) {
this.formGroup = this.formBuilder.group({ this.formGroup = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import { Compute } from '../../../../../models/compute'; import { Compute } from '../../../../../models/compute';
@ -19,7 +19,7 @@ import { ToasterService } from '../../../../../services/toaster.service';
export class EthernetHubsAddTemplateComponent implements OnInit { export class EthernetHubsAddTemplateComponent implements OnInit {
controller:Controller ; controller:Controller ;
templateName: string = ''; templateName: string = '';
formGroup: FormGroup; formGroup: UntypedFormGroup;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -29,12 +29,12 @@ export class EthernetHubsAddTemplateComponent implements OnInit {
private router: Router, private router: Router,
private toasterService: ToasterService, private toasterService: ToasterService,
private templateMocksService: TemplateMocksService, private templateMocksService: TemplateMocksService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private computeService: ComputeService private computeService: ComputeService
) { ) {
this.formGroup = this.formBuilder.group({ this.formGroup = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
numberOfPorts: new FormControl(8, Validators.required), numberOfPorts: new UntypedFormControl(8, Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import{ Controller } from '../../../../../models/controller'; import{ Controller } from '../../../../../models/controller';
import { EthernetHubTemplate } from '../../../../../models/templates/ethernet-hub-template'; import { EthernetHubTemplate } from '../../../../../models/templates/ethernet-hub-template';
@ -17,7 +17,7 @@ export class EthernetHubsTemplateDetailsComponent implements OnInit {
controller:Controller ; controller:Controller ;
ethernetHubTemplate: EthernetHubTemplate; ethernetHubTemplate: EthernetHubTemplate;
numberOfPorts: number; numberOfPorts: number;
inputForm: FormGroup; inputForm: UntypedFormGroup;
isSymbolSelectionOpened: boolean = false; isSymbolSelectionOpened: boolean = false;
categories = []; categories = [];
@ -27,14 +27,14 @@ export class EthernetHubsTemplateDetailsComponent implements OnInit {
private controllerService: ControllerService, private controllerService: ControllerService,
private builtInTemplatesService: BuiltInTemplatesService, private builtInTemplatesService: BuiltInTemplatesService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private builtInTemplatesConfigurationService: BuiltInTemplatesConfigurationService, private builtInTemplatesConfigurationService: BuiltInTemplatesConfigurationService,
private router: Router private router: Router
) { ) {
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
defaultName: new FormControl('', Validators.required), defaultName: new UntypedFormControl('', Validators.required),
symbol: new FormControl('', Validators.required), symbol: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import { Compute } from '../../../../../models/compute'; import { Compute } from '../../../../../models/compute';
@ -19,7 +19,7 @@ import { ToasterService } from '../../../../../services/toaster.service';
export class EthernetSwitchesAddTemplateComponent implements OnInit { export class EthernetSwitchesAddTemplateComponent implements OnInit {
controller:Controller ; controller:Controller ;
templateName: string = ''; templateName: string = '';
formGroup: FormGroup; formGroup: UntypedFormGroup;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -29,12 +29,12 @@ export class EthernetSwitchesAddTemplateComponent implements OnInit {
private router: Router, private router: Router,
private toasterService: ToasterService, private toasterService: ToasterService,
private templateMocksService: TemplateMocksService, private templateMocksService: TemplateMocksService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private computeService: ComputeService private computeService: ComputeService
) { ) {
this.formGroup = this.formBuilder.group({ this.formGroup = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
numberOfPorts: new FormControl(8, Validators.required), numberOfPorts: new UntypedFormControl(8, Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import{ Controller } from '../../../../../models/controller'; import{ Controller } from '../../../../../models/controller';
import { EthernetSwitchTemplate } from '../../../../../models/templates/ethernet-switch-template'; import { EthernetSwitchTemplate } from '../../../../../models/templates/ethernet-switch-template';
@ -18,7 +18,7 @@ export class EthernetSwitchesTemplateDetailsComponent implements OnInit {
@ViewChild(PortsComponent) portsComponent: PortsComponent; @ViewChild(PortsComponent) portsComponent: PortsComponent;
controller:Controller ; controller:Controller ;
ethernetSwitchTemplate: EthernetSwitchTemplate; ethernetSwitchTemplate: EthernetSwitchTemplate;
inputForm: FormGroup; inputForm: UntypedFormGroup;
isSymbolSelectionOpened: boolean = false; isSymbolSelectionOpened: boolean = false;
categories = []; categories = [];
consoleTypes: string[] = []; consoleTypes: string[] = [];
@ -28,14 +28,14 @@ export class EthernetSwitchesTemplateDetailsComponent implements OnInit {
private controllerService: ControllerService, private controllerService: ControllerService,
private builtInTemplatesService: BuiltInTemplatesService, private builtInTemplatesService: BuiltInTemplatesService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private builtInTemplatesConfigurationService: BuiltInTemplatesConfigurationService, private builtInTemplatesConfigurationService: BuiltInTemplatesConfigurationService,
private router: Router private router: Router
) { ) {
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
defaultName: new FormControl('', Validators.required), defaultName: new UntypedFormControl('', Validators.required),
symbol: new FormControl('', Validators.required), symbol: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,6 +1,6 @@
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AbstractControlDirective, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { AbstractControlDirective, UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatAutocompleteModule } from '@angular/material/autocomplete'; import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatCommonModule } from '@angular/material/core'; import { MatCommonModule } from '@angular/material/core';
@ -77,7 +77,7 @@ xdescribe('AddDockerTemplateComponent', () => {
{ provide: ToasterService, useValue: mockedToasterService }, { provide: ToasterService, useValue: mockedToasterService },
{ provide: TemplateMocksService, useClass: TemplateMocksService }, { provide: TemplateMocksService, useClass: TemplateMocksService },
{ provide: DockerConfigurationService, useClass: DockerConfigurationService }, { provide: DockerConfigurationService, useClass: DockerConfigurationService },
{ provide: AbstractControlDirective, useExisting: FormControl, useMulti: true }, { provide: AbstractControlDirective, useExisting: UntypedFormControl, useMulti: true },
], ],
declarations: [AddDockerTemplateComponent], declarations: [AddDockerTemplateComponent],
}).compileComponents(); }).compileComponents();

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import { Compute } from '../../../../models/compute'; import { Compute } from '../../../../models/compute';
@ -27,9 +27,9 @@ export class AddDockerTemplateComponent implements OnInit {
selectedImage: DockerImage; selectedImage: DockerImage;
newImageSelected: boolean = false; newImageSelected: boolean = false;
virtualMachineForm: FormGroup; virtualMachineForm: UntypedFormGroup;
containerNameForm: FormGroup; containerNameForm: UntypedFormGroup;
networkAdaptersForm: FormGroup; networkAdaptersForm: UntypedFormGroup;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -38,7 +38,7 @@ export class AddDockerTemplateComponent implements OnInit {
private dockerService: DockerService, private dockerService: DockerService,
private toasterService: ToasterService, private toasterService: ToasterService,
private router: Router, private router: Router,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private templateMocksService: TemplateMocksService, private templateMocksService: TemplateMocksService,
private configurationService: DockerConfigurationService, private configurationService: DockerConfigurationService,
private computeService: ComputeService private computeService: ComputeService
@ -46,15 +46,15 @@ export class AddDockerTemplateComponent implements OnInit {
this.dockerTemplate = new DockerTemplate(); this.dockerTemplate = new DockerTemplate();
this.virtualMachineForm = this.formBuilder.group({ this.virtualMachineForm = this.formBuilder.group({
filename: new FormControl(null, Validators.required), filename: new UntypedFormControl(null, Validators.required),
}); });
this.containerNameForm = this.formBuilder.group({ this.containerNameForm = this.formBuilder.group({
templateName: new FormControl(null, Validators.required), templateName: new UntypedFormControl(null, Validators.required),
}); });
this.networkAdaptersForm = this.formBuilder.group({ this.networkAdaptersForm = this.formBuilder.group({
adapters: new FormControl('1', Validators.required), adapters: new UntypedFormControl('1', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
@ -17,7 +17,7 @@ export class CopyDockerTemplateComponent implements OnInit {
controller:Controller ; controller:Controller ;
templateName: string = ''; templateName: string = '';
dockerTemplate: DockerTemplate; dockerTemplate: DockerTemplate;
templateNameForm: FormGroup; templateNameForm: UntypedFormGroup;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
@ -25,10 +25,10 @@ export class CopyDockerTemplateComponent implements OnInit {
private dockerService: DockerService, private dockerService: DockerService,
private toasterService: ToasterService, private toasterService: ToasterService,
private router: Router, private router: Router,
private formBuilder: FormBuilder private formBuilder: UntypedFormBuilder
) { ) {
this.templateNameForm = this.formBuilder.group({ this.templateNameForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { CustomAdapter } from '../../../../models/qemu/qemu-custom-adapter'; import { CustomAdapter } from '../../../../models/qemu/qemu-custom-adapter';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
@ -26,7 +26,7 @@ export class DockerTemplateDetailsComponent implements OnInit {
adapters: CustomAdapter[] = []; adapters: CustomAdapter[] = [];
displayedColumns: string[] = ['adapter_number', 'port_name']; displayedColumns: string[] = ['adapter_number', 'port_name'];
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
@ -34,14 +34,14 @@ export class DockerTemplateDetailsComponent implements OnInit {
private dockerService: DockerService, private dockerService: DockerService,
private toasterService: ToasterService, private toasterService: ToasterService,
private configurationService: DockerConfigurationService, private configurationService: DockerConfigurationService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private router: Router private router: Router
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
defaultName: new FormControl('', Validators.required), defaultName: new UntypedFormControl('', Validators.required),
adapter: new FormControl('', Validators.required), adapter: new UntypedFormControl('', Validators.required),
symbol: new FormControl('', Validators.required), symbol: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,6 +1,6 @@
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { Component, OnDestroy, OnInit } from '@angular/core'; import { Component, OnDestroy, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar'; import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { UploadServiceService } from 'app/common/uploading-processbar/upload-service.service'; import { UploadServiceService } from 'app/common/uploading-processbar/upload-service.service';
@ -29,9 +29,9 @@ export class AddIosTemplateComponent implements OnInit, OnDestroy {
iosTemplate: IosTemplate; iosTemplate: IosTemplate;
isEtherSwitchRouter: boolean = false; isEtherSwitchRouter: boolean = false;
iosImageForm: FormGroup; iosImageForm: UntypedFormGroup;
iosNameForm: FormGroup; iosNameForm: UntypedFormGroup;
iosMemoryForm: FormGroup; iosMemoryForm: UntypedFormGroup;
selectedPlatform: string; selectedPlatform: string;
networkAdaptersForTemplate: string[] = []; networkAdaptersForTemplate: string[] = [];
@ -59,7 +59,7 @@ export class AddIosTemplateComponent implements OnInit, OnDestroy {
private controllerService: ControllerService, private controllerService: ControllerService,
private iosService: IosService, private iosService: IosService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private router: Router, private router: Router,
private templateMocksService: TemplateMocksService, private templateMocksService: TemplateMocksService,
private iosConfigurationService: IosConfigurationService, private iosConfigurationService: IosConfigurationService,
@ -70,22 +70,22 @@ export class AddIosTemplateComponent implements OnInit, OnDestroy {
this.iosTemplate = new IosTemplate(); this.iosTemplate = new IosTemplate();
this.iosImageForm = this.formBuilder.group({ this.iosImageForm = this.formBuilder.group({
imageName: new FormControl(null, [Validators.required]), imageName: new UntypedFormControl(null, [Validators.required]),
}); });
this.iosNameForm = this.formBuilder.group({ this.iosNameForm = this.formBuilder.group({
templateName: new FormControl(null, [Validators.required]), templateName: new UntypedFormControl(null, [Validators.required]),
platform: new FormControl(null, [Validators.required]), platform: new UntypedFormControl(null, [Validators.required]),
chassis: new FormControl(null, [Validators.required]), chassis: new UntypedFormControl(null, [Validators.required]),
}); });
this.iosMemoryForm = this.formBuilder.group({ this.iosMemoryForm = this.formBuilder.group({
memory: new FormControl(null, [Validators.required]), memory: new UntypedFormControl(null, [Validators.required]),
}); });
} }
ngOnInit() { ngOnInit() {
this.uploader = new FileUploader({}); this.uploader = new FileUploader({url: ''});
this.uploader.onAfterAddingFile = (file) => { this.uploader.onAfterAddingFile = (file) => {
file.withCredentials = false; file.withCredentials = false;
}; };

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
@ -17,7 +17,7 @@ export class CopyIosTemplateComponent implements OnInit {
controller:Controller ; controller:Controller ;
templateName: string = ''; templateName: string = '';
iosTemplate: IosTemplate; iosTemplate: IosTemplate;
formGroup: FormGroup; formGroup: UntypedFormGroup;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
@ -25,10 +25,10 @@ export class CopyIosTemplateComponent implements OnInit {
private iosService: IosService, private iosService: IosService,
private toasterService: ToasterService, private toasterService: ToasterService,
private router: Router, private router: Router,
private formBuilder: FormBuilder private formBuilder: UntypedFormBuilder
) { ) {
this.formGroup = this.formBuilder.group({ this.formGroup = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
import { IosTemplate } from '../../../../models/templates/ios-template'; import { IosTemplate } from '../../../../models/templates/ios-template';
@ -31,40 +31,40 @@ export class IosTemplateDetailsComponent implements OnInit {
networkAdaptersForPlatform = {}; networkAdaptersForPlatform = {};
networkModules = {}; networkModules = {};
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
memoryForm: FormGroup; memoryForm: UntypedFormGroup;
advancedForm: FormGroup; advancedForm: UntypedFormGroup;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
private controllerService: ControllerService, private controllerService: ControllerService,
private iosService: IosService, private iosService: IosService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private iosConfigurationService: IosConfigurationService, private iosConfigurationService: IosConfigurationService,
private router: Router private router: Router
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
defaultName: new FormControl('', Validators.required), defaultName: new UntypedFormControl('', Validators.required),
symbol: new FormControl('', Validators.required), symbol: new UntypedFormControl('', Validators.required),
path: new FormControl('', Validators.required), path: new UntypedFormControl('', Validators.required),
initialConfig: new FormControl('', Validators.required), initialConfig: new UntypedFormControl('', Validators.required),
}); });
this.memoryForm = this.formBuilder.group({ this.memoryForm = this.formBuilder.group({
ram: new FormControl('', Validators.required), ram: new UntypedFormControl('', Validators.required),
nvram: new FormControl('', Validators.required), nvram: new UntypedFormControl('', Validators.required),
iomemory: new FormControl('', Validators.required), iomemory: new UntypedFormControl('', Validators.required),
disk0: new FormControl('', Validators.required), disk0: new UntypedFormControl('', Validators.required),
disk1: new FormControl('', Validators.required), disk1: new UntypedFormControl('', Validators.required),
}); });
this.advancedForm = this.formBuilder.group({ this.advancedForm = this.formBuilder.group({
systemId: new FormControl('', Validators.required), systemId: new UntypedFormControl('', Validators.required),
idlemax: new FormControl('', Validators.required), idlemax: new UntypedFormControl('', Validators.required),
idlesleep: new FormControl('', Validators.required), idlesleep: new UntypedFormControl('', Validators.required),
execarea: new FormControl('', Validators.required), execarea: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnDestroy, OnInit } from '@angular/core'; import { Component, OnDestroy, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar'; import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { UploadServiceService } from 'app/common/uploading-processbar/upload-service.service'; import { UploadServiceService } from 'app/common/uploading-processbar/upload-service.service';
@ -32,8 +32,8 @@ export class AddIouTemplateComponent implements OnInit, OnDestroy {
iouImages: IouImage[] = []; iouImages: IouImage[] = [];
uploader: FileUploader; uploader: FileUploader;
templateNameForm: FormGroup; templateNameForm: UntypedFormGroup;
imageForm: FormGroup; imageForm: UntypedFormGroup;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
uploadProgress: number = 0 uploadProgress: number = 0
subscription: Subscription; subscription: Subscription;
@ -44,7 +44,7 @@ export class AddIouTemplateComponent implements OnInit, OnDestroy {
private iouService: IouService, private iouService: IouService,
private toasterService: ToasterService, private toasterService: ToasterService,
private router: Router, private router: Router,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private templateMocksService: TemplateMocksService, private templateMocksService: TemplateMocksService,
private computeService: ComputeService, private computeService: ComputeService,
private uploadServiceService: UploadServiceService, private uploadServiceService: UploadServiceService,
@ -53,16 +53,16 @@ export class AddIouTemplateComponent implements OnInit, OnDestroy {
this.iouTemplate = new IouTemplate(); this.iouTemplate = new IouTemplate();
this.templateNameForm = this.formBuilder.group({ this.templateNameForm = this.formBuilder.group({
templateName: new FormControl(null, Validators.required), templateName: new UntypedFormControl(null, Validators.required),
}); });
this.imageForm = this.formBuilder.group({ this.imageForm = this.formBuilder.group({
imageName: new FormControl('', Validators.required), imageName: new UntypedFormControl('', Validators.required),
}); });
} }
ngOnInit() { ngOnInit() {
this.uploader = new FileUploader({}); this.uploader = new FileUploader({url: ''});
this.uploader.onAfterAddingFile = (file) => { this.uploader.onAfterAddingFile = (file) => {
file.withCredentials = false; file.withCredentials = false;
}; };

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
@ -17,7 +17,7 @@ export class CopyIouTemplateComponent implements OnInit {
controller:Controller ; controller:Controller ;
templateName: string = ''; templateName: string = '';
iouTemplate: IouTemplate; iouTemplate: IouTemplate;
templateNameForm: FormGroup; templateNameForm: UntypedFormGroup;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
@ -25,10 +25,10 @@ export class CopyIouTemplateComponent implements OnInit {
private qemuService: IouService, private qemuService: IouService,
private toasterService: ToasterService, private toasterService: ToasterService,
private router: Router, private router: Router,
private formBuilder: FormBuilder private formBuilder: UntypedFormBuilder
) { ) {
this.templateNameForm = this.formBuilder.group({ this.templateNameForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
import { IouTemplate } from '../../../../models/templates/iou-template'; import { IouTemplate } from '../../../../models/templates/iou-template';
@ -24,8 +24,8 @@ export class IouTemplateDetailsComponent implements OnInit {
consoleResolutions: string[] = []; consoleResolutions: string[] = [];
categories = []; categories = [];
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
networkForm: FormGroup; networkForm: UntypedFormGroup;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
@ -34,19 +34,19 @@ export class IouTemplateDetailsComponent implements OnInit {
private toasterService: ToasterService, private toasterService: ToasterService,
private configurationService: IouConfigurationService, private configurationService: IouConfigurationService,
private router: Router, private router: Router,
private formBuilder: FormBuilder private formBuilder: UntypedFormBuilder
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
defaultName: new FormControl('', Validators.required), defaultName: new UntypedFormControl('', Validators.required),
symbol: new FormControl('', Validators.required), symbol: new UntypedFormControl('', Validators.required),
path: new FormControl('', Validators.required), path: new UntypedFormControl('', Validators.required),
initialConfig: new FormControl('', Validators.required), initialConfig: new UntypedFormControl('', Validators.required),
}); });
this.networkForm = this.formBuilder.group({ this.networkForm = this.formBuilder.group({
ethernetAdapters: new FormControl('', Validators.required), ethernetAdapters: new UntypedFormControl('', Validators.required),
serialAdapters: new FormControl('', Validators.required), serialAdapters: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar'; import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { UploadServiceService } from '../../../../common/uploading-processbar/upload-service.service'; import { UploadServiceService } from '../../../../common/uploading-processbar/upload-service.service';
@ -38,9 +38,9 @@ export class AddQemuVmTemplateComponent implements OnInit {
uploadedFile: boolean = false; uploadedFile: boolean = false;
uploadProgress: number = 0; uploadProgress: number = 0;
nameForm: FormGroup; nameForm: UntypedFormGroup;
memoryForm: FormGroup; memoryForm: UntypedFormGroup;
diskForm: FormGroup; diskForm: UntypedFormGroup;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -49,7 +49,7 @@ export class AddQemuVmTemplateComponent implements OnInit {
private qemuService: QemuService, private qemuService: QemuService,
private toasterService: ToasterService, private toasterService: ToasterService,
private router: Router, private router: Router,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private templateMocksService: TemplateMocksService, private templateMocksService: TemplateMocksService,
private configurationService: QemuConfigurationService, private configurationService: QemuConfigurationService,
private computeService: ComputeService, private computeService: ComputeService,
@ -59,20 +59,20 @@ export class AddQemuVmTemplateComponent implements OnInit {
this.qemuTemplate = new QemuTemplate(); this.qemuTemplate = new QemuTemplate();
this.nameForm = this.formBuilder.group({ this.nameForm = this.formBuilder.group({
templateName: new FormControl(null, Validators.required), templateName: new UntypedFormControl(null, Validators.required),
}); });
this.memoryForm = this.formBuilder.group({ this.memoryForm = this.formBuilder.group({
ramMemory: new FormControl('256', Validators.required), ramMemory: new UntypedFormControl('256', Validators.required),
}); });
this.diskForm = this.formBuilder.group({ this.diskForm = this.formBuilder.group({
fileName: new FormControl('', Validators.required), fileName: new UntypedFormControl('', Validators.required),
}); });
} }
ngOnInit() { ngOnInit() {
this.uploader = new FileUploader({}); this.uploader = new FileUploader({url: ''});
this.uploader.onAfterAddingFile = (file) => { this.uploader.onAfterAddingFile = (file) => {
file.withCredentials = false; file.withCredentials = false;

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import { QemuBinary } from '../../../../models/qemu/qemu-binary'; import { QemuBinary } from '../../../../models/qemu/qemu-binary';
@ -18,7 +18,7 @@ export class CopyQemuVmTemplateComponent implements OnInit {
controller:Controller ; controller:Controller ;
templateName: string = ''; templateName: string = '';
qemuTemplate: QemuTemplate; qemuTemplate: QemuTemplate;
nameForm: FormGroup; nameForm: UntypedFormGroup;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
@ -26,10 +26,10 @@ export class CopyQemuVmTemplateComponent implements OnInit {
private qemuService: QemuService, private qemuService: QemuService,
private toasterService: ToasterService, private toasterService: ToasterService,
private router: Router, private router: Router,
private formBuilder: FormBuilder private formBuilder: UntypedFormBuilder
) { ) {
this.nameForm = this.formBuilder.group({ this.nameForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,7 +1,7 @@
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { NO_ERRORS_SCHEMA } from '@angular/core'; import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AbstractControlDirective, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { AbstractControlDirective, UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatIconModule } from '@angular/material/icon'; import { MatIconModule } from '@angular/material/icon';
import { MatMenuModule } from '@angular/material/menu'; import { MatMenuModule } from '@angular/material/menu';
@ -66,7 +66,7 @@ describe('QemuVmTemplateDetailsComponent', () => {
{ provide: QemuService, useValue: mockedQemuService }, { provide: QemuService, useValue: mockedQemuService },
{ provide: ToasterService, useValue: mockedToasterService }, { provide: ToasterService, useValue: mockedToasterService },
{ provide: QemuConfigurationService, useClass: QemuConfigurationService }, { provide: QemuConfigurationService, useClass: QemuConfigurationService },
{ provide: AbstractControlDirective, useExisting: FormControl, useMulti: true }, { provide: AbstractControlDirective, useExisting: UntypedFormControl, useMulti: true },
], ],
declarations: [QemuVmTemplateDetailsComponent], declarations: [QemuVmTemplateDetailsComponent],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { QemuBinary } from '../../../../models/qemu/qemu-binary'; import { QemuBinary } from '../../../../models/qemu/qemu-binary';
import { CustomAdapter } from '../../../../models/qemu/qemu-custom-adapter'; import { CustomAdapter } from '../../../../models/qemu/qemu-custom-adapter';
@ -30,7 +30,7 @@ export class QemuVmTemplateDetailsComponent implements OnInit {
activateCpuThrottling: boolean = true; activateCpuThrottling: boolean = true;
isConfiguratorOpened: boolean = false; isConfiguratorOpened: boolean = false;
displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions']; displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions'];
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
selectPlatform: string[] = []; selectPlatform: string[] = [];
selectedPlatform: string; selectedPlatform: string;
@ -44,13 +44,13 @@ export class QemuVmTemplateDetailsComponent implements OnInit {
private qemuService: QemuService, private qemuService: QemuService,
private toasterService: ToasterService, private toasterService: ToasterService,
private configurationService: QemuConfigurationService, private configurationService: QemuConfigurationService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private router: Router private router: Router
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
defaultName: new FormControl('', Validators.required), defaultName: new UntypedFormControl('', Validators.required),
symbol: new FormControl('', Validators.required), symbol: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
@ -20,7 +20,7 @@ export class AddVirtualBoxTemplateComponent implements OnInit {
virtualMachines: VirtualBoxVm[]; virtualMachines: VirtualBoxVm[];
selectedVM: VirtualBoxVm; selectedVM: VirtualBoxVm;
virtualBoxTemplate: VirtualBoxTemplate; virtualBoxTemplate: VirtualBoxTemplate;
vmForm: FormGroup; vmForm: UntypedFormGroup;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
@ -29,10 +29,10 @@ export class AddVirtualBoxTemplateComponent implements OnInit {
private toasterService: ToasterService, private toasterService: ToasterService,
private templateMocksService: TemplateMocksService, private templateMocksService: TemplateMocksService,
private router: Router, private router: Router,
private formBuilder: FormBuilder private formBuilder: UntypedFormBuilder
) { ) {
this.vmForm = this.formBuilder.group({ this.vmForm = this.formBuilder.group({
vm: new FormControl('', Validators.required), vm: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { CustomAdapter } from '../../../../models/qemu/qemu-custom-adapter'; import { CustomAdapter } from '../../../../models/qemu/qemu-custom-adapter';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
@ -25,8 +25,8 @@ export class VirtualBoxTemplateDetailsComponent implements OnInit {
networkTypes = []; networkTypes = [];
displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions']; displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions'];
isConfiguratorOpened: boolean = false; isConfiguratorOpened: boolean = false;
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
networkForm: FormGroup; networkForm: UntypedFormGroup;
@ViewChild('customAdaptersConfigurator') @ViewChild('customAdaptersConfigurator')
customAdaptersConfigurator: CustomAdaptersComponent; customAdaptersConfigurator: CustomAdaptersComponent;
@ -36,21 +36,21 @@ export class VirtualBoxTemplateDetailsComponent implements OnInit {
private controllerService: ControllerService, private controllerService: ControllerService,
private virtualBoxService: VirtualBoxService, private virtualBoxService: VirtualBoxService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private virtualBoxConfigurationService: VirtualBoxConfigurationService, private virtualBoxConfigurationService: VirtualBoxConfigurationService,
private router: Router private router: Router
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
defaultName: new FormControl('', Validators.required), defaultName: new UntypedFormControl('', Validators.required),
symbol: new FormControl('', Validators.required), symbol: new UntypedFormControl('', Validators.required),
ram: new FormControl('', Validators.required), ram: new UntypedFormControl('', Validators.required),
}); });
this.networkForm = this.formBuilder.group({ this.networkForm = this.formBuilder.group({
adapters: new FormControl('', Validators.required), adapters: new UntypedFormControl('', Validators.required),
nameFormat: new FormControl('', Validators.required), nameFormat: new UntypedFormControl('', Validators.required),
size: new FormControl('', Validators.required), size: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
@ -20,7 +20,7 @@ export class AddVmwareTemplateComponent implements OnInit {
virtualMachines: VmwareVm[]; virtualMachines: VmwareVm[];
selectedVM: VmwareVm; selectedVM: VmwareVm;
vmwareTemplate: VmwareTemplate; vmwareTemplate: VmwareTemplate;
templateNameForm: FormGroup; templateNameForm: UntypedFormGroup;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
@ -29,10 +29,10 @@ export class AddVmwareTemplateComponent implements OnInit {
private toasterService: ToasterService, private toasterService: ToasterService,
private templateMocksService: TemplateMocksService, private templateMocksService: TemplateMocksService,
private router: Router, private router: Router,
private formBuilder: FormBuilder private formBuilder: UntypedFormBuilder
) { ) {
this.templateNameForm = this.formBuilder.group({ this.templateNameForm = this.formBuilder.group({
templateName: new FormControl(null, [Validators.required]), templateName: new UntypedFormControl(null, [Validators.required]),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { CustomAdapter } from '../../../../models/qemu/qemu-custom-adapter'; import { CustomAdapter } from '../../../../models/qemu/qemu-custom-adapter';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
@ -18,7 +18,7 @@ import { CustomAdaptersComponent } from '../../common/custom-adapters/custom-ada
export class VmwareTemplateDetailsComponent implements OnInit { export class VmwareTemplateDetailsComponent implements OnInit {
controller:Controller ; controller:Controller ;
vmwareTemplate: VmwareTemplate; vmwareTemplate: VmwareTemplate;
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions']; displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions'];
isConfiguratorOpened: boolean = false; isConfiguratorOpened: boolean = false;
isSymbolSelectionOpened: boolean = false; isSymbolSelectionOpened: boolean = false;
@ -35,14 +35,14 @@ export class VmwareTemplateDetailsComponent implements OnInit {
private controllerService: ControllerService, private controllerService: ControllerService,
private vmwareService: VmwareService, private vmwareService: VmwareService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private vmwareConfigurationService: VmwareConfigurationService, private vmwareConfigurationService: VmwareConfigurationService,
private router: Router private router: Router
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
defaultName: new FormControl('', Validators.required), defaultName: new UntypedFormControl('', Validators.required),
symbol: new FormControl('', Validators.required), symbol: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import { Compute } from '../../../../models/compute'; import { Compute } from '../../../../models/compute';
@ -19,7 +19,7 @@ import { VpcsService } from '../../../../services/vpcs.service';
export class AddVpcsTemplateComponent implements OnInit { export class AddVpcsTemplateComponent implements OnInit {
controller:Controller ; controller:Controller ;
templateName: string = ''; templateName: string = '';
templateNameForm: FormGroup; templateNameForm: UntypedFormGroup;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -29,11 +29,11 @@ export class AddVpcsTemplateComponent implements OnInit {
private router: Router, private router: Router,
private toasterService: ToasterService, private toasterService: ToasterService,
private templateMocksService: TemplateMocksService, private templateMocksService: TemplateMocksService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private computeService: ComputeService private computeService: ComputeService
) { ) {
this.templateNameForm = this.formBuilder.group({ this.templateNameForm = this.formBuilder.group({
templateName: new FormControl(null, [Validators.required]), templateName: new UntypedFormControl(null, [Validators.required]),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
import { VpcsTemplate } from '../../../../models/templates/vpcs-template'; import { VpcsTemplate } from '../../../../models/templates/vpcs-template';
@ -16,7 +16,7 @@ import { VpcsService } from '../../../../services/vpcs.service';
export class VpcsTemplateDetailsComponent implements OnInit { export class VpcsTemplateDetailsComponent implements OnInit {
controller:Controller ; controller:Controller ;
vpcsTemplate: VpcsTemplate; vpcsTemplate: VpcsTemplate;
inputForm: FormGroup; inputForm: UntypedFormGroup;
isSymbolSelectionOpened: boolean = false; isSymbolSelectionOpened: boolean = false;
consoleTypes: string[] = []; consoleTypes: string[] = [];
categories = []; categories = [];
@ -26,15 +26,15 @@ export class VpcsTemplateDetailsComponent implements OnInit {
private controllerService: ControllerService, private controllerService: ControllerService,
private vpcsService: VpcsService, private vpcsService: VpcsService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private vpcsConfigurationService: VpcsConfigurationService, private vpcsConfigurationService: VpcsConfigurationService,
private router: Router private router: Router
) { ) {
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required), templateName: new UntypedFormControl('', Validators.required),
defaultName: new FormControl('', Validators.required), defaultName: new UntypedFormControl('', Validators.required),
scriptFile: new FormControl('', Validators.required), scriptFile: new UntypedFormControl('', Validators.required),
symbol: new FormControl('', Validators.required), symbol: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../cartography/models/node'; import { Node } from '../../../cartography/models/node';
import{ Controller } from '../../../models/controller'; import{ Controller } from '../../../models/controller';
@ -14,17 +14,17 @@ import { ToasterService } from '../../../services/toaster.service';
export class ChangeHostnameDialogComponent implements OnInit { export class ChangeHostnameDialogComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
inputForm: FormGroup; inputForm: UntypedFormGroup;
name: string; name: string;
constructor( constructor(
public dialogRef: MatDialogRef<ChangeHostnameDialogComponent>, public dialogRef: MatDialogRef<ChangeHostnameDialogComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder private formBuilder: UntypedFormBuilder
) { ) {
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormControl } from '@angular/forms'; import { UntypedFormControl } from '@angular/forms';
import { ResizeEvent } from 'angular-resizable-element'; import { ResizeEvent } from 'angular-resizable-element';
import { Node } from '../../../cartography/models/node'; import { Node } from '../../../cartography/models/node';
import { Project } from '../../../models/project'; import { Project } from '../../../models/project';
@ -37,7 +37,7 @@ export class ConsoleWrapperComponent implements OnInit {
) {} ) {}
nodes: Node[] = []; nodes: Node[] = [];
selected = new FormControl(0); selected = new UntypedFormControl(0);
ngOnInit() { ngOnInit() {
this.themeService.getActualTheme() === 'light' this.themeService.getActualTheme() === 'light'

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Link } from '../../../../models/link'; import { Link } from '../../../../models/link';
import { Project } from '../../../../models/project'; import { Project } from '../../../../models/project';
@ -20,12 +20,12 @@ export class LinkStyleEditorDialogComponent implements OnInit {
controller:Controller ; controller:Controller ;
project: Project; project: Project;
link: Link; link: Link;
formGroup: FormGroup; formGroup: UntypedFormGroup;
borderTypes = ["Solid", "Dash", "Dot", "Dash Dot", "Dash Dot Dot"]; borderTypes = ["Solid", "Dash", "Dot", "Dash Dot", "Dash Dot Dot"];
constructor( constructor(
public dialogRef: MatDialogRef<LinkStyleEditorDialogComponent>, public dialogRef: MatDialogRef<LinkStyleEditorDialogComponent>,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private toasterService: ToasterService, private toasterService: ToasterService,
private linkService: LinkService, private linkService: LinkService,
private linksDataSource: LinksDataSource, private linksDataSource: LinksDataSource,
@ -34,9 +34,9 @@ export class LinkStyleEditorDialogComponent implements OnInit {
private nonNegativeValidator: NonNegativeValidator private nonNegativeValidator: NonNegativeValidator
) { ) {
this.formGroup = this.formBuilder.group({ this.formGroup = this.formBuilder.group({
color: new FormControl('', [Validators.required]), color: new UntypedFormControl('', [Validators.required]),
width: new FormControl('', [Validators.required, nonNegativeValidator.get]), width: new UntypedFormControl('', [Validators.required, nonNegativeValidator.get]),
type: new FormControl('', [Validators.required]) type: new UntypedFormControl('', [Validators.required])
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { DrawingToMapDrawingConverter } from '../../../../cartography/converters/map/drawing-to-map-drawing-converter'; import { DrawingToMapDrawingConverter } from '../../../../cartography/converters/map/drawing-to-map-drawing-converter';
import { MapDrawingToSvgConverter } from '../../../../cartography/converters/map/map-drawing-to-svg-converter'; import { MapDrawingToSvgConverter } from '../../../../cartography/converters/map/map-drawing-to-svg-converter';
@ -26,7 +26,7 @@ export class StyleEditorDialogComponent implements OnInit {
project: Project; project: Project;
drawing: Drawing; drawing: Drawing;
element: ElementData; element: ElementData;
formGroup: FormGroup; formGroup: UntypedFormGroup;
borderTypes = [ borderTypes = [
{ qt: 'none', value: 'none', name: 'Solid' }, { qt: 'none', value: 'none', name: 'Solid' },
{ qt: '10, 2', value: '25, 25', name: 'Dash' }, { qt: '10, 2', value: '25, 25', name: 'Dash' },
@ -42,15 +42,15 @@ export class StyleEditorDialogComponent implements OnInit {
private mapDrawingToSvgConverter: MapDrawingToSvgConverter, private mapDrawingToSvgConverter: MapDrawingToSvgConverter,
private drawingService: DrawingService, private drawingService: DrawingService,
private drawingsDataSource: DrawingsDataSource, private drawingsDataSource: DrawingsDataSource,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private toasterService: ToasterService, private toasterService: ToasterService,
private nonNegativeValidator: NonNegativeValidator, private nonNegativeValidator: NonNegativeValidator,
private rotationValidator: RotationValidator, private rotationValidator: RotationValidator,
private qtDasharrayFixer: QtDasharrayFixer private qtDasharrayFixer: QtDasharrayFixer
) { ) {
this.formGroup = this.formBuilder.group({ this.formGroup = this.formBuilder.group({
borderWidth: new FormControl('', [Validators.required, nonNegativeValidator.get]), borderWidth: new UntypedFormControl('', [Validators.required, nonNegativeValidator.get]),
rotation: new FormControl('', [Validators.required, rotationValidator.get]), rotation: new UntypedFormControl('', [Validators.required, rotationValidator.get]),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, ElementRef, OnInit, Renderer2, ViewChild } from '@angular/core'; import { Component, ElementRef, OnInit, Renderer2, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { DrawingToMapDrawingConverter } from '../../../../cartography/converters/map/drawing-to-map-drawing-converter'; import { DrawingToMapDrawingConverter } from '../../../../cartography/converters/map/drawing-to-map-drawing-converter';
import { MapDrawingToSvgConverter } from '../../../../cartography/converters/map/map-drawing-to-svg-converter'; import { MapDrawingToSvgConverter } from '../../../../cartography/converters/map/map-drawing-to-svg-converter';
@ -40,7 +40,7 @@ export class TextEditorDialogComponent implements OnInit {
element: TextElement; element: TextElement;
rotation: string; rotation: string;
isTextEditable: boolean; isTextEditable: boolean;
formGroup: FormGroup; formGroup: UntypedFormGroup;
constructor( constructor(
private dialogRef: MatDialogRef<TextEditorDialogComponent>, private dialogRef: MatDialogRef<TextEditorDialogComponent>,
@ -53,7 +53,7 @@ export class TextEditorDialogComponent implements OnInit {
private nodesDataSource: NodesDataSource, private nodesDataSource: NodesDataSource,
private linkService: LinkService, private linkService: LinkService,
private linksDataSource: LinksDataSource, private linksDataSource: LinksDataSource,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private toasterService: ToasterService, private toasterService: ToasterService,
private rotationValidator: RotationValidator, private rotationValidator: RotationValidator,
private fontFixer: FontFixer private fontFixer: FontFixer
@ -61,7 +61,7 @@ export class TextEditorDialogComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.formGroup = this.formBuilder.group({ this.formGroup = this.formBuilder.group({
rotation: new FormControl('', [Validators.required, this.rotationValidator.get]), rotation: new UntypedFormControl('', [Validators.required, this.rotationValidator.get]),
}); });
if (this.label && this.node) { if (this.label && this.node) {

View File

@ -33,7 +33,7 @@ export class ImportApplianceComponent implements OnInit {
) {} ) {}
ngOnInit() { ngOnInit() {
this.uploader = new FileUploader({}); this.uploader = new FileUploader({url: ''});
this.uploader.onAfterAddingFile = (file) => { this.uploader.onAfterAddingFile = (file) => {
file.withCredentials = false; file.withCredentials = false;
}; };

View File

@ -9,7 +9,7 @@ import {
OnInit, OnInit,
ViewChild, ViewChild,
} from '@angular/core'; } from '@angular/core';
import { FormControl } from '@angular/forms'; import { UntypedFormControl } from '@angular/forms';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { NodesDataSource } from '../../../cartography/datasources/nodes-datasource'; import { NodesDataSource } from '../../../cartography/datasources/nodes-datasource';
import { Drawing } from '../../../cartography/models/drawing'; import { Drawing } from '../../../cartography/models/drawing';
@ -63,7 +63,7 @@ export class LogConsoleComponent implements OnInit, AfterViewInit, OnDestroy {
public style: object = {}; public style: object = {};
public isDraggingEnabled: boolean = false; public isDraggingEnabled: boolean = false;
public isLightThemeEnabled: boolean = false; public isLightThemeEnabled: boolean = false;
public selected = new FormControl(0); public selected = new UntypedFormControl(0);
constructor( constructor(
private projectWebServiceHandler: ProjectWebServiceHandler, private projectWebServiceHandler: ProjectWebServiceHandler,

View File

@ -149,7 +149,7 @@ export class NewTemplateDialogComponent implements OnInit {
this.dataSource.paginator = this.paginator; this.dataSource.paginator = this.paginator;
}); });
this.uploader = new FileUploader({}); this.uploader = new FileUploader({url: ''});
this.uploader.onAfterAddingFile = (file) => { this.uploader.onAfterAddingFile = (file) => {
file.withCredentials = false; file.withCredentials = false;
}; };
@ -168,7 +168,7 @@ export class NewTemplateDialogComponent implements OnInit {
this.getAppliance(item.url); this.getAppliance(item.url);
}; };
this.uploaderImage = new FileUploader({}); this.uploaderImage = new FileUploader({url: ''});
this.uploaderImage.onAfterAddingFile = (file) => { this.uploaderImage.onAfterAddingFile = (file) => {
file.withCredentials = false; file.withCredentials = false;
}; };

View File

@ -1,5 +1,5 @@
import { Component, Inject, OnInit } from '@angular/core'; import { Component, Inject, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import{ Controller } from '../../../../models/controller'; import{ Controller } from '../../../../models/controller';
@ -17,14 +17,14 @@ import { ProjectNameValidator } from '../../../projects/models/projectNameValida
}) })
export class TemplateNameDialogComponent implements OnInit { export class TemplateNameDialogComponent implements OnInit {
controller:Controller ; controller:Controller ;
templateNameForm: FormGroup; templateNameForm: UntypedFormGroup;
constructor( constructor(
public dialogRef: MatDialogRef<TemplateNameDialogComponent>, public dialogRef: MatDialogRef<TemplateNameDialogComponent>,
private router: Router, private router: Router,
private dialog: MatDialog, private dialog: MatDialog,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private templateNameValidator: ProjectNameValidator, private templateNameValidator: ProjectNameValidator,
private templateService: TemplateService, private templateService: TemplateService,
@Inject(MAT_DIALOG_DATA) public data: any @Inject(MAT_DIALOG_DATA) public data: any
@ -33,7 +33,7 @@ export class TemplateNameDialogComponent implements OnInit {
ngOnInit() { ngOnInit() {
let name = this.data['name']; let name = this.data['name'];
this.templateNameForm = this.formBuilder.group({ this.templateNameForm = this.formBuilder.group({
templateName: new FormControl( templateName: new UntypedFormControl(
name, name,
[Validators.required, this.templateNameValidator.get], [Validators.required, this.templateNameValidator.get],
[templateNameAsyncValidator(this.controller, this.templateService)] [templateNameAsyncValidator(this.controller, this.templateService)]

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import{ Controller } from '../../../../../models/controller'; import{ Controller } from '../../../../../models/controller';
@ -15,9 +15,9 @@ export class ConfiguratorDialogAtmSwitchComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
nameForm: FormGroup; nameForm: UntypedFormGroup;
inputForm: FormGroup; inputForm: UntypedFormGroup;
abstractForm: FormGroup; abstractForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
nodeMappings = new Map<string, string>(); nodeMappings = new Map<string, string>();
@ -38,22 +38,22 @@ export class ConfiguratorDialogAtmSwitchComponent implements OnInit {
public dialogRef: MatDialogRef<ConfiguratorDialogAtmSwitchComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogAtmSwitchComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder private formBuilder: UntypedFormBuilder
) { ) {
this.nameForm = this.formBuilder.group({ this.nameForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
}); });
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
sourcePort: new FormControl('', Validators.required), sourcePort: new UntypedFormControl('', Validators.required),
sourceVci: new FormControl('', Validators.required), sourceVci: new UntypedFormControl('', Validators.required),
destinationPort: new FormControl('', Validators.required), destinationPort: new UntypedFormControl('', Validators.required),
destinationVci: new FormControl('', Validators.required), destinationVci: new UntypedFormControl('', Validators.required),
}); });
this.abstractForm = this.formBuilder.group({ this.abstractForm = this.formBuilder.group({
sourceVpi: new FormControl('', Validators.required), sourceVpi: new UntypedFormControl('', Validators.required),
destinationVpi: new FormControl('', Validators.required), destinationVpi: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import { UdpTunnelsComponent } from '../../../../../components/preferences/common/udp-tunnels/udp-tunnels.component'; import { UdpTunnelsComponent } from '../../../../../components/preferences/common/udp-tunnels/udp-tunnels.component';
@ -19,7 +19,7 @@ export class ConfiguratorDialogCloudComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
onCloseOptions = []; onCloseOptions = [];
bootPriorities = []; bootPriorities = [];
@ -41,11 +41,11 @@ export class ConfiguratorDialogCloudComponent implements OnInit {
public dialogRef: MatDialogRef<ConfiguratorDialogCloudComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogCloudComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private builtInTemplatesConfigurationService: BuiltInTemplatesConfigurationService private builtInTemplatesConfigurationService: BuiltInTemplatesConfigurationService
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialog, MatDialogRef } from '@angular/material/dialog'; import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import{ Controller } from '../../../../../models/controller'; import{ Controller } from '../../../../../models/controller';
@ -19,7 +19,7 @@ export class ConfiguratorDialogDockerComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
consoleResolutions: string[] = ['2560x1440', '1920x1080', '1680x1050', '1440x900', '1366x768', '1280x1024', '1280x800', '1024x768', '800x600', '640x480']; consoleResolutions: string[] = ['2560x1440', '1920x1080', '1680x1050', '1440x900', '1366x768', '1280x1024', '1280x800', '1024x768', '800x600', '640x480'];
private conf = { private conf = {
@ -33,19 +33,19 @@ export class ConfiguratorDialogDockerComponent implements OnInit {
public dialogReference: MatDialogRef<ConfiguratorDialogDockerComponent>, public dialogReference: MatDialogRef<ConfiguratorDialogDockerComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private dockerConfigurationService: DockerConfigurationService, private dockerConfigurationService: DockerConfigurationService,
private nonNegativeValidator: NonNegativeValidator, private nonNegativeValidator: NonNegativeValidator,
private dialog: MatDialog private dialog: MatDialog
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
adapter: new FormControl('', Validators.required), adapter: new UntypedFormControl('', Validators.required),
memory: new FormControl('', nonNegativeValidator.get), memory: new UntypedFormControl('', nonNegativeValidator.get),
cpus: new FormControl('', nonNegativeValidator.get), cpus: new UntypedFormControl('', nonNegativeValidator.get),
startCommand: new FormControl(''), startCommand: new UntypedFormControl(''),
consoleHttpPort: new FormControl('', Validators.required), consoleHttpPort: new UntypedFormControl('', Validators.required),
consoleHttpPath: new FormControl('', Validators.required) consoleHttpPath: new UntypedFormControl('', Validators.required)
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms'; import { UntypedFormBuilder } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../../cartography/models/node'; import { Node } from '../../../../../../cartography/models/node';
import{ Controller } from '../../../../../../models/controller'; import{ Controller } from '../../../../../../models/controller';
@ -22,7 +22,7 @@ export class ConfigureCustomAdaptersDialogComponent implements OnInit {
public dialogRef: MatDialogRef<ConfigureCustomAdaptersDialogComponent>, public dialogRef: MatDialogRef<ConfigureCustomAdaptersDialogComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private dockerConfigurationService: DockerConfigurationService private dockerConfigurationService: DockerConfigurationService
) {} ) {}

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import { PortsComponent } from '../../../../../components/preferences/common/ports/ports.component'; import { PortsComponent } from '../../../../../components/preferences/common/ports/ports.component';
@ -18,18 +18,18 @@ export class ConfiguratorDialogEthernetSwitchComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
inputForm: FormGroup; inputForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
constructor( constructor(
public dialogRef: MatDialogRef<ConfiguratorDialogEthernetSwitchComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogEthernetSwitchComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private ethernetSwitchesConfigurationService: BuiltInTemplatesConfigurationService private ethernetSwitchesConfigurationService: BuiltInTemplatesConfigurationService
) { ) {
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import{ Controller } from '../../../../../models/controller'; import{ Controller } from '../../../../../models/controller';
@ -16,7 +16,7 @@ export class ConfiguratorDialogEthernetHubComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
numberOfPorts: number; numberOfPorts: number;
inputForm: FormGroup; inputForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
categories = []; categories = [];
name: string; name: string;
@ -25,11 +25,11 @@ export class ConfiguratorDialogEthernetHubComponent implements OnInit {
public dialogRef: MatDialogRef<ConfiguratorDialogEthernetHubComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogEthernetHubComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private vpcsConfigurationService: VpcsConfigurationService private vpcsConfigurationService: VpcsConfigurationService
) { ) {
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import{ Controller } from '../../../../../models/controller'; import{ Controller } from '../../../../../models/controller';
@ -16,24 +16,24 @@ export class ConfiguratorDialogIosComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
memoryForm: FormGroup; memoryForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
constructor( constructor(
public dialogRef: MatDialogRef<ConfiguratorDialogIosComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogIosComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private configurationService: IosConfigurationService private configurationService: IosConfigurationService
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
}); });
this.memoryForm = this.formBuilder.group({ this.memoryForm = this.formBuilder.group({
ram: new FormControl('', Validators.required), ram: new UntypedFormControl('', Validators.required),
nvram: new FormControl('', Validators.required), nvram: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import{ Controller } from '../../../../../models/controller'; import{ Controller } from '../../../../../models/controller';
@ -16,24 +16,24 @@ export class ConfiguratorDialogIouComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
networkForm: FormGroup; networkForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
constructor( constructor(
public dialogRef: MatDialogRef<ConfiguratorDialogIouComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogIouComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private configurationService: IouConfigurationService private configurationService: IouConfigurationService
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
}); });
this.networkForm = this.formBuilder.group({ this.networkForm = this.formBuilder.group({
ethernetAdapters: new FormControl('', Validators.required), ethernetAdapters: new UntypedFormControl('', Validators.required),
serialAdapters: new FormControl('', Validators.required), serialAdapters: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import{ Controller } from '../../../../../models/controller'; import{ Controller } from '../../../../../models/controller';
@ -15,16 +15,16 @@ export class ConfiguratorDialogNatComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
constructor( constructor(
public dialogRef: MatDialogRef<ConfiguratorDialogNatComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogNatComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder private formBuilder: UntypedFormBuilder
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialog, MatDialogRef } from '@angular/material/dialog'; import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import { CustomAdaptersTableComponent } from '../../../../../components/preferences/common/custom-adapters-table/custom-adapters-table.component'; import { CustomAdaptersTableComponent } from '../../../../../components/preferences/common/custom-adapters-table/custom-adapters-table.component';
@ -21,7 +21,7 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
onCloseOptions = []; onCloseOptions = [];
bootPriorities = []; bootPriorities = [];
@ -46,13 +46,13 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
public dialogRef: MatDialogRef<ConfiguratorDialogQemuComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogQemuComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private qemuService: QemuService, private qemuService: QemuService,
private qemuConfigurationService: QemuConfigurationService private qemuConfigurationService: QemuConfigurationService
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
ram: new FormControl('', Validators.required), ram: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { QemuImg } from '../../../../../../models/qemu/qemu-img'; import { QemuImg } from '../../../../../../models/qemu/qemu-img';
import{ Controller } from '../../../../../../models/controller'; import{ Controller } from '../../../../../../models/controller';
@ -75,19 +75,19 @@ export class QemuImageCreatorComponent implements OnInit {
lazyRefcountsOptions: string[] = ['off', 'on']; lazyRefcountsOptions: string[] = ['off', 'on'];
refcountBitsOptions: number[] = [1, 2, 4, 8, 16, 32, 64]; refcountBitsOptions: number[] = [1, 2, 4, 8, 16, 32, 64];
zeroedGrainOptions: string[] = ['on', 'off']; zeroedGrainOptions: string[] = ['on', 'off'];
inputForm: FormGroup; inputForm: UntypedFormGroup;
constructor( constructor(
public dialogRef: MatDialogRef<QemuImageCreatorComponent>, public dialogRef: MatDialogRef<QemuImageCreatorComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private qemuService: QemuService private qemuService: QemuService
) { ) {
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
qemu_img: new FormControl('', Validators.required), qemu_img: new UntypedFormControl('', Validators.required),
path: new FormControl('', Validators.required), path: new UntypedFormControl('', Validators.required),
size: new FormControl('', Validators.required), size: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import{ Controller } from '../../../../../models/controller'; import{ Controller } from '../../../../../models/controller';
@ -15,8 +15,8 @@ export class ConfiguratorDialogSwitchComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
nameForm: FormGroup; nameForm: UntypedFormGroup;
inputForm: FormGroup; inputForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
nodeMappings = new Map<string, string>(); nodeMappings = new Map<string, string>();
@ -33,17 +33,17 @@ export class ConfiguratorDialogSwitchComponent implements OnInit {
public dialogRef: MatDialogRef<ConfiguratorDialogSwitchComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogSwitchComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder private formBuilder: UntypedFormBuilder
) { ) {
this.nameForm = this.formBuilder.group({ this.nameForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
}); });
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
sourcePort: new FormControl('', Validators.required), sourcePort: new UntypedFormControl('', Validators.required),
sourceDlci: new FormControl('', Validators.required), sourceDlci: new UntypedFormControl('', Validators.required),
destinationPort: new FormControl('', Validators.required), destinationPort: new UntypedFormControl('', Validators.required),
destinationDlci: new FormControl('', Validators.required), destinationDlci: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import { CustomAdaptersTableComponent } from '../../../../../components/preferences/common/custom-adapters-table/custom-adapters-table.component'; import { CustomAdaptersTableComponent } from '../../../../../components/preferences/common/custom-adapters-table/custom-adapters-table.component';
@ -17,7 +17,7 @@ export class ConfiguratorDialogVirtualBoxComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
onCloseOptions = []; onCloseOptions = [];
@ -30,12 +30,12 @@ export class ConfiguratorDialogVirtualBoxComponent implements OnInit {
public dialogRef: MatDialogRef<ConfiguratorDialogVirtualBoxComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogVirtualBoxComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private virtualBoxConfigurationService: VirtualBoxConfigurationService private virtualBoxConfigurationService: VirtualBoxConfigurationService
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
ram: new FormControl('', Validators.required), ram: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import { CustomAdaptersTableComponent } from '../../../../../components/preferences/common/custom-adapters-table/custom-adapters-table.component'; import { CustomAdaptersTableComponent } from '../../../../../components/preferences/common/custom-adapters-table/custom-adapters-table.component';
@ -17,7 +17,7 @@ export class ConfiguratorDialogVmwareComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
generalSettingsForm: FormGroup; generalSettingsForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
onCloseOptions = []; onCloseOptions = [];
@ -30,11 +30,11 @@ export class ConfiguratorDialogVmwareComponent implements OnInit {
public dialogRef: MatDialogRef<ConfiguratorDialogVmwareComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogVmwareComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private vmwareConfigurationService: VmwareConfigurationService private vmwareConfigurationService: VmwareConfigurationService
) { ) {
this.generalSettingsForm = this.formBuilder.group({ this.generalSettingsForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Node } from '../../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import{ Controller } from '../../../../../models/controller'; import{ Controller } from '../../../../../models/controller';
@ -16,18 +16,18 @@ export class ConfiguratorDialogVpcsComponent implements OnInit {
controller:Controller ; controller:Controller ;
node: Node; node: Node;
name: string; name: string;
inputForm: FormGroup; inputForm: UntypedFormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
constructor( constructor(
public dialogRef: MatDialogRef<ConfiguratorDialogVpcsComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogVpcsComponent>,
public nodeService: NodeService, public nodeService: NodeService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private vpcsConfigurationService: VpcsConfigurationService private vpcsConfigurationService: VpcsConfigurationService
) { ) {
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
name: new FormControl('', Validators.required), name: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { NodesDataSource } from '../../../../cartography/datasources/nodes-datasource'; import { NodesDataSource } from '../../../../cartography/datasources/nodes-datasource';
import { CapturingSettings } from '../../../../models/capturingSettings'; import { CapturingSettings } from '../../../../models/capturingSettings';
@ -22,20 +22,20 @@ export class StartCaptureDialogComponent implements OnInit {
project: Project; project: Project;
link: Link; link: Link;
linkTypes = []; linkTypes = [];
inputForm: FormGroup; inputForm: UntypedFormGroup;
startProgram: boolean; startProgram: boolean;
constructor( constructor(
private dialogRef: MatDialogRef<PacketFiltersDialogComponent>, private dialogRef: MatDialogRef<PacketFiltersDialogComponent>,
private linkService: LinkService, private linkService: LinkService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private toasterService: ToasterService, private toasterService: ToasterService,
private nodesDataSource: NodesDataSource, private nodesDataSource: NodesDataSource,
private packetCaptureService: PacketCaptureService private packetCaptureService: PacketCaptureService
) { ) {
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
linkType: new FormControl('', Validators.required), linkType: new UntypedFormControl('', Validators.required),
fileName: new FormControl('', Validators.required), fileName: new UntypedFormControl('', Validators.required),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { DeviceDetectorService } from 'ngx-device-detector'; import { DeviceDetectorService } from 'ngx-device-detector';
import { ElectronService } from 'ngx-electron'; import { ElectronService } from 'ngx-electron';
@ -11,19 +11,19 @@ import { ToasterService } from '../../../services/toaster.service';
styleUrls: ['./screenshot-dialog.component.scss'], styleUrls: ['./screenshot-dialog.component.scss'],
}) })
export class ScreenshotDialogComponent implements OnInit { export class ScreenshotDialogComponent implements OnInit {
nameForm: FormGroup; nameForm: UntypedFormGroup;
isPngAvailable: boolean; isPngAvailable: boolean;
filetype: string = 'svg'; filetype: string = 'svg';
constructor( constructor(
public dialogRef: MatDialogRef<ScreenshotDialogComponent>, public dialogRef: MatDialogRef<ScreenshotDialogComponent>,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private electronService: ElectronService, private electronService: ElectronService,
private deviceService: DeviceDetectorService private deviceService: DeviceDetectorService
) { ) {
this.nameForm = this.formBuilder.group({ this.nameForm = this.formBuilder.group({
screenshotName: new FormControl(`screenshot-${Date.now()}`, [Validators.required]), screenshotName: new UntypedFormControl(`screenshot-${Date.now()}`, [Validators.required]),
}); });
this.isPngAvailable = this.electronService.isWindows || this.deviceService.getDeviceInfo().os === 'Windows'; this.isPngAvailable = this.electronService.isWindows || this.deviceService.getDeviceInfo().os === 'Windows';
} }

View File

@ -1,5 +1,5 @@
import { Component, EventEmitter, OnInit } from '@angular/core'; import { Component, EventEmitter, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialog, MatDialogRef } from '@angular/material/dialog'; import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
@ -19,7 +19,7 @@ import { ProjectNameValidator } from '../models/projectNameValidator';
}) })
export class AddBlankProjectDialogComponent implements OnInit { export class AddBlankProjectDialogComponent implements OnInit {
controller:Controller ; controller:Controller ;
projectNameForm: FormGroup; projectNameForm: UntypedFormGroup;
uuid: string; uuid: string;
onAddProject = new EventEmitter<string>(); onAddProject = new EventEmitter<string>();
@ -29,13 +29,13 @@ export class AddBlankProjectDialogComponent implements OnInit {
private dialog: MatDialog, private dialog: MatDialog,
private projectService: ProjectService, private projectService: ProjectService,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private projectNameValidator: ProjectNameValidator private projectNameValidator: ProjectNameValidator
) {} ) {}
ngOnInit() { ngOnInit() {
this.projectNameForm = this.formBuilder.group({ this.projectNameForm = this.formBuilder.group({
projectName: new FormControl( projectName: new UntypedFormControl(
null, null,
[Validators.required, this.projectNameValidator.get], [Validators.required, this.projectNameValidator.get],
[projectNameAsyncValidator(this.controller, this.projectService)] [projectNameAsyncValidator(this.controller, this.projectService)]

View File

@ -1,5 +1,5 @@
import { Component, OnInit, Injectable, ViewChild } from '@angular/core'; import { Component, OnInit, Injectable, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Project, ProjectVariable } from '../../../models/project'; import { Project, ProjectVariable } from '../../../models/project';
import{ Controller } from '../../../models/controller'; import{ Controller } from '../../../models/controller';
@ -18,8 +18,8 @@ export class EditProjectDialogComponent implements OnInit {
controller:Controller ; controller:Controller ;
project: Project; project: Project;
formGroup: FormGroup; formGroup: UntypedFormGroup;
variableFormGroup: FormGroup; variableFormGroup: UntypedFormGroup;
projectVariables: ProjectVariable[]; projectVariables: ProjectVariable[];
displayedColumns: string[] = ['name', 'value', 'actions']; displayedColumns: string[] = ['name', 'value', 'actions'];
@ -29,22 +29,22 @@ export class EditProjectDialogComponent implements OnInit {
constructor( constructor(
public dialogRef: MatDialogRef<EditProjectDialogComponent>, public dialogRef: MatDialogRef<EditProjectDialogComponent>,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private projectService: ProjectService, private projectService: ProjectService,
private toasterService: ToasterService, private toasterService: ToasterService,
private nonNegativeValidator: NonNegativeValidator private nonNegativeValidator: NonNegativeValidator
) { ) {
this.formGroup = this.formBuilder.group({ this.formGroup = this.formBuilder.group({
projectName: new FormControl('', [Validators.required]), projectName: new UntypedFormControl('', [Validators.required]),
width: new FormControl('', [Validators.required, nonNegativeValidator.get]), width: new UntypedFormControl('', [Validators.required, nonNegativeValidator.get]),
height: new FormControl('', [Validators.required, nonNegativeValidator.get]), height: new UntypedFormControl('', [Validators.required, nonNegativeValidator.get]),
nodeGridSize: new FormControl('', [Validators.required, nonNegativeValidator.get]), nodeGridSize: new UntypedFormControl('', [Validators.required, nonNegativeValidator.get]),
drawingGridSize: new FormControl('', [Validators.required, nonNegativeValidator.get]), drawingGridSize: new UntypedFormControl('', [Validators.required, nonNegativeValidator.get]),
}); });
this.variableFormGroup = this.formBuilder.group({ this.variableFormGroup = this.formBuilder.group({
name: new FormControl('', [Validators.required]), name: new UntypedFormControl('', [Validators.required]),
value: new FormControl('', [Validators.required]), value: new UntypedFormControl('', [Validators.required]),
}); });
} }

View File

@ -148,7 +148,7 @@ describe('ImportProjectDialogComponent', () => {
}); });
it('should call uploading item with correct arguments', () => { it('should call uploading item with correct arguments', () => {
let fileItem = new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {}); let fileItem = new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {url: ''});
fileSelectDirective.uploader.queue.push(fileItem); fileSelectDirective.uploader.queue.push(fileItem);
spyOn(fileSelectDirective.uploader, 'uploadItem'); spyOn(fileSelectDirective.uploader, 'uploadItem');
@ -167,7 +167,7 @@ describe('ImportProjectDialogComponent', () => {
}); });
it('should clear queue after calling delete', () => { it('should clear queue after calling delete', () => {
fileSelectDirective.uploader.queue.push(new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {})); fileSelectDirective.uploader.queue.push(new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {url: ''}));
spyOn(fileSelectDirective.uploader.queue, 'pop'); spyOn(fileSelectDirective.uploader.queue, 'pop');
component.onDeleteClick(); component.onDeleteClick();
@ -177,7 +177,7 @@ describe('ImportProjectDialogComponent', () => {
}); });
it('should prepare correct upload path for file', () => { it('should prepare correct upload path for file', () => {
fileSelectDirective.uploader.queue.push(new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {})); fileSelectDirective.uploader.queue.push(new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {url: ''}));
component.projectNameForm.controls['projectName'].setValue('newProject'); component.projectNameForm.controls['projectName'].setValue('newProject');
component.onImportClick(); component.onImportClick();
@ -187,7 +187,7 @@ describe('ImportProjectDialogComponent', () => {
}); });
it('should navigate to progress view after clicking import', () => { it('should navigate to progress view after clicking import', () => {
let fileItem = new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {}); let fileItem = new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {url: ''});
fileSelectDirective.uploader.queue.push(fileItem); fileSelectDirective.uploader.queue.push(fileItem);
component.onImportClick(); component.onImportClick();
@ -227,7 +227,7 @@ describe('ImportProjectDialogComponent', () => {
}); });
it('should show delete button after selecting project', () => { it('should show delete button after selecting project', () => {
let fileItem = new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {}); let fileItem = new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {url: ''});
fileSelectDirective.uploader.queue.push(fileItem); fileSelectDirective.uploader.queue.push(fileItem);
let event = { let event = {
target: { target: {
@ -240,7 +240,7 @@ describe('ImportProjectDialogComponent', () => {
}); });
it('should hide delete button after deselecting project', () => { it('should hide delete button after deselecting project', () => {
let fileItem = new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {}); let fileItem = new FileItem(fileSelectDirective.uploader, new File([], 'fileName'), {url: ''});
fileSelectDirective.uploader.queue.push(fileItem); fileSelectDirective.uploader.queue.push(fileItem);
let event = { let event = {
target: { target: {

View File

@ -1,5 +1,5 @@
import { Component, EventEmitter, Inject, OnInit } from '@angular/core'; import { Component, EventEmitter, Inject, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { ToasterService } from '../../../services/toaster.service'; import { ToasterService } from '../../../services/toaster.service';
import { FileItem, FileUploader, ParsedResponseHeaders } from 'ng2-file-upload'; import { FileItem, FileUploader, ParsedResponseHeaders } from 'ng2-file-upload';
@ -28,7 +28,7 @@ export class ImportProjectDialogComponent implements OnInit {
isFinishEnabled: boolean = false; isFinishEnabled: boolean = false;
isDeleteVisible: boolean = false; isDeleteVisible: boolean = false;
resultMessage: string = 'The project is being imported... Please wait'; resultMessage: string = 'The project is being imported... Please wait';
projectNameForm: FormGroup; projectNameForm: UntypedFormGroup;
submitted: boolean = false; submitted: boolean = false;
isFirstStepCompleted: boolean = false; isFirstStepCompleted: boolean = false;
uuid: string; uuid: string;
@ -38,7 +38,7 @@ export class ImportProjectDialogComponent implements OnInit {
private dialog: MatDialog, private dialog: MatDialog,
public dialogRef: MatDialogRef<ImportProjectDialogComponent>, public dialogRef: MatDialogRef<ImportProjectDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any, @Inject(MAT_DIALOG_DATA) public data: any,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private projectService: ProjectService, private projectService: ProjectService,
private projectNameValidator: ProjectNameValidator, private projectNameValidator: ProjectNameValidator,
private toasterService : ToasterService, private toasterService : ToasterService,
@ -47,12 +47,12 @@ export class ImportProjectDialogComponent implements OnInit {
) { ) {
this.projectNameForm = this.formBuilder.group({ this.projectNameForm = this.formBuilder.group({
projectName: new FormControl(null, [Validators.required, projectNameValidator.get]), projectName: new UntypedFormControl(null, [Validators.required, projectNameValidator.get]),
}); });
} }
ngOnInit() { ngOnInit() {
this.uploader = new FileUploader({}); this.uploader = new FileUploader({url: ''});
this.uploader.onAfterAddingFile = (file) => { this.uploader.onAfterAddingFile = (file) => {
file.withCredentials = false; file.withCredentials = false;
}; };

View File

@ -1,5 +1,5 @@
import { Component, EventEmitter, OnInit } from '@angular/core'; import { Component, EventEmitter, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { NodesDataSource } from '../../../cartography/datasources/nodes-datasource'; import { NodesDataSource } from '../../../cartography/datasources/nodes-datasource';
import { Project } from '../../../models/project'; import { Project } from '../../../models/project';
@ -17,7 +17,7 @@ import { ProjectNameValidator } from '../models/projectNameValidator';
export class SaveProjectDialogComponent implements OnInit { export class SaveProjectDialogComponent implements OnInit {
controller:Controller ; controller:Controller ;
project: Project; project: Project;
projectNameForm: FormGroup; projectNameForm: UntypedFormGroup;
onAddProject = new EventEmitter<string>(); onAddProject = new EventEmitter<string>();
constructor( constructor(
@ -25,11 +25,11 @@ export class SaveProjectDialogComponent implements OnInit {
private projectService: ProjectService, private projectService: ProjectService,
private nodesDataSource: NodesDataSource, private nodesDataSource: NodesDataSource,
private toasterService: ToasterService, private toasterService: ToasterService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private projectNameValidator: ProjectNameValidator private projectNameValidator: ProjectNameValidator
) { ) {
this.projectNameForm = this.formBuilder.group({ this.projectNameForm = this.formBuilder.group({
projectName: new FormControl(null, [Validators.required, projectNameValidator.get]), projectName: new UntypedFormControl(null, [Validators.required, projectNameValidator.get]),
}); });
} }

View File

@ -11,7 +11,7 @@
* Author: Sylvain MATHIEU, Elise LEBEAU * Author: Sylvain MATHIEU, Elise LEBEAU
*/ */
import {Component, Inject, OnInit} from '@angular/core'; import {Component, Inject, OnInit} from '@angular/core';
import {FormBuilder, FormControl, FormGroup, Validators} from "@angular/forms"; import {UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from "@angular/forms";
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
import {Controller} from "@models/controller"; import {Controller} from "@models/controller";
import {GroupNameValidator} from "@components/group-management/add-group-dialog/GroupNameValidator"; import {GroupNameValidator} from "@components/group-management/add-group-dialog/GroupNameValidator";
@ -25,17 +25,17 @@ import {groupNameAsyncValidator} from "@components/group-management/add-group-di
}) })
export class AddRoleDialogComponent implements OnInit { export class AddRoleDialogComponent implements OnInit {
roleNameForm: FormGroup; roleNameForm: UntypedFormGroup;
constructor(private dialogRef: MatDialogRef<AddRoleDialogComponent>, constructor(private dialogRef: MatDialogRef<AddRoleDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: { controller: Controller }, @Inject(MAT_DIALOG_DATA) public data: { controller: Controller },
private formBuilder: FormBuilder) { private formBuilder: UntypedFormBuilder) {
} }
ngOnInit(): void { ngOnInit(): void {
this.roleNameForm = this.formBuilder.group({ this.roleNameForm = this.formBuilder.group({
name: new FormControl(), name: new UntypedFormControl(),
description: new FormControl() description: new UntypedFormControl()
}); });
} }

View File

@ -16,7 +16,7 @@ import {ActivatedRoute} from "@angular/router";
import {Controller} from "@models/controller"; import {Controller} from "@models/controller";
import {ControllerService} from "@services/controller.service"; import {ControllerService} from "@services/controller.service";
import {Role} from "@models/api/role"; import {Role} from "@models/api/role";
import {FormControl, FormGroup} from "@angular/forms"; import {UntypedFormControl, UntypedFormGroup} from "@angular/forms";
import {ToasterService} from "@services/toaster.service"; import {ToasterService} from "@services/toaster.service";
import {HttpErrorResponse} from "@angular/common/http"; import {HttpErrorResponse} from "@angular/common/http";
@ -28,16 +28,16 @@ import {HttpErrorResponse} from "@angular/common/http";
export class RoleDetailComponent implements OnInit { export class RoleDetailComponent implements OnInit {
controller: Controller; controller: Controller;
role: Role; role: Role;
editRoleForm: FormGroup; editRoleForm: UntypedFormGroup;
constructor(private roleService: RoleService, constructor(private roleService: RoleService,
private controllerService: ControllerService, private controllerService: ControllerService,
private toastService: ToasterService, private toastService: ToasterService,
private route: ActivatedRoute) { private route: ActivatedRoute) {
this.editRoleForm = new FormGroup({ this.editRoleForm = new UntypedFormGroup({
rolename: new FormControl(), rolename: new UntypedFormControl(),
description: new FormControl(), description: new UntypedFormControl(),
}); });
} }

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms'; import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { ConsoleService } from '../../../services/settings/console.service'; import { ConsoleService } from '../../../services/settings/console.service';
import { ToasterService } from '../../../services/toaster.service'; import { ToasterService } from '../../../services/toaster.service';
@ -10,8 +10,8 @@ import { ToasterService } from '../../../services/toaster.service';
styleUrls: ['./console.component.scss'], styleUrls: ['./console.component.scss'],
}) })
export class ConsoleComponent implements OnInit { export class ConsoleComponent implements OnInit {
consoleForm = new FormGroup({ consoleForm = new UntypedFormGroup({
command: new FormControl(''), command: new UntypedFormControl(''),
}); });
constructor(private router: Router, private consoleService: ConsoleService, private toasterService: ToasterService) {} constructor(private router: Router, private consoleService: ConsoleService, private toasterService: ToasterService) {}

View File

@ -1,5 +1,5 @@
import { Component, Inject } from '@angular/core'; import { Component, Inject } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { NodesDataSource } from '../../../cartography/datasources/nodes-datasource'; import { NodesDataSource } from '../../../cartography/datasources/nodes-datasource';
import { Node } from '../../../cartography/models/node'; import { Node } from '../../../cartography/models/node';
@ -18,13 +18,13 @@ export class CreateSnapshotDialogComponent {
controller:Controller ; controller:Controller ;
project: Project; project: Project;
snapshot: Snapshot = new Snapshot(); snapshot: Snapshot = new Snapshot();
inputForm: FormGroup; inputForm: UntypedFormGroup;
snapshots: string[] = []; snapshots: string[] = [];
isInRunningState: boolean; isInRunningState: boolean;
constructor( constructor(
public dialogRef: MatDialogRef<CreateSnapshotDialogComponent>, public dialogRef: MatDialogRef<CreateSnapshotDialogComponent>,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private toasterService: ToasterService, private toasterService: ToasterService,
private snapshotService: SnapshotService, private snapshotService: SnapshotService,
private nodesDataSource: NodesDataSource, private nodesDataSource: NodesDataSource,
@ -34,7 +34,7 @@ export class CreateSnapshotDialogComponent {
this.project = data['project']; this.project = data['project'];
this.inputForm = this.formBuilder.group({ this.inputForm = this.formBuilder.group({
snapshotName: new FormControl('', Validators.required), snapshotName: new UntypedFormControl('', Validators.required),
}); });
if (this.project && this.project.project_id) { if (this.project && this.project.project_id) {

View File

@ -1,6 +1,6 @@
import { DataSource } from '@angular/cdk/collections'; import { DataSource } from '@angular/cdk/collections';
import { Component, Inject, OnInit } from '@angular/core'; import { Component, Inject, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { BehaviorSubject, merge, Observable } from 'rxjs'; import { BehaviorSubject, merge, Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
@ -32,8 +32,8 @@ export class TemplateListDialogComponent implements OnInit {
'qemu', 'qemu',
]; ];
selectedType: string; selectedType: string;
configurationForm: FormGroup; configurationForm: UntypedFormGroup;
positionForm: FormGroup; positionForm: UntypedFormGroup;
templates: Template[]; templates: Template[];
filteredTemplates: Template[]; filteredTemplates: Template[];
selectedTemplate: Template; selectedTemplate: Template;
@ -44,7 +44,7 @@ export class TemplateListDialogComponent implements OnInit {
constructor( constructor(
public dialogRef: MatDialogRef<TemplateListDialogComponent>, public dialogRef: MatDialogRef<TemplateListDialogComponent>,
private templateService: TemplateService, private templateService: TemplateService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
@Inject(MAT_DIALOG_DATA) public data: any, @Inject(MAT_DIALOG_DATA) public data: any,
private toasterService: ToasterService, private toasterService: ToasterService,
private nonNegativeValidator: NonNegativeValidator private nonNegativeValidator: NonNegativeValidator
@ -52,11 +52,11 @@ export class TemplateListDialogComponent implements OnInit {
this.controller = data['controller']; this.controller = data['controller'];
this.project = data['project']; this.project = data['project'];
this.configurationForm = this.formBuilder.group({ this.configurationForm = this.formBuilder.group({
numberOfNodes: new FormControl(1, [ Validators.compose([Validators.required, nonNegativeValidator.get])]), numberOfNodes: new UntypedFormControl(1, [ Validators.compose([Validators.required, nonNegativeValidator.get])]),
}); });
this.positionForm = this.formBuilder.group({ this.positionForm = this.formBuilder.group({
top: new FormControl(0, Validators.required), top: new UntypedFormControl(0, Validators.required),
left: new FormControl(0, Validators.required), left: new UntypedFormControl(0, Validators.required),
}); });
} }

View File

@ -11,7 +11,7 @@
* Author: Sylvain MATHIEU, Elise LEBEAU * Author: Sylvain MATHIEU, Elise LEBEAU
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {FormControl, FormGroup, Validators} from "@angular/forms"; import {UntypedFormControl, UntypedFormGroup, Validators} from "@angular/forms";
import {MatDialogRef} from "@angular/material/dialog"; import {MatDialogRef} from "@angular/material/dialog";
import {UserService} from "@services/user.service"; import {UserService} from "@services/user.service";
import {Controller} from "@models/controller"; import {Controller} from "@models/controller";
@ -33,12 +33,12 @@ import {matchingPassword} from "@components/user-management/ConfirmPasswordValid
styleUrls: ['./add-user-dialog.component.scss'] styleUrls: ['./add-user-dialog.component.scss']
}) })
export class AddUserDialogComponent implements OnInit { export class AddUserDialogComponent implements OnInit {
addUserForm: FormGroup; addUserForm: UntypedFormGroup;
controller: Controller; controller: Controller;
groups: Group[]; groups: Group[];
groupsToAdd: Set<Group> = new Set([]); groupsToAdd: Set<Group> = new Set([]);
autocompleteControl = new FormControl(); autocompleteControl = new UntypedFormControl();
filteredGroups: Observable<Group[]>; filteredGroups: Observable<Group[]>;
constructor(public dialogRef: MatDialogRef<AddUserDialogComponent>, constructor(public dialogRef: MatDialogRef<AddUserDialogComponent>,
@ -47,21 +47,21 @@ export class AddUserDialogComponent implements OnInit {
private groupService: GroupService) { } private groupService: GroupService) { }
ngOnInit(): void { ngOnInit(): void {
this.addUserForm = new FormGroup({ this.addUserForm = new UntypedFormGroup({
username: new FormControl(null, [ username: new UntypedFormControl(null, [
Validators.required, Validators.required,
Validators.minLength(3), Validators.minLength(3),
Validators.pattern("[a-zA-Z0-9_-]+$")], Validators.pattern("[a-zA-Z0-9_-]+$")],
[userNameAsyncValidator(this.controller, this.userService)]), [userNameAsyncValidator(this.controller, this.userService)]),
full_name: new FormControl(), full_name: new UntypedFormControl(),
email: new FormControl(null, email: new UntypedFormControl(null,
[Validators.email, Validators.required], [Validators.email, Validators.required],
[userEmailAsyncValidator(this.controller, this.userService)]), [userEmailAsyncValidator(this.controller, this.userService)]),
password: new FormControl(null, password: new UntypedFormControl(null,
[Validators.required, Validators.minLength(6), Validators.maxLength(100)]), [Validators.required, Validators.minLength(6), Validators.maxLength(100)]),
confirmPassword: new FormControl(null, confirmPassword: new UntypedFormControl(null,
[Validators.minLength(6), Validators.maxLength(100), Validators.required] ), [Validators.minLength(6), Validators.maxLength(100), Validators.required] ),
is_active: new FormControl(true) is_active: new UntypedFormControl(true)
},{ },{
validators: [matchingPassword] validators: [matchingPassword]
}); });

View File

@ -12,12 +12,12 @@
*/ */
import {Controller} from "../../../models/controller"; import {Controller} from "../../../models/controller";
import {UserService} from "../../../services/user.service"; import {UserService} from "../../../services/user.service";
import {FormControl} from "@angular/forms"; import {UntypedFormControl} from "@angular/forms";
import {timer} from "rxjs"; import {timer} from "rxjs";
import {map, switchMap} from "rxjs/operators"; import {map, switchMap} from "rxjs/operators";
export const userEmailAsyncValidator = (controller: Controller, userService: UserService, except: string = '') => { export const userEmailAsyncValidator = (controller: Controller, userService: UserService, except: string = '') => {
return (control: FormControl) => { return (control: UntypedFormControl) => {
return timer(500).pipe( return timer(500).pipe(
switchMap(() => userService.list(controller)), switchMap(() => userService.list(controller)),
map((response) => { map((response) => {

View File

@ -11,13 +11,13 @@
* Author: Sylvain MATHIEU, Elise LEBEAU * Author: Sylvain MATHIEU, Elise LEBEAU
*/ */
import {Controller} from "../../../models/controller"; import {Controller} from "../../../models/controller";
import {FormControl} from "@angular/forms"; import {UntypedFormControl} from "@angular/forms";
import {timer} from "rxjs"; import {timer} from "rxjs";
import {map, switchMap} from "rxjs/operators"; import {map, switchMap} from "rxjs/operators";
import {UserService} from "../../../services/user.service"; import {UserService} from "../../../services/user.service";
export const userNameAsyncValidator = (controller: Controller, userService: UserService, except: string = '') => { export const userNameAsyncValidator = (controller: Controller, userService: UserService, except: string = '') => {
return (control: FormControl) => { return (control: UntypedFormControl) => {
return timer(500).pipe( return timer(500).pipe(
switchMap(() => userService.list(controller)), switchMap(() => userService.list(controller)),
map((response) => { map((response) => {

View File

@ -1,5 +1,5 @@
import {Component, Inject, OnInit} from '@angular/core'; import {Component, Inject, OnInit} from '@angular/core';
import {AbstractControl, FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators} from "@angular/forms"; import {AbstractControl, UntypedFormControl, UntypedFormGroup, ValidationErrors, ValidatorFn, Validators} from "@angular/forms";
import {User} from "@models/users/user"; import {User} from "@models/users/user";
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
import {UserService} from "@services/user.service"; import {UserService} from "@services/user.service";
@ -14,7 +14,7 @@ import {matchingPassword} from "@components/user-management/ConfirmPasswordValid
}) })
export class ChangeUserPasswordComponent implements OnInit { export class ChangeUserPasswordComponent implements OnInit {
editPasswordForm: FormGroup; editPasswordForm: UntypedFormGroup;
user: User; user: User;
constructor(private dialogRef: MatDialogRef<ChangeUserPasswordComponent>, constructor(private dialogRef: MatDialogRef<ChangeUserPasswordComponent>,
@ -24,10 +24,10 @@ export class ChangeUserPasswordComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.user = this.data.user; this.user = this.data.user;
this.editPasswordForm = new FormGroup({ this.editPasswordForm = new UntypedFormGroup({
password: new FormControl(null, password: new UntypedFormControl(null,
[Validators.minLength(6), Validators.maxLength(100), Validators.required] ), [Validators.minLength(6), Validators.maxLength(100), Validators.required] ),
confirmPassword: new FormControl(null, confirmPassword: new UntypedFormControl(null,
[Validators.minLength(6), Validators.maxLength(100), Validators.required] ), [Validators.minLength(6), Validators.maxLength(100), Validators.required] ),
},{ },{
validators: [matchingPassword] validators: [matchingPassword]

View File

@ -1,5 +1,5 @@
import {Component, Inject, OnInit} from '@angular/core'; import {Component, Inject, OnInit} from '@angular/core';
import {FormControl, FormGroup, Validators} from "@angular/forms"; import {UntypedFormControl, UntypedFormGroup, Validators} from "@angular/forms";
import {Group} from "@models/groups/group"; import {Group} from "@models/groups/group";
import {UserService} from "@services/user.service"; import {UserService} from "@services/user.service";
import {ToasterService} from "@services/toaster.service"; import {ToasterService} from "@services/toaster.service";
@ -22,7 +22,7 @@ import {RemoveToGroupDialogComponent} from "@components/group-details/remove-to-
}) })
export class UserDetailComponent implements OnInit { export class UserDetailComponent implements OnInit {
editUserForm: FormGroup; editUserForm: UntypedFormGroup;
groups: Group[]; groups: Group[];
user: User; user: User;
controller: Controller; controller: Controller;
@ -53,17 +53,17 @@ export class UserDetailComponent implements OnInit {
} }
initForm() { initForm() {
this.editUserForm = new FormGroup({ this.editUserForm = new UntypedFormGroup({
username: new FormControl(this.user.username, [ username: new UntypedFormControl(this.user.username, [
Validators.required, Validators.required,
Validators.minLength(3), Validators.minLength(3),
Validators.pattern("[a-zA-Z0-9_-]+$")], Validators.pattern("[a-zA-Z0-9_-]+$")],
[userNameAsyncValidator(this.controller, this.userService, this.user.username)]), [userNameAsyncValidator(this.controller, this.userService, this.user.username)]),
full_name: new FormControl(this.user.full_name), full_name: new UntypedFormControl(this.user.full_name),
email: new FormControl(this.user.email, email: new UntypedFormControl(this.user.email,
[Validators.email, Validators.required], [Validators.email, Validators.required],
[userEmailAsyncValidator(this.controller, this.userService, this.user.email)]), [userEmailAsyncValidator(this.controller, this.userService, this.user.email)]),
is_active: new FormControl(this.user.is_active) is_active: new UntypedFormControl(this.user.is_active)
}); });
} }

View File

@ -1,11 +1,11 @@
import { FormControl } from '@angular/forms'; import { UntypedFormControl } from '@angular/forms';
import { timer } from 'rxjs'; import { timer } from 'rxjs';
import { map, switchMap } from 'rxjs/operators'; import { map, switchMap } from 'rxjs/operators';
import{ Controller } from '../models/controller'; import{ Controller } from '../models/controller';
import { ProjectService } from '../services/project.service'; import { ProjectService } from '../services/project.service';
export const projectNameAsyncValidator = (controller:Controller , projectService: ProjectService) => { export const projectNameAsyncValidator = (controller:Controller , projectService: ProjectService) => {
return (control: FormControl) => { return (control: UntypedFormControl) => {
return timer(500).pipe( return timer(500).pipe(
switchMap(() => projectService.list(controller)), switchMap(() => projectService.list(controller)),
map((response) => (response.find((n) => n.name === control.value) ? { projectExist: true } : null)) map((response) => (response.find((n) => n.name === control.value) ? { projectExist: true } : null))

View File

@ -1,11 +1,11 @@
import { FormControl } from '@angular/forms'; import { UntypedFormControl } from '@angular/forms';
import { timer } from 'rxjs'; import { timer } from 'rxjs';
import { map, switchMap } from 'rxjs/operators'; import { map, switchMap } from 'rxjs/operators';
import{ Controller } from '../models/controller'; import{ Controller } from '../models/controller';
import { TemplateService } from '../services/template.service'; import { TemplateService } from '../services/template.service';
export const templateNameAsyncValidator = (controller:Controller , templateService: TemplateService) => { export const templateNameAsyncValidator = (controller:Controller , templateService: TemplateService) => {
return (control: FormControl) => { return (control: UntypedFormControl) => {
return timer(500).pipe( return timer(500).pipe(
switchMap(() => templateService.list(controller)), switchMap(() => templateService.list(controller)),
map((response) => (response.find((n) => n.name === control.value) ? { templateExist: true } : null)) map((response) => (response.find((n) => n.name === control.value) ? { templateExist: true } : null))

View File

@ -3,7 +3,7 @@
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/spec", "outDir": "../out-tsc/spec",
"baseUrl": "./", "baseUrl": "./",
"target": "es5", "target": "es2020",
"paths": { "paths": {
"@components/*": ["app/components/*"], "@components/*": ["app/components/*"],
"@services/*": ["app/services/*"], "@services/*": ["app/services/*"],

5811
yarn.lock

File diff suppressed because it is too large Load Diff