</cd-table>
</ng-container>
<router-outlet name="modal"></router-outlet>
+
+
+<ng-template #runningTpl
+ let-value="value">
+ <span ngbTooltip="Service instances running out of the total number of services requested.">
+ {{ value.running }} / {{ value.size }}
+ </span>
+ <i *ngIf="value.running == 0 || value.size == 0"
+ class="icon-warning-color"
+ [ngClass]="[icons.warning]">
+ </i>
+</ng-template>
-import { Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core';
+import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
export class ServicesComponent extends ListWithDetails implements OnChanges, OnInit {
@ViewChild(TableComponent, { static: true })
table: TableComponent;
+ @ViewChild('runningTpl', { static: true })
+ public runningTpl: TemplateRef<any>;
@Input() hostname: string;
services: Array<CephServiceSpec> = [];
isLoadingServices = false;
selection: CdTableSelection = new CdTableSelection();
+ icons = Icons;
constructor(
private actionLabels: ActionLabelsI18n,
},
{
name: $localize`Running`,
- prop: 'status.running',
- flexGrow: 1
- },
- {
- name: $localize`Size`,
- prop: 'status.size',
- flexGrow: 1
+ prop: 'status',
+ flexGrow: 1,
+ cellTemplate: this.runningTpl
},
{
name: $localize`Last Refreshed`,