]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: Rename side-nav panel items
authorNaman Munet <naman.munet@ibm.com>
Mon, 29 Sep 2025 04:51:06 +0000 (10:21 +0530)
committerNaman Munet <naman.munet@ibm.com>
Wed, 8 Oct 2025 08:20:26 +0000 (13:50 +0530)
Fixes: https://tracker.ceph.com/issues/73252
Commit includes changes:
1) Renaming Topic to Notification destination
2) Renaming Tiering to Storage class
3) Renaming Users to User Management
4) fix storage class table refresh after delete
5) Also made changes to internal routing for topic and storage class

Signed-off-by: Naman Munet <naman.munet@ibm.com>
14 files changed:
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-notification-list/rgw-bucket-notification-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-tiering-form/rgw-bucket-tiering-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-storage-class-form/rgw-storage-class-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-storage-class-list/rgw-storage-class-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-storage-class-list/rgw-storage-class-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-details/rgw-topic-details.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-form/rgw-topic-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-form/rgw-topic-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-list/rgw-topic-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-list/rgw-topic-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw.module.ts
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-message.service.ts

index ffec0f3d3c32c29a7124afa86ef2ed342c7ae7b9..989d73b9fa53682a7473f6e680c76db7514d490a 100644 (file)
@@ -73,8 +73,8 @@ export class RgwBucketNotificationListComponent extends ListWithDetails implemen
         flexGrow: 2
       },
       {
-        name: $localize`Topic`,
-        prop: 'Topic',
+        name: $localize`Destination`,
+        prop: 'Destination',
         flexGrow: 1,
         cellTransformation: CellTemplate.copy
       },
index dde30ad0e94734c2ce2ab661c8fde102f62d950f..9fd615e3f9d610edda1e28e89dcb61e13acc4589 100644 (file)
@@ -285,7 +285,7 @@ export class RgwBucketTieringFormComponent extends CdForm implements OnInit {
   }
 
   goToCreateStorageClass() {
-    this.router.navigate(['rgw/tiering/create']);
+    this.router.navigate(['rgw/storage-class/create']);
     this.closeModal();
   }
 }
index 5288e7d3d971bcdd97fa459e6500db1cdbcdb285..85233492dc25f15a0e9dc3fbb1fdf6b7e525df8d 100644 (file)
@@ -134,8 +134,8 @@ export class RgwStorageClassFormComponent extends CdForm implements OnInit {
     private rgwZoneService: RgwZoneService
   ) {
     super();
-    this.resource = $localize`Tiering Storage Class`;
-    this.editing = this.router.url.startsWith(`/rgw/tiering/${URLVerbs.EDIT}`);
+    this.resource = $localize`Storage Class`;
+    this.editing = this.router.url.startsWith(`/rgw/storage-class/${URLVerbs.EDIT}`);
     this.action = this.editing ? this.actionLabels.EDIT : this.actionLabels.CREATE;
   }
 
