summaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/common
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/client/src/app/common')
-rw-r--r--cds-ui/client/src/app/common/core/core.module.ts11
-rw-r--r--cds-ui/client/src/app/common/core/services/notification-handler.service.ts8
-rw-r--r--cds-ui/client/src/app/common/shared/shared.module.ts9
3 files changed, 19 insertions, 9 deletions
diff --git a/cds-ui/client/src/app/common/core/core.module.ts b/cds-ui/client/src/app/common/core/core.module.ts
index 807065ebc..7207178a9 100644
--- a/cds-ui/client/src/app/common/core/core.module.ts
+++ b/cds-ui/client/src/app/common/core/core.module.ts
@@ -30,6 +30,8 @@ import { appReducers } from './store/reducers/app.reducer';
import { BlueprintEffects } from './store/effects/blueprint.effects';
import { ResourcesEffects } from './store/effects/resources.effects';
import { ApiService } from './services/api.service';
+import { NotificationHandlerService } from './services/notification-handler.service';
+import { LoaderService } from './services/loader.service';
// import { BlueprintService } from './services/blueprint.service';
@NgModule({
@@ -38,10 +40,13 @@ import { ApiService } from './services/api.service';
imports: [
CommonModule,
StoreModule.forRoot(appReducers),
- EffectsModule.forRoot([BlueprintEffects,ResourcesEffects]),
- StoreRouterConnectingModule.forRoot({stateKey: 'router'}),
+ EffectsModule.forRoot([BlueprintEffects, ResourcesEffects]),
+ StoreRouterConnectingModule.forRoot({ stateKey: 'router' }),
HttpClientModule
],
- providers : [ ApiService ]
+ providers: [ApiService,
+ NotificationHandlerService,
+ LoaderService
+ ]
})
export class CoreModule { }
diff --git a/cds-ui/client/src/app/common/core/services/notification-handler.service.ts b/cds-ui/client/src/app/common/core/services/notification-handler.service.ts
index 296b71e53..b64f2fa0f 100644
--- a/cds-ui/client/src/app/common/core/services/notification-handler.service.ts
+++ b/cds-ui/client/src/app/common/core/services/notification-handler.service.ts
@@ -23,22 +23,22 @@ limitations under the License.
import { Injectable } from '@angular/core';
-// import { NotificationService } from '../../shared/components/notification/notification.service';
+import { NotificationService } from '../../shared/components/notification/notification.service';
@Injectable()
export class NotificationHandlerService {
constructor(
- // private alert: NotificationService
+ private alert: NotificationService
) { }
success(message: string) {
- // this.alert.success(message);
+ this.alert.success(message);
}
error(message: string) {
- // this.alert.error(message);
+ this.alert.error(message);
}
info(message: string) {
diff --git a/cds-ui/client/src/app/common/shared/shared.module.ts b/cds-ui/client/src/app/common/shared/shared.module.ts
index b036f5967..39e4e433f 100644
--- a/cds-ui/client/src/app/common/shared/shared.module.ts
+++ b/cds-ui/client/src/app/common/shared/shared.module.ts
@@ -30,6 +30,8 @@ import { SearchPipe } from './pipes/search.pipe';
import { SearchDialog } from './components/search-dialog/search-dialog.component';
import { AppMaterialModule } from '../modules/app-material.module';
import { SortPipe } from './pipes/sort.pipe';
+import { NotificationComponent } from './components/notification/notification.component';
+import { NotificationService } from './components/notification/notification.service';
@NgModule({
declarations: [
@@ -37,14 +39,16 @@ import { SortPipe } from './pipes/sort.pipe';
CBAWizardComponent,
SearchPipe,
SearchDialog,
- SortPipe
+ SortPipe,
+ NotificationComponent
],
exports: [
HomeComponent,
CBAWizardComponent,
SearchPipe,
SearchDialog,
- SortPipe
+ SortPipe,
+ NotificationComponent
],
imports: [
AppMaterialModule,
@@ -68,6 +72,7 @@ import { SortPipe } from './pipes/sort.pipe';
MatStepperModule,
RouterModule
],
+ providers: [NotificationService],
entryComponents: [SearchDialog]
})
export class SharedModule { } \ No newline at end of file