diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index dd9e3e44..c5ebac59 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -50,6 +50,7 @@ import { CopyQemuVmTemplateComponent } from './components/preferences/qemu/copy- import { CopyIosTemplateComponent } from './components/preferences/dynamips/copy-ios-template/copy-ios-template.component'; import { CopyDockerTemplateComponent } from './components/preferences/docker/copy-docker-template/copy-docker-template.component'; import { CopyIouTemplateComponent } from './components/preferences/ios-on-unix/copy-iou-template/copy-iou-template.component'; +import { ListOfSnapshotsComponent } from './components/snapshots/list-of-snapshots/list-of-snapshots.component'; const routes: Routes = [ { @@ -62,6 +63,7 @@ const routes: Routes = [ { path: 'server/:server_id/projects', component: ProjectsComponent }, { path: 'settings', component: SettingsComponent }, { path: 'installed-software', component: InstalledSoftwareComponent }, + { path: 'server/:server_id/project/:project_id/snapshots', component: ListOfSnapshotsComponent }, { path: 'server/:server_id/preferences', component: PreferencesComponent }, // { path: 'server/:server_id/preferences/general', component: GeneralPreferencesComponent }, { path: 'server/:server_id/preferences/builtin', component: BuiltInPreferencesComponent}, @@ -116,7 +118,9 @@ const routes: Routes = [ { path: 'server/:server_id/preferences/iou/addtemplate', component: AddIouTemplateComponent } ] }, - { path: 'server/:server_id/project/:project_id', component: ProjectMapComponent } + { + path: 'server/:server_id/project/:project_id', component: ProjectMapComponent, + } ]; @NgModule({ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index c5938619..223999cc 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -68,7 +68,6 @@ import { RavenState } from './common/error-handlers/raven-state-communicator'; import { ServerDiscoveryComponent } from './components/servers/server-discovery/server-discovery.component'; import { ServerDatabase } from './services/server.database'; import { CreateSnapshotDialogComponent } from './components/snapshots/create-snapshot-dialog/create-snapshot-dialog.component'; -import { SnapshotsComponent } from './components/snapshots/snapshots.component'; import { SnapshotMenuItemComponent } from './components/snapshots/snapshot-menu-item/snapshot-menu-item.component'; import { MATERIAL_IMPORTS } from './material.imports'; import { DrawingService } from './services/drawing.service'; @@ -165,6 +164,9 @@ import { SearchFilter } from './filters/searchFilter.pipe'; import { RecentlyOpenedProjectService } from './services/recentlyOpenedProject.service'; import { ServerManagementService } from './services/server-management.service'; import { DeleteActionComponent } from './components/project-map/context-menu/actions/delete-action/delete-action.component'; +import { ListOfSnapshotsComponent } from './components/snapshots/list-of-snapshots/list-of-snapshots.component'; +import { DateFilter } from './filters/dateFilter.pipe'; +import { NameFilter } from './filters/nameFilter.pipe'; import { CustomAdaptersComponent } from './components/preferences/common/custom-adapters/custom-adapters.component'; if (environment.production) { @@ -184,7 +186,6 @@ if (environment.production) { AddServerDialogComponent, CreateSnapshotDialogComponent, SnapshotMenuItemComponent, - SnapshotsComponent, ProjectsComponent, AddBlankProjectDialogComponent, ImportProjectDialogComponent, @@ -269,6 +270,9 @@ if (environment.production) { EmptyTemplatesListComponent, SymbolsMenuComponent, SearchFilter, + DateFilter, + NameFilter, + ListOfSnapshotsComponent, CustomAdaptersComponent ], imports: [ diff --git a/src/app/common/progress-dialog/progress-dialog.service.ts b/src/app/common/progress-dialog/progress-dialog.service.ts index 07b757dc..ab7e4462 100644 --- a/src/app/common/progress-dialog/progress-dialog.service.ts +++ b/src/app/common/progress-dialog/progress-dialog.service.ts @@ -8,7 +8,8 @@ export class ProgressDialogService { public open() { const ref = this.dialog.open(ProgressDialogComponent, { - width: '250px' + width: '250px', + autoFocus: false }); return ref; } diff --git a/src/app/components/preferences/common/delete-template-component/delete-template.component.ts b/src/app/components/preferences/common/delete-template-component/delete-template.component.ts index d4495bea..b300866a 100644 --- a/src/app/components/preferences/common/delete-template-component/delete-template.component.ts +++ b/src/app/components/preferences/common/delete-template-component/delete-template.component.ts @@ -26,7 +26,8 @@ export class DeleteTemplateComponent { height: '250px', data: { templateName: templateName - } + }, + autoFocus: false }); dialogRef.afterClosed().subscribe((answer: boolean) => { diff --git a/src/app/components/preferences/docker/add-docker-template/add-docker-template.component.spec.ts b/src/app/components/preferences/docker/add-docker-template/add-docker-template.component.spec.ts index 2f306680..0617109a 100644 --- a/src/app/components/preferences/docker/add-docker-template/add-docker-template.component.spec.ts +++ b/src/app/components/preferences/docker/add-docker-template/add-docker-template.component.spec.ts @@ -1,5 +1,5 @@ import { ComponentFixture, async, TestBed } from '@angular/core/testing'; -import { MatInputModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, MatSelectModule, MatFormFieldModule, MatAutocompleteModule, MatTableModule } from '@angular/material'; +import { MatInputModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, MatSelectModule, MatFormFieldModule, MatAutocompleteModule, MatTableModule, MatStepperModule } from '@angular/material'; import { CommonModule } from '@angular/common'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; @@ -36,7 +36,7 @@ describe('AddDockerTemplateComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [ FormsModule, MatTableModule, MatAutocompleteModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule, MatSelectModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, CommonModule, NoopAnimationsModule, RouterTestingModule.withRoutes([])], + imports: [MatStepperModule, FormsModule, MatTableModule, MatAutocompleteModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule, MatSelectModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, CommonModule, NoopAnimationsModule, RouterTestingModule.withRoutes([])], providers: [ { provide: ActivatedRoute, useValue: activatedRoute diff --git a/src/app/components/preferences/dynamips/add-ios-template/add-ios-template.component.spec.ts b/src/app/components/preferences/dynamips/add-ios-template/add-ios-template.component.spec.ts index 942dcb36..876f29c3 100644 --- a/src/app/components/preferences/dynamips/add-ios-template/add-ios-template.component.spec.ts +++ b/src/app/components/preferences/dynamips/add-ios-template/add-ios-template.component.spec.ts @@ -1,5 +1,5 @@ import { ComponentFixture, async, TestBed } from '@angular/core/testing'; -import { MatInputModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, MatSelectModule, MatFormFieldModule, MatAutocompleteModule, MatTableModule } from '@angular/material'; +import { MatInputModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, MatSelectModule, MatFormFieldModule, MatAutocompleteModule, MatTableModule, MatStepperModule } from '@angular/material'; import { CommonModule } from '@angular/common'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; @@ -36,7 +36,7 @@ describe('AddIosTemplateComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [ FormsModule, MatTableModule, MatAutocompleteModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule, MatSelectModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, CommonModule, NoopAnimationsModule, RouterTestingModule.withRoutes([])], + imports: [MatStepperModule, FormsModule, MatTableModule, MatAutocompleteModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule, MatSelectModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, CommonModule, NoopAnimationsModule, RouterTestingModule.withRoutes([])], providers: [ { provide: ActivatedRoute, useValue: activatedRoute diff --git a/src/app/components/preferences/ios-on-unix/add-iou-template/add-iou-template.component.spec.ts b/src/app/components/preferences/ios-on-unix/add-iou-template/add-iou-template.component.spec.ts index a64f24f2..3db5d846 100644 --- a/src/app/components/preferences/ios-on-unix/add-iou-template/add-iou-template.component.spec.ts +++ b/src/app/components/preferences/ios-on-unix/add-iou-template/add-iou-template.component.spec.ts @@ -1,5 +1,5 @@ import { ComponentFixture, async, TestBed } from '@angular/core/testing'; -import { MatInputModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, MatSelectModule, MatFormFieldModule, MatAutocompleteModule, MatTableModule } from '@angular/material'; +import { MatInputModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, MatSelectModule, MatFormFieldModule, MatAutocompleteModule, MatTableModule, MatStepperModule } from '@angular/material'; import { CommonModule } from '@angular/common'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; @@ -36,7 +36,7 @@ describe('AddIouTemplateComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [ FormsModule, MatTableModule, MatAutocompleteModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule, MatSelectModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, CommonModule, NoopAnimationsModule, RouterTestingModule.withRoutes([])], + imports: [MatStepperModule, FormsModule, MatTableModule, MatAutocompleteModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule, MatSelectModule, MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, CommonModule, NoopAnimationsModule, RouterTestingModule.withRoutes([])], providers: [ { provide: ActivatedRoute, useValue: activatedRoute }, { provide: ServerService, useValue: mockedServerService }, diff --git a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.spec.ts b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.spec.ts index 3afd6b0b..48012eee 100644 --- a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.spec.ts +++ b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.spec.ts @@ -1,5 +1,5 @@ import { ComponentFixture, async, TestBed } from '@angular/core/testing'; -import { MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, MatSelectModule, MatAutocompleteModule, MatFormFieldModule, MatInputModule } from '@angular/material'; +import { MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, MatSelectModule, MatAutocompleteModule, MatFormFieldModule, MatInputModule, MatStepperModule } from '@angular/material'; import { CommonModule } from '@angular/common'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; @@ -47,7 +47,7 @@ describe('AddQemuVmTemplateComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [FormsModule, ReactiveFormsModule, MatSelectModule, MatAutocompleteModule, MatIconModule, MatFormFieldModule, MatInputModule, + imports: [MatStepperModule, FormsModule, ReactiveFormsModule, MatSelectModule, MatAutocompleteModule, MatIconModule, MatFormFieldModule, MatInputModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, CommonModule, NoopAnimationsModule, RouterTestingModule.withRoutes([])], providers: [ { diff --git a/src/app/components/preferences/vpcs/vpcs-templates/vpcs-templates.component.ts b/src/app/components/preferences/vpcs/vpcs-templates/vpcs-templates.component.ts index ad88af64..a2e570d8 100644 --- a/src/app/components/preferences/vpcs/vpcs-templates/vpcs-templates.component.ts +++ b/src/app/components/preferences/vpcs/vpcs-templates/vpcs-templates.component.ts @@ -6,7 +6,6 @@ import { VpcsService } from '../../../../services/vpcs.service'; import { VpcsTemplate } from '../../../../models/templates/vpcs-template'; import { DeleteTemplateComponent } from '../../common/delete-template-component/delete-template.component'; - @Component({ selector: 'app-vpcs-templates', templateUrl: './vpcs-templates.component.html', diff --git a/src/app/components/project-map/context-menu/actions/edit-style-action/edit-style-action.component.ts b/src/app/components/project-map/context-menu/actions/edit-style-action/edit-style-action.component.ts index 5234c05b..ea7e8cdf 100644 --- a/src/app/components/project-map/context-menu/actions/edit-style-action/edit-style-action.component.ts +++ b/src/app/components/project-map/context-menu/actions/edit-style-action/edit-style-action.component.ts @@ -20,7 +20,8 @@ export class EditStyleActionComponent implements OnInit { editStyle() { const dialogRef = this.dialog.open(StyleEditorDialogComponent, { - width: '300px' + width: '300px', + autoFocus: false }); let instance = dialogRef.componentInstance; instance.server = this.server; diff --git a/src/app/components/project-map/context-menu/actions/edit-text-action/edit-text-action.component.ts b/src/app/components/project-map/context-menu/actions/edit-text-action/edit-text-action.component.ts index cc2f0720..2486a0c7 100644 --- a/src/app/components/project-map/context-menu/actions/edit-text-action/edit-text-action.component.ts +++ b/src/app/components/project-map/context-menu/actions/edit-text-action/edit-text-action.component.ts @@ -20,7 +20,8 @@ export class EditTextActionComponent implements OnInit { editText() { const dialogRef = this.dialog.open(TextEditorDialogComponent, { - width: '300px' + width: '300px', + autoFocus: false }); let instance = dialogRef.componentInstance; instance.server = this.server; diff --git a/src/app/components/projects/add-blank-project-dialog/add-blank-project-dialog.component.ts b/src/app/components/projects/add-blank-project-dialog/add-blank-project-dialog.component.ts index 6536836c..523860fe 100644 --- a/src/app/components/projects/add-blank-project-dialog/add-blank-project-dialog.component.ts +++ b/src/app/components/projects/add-blank-project-dialog/add-blank-project-dialog.component.ts @@ -83,7 +83,8 @@ export class AddBlankProjectDialogComponent implements OnInit { height: '150px', data: { existingProject: existingProject - } + }, + autoFocus: false }); dialogRef.afterClosed().subscribe((answer: boolean) => { diff --git a/src/app/components/projects/import-project-dialog/import-project-dialog.component.ts b/src/app/components/projects/import-project-dialog/import-project-dialog.component.ts index 59ad09ee..07a76027 100644 --- a/src/app/components/projects/import-project-dialog/import-project-dialog.component.ts +++ b/src/app/components/projects/import-project-dialog/import-project-dialog.component.ts @@ -106,7 +106,8 @@ export class ImportProjectDialogComponent implements OnInit { height: '150px', data: { existingProject: existingProject - } + }, + autoFocus: false }); dialogRef.afterClosed().subscribe((answer: boolean) => { diff --git a/src/app/components/projects/projects.component.ts b/src/app/components/projects/projects.component.ts index f6ae4fbb..02741faf 100644 --- a/src/app/components/projects/projects.component.ts +++ b/src/app/components/projects/projects.component.ts @@ -109,7 +109,8 @@ export class ProjectsComponent implements OnInit { addBlankProject() { const dialogRef = this.dialog.open(AddBlankProjectDialogComponent, { - width: '400px' + width: '400px', + autoFocus: false }); let instance = dialogRef.componentInstance; instance.server = this.server; @@ -117,7 +118,8 @@ export class ProjectsComponent implements OnInit { importProject() { const dialogRef = this.dialog.open(ImportProjectDialogComponent, { - width: '400px' + width: '400px', + autoFocus: false }); let instance = dialogRef.componentInstance; instance.server = this.server; diff --git a/src/app/components/servers/servers.component.ts b/src/app/components/servers/servers.component.ts index 57cdba3c..d487e2d4 100644 --- a/src/app/components/servers/servers.component.ts +++ b/src/app/components/servers/servers.component.ts @@ -69,7 +69,8 @@ export class ServersComponent implements OnInit, OnDestroy { createModal() { const dialogRef = this.dialog.open(AddServerDialogComponent, { - width: '350px' + width: '350px', + autoFocus: false }); dialogRef.afterClosed().subscribe(server => { diff --git a/src/app/components/snapshots/create-snapshot-dialog/create-snapshot-dialog.component.html b/src/app/components/snapshots/create-snapshot-dialog/create-snapshot-dialog.component.html index f81fdfac..ca13ce5e 100644 --- a/src/app/components/snapshots/create-snapshot-dialog/create-snapshot-dialog.component.html +++ b/src/app/components/snapshots/create-snapshot-dialog/create-snapshot-dialog.component.html @@ -1,6 +1,11 @@ -
snapshots works!
diff --git a/src/app/components/snapshots/snapshots.component.spec.ts b/src/app/components/snapshots/snapshots.component.spec.ts deleted file mode 100644 index 1e49c3d8..00000000 --- a/src/app/components/snapshots/snapshots.component.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { SnapshotsComponent } from './snapshots.component'; - -describe('SnapshotsComponent', () => { - let component: SnapshotsComponent; - let fixture: ComponentFixture