diff options
Diffstat (limited to 'src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.ts')
-rw-r--r-- | src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.ts new file mode 100644 index 000000000..f9a351367 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.ts @@ -0,0 +1,24 @@ +import { Component, Input, OnChanges } from '@angular/core'; + +import { RgwBucketService } from '~/app/shared/api/rgw-bucket.service'; + +@Component({ + selector: 'cd-rgw-bucket-details', + templateUrl: './rgw-bucket-details.component.html', + styleUrls: ['./rgw-bucket-details.component.scss'] +}) +export class RgwBucketDetailsComponent implements OnChanges { + @Input() + selection: any; + + constructor(private rgwBucketService: RgwBucketService) {} + + ngOnChanges() { + if (this.selection) { + this.rgwBucketService.get(this.selection.bid).subscribe((bucket: object) => { + bucket['lock_retention_period_days'] = this.rgwBucketService.getLockDays(bucket); + this.selection = bucket; + }); + } + } +} |