File

src/app/ceph/block/mirroring/overview/overview.component.ts

Implements

OnInit OnDestroy

Metadata

selector cd-mirroring
styleUrls ./overview.component.scss
templateUrl ./overview.component.html

Index

Properties
Methods

Constructor

constructor(rbdMirroringService: RbdMirroringService)
Parameters :
Name Type Optional
rbdMirroringService RbdMirroringService No

Methods

ngOnDestroy
ngOnDestroy()
Returns : void
ngOnInit
ngOnInit()
Returns : void

Properties

status
Type : ViewCacheStatus
subs
Type : Subscription
import { Component, OnDestroy, OnInit } from '@angular/core';

import { Subscription } from 'rxjs';

import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
import { ViewCacheStatus } from '../../../../shared/enum/view-cache-status.enum';

@Component({
  selector: 'cd-mirroring',
  templateUrl: './overview.component.html',
  styleUrls: ['./overview.component.scss']
})
export class OverviewComponent implements OnInit, OnDestroy {
  subs: Subscription;

  status: ViewCacheStatus;

  constructor(private rbdMirroringService: RbdMirroringService) {}

  ngOnInit() {
    this.subs = this.rbdMirroringService.subscribeSummary((data: any) => {
      if (!data) {
        return;
      }
      this.status = data.content_data.status;
    });
  }

  ngOnDestroy(): void {
    this.subs.unsubscribe();
  }
}
<cd-view-cache [status]="status"></cd-view-cache>

<div class="row">
  <div class="col-sm-6">
    <legend i18n>Daemons</legend>

    <cd-mirroring-daemons>
    </cd-mirroring-daemons>
  </div>

  <div class="col-sm-6">
    <legend i18n>Pools</legend>

    <cd-mirroring-pools>
    </cd-mirroring-pools>
  </div>
</div>

<div class="row">
  <div class="col-md-12">
    <legend i18n>Images</legend>
    <cd-mirroring-images>
    </cd-mirroring-images>
  </div>
</div>

./overview.component.scss

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""