# All files / src/app/ceph/cluster/configuration/configuration-details configuration-details.component.ts

85.71% Statements 12/14
66.67% Branches 4/6
100% Functions 2/2
83.33% Lines 10/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    376x

    6x
    6x

    6x

    6x

    6x

    2x

    2x

    6x

    6x
     import { Component, Input, OnChanges } from '@angular/core';

    import { I18n } from '@ngx-translate/i18n-polyfill';
    import * as _ from 'lodash';

    import { CdTableSelection } from '../../../../shared/models/cd-table-selection';

    @Component({
      selector: 'cd-configuration-details',
      template: require('./configuration-details.component.html'),
      styles: []
    })
    export class ConfigurationDetailsComponent implements OnChanges {
      @Input()
      selection: CdTableSelection;
      selectedItem: any;
      flags = {
        runtime: this.i18n('The value can be updated at runtime.'),
        no_mon_update: this.i18n(`Daemons/clients do not pull this value from the
          monitor config database. We disallow setting this option via 'ceph config
          set ...'. This option should be configured via ceph.conf or via the
          command line.`),
        startup: this.i18n('Option takes effect only during daemon startup.'),
        cluster_create: this.i18n('Option only affects cluster creation.'),
        create: this.i18n('Option only affects daemon creation.')
      };

      constructor(private i18n: I18n) {}

      ngOnChanges() {
        if (this.selection.hasSelection) {
          this.selectedItem = this.selection.first();
          this.selectedItem.services = _.split(this.selectedItem.services, ',');
        }
      }
    }