All files / src/app/ceph/rgw/rgw-user-swift-key-modal rgw-user-swift-key-modal.component.ts

87.5% Statements 14/16
75% Branches 9/12
66.67% Functions 2/3
85.71% Lines 12/14

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 363x   3x 3x   3x             3x             1x 1x 1x   1x 1x           3x       3x  
import { Component } from '@angular/core';
 
import { I18n } from '@ngx-translate/i18n-polyfill';
import { BsModalRef } from 'ngx-bootstrap/modal';
 
import { ActionLabelsI18n } from '../../../shared/constants/app.constants';
 
@Component({
  selector: 'cd-rgw-user-swift-key-modal',
  template: require('./rgw-user-swift-key-modal.component.html'),
  styles: []
})
export class RgwUserSwiftKeyModalComponent {
  user: string;
  secret_key: string;
  resource: string;
  action: string;
 
  constructor(
    public bsModalRef: BsModalRef,
    private i18n: I18n,
    public actionLabels: ActionLabelsI18n
  ) {
    this.resource = this.i18n('Swift Key');
    this.action = this.actionLabels.SHOW;
  }
 
  /**
   * Set the values displayed in the dialog.
   */
  setValues(user: string, secret_key: string) {
    this.user = user;
    this.secret_key = secret_key;
  }
}