import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation';
-import { AlertModule } from 'ngx-bootstrap/alert';
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { ModalModule } from 'ngx-bootstrap/modal';
import { ProgressbarModule } from 'ngx-bootstrap/progressbar';
ProgressbarModule.forRoot(),
BsDropdownModule.forRoot(),
ModalModule.forRoot(),
- AlertModule.forRoot(),
TooltipModule.forRoot(),
NgBootstrapFormValidationModule
],
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
import { ChartsModule } from 'ng2-charts';
-import { AlertModule } from 'ngx-bootstrap/alert';
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
-import { TableComponent } from '../../../shared/datatable/table/table.component';
-
import { ComponentsModule } from '../../../shared/components/components.module';
+import { TableComponent } from '../../../shared/datatable/table/table.component';
import { RbdConfigurationEntry } from '../../../shared/models/configuration';
import { PipesModule } from '../../../shared/pipes/pipes.module';
import { FormatterService } from '../../../shared/services/formatter.service';
NgxDatatableModule,
RouterTestingModule,
ComponentsModule,
- AlertModule,
BsDropdownModule.forRoot(),
ChartsModule,
PipesModule
import { RouterTestingModule } from '@angular/router/testing';
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
-import { AlertModule } from 'ngx-bootstrap/alert';
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { ModalModule } from 'ngx-bootstrap/modal';
import { TooltipModule } from 'ngx-bootstrap/tooltip';
ModalModule.forRoot(),
TooltipModule.forRoot(),
ToastrModule.forRoot(),
- AlertModule.forRoot(),
RouterTestingModule,
HttpClientTestingModule
],
import { NgbNavModule, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap';
import { TreeModule } from 'angular-tree-component';
import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation';
-import { AlertModule } from 'ngx-bootstrap/alert';
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { ModalModule } from 'ngx-bootstrap/modal';
BsDropdownModule.forRoot(),
BsDatepickerModule.forRoot(),
ModalModule.forRoot(),
- AlertModule.forRoot(),
TooltipModule.forRoot(),
MgrModulesModule,
NgbTypeaheadModule,
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation';
-import { AlertModule } from 'ngx-bootstrap/alert';
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { ModalModule } from 'ngx-bootstrap/modal';
import { TooltipModule } from 'ngx-bootstrap/tooltip';
FormsModule,
ReactiveFormsModule,
PerformanceCounterModule,
- AlertModule.forRoot(),
BsDropdownModule.forRoot(),
NgbNavModule,
TooltipModule.forRoot(),
-<alert type="{{ bootstrapClass }}">
+<ngb-alert type="{{ bootstrapClass }}"
+ [dismissible]="false">
<table>
<ng-container *ngIf="size === 'normal'; else slim">
<tr>
</tr>
</ng-template>
</table>
-</alert>
+</ngb-alert>
<ng-template #content>
<ng-content></ng-content>
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { AlertComponent, AlertConfig } from 'ngx-bootstrap/alert';
+
+import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
import { AlertPanelComponent } from './alert-panel.component';
let fixture: ComponentFixture<AlertPanelComponent>;
configureTestBed({
- declarations: [AlertPanelComponent, AlertComponent],
- providers: [AlertConfig, i18nProviders]
+ declarations: [AlertPanelComponent],
+ imports: [NgbAlertModule],
+ providers: [i18nProviders]
});
beforeEach(() => {
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
-import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';
+import { NgbAlertModule, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';
import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation';
import { ClickOutsideModule } from 'ng-click-outside';
import { ChartsModule } from 'ng2-charts';
-import { AlertModule } from 'ngx-bootstrap/alert';
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { ModalModule } from 'ngx-bootstrap/modal';
import { ProgressbarModule } from 'ngx-bootstrap/progressbar';
CommonModule,
FormsModule,
ReactiveFormsModule,
- AlertModule.forRoot(),
+ NgbAlertModule,
NgbPopoverModule,
ProgressbarModule.forRoot(),
TooltipModule.forRoot(),
import { FormsModule } from '@angular/forms';
import { RouterTestingModule } from '@angular/router/testing';
-import { AlertModule } from 'ngx-bootstrap/alert';
+import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
import { of } from 'rxjs';
import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
configureTestBed({
declarations: [GrafanaComponent, AlertPanelComponent, LoadingPanelComponent],
- imports: [AlertModule.forRoot(), HttpClientTestingModule, RouterTestingModule, FormsModule],
+ imports: [NgbAlertModule, HttpClientTestingModule, RouterTestingModule, FormsModule],
providers: [CephReleaseNamePipe, SettingsService, SummaryService, i18nProviders]
});
-<alert type="info">
+<ngb-alert type="info"
+ [dismissible]="false">
<strong>
<i [ngClass]="[icons.spinner, icons.spin]"
aria-hidden="true"
class="mr-2"></i>
</strong>
<ng-content></ng-content>
-</alert>
+</ngb-alert>
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { AlertModule } from 'ngx-bootstrap/alert';
+import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
import { configureTestBed } from '../../../../testing/unit-test-helper';
import { LoadingPanelComponent } from './loading-panel.component';
configureTestBed({
declarations: [LoadingPanelComponent],
- imports: [AlertModule.forRoot()]
+ imports: [NgbAlertModule]
});
beforeEach(() => {
-<alert class="no-margin-bottom"
- type="{{ alertType }}"
- *ngIf="expirationDays != null && expirationDays <= pwdExpirationSettings.pwdExpirationWarning1"
- [dismissible]="true"
- (onClose)="close($event)">
+<ngb-alert class="no-margin-bottom"
+ type="{{ alertType }}"
+ *ngIf="expirationDays != null && expirationDays <= pwdExpirationSettings.pwdExpirationWarning1"
+ (close)="close($event)">
<div *ngIf="expirationDays === 0"
i18n>Your password will expire in <strong>less than 1</strong> day. Click
- <a routerLink="/user-profile/edit"
- class="alert-link">here</a> to change it now.</div>
+ <a routerLink="/user-profile/edit"
+ class="alert-link">here</a> to change it now.</div>
<div *ngIf="expirationDays > 0"
i18n>Your password will expire in <strong>{{ expirationDays }}</strong> day(s). Click
<a routerLink="/user-profile/edit"
class="alert-link">here</a> to change it now.</div>
-</alert>
+</ngb-alert>
import { Routes } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
+import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
import { of as observableOf } from 'rxjs';
-import { AlertModule } from 'ngx-bootstrap/alert';
-
import { configureTestBed } from '../../../../testing/unit-test-helper';
-
import { SettingsService } from '../../api/settings.service';
import { AuthStorageService } from '../../services/auth-storage.service';
import { PwdExpirationNotificationComponent } from './pwd-expiration-notification.component';
configureTestBed({
declarations: [PwdExpirationNotificationComponent, FakeComponent],
- imports: [
- AlertModule.forRoot(),
- HttpClientTestingModule,
- RouterTestingModule.withRoutes(routes)
- ],
+ imports: [NgbAlertModule, HttpClientTestingModule, RouterTestingModule.withRoutes(routes)],
providers: [SettingsService, AuthStorageService]
});
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { AlertModule } from 'ngx-bootstrap/alert';
+import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
import { configureTestBed } from '../../../../testing/unit-test-helper';
import { AlertPanelComponent } from '../alert-panel/alert-panel.component';
configureTestBed({
declarations: [ViewCacheComponent, AlertPanelComponent],
- imports: [AlertModule.forRoot()]
+ imports: [NgbAlertModule]
});
beforeEach(() => {
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
-import { AlertModule } from 'ngx-bootstrap/alert';
+import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
import { CdForm } from '../forms/cd-form';
configureTestBed({
declarations: [TestComponent],
- imports: [AlertModule.forRoot(), SharedModule],
+ imports: [SharedModule, NgbAlertModule],
providers: [i18nProviders]
});
it('should show loading component by default', () => {
expectShown(0, 0, 1);
- const alert = fixture.debugElement.nativeElement.querySelector('cd-loading-panel alert');
+ const alert = fixture.debugElement.nativeElement.querySelector('cd-loading-panel ngb-alert');
expect(alert.textContent).toBe('Loading form data...');
});