@@ -619,7 +619,7 @@ export class RgwStorageClassFormComponent extends CdForm implements OnInit {
     }
   }
   goToListView() {
-    this.router.navigate([`rgw/tiering`]);
+    this.router.navigate([`rgw/storage-class`]);
   }
 
   getTierTargetByStorageClass(placementTargetInfo: PlacementTarget, storageClass: string) {
index 991c82c42967686461c1156158de6cf925679c61..57f966ffff9153e0bd04ec29059b64e32f9efa94 100644 (file)
@@ -1,4 +1,4 @@
-import { Component, NgZone, OnInit } from '@angular/core';
+import { Component, NgZone, OnInit, ViewChild } from '@angular/core';
 import { CdTableAction } from '~/app/shared/models/cd-table-action';
 import { CdTableColumn } from '~/app/shared/models/cd-table-column';
 import { CdTableSelection } from '~/app/shared/models/cd-table-selection';
@@ -23,8 +23,10 @@ import { URLBuilderService } from '~/app/shared/services/url-builder.service';
 import { Permission } from '~/app/shared/models/permissions';
 import { BucketTieringUtils } from '../utils/rgw-bucket-tiering';
 import { Router } from '@angular/router';
+import { Observable, Subscriber } from 'rxjs';
+import { TableComponent } from '~/app/shared/datatable/table/table.component';
 
-const BASE_URL = 'rgw/tiering';
+const BASE_URL = 'rgw/storage-class';
 @Component({
   selector: 'cd-rgw-storage-class-list',
   templateUrl: './rgw-storage-class-list.component.html',
@@ -32,6 +34,8 @@ const BASE_URL = 'rgw/tiering';
   providers: [{ provide: URLBuilderService, useValue: new URLBuilderService(BASE_URL) }]
 })
 export class RgwStorageClassListComponent extends ListWithDetails implements OnInit {
+  @ViewChild('table', { static: true })
+  table: TableComponent;
   columns: CdTableColumn[];
   selection = new CdTableSelection();
   permission: Permission;
@@ -108,7 +112,7 @@ export class RgwStorageClassListComponent extends ListWithDetails implements OnI
         name: this.actionLabels.EDIT,
         permission: 'update',
         icon: Icons.edit,
-        routerLink: () => [`/rgw/tiering/edit/${getStorageUri()}`]
+        routerLink: () => [`/${BASE_URL}/edit/${getStorageUri()}`]
       },
       {
         name: this.actionLabels.REMOVE,
@@ -170,17 +174,30 @@ export class RgwStorageClassListComponent extends ListWithDetails implements OnI
     const storage_class = this.selection.first().storage_class;
     const placement_target = this.selection.first().placement_target;
     this.cdsModalService.show(DeleteConfirmationModalComponent, {
-      itemDescription: $localize`Tiering Storage Class`,
+      itemDescription: $localize`Storage class`,
       itemNames: [storage_class],
       actionDescription: 'remove',
-      submitActionObservable: () =>
-        this.taskWrapper.wrapTaskAroundCall({
-          task: new FinishedTask('rgw/zonegroup/storage-class', {
-            placement_target: placement_target,
-            storage_class: storage_class
-          }),
-          call: this.rgwStorageClassService.removeStorageClass(placement_target, storage_class)
-        })
+      submitActionObservable: () => {
+        return new Observable((observer: Subscriber<any>) => {
+          this.taskWrapper
+            .wrapTaskAroundCall({
+              task: new FinishedTask('rgw/zonegroup/storage-class', {
+                placement_target: placement_target,
+                storage_class: storage_class
+              }),
+              call: this.rgwStorageClassService.removeStorageClass(placement_target, storage_class)
+            })
+            .subscribe({
+              error: (error: any) => {
+                observer.error(error);
+              },
+              complete: () => {
+                observer.complete();
+                this.table.refreshBtn();
+              }
+            });
+        });
+      }
     });
   }
 
index 9f583d3a54ad4bb9c74e25e2dc798d60dbe8d04f..4c6c3ce69fe9548bb6044bf2ec5b04566f190130 100644 (file)
                 class="bold">Push endpoint arguments</td>
             <td>{{ selection?.dest?.push_endpoint_args }}</td>
           </tr>
-          <tr>
-            <td i18n
-                class="bold w-25">Push endpoint topic</td>
-            <td class="w-75">{{ selection?.dest?.push_endpoint_topic}}</td>
-          </tr>
-          <tr>
-            <td i18n
-                class="bold w-25">Push endpoint</td>
-            <td class="w-75">{{ selection?.dest?.push_endpoint }}</td>
-          </tr>
           <tr>
             <td i18n
                 class="bold w-25">Stored secret</td>
index 07f9b2ccf913531e0348f9766b935cdd371808ff..115a408d5fa7d576b74fb11ddb52882d215733fd 100644 (file)
@@ -9,14 +9,14 @@
       {{ action | titlecase }} {{ resource | upperFirst }}
       <cd-help-text>
         <span i18n>
-            Configure the push endpoint parameters to send notifications. On successful creation, you'll receive the topic's unique Amazon Resource Name
+            Configure the push endpoint parameters to send notifications. On successful creation, you'll receive the destination's unique Amazon Resource Name
         </span>
       </cd-help-text>
     </div>
 
     <div class="form-item form-item-append"
          cdsRow>
-      <!-- Topic Type-->
+      <!-- Destination Type-->
       <div cdsCol>
         <cds-select formControlName="endpointType"
                     label="Type"
                     id="endpointType"
                     (change)="onEndpointTypeChange();"
                     [invalid]="topicForm.controls.endpointType.invalid && topicForm.controls.endpointType.dirty"
-                    [invalidText]="topicTypeError"
-                    helperText="This user will manage and configure the topic’s settings."
-                    i18n-helperText>
+                    [invalidText]="topicTypeError">
           <option i18n
                   *ngIf="endpointType === null"
                   value="null">Loading... </option>
           <option i18n
                   *ngIf="endpointType !== null"
-                  value="">-- Select a Topic type --</option>
+                  value="">-- Select a destination type --</option>
           <option *ngFor="let data of endpointType"
                   i18n>{{ data | upperFirst }} </option>
         </cds-select>
@@ -53,9 +51,7 @@
           cdRequiredField="Owner"
           [invalid]="topicForm.controls.owner.invalid && topicForm.controls.owner.dirty"
           id="owner"
-          helperText="This owner will define and control the topic’s settings"
-          [invalidText]="ownerError"
-          i18n-helperText>
+          [invalidText]="ownerError">
           <option i18n
                   *ngIf="owners === null"
                   value="null">Loading... </option>
@@ -78,7 +74,7 @@
       <div class="form-item form-item-append"
            cdsRow>
 
-        <!-- Topic Name -->
+        <!-- Destination Name -->
         <div cdsCol>
           <cds-text-label
             labelInputID="name"
@@ -86,8 +82,7 @@
             i18n-helperText
             cdRequiredField="Name"
             [invalid]="topicForm.controls.name.invalid && topicForm.controls.name.dirty"
-            [invalidText]="nameError"
-            helperText="Enter a Topic name">Name
+            [invalidText]="nameError">Name
 
           <input cdsText
                  type="text"
         <div cdsCol>
           <cds-text-label
             labelInputID="fqdn"
-            cdRequiredField="RGW Gateway Hostname"
+            cdRequiredField="Destination address"
             [invalid]="topicForm.controls.fqdn.invalid && topicForm.controls.fqdn.dirty"
             [invalidText]="fqdnError"
-            helperText="Enter the FQDN to configure the topic's settings and behavior"
+            helperText="Enter the FQDN/hostname/IP address for the push endpoint"
             i18n-helperText
             i18n>
-           RGW Gateway hostname
+           Destination address
           <input cdsText
                  type="text"
                  id="fqdn"
           <cds-number
             id="Port"
             formControlName="port"
-            cdRequiredField="Port"
+            cdRequiredField="Destination port"
             label="Port"
             i18n-label
             [min]="1"
                   cdsCol
                   class="cd-header">
             Additional common attributes
-            <cd-help-text>Configure additional attributes to customize the topic's behavior and settings</cd-help-text>
+            <cd-help-text>Configure additional attributes to customize the destination behavior and settings</cd-help-text>
           </legend>
 
           <!-- Persistent-->
             <cds-text-label labelInputID="opaque_data"
                             i18n
                             i18n-helperText
-                            helperText="A user-defined metadata added to all notifications that are triggered by the topic.">
+                            helperText="A user-defined metadata added to all notifications that are triggered by the destination.">
               Opaque data
               <input cdsText
                      type="text"
index 6d08a6beb8ee3b929f33ccfb2ed2b47dce177bbd..dc0472d2e26cecdc95f6643a183dcc9d602071a8 100644 (file)
@@ -26,7 +26,7 @@ import {
   Endpoint
 } from '~/app/shared/models/topic.model';
 
-const BASE_URL = 'rgw/topic';
+const BASE_URL = 'rgw/destination';
 @Component({
   selector: 'cd-rgw-topic-form',
   templateUrl: './rgw-topic-form.component.html',
@@ -65,9 +65,9 @@ export class RgwTopicFormComponent extends CdForm implements OnInit, AfterViewCh
     private route: ActivatedRoute
   ) {
     super();
-    this.editing = this.router.url.startsWith(`/rgw/topic/${URLVerbs.EDIT}`);
+    this.editing = this.router.url.startsWith(`/${BASE_URL}/${URLVerbs.EDIT}`);
     this.action = this.editing ? this.actionLabels.EDIT : this.actionLabels.CREATE;
-    this.resource = $localize`topic`;
+    this.resource = $localize`notification destination`;
   }
 
   ngAfterViewChecked(): void {
@@ -397,8 +397,8 @@ export class RgwTopicFormComponent extends CdForm implements OnInit, AfterViewCh
       return this.topicForm.setErrors({ cdSubmitButton: true });
     }
     const notificationTitle = this.editing
-      ? $localize`Topic updated successfully`
-      : $localize`Topic created successfully`;
+      ? $localize`Notification destination updated successfully`
+      : $localize`Notification destination created successfully`;
     const formValue = this.topicForm.getRawValue();
     const topicPolicy = this.getTopicPolicy();
     const payload = this.generatePayload(formValue, topicPolicy);
index 7b4789a09cfbfcc6fabe4ad8323bb5665d149fbe..8bb037f3f010679c699a0d8d34c0cf14f4286798 100644 (file)
@@ -1,5 +1,7 @@
   <ng-container>
   <cd-table #table
+            headerTitle="Notification destination"
+            headerDescription="Delivers bucket and object change notifications to external services like Kafka or AMQP."
             [autoReload]="false"
             [data]="topics$ | async"
             [columns]="columns"
index 1fef9f21936ef532cdd755a8b6405f0fa2611ec7..f6de3b119fa5dd44e19b7e1f4048df21552dc001 100644 (file)
@@ -22,7 +22,7 @@ import { Topic } from '~/app/shared/models/topic.model';
 import { BehaviorSubject, Observable, of, Subscriber } from 'rxjs';
 import { catchError, shareReplay, switchMap } from 'rxjs/operators';
 
-const BASE_URL = 'rgw/topic';
+const BASE_URL = 'rgw/destination';
 @Component({
   selector: 'cd-rgw-topic-list',
   templateUrl: './rgw-topic-list.component.html',
@@ -129,13 +129,13 @@ export class RgwTopicListComponent extends ListWithDetails implements OnInit {
     const key = this.selection.first().key;
     const name = this.selection.first().name;
     this.modalService.show(DeleteConfirmationModalComponent, {
-      itemDescription: $localize`Topic`,
+      itemDescription: $localize`Notification destination`,
       itemNames: [name],
       submitActionObservable: () => {
         return new Observable((observer: Subscriber<any>) => {
           this.taskWrapper
             .wrapTaskAroundCall({
-              task: new FinishedTask('rgw/topic/delete', {
+              task: new FinishedTask(`${BASE_URL}/delete`, {
                 name: [name]
               }),
               call: this.rgwTopicService.delete(key)
index 837aaa5ba6ca1f8b841edf191af36089701b7a6a..dd1f0c9d2b2b4a78306332a69541d8d848f01423 100644 (file)
@@ -389,8 +389,8 @@ const routes: Routes = [
     ]
   },
   {
-    path: 'tiering',
-    data: { breadcrumbs: 'Tiering' },
+    path: 'storage-class',
+    data: { breadcrumbs: 'Storage class' },
     children: [
       { path: '', component: RgwStorageClassListComponent },
       {
@@ -438,8 +438,8 @@ const routes: Routes = [
     children: [{ path: '', component: RgwConfigurationPageComponent }]
   },
   {
-    path: 'topic',
-    data: { breadcrumbs: 'Topic' },
+    path: 'destination',
+    data: { breadcrumbs: 'Notification destination' },
     children: [
       { path: '', component: RgwTopicListComponent },
       {
index c8256c9054c944b55884614edbfc7e68fbba3903..68c0f081c20248426a06068c8f345428d3e21835 100644 (file)
                             [useRouter]="true"
                             class="tc_submenuitem tc_submenuitem_rgw_overview"><span i18n>Overview</span></cds-sidenav-item>
           <cds-sidenav-item route="/rgw/user"
-                            title="Users"
+                            title="User management"
                             i18n-title
                             [useRouter]="true"
-                            class="tc_submenuitem tc_submenuitem_rgw_users"><span i18n>Users</span></cds-sidenav-item>
+                            class="tc_submenuitem tc_submenuitem_rgw_users"><span i18n>User management</span></cds-sidenav-item>
           <cds-sidenav-item route="/rgw/bucket"
                             title="Buckets"
                             i18n-title
                             [useRouter]="true"
                             class="tc_submenuitem tc_submenuitem_rgw_buckets"><span i18n>Buckets</span></cds-sidenav-item>
-          <cds-sidenav-item route="/rgw/topic"
+          <cds-sidenav-item route="/rgw/destination"
                             [useRouter]="true"
-                            title="Topics"
+                            title="Notification destination"
                             i18n-title
-                            class="tc_submenuitem tc_submenuitem_rgw_topics"><span i18n>Topics</span></cds-sidenav-item>
-          <cds-sidenav-item route="/rgw/tiering"
-                            title="Tiering"
+                            class="tc_submenuitem tc_submenuitem_rgw_notification"><span i18n>Notification destination</span></cds-sidenav-item>
+          <cds-sidenav-item route="/rgw/storage-class"
+                            title="Storage class"
                             i18n-title
                             [useRouter]="true"
-                            class="tc_submenuitem tc_submenuitem_rgw_tiering"><span i18n>Tiering</span></cds-sidenav-item>
+                            class="tc_submenuitem tc_submenuitem_rgw_storage_class"><span i18n>Storage class</span></cds-sidenav-item>
           <cds-sidenav-item route="/rgw/multisite"
                             title="Multi-site"
                             i18n-title
index 8979db7233fa9646f55d13d8665808181b889d1e..516fb711c9be11ac801733dde7bf26bb0b79e030 100644 (file)
@@ -139,7 +139,7 @@ describe('NavigationComponent', () => {
           '.tc_submenuitem_rgw_daemons',
           '.tc_submenuitem_rgw_users',
           '.tc_submenuitem_rgw_buckets',
-          '.tc_submenuitem_rgw_topics'
+          '.tc_submenuitem_rgw_notification'
         ]
       ]
     ];
@@ -188,7 +188,7 @@ describe('NavigationComponent', () => {
           '.tc_submenuitem_rgw_daemons',
           '.tc_submenuitem_rgw_users',
           '.tc_submenuitem_rgw_buckets',
-          '.tc_submenuitem_rgw_topics'
+          '.tc_submenuitem_rgw_notification'
         ]
       ]
     ];
@@ -248,9 +248,9 @@ describe('NavigationComponent', () => {
         '.tc_submenuitem_block_iscsi': 'iSCSI',
         '.tc_submenuitem_block_nvme': 'NVMe/TCP',
         '.tc_submenuitem_rgw_overview': 'Overview',
-        '.tc_submenuitem_rgw_users': 'Users',
+        '.tc_submenuitem_rgw_users': 'User management',
         '.tc_submenuitem_rgw_buckets': 'Buckets',
-        '.tc_submenuitem_rgw_topics': 'Topics',
+        '.tc_submenuitem_rgw_notification': 'Notification destination',
         '.tc_submenuitem_rgw_multi-site': 'Multi-site',
         '.tc_submenuitem_rgw_daemons': 'Gateways',
         '.tc_submenuitem_rgw_nfs': 'NFS',
index eeec846cfd398e2eb6b89a1a7b64fe2591092c2f..6a43e16f24d8cebae1d074d4c53e993d6b7d953c 100644 (file)
@@ -410,8 +410,8 @@ export class TaskMessageService {
     'nfs/delete': this.newTaskMessage(this.commonOperations.delete, (metadata) =>
       this.nfs(metadata)
     ),
-    'rgw/topic/delete': this.newTaskMessage(this.commonOperations.delete, (metadata) =>
-      this.topic(metadata)
+    'rgw/destination/delete': this.newTaskMessage(this.commonOperations.delete, (metadata) =>
+      this.destination(metadata)
     ),
     // Grafana tasks
     'grafana/dashboards/update': this.newTaskMessage(
@@ -624,8 +624,8 @@ export class TaskMessageService {
     return $localize`SMB users and groups access resource '${metadata.usersGroupsId}'`;
   }
 
-  topic(metadata: any) {
-    return $localize`Topic  '${metadata.name}'`;
+  destination(metadata: any) {
+    return $localize`Notification destination  '${metadata.name}'`;
   }
   notification(metadata: any) {
     return $localize`Notification  '${metadata.name}'`;
@@ -635,7 +635,7 @@ export class TaskMessageService {
   }
 
   rgwStorageClass(metadata: any) {
-    return $localize`Tiering Storage Class  '${metadata.storage_class}'`;
+    return $localize`Storage Class  '${metadata.storage_class}'`;
   }
 
   crudMessage(metadata: any) {