1 import { Component, Input, OnChanges } from '@angular/core';
2 import { CdTableColumn } from '~/app/shared/models/cd-table-column';
4 ALLOW_READ_THROUGH_TEXT,
6 MULTIPART_MIN_PART_TEXT,
7 MULTIPART_SYNC_THRESHOLD_TEXT,
8 RETAIN_HEAD_OBJECT_TEXT,
10 TARGET_ACCESS_KEY_TEXT,
12 TARGET_SECRET_KEY_TEXT
13 } from '../models/rgw-storage-class.model';
16 selector: 'cd-rgw-storage-class-details',
17 templateUrl: './rgw-storage-class-details.component.html',
18 styleUrls: ['./rgw-storage-class-details.component.scss']
20 export class RgwStorageClassDetailsComponent implements OnChanges {
22 selection: StorageClassDetails;
23 columns: CdTableColumn[] = [];
24 storageDetails: StorageClassDetails;
25 allowReadThroughText = ALLOW_READ_THROUGH_TEXT;
26 retainHeadObjectText = RETAIN_HEAD_OBJECT_TEXT;
27 multipartMinPartText = MULTIPART_MIN_PART_TEXT;
28 multipartSyncThreholdText = MULTIPART_SYNC_THRESHOLD_TEXT;
29 targetAccessKeyText = TARGET_ACCESS_KEY_TEXT;
30 targetSecretKeyText = TARGET_SECRET_KEY_TEXT;
31 targetPathText = TARGET_PATH_TEXT;
32 hostStyleText = HOST_STYLE;
36 this.storageDetails = {
37 access_key: this.selection.access_key,
38 secret: this.selection.secret,
39 target_path: this.selection.target_path,
40 multipart_min_part_size: this.selection.multipart_min_part_size,
41 multipart_sync_threshold: this.selection.multipart_sync_threshold,
42 host_style: this.selection.host_style,
43 retain_head_object: this.selection.retain_head_object,
44 allow_read_through: this.selection.allow_read_through