-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
240 additions
and
31 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...c/app/common/dialog-box-confirm-cancel-edit/dialog-box-confirm-cancel-edit.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<h1 mat-dialog-title>Cancel Edit?</h1> | ||
<div mat-dialog-content class="content"> | ||
Are you sure you want to cancel the edit for the item " | ||
{{ data.name }}"? All changes will be lost! | ||
</div> | ||
<div mat-dialog-actions> | ||
<button mat-button [mat-dialog-close]="true">Yes</button> | ||
<button mat-button [mat-dialog-close]="false">No</button> | ||
</div> |
Empty file.
35 changes: 35 additions & 0 deletions
35
...pp/common/dialog-box-confirm-cancel-edit/dialog-box-confirm-cancel-edit.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { DialogModule } from '@angular/cdk/dialog'; | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { MAT_DIALOG_DATA } from '@angular/material/dialog'; | ||
import { NoopAnimationsModule } from '@angular/platform-browser/animations'; | ||
|
||
import { DialogBoxConfirmCancelEditComponent } from './dialog-box-confirm-cancel-edit.component'; | ||
|
||
describe('DialogBoxConfirmCancelEditComponent', () => { | ||
let component: DialogBoxConfirmCancelEditComponent; | ||
let fixture: ComponentFixture<DialogBoxConfirmCancelEditComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [ | ||
DialogBoxConfirmCancelEditComponent, | ||
DialogModule, | ||
NoopAnimationsModule, | ||
], | ||
providers: [ | ||
{ | ||
provide: MAT_DIALOG_DATA, | ||
useValue: { name: '' }, | ||
}, | ||
], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(DialogBoxConfirmCancelEditComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
25 changes: 25 additions & 0 deletions
25
...src/app/common/dialog-box-confirm-cancel-edit/dialog-box-confirm-cancel-edit.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Component, Inject } from '@angular/core'; | ||
import { MatButton, MatButtonModule } from '@angular/material/button'; | ||
import { | ||
MAT_DIALOG_DATA, | ||
MatDialogActions, | ||
MatDialogClose, | ||
MatDialogContent, | ||
MatDialogModule, | ||
MatDialogTitle, | ||
} from '@angular/material/dialog'; | ||
|
||
export interface DialogConfirmCancelData { | ||
name: string; | ||
} | ||
|
||
@Component({ | ||
selector: 'cobbler-dialog-box-confirm-cancel-edit', | ||
standalone: true, | ||
imports: [MatButtonModule, MatDialogModule], | ||
templateUrl: './dialog-box-confirm-cancel-edit.component.html', | ||
styleUrl: './dialog-box-confirm-cancel-edit.component.scss', | ||
}) | ||
export class DialogBoxConfirmCancelEditComponent { | ||
constructor(@Inject(MAT_DIALOG_DATA) public data: DialogConfirmCancelData) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Utils from './utils'; | ||
|
||
describe('Utils', () => { | ||
it('Should return the correct values', () => { | ||
const result = Utils.deduplicateDirtyValues(undefined, { | ||
redhat_management_key: '<<inherit>>', | ||
boot_loaders: ['grub', 'pxe', 'ipxe'], | ||
boot_loaders_inherited: true, | ||
}); | ||
expect(result).toBe({ | ||
redhat_management_key: '<<inherit>>', | ||
boot_loaders: true, | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.