]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: Remove unused css
authorAfreen Misbah <afreen@ibm.com>
Thu, 9 Oct 2025 12:27:21 +0000 (17:57 +0530)
committerAfreen Misbah <afreen@ibm.com>
Thu, 9 Oct 2025 13:15:14 +0000 (18:45 +0530)
Signed-off-by: Afreen Misbah <afreen@ibm.com>
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.scss
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.html

index 8dd5a48e7d78b0377d68c821cf2cd3ca5cfa6e6a..e9814713b45a2d640e5c5318258e0e9681ff20d0 100644 (file)
@@ -3,10 +3,9 @@
              let-last="last">
   <div class="notification-wrapper">
     <div class="notification-item">
-      <div class="notification-icon">
-        <cd-icon [type]="notificationIconMap[notification.type] || notificationIconMap['default']">
-        </cd-icon>
-      </div>
+      <cd-icon id="notification-icon"
+               [type]="notificationIconMap[notification.type] || notificationIconMap['default']">
+      </cd-icon>
       <div class="notification-content">
         <div class="notification-timestamp">{{ notification.timestamp | relativeDate }}</div>
         <div class="notification-title">{{ notification.title }}</div>
index 14bf38ff9db4e45c4af9febd5ce055e172ccde43..c7ddebbd465fa814b8d8288302d023f93dea011e 100644 (file)
   display: block;
 }
 
-.notification-icon {
-  flex-shrink: 0;
-  margin-top: 0;
-  width: 20px;
-  height: 20px;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-
-  svg {
-    width: 16px;
-    height: 16px;
-  }
-}
-
 .notification-empty {
   margin: 0;
   padding: $spacing-05;
index 7fb06f5ce7c94a79462f23ecac42ec44cfc1e8d5..095524df5af9d55c7f4852cb8cb923d35ce102af 100644 (file)
@@ -107,7 +107,7 @@ describe('NotificationAreaComponent', () => {
       firstNotification.query(By.css('.notification-message')).nativeElement.textContent
     ).toContain('message');
 
-    const iconElement = firstNotification.query(By.css('.notification-icon cd-icon'));
+    const iconElement = firstNotification.query(By.css('#notification-icon'));
     expect(iconElement).toBeTruthy();
   });
 
@@ -119,12 +119,12 @@ describe('NotificationAreaComponent', () => {
   });
 
   it('should render notification icons with correct types', () => {
-    const iconElements = fixture.debugElement.queryAll(By.css('.notification-icon cd-icon'));
+    const iconElements = fixture.debugElement.queryAll(By.css('#notification-icon'));
     expect(iconElements.length).toBe(2);
 
     // Check that icons have the correct type attribute
     expect(iconElements[0].attributes['ng-reflect-type']).toBe('success');
-    expect(iconElements[1].attributes['ng-reflect-type']).toBe('danger');
+    expect(iconElements[1].attributes['ng-reflect-type']).toBe('error');
   });
 
   it('should render notification dividers between items', () => {
@@ -170,8 +170,8 @@ describe('NotificationAreaComponent', () => {
 
   it('should handle notification icon mapping correctly', () => {
     expect(component.notificationIconMap[NotificationType.success]).toBe('success');
-    expect(component.notificationIconMap[NotificationType.error]).toBe('danger');
-    expect(component.notificationIconMap[NotificationType.info]).toBe('info');
+    expect(component.notificationIconMap[NotificationType.error]).toBe('error');
+    expect(component.notificationIconMap[NotificationType.info]).toBe('infoCircle');
     expect(component.notificationIconMap[NotificationType.warning]).toBe('warning');
   });
 
index f1182dd46d037e9c1cf9f5e4f0a73bfb1cde6292..2f176abf74c94330aca8bb811632a625d0f41657 100644 (file)
@@ -1,3 +1,4 @@
 <svg  [cdsIcon]="icon"
       [size]="size"
-      [class]="type+'-icon'"></svg>
+      [class]="type+'-icon'"
+      id="icon"></svg>