]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/components/alert-panel/alert-panel.component.ts
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / components / alert-panel / alert-panel.component.ts
index 5798d24df11a37671bcfa85b3935b696345d0ec8..9d72928557874ea8c766e013b47ec0d8a36b9c1d 100644 (file)
@@ -1,6 +1,6 @@
-import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-import { Icons } from '../../enum/icons.enum';
+import { Component, Input, OnInit } from '@angular/core';
+
+import { Icons } from '~/app/shared/enum/icons.enum';
 
 @Component({
   selector: 'cd-alert-panel',
@@ -12,8 +12,6 @@ export class AlertPanelComponent implements OnInit {
   title = '';
   @Input()
   bootstrapClass = '';
-  @Output()
-  backAction = new EventEmitter();
   @Input()
   type: 'warning' | 'error' | 'info' | 'success';
   @Input()
@@ -27,27 +25,25 @@ export class AlertPanelComponent implements OnInit {
 
   icons = Icons;
 
-  constructor(private i18n: I18n) {}
-
   ngOnInit() {
     switch (this.type) {
       case 'warning':
-        this.title = this.title || this.i18n('Warning');
+        this.title = this.title || $localize`Warning`;
         this.typeIcon = this.typeIcon || Icons.warning;
         this.bootstrapClass = this.bootstrapClass || 'warning';
         break;
       case 'error':
-        this.title = this.title || this.i18n('Error');
+        this.title = this.title || $localize`Error`;
         this.typeIcon = this.typeIcon || Icons.destroyCircle;
         this.bootstrapClass = this.bootstrapClass || 'danger';
         break;
       case 'info':
-        this.title = this.title || this.i18n('Information');
+        this.title = this.title || $localize`Information`;
         this.typeIcon = this.typeIcon || Icons.infoCircle;
         this.bootstrapClass = this.bootstrapClass || 'info';
         break;
       case 'success':
-        this.title = this.title || this.i18n('Success');
+        this.title = this.title || $localize`Success`;
         this.typeIcon = this.typeIcon || Icons.check;
         this.bootstrapClass = this.bootstrapClass || 'success';
         break;