flexGrow: 2
},
{
- name: $localize`Topic`,
- prop: 'Topic',
+ name: $localize`Destination`,
+ prop: 'Destination',
flexGrow: 1,
cellTransformation: CellTemplate.copy
},
}
goToCreateStorageClass() {
- this.router.navigate(['rgw/tiering/create']);
+ this.router.navigate(['rgw/storage-class/create']);
this.closeModal();
}
}
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;
}
}
}
goToListView() {
- this.router.navigate([`rgw/tiering`]);
+ this.router.navigate([`rgw/storage-class`]);
}
getTierTargetByStorageClass(placementTargetInfo: PlacementTarget, storageClass: string) {
</cd-help-text>
</legend>
<cd-table
+ #table
[data]="storageClassList"
columnMode="flex"
[columns]="columns"
-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';
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',
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;
name: this.actionLabels.EDIT,
permission: 'update',
icon: Icons.edit,
- routerLink: () => [`/rgw/tiering/edit/${getStorageUri()}`]
+ routerLink: () => [`/${BASE_URL}/edit/${getStorageUri()}`]
},
{
name: this.actionLabels.REMOVE,
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();
+ }
+ });
+ });
+ }
});
}
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>
{{ 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>
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>
<div class="form-item form-item-append"
cdsRow>
- <!-- Topic Name -->
+ <!-- Destination Name -->
<div cdsCol>
<cds-text-label
labelInputID="name"
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"
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',
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 {
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);
<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"
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',
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)
]
},
{
- path: 'tiering',
- data: { breadcrumbs: 'Tiering' },
+ path: 'storage-class',
+ data: { breadcrumbs: 'Storage class' },
children: [
{ path: '', component: RgwStorageClassListComponent },
{
children: [{ path: '', component: RgwConfigurationPageComponent }]
},
{
- path: 'topic',
- data: { breadcrumbs: 'Topic' },
+ path: 'destination',
+ data: { breadcrumbs: 'Notification destination' },
children: [
{ path: '', component: RgwTopicListComponent },
{
[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
'.tc_submenuitem_rgw_daemons',
'.tc_submenuitem_rgw_users',
'.tc_submenuitem_rgw_buckets',
- '.tc_submenuitem_rgw_topics'
+ '.tc_submenuitem_rgw_notification'
]
]
];
'.tc_submenuitem_rgw_daemons',
'.tc_submenuitem_rgw_users',
'.tc_submenuitem_rgw_buckets',
- '.tc_submenuitem_rgw_topics'
+ '.tc_submenuitem_rgw_notification'
]
]
];
'.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',
'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(
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}'`;
}
rgwStorageClass(metadata: any) {
- return $localize`Tiering Storage Class '${metadata.storage_class}'`;
+ return $localize`Storage Class '${metadata.storage_class}'`;
}
crudMessage(metadata: any) {