]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.ts
import ceph pacific 16.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / rgw / rgw-bucket-details / rgw-bucket-details.component.ts
1 import { Component, Input, OnChanges } from '@angular/core';
2
3 import { RgwBucketService } from '~/app/shared/api/rgw-bucket.service';
4
5 @Component({
6 selector: 'cd-rgw-bucket-details',
7 templateUrl: './rgw-bucket-details.component.html',
8 styleUrls: ['./rgw-bucket-details.component.scss']
9 })
10 export class RgwBucketDetailsComponent implements OnChanges {
11 @Input()
12 selection: any;
13
14 constructor(private rgwBucketService: RgwBucketService) {}
15
16 ngOnChanges() {
17 if (this.selection) {
18 this.rgwBucketService.get(this.selection.bid).subscribe((bucket: object) => {
19 bucket['lock_retention_period_days'] = this.rgwBucketService.getLockDays(bucket);
20 this.selection = bucket;
21 });
22 }
23 }
24 }