1 import { Component, Input, OnChanges } from '@angular/core';
3 import * as _ from 'lodash';
5 import { RgwDaemonService } from '../../../shared/api/rgw-daemon.service';
6 import { CdTableSelection } from '../../../shared/models/cd-table-selection';
9 selector: 'cd-rgw-daemon-details',
10 templateUrl: './rgw-daemon-details.component.html',
11 styleUrls: ['./rgw-daemon-details.component.scss']
13 export class RgwDaemonDetailsComponent implements OnChanges {
18 selection: CdTableSelection;
20 constructor(private rgwDaemonService: RgwDaemonService) {}
23 // Get the service id of the first selected row.
24 if (this.selection.hasSelection) {
25 this.serviceId = this.selection.first().id;
30 if (_.isEmpty(this.serviceId)) {
33 this.rgwDaemonService.get(this.serviceId).subscribe((resp) => {
34 this.metadata = resp['rgw_metadata'];