Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
fix(firewall): check if vm exists with a name for private sg (#1092)
Browse files Browse the repository at this point in the history
PR Close #989
  • Loading branch information
tamazlykar authored Jun 6, 2018
1 parent 7db7f4f commit 205aff2
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import {
EventEmitter,
OnChanges,
SimpleChanges
} from '@angular/core';
import { getType, SecurityGroup } from '../sg.model';
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
import { MatMenuTrigger } from '@angular/material';

import { getType, SecurityGroup } from '../sg.model';
import { VirtualMachine } from '../../vm';
import { Dictionary } from '@ngrx/entity/src/models';
import { SecurityGroupViewMode } from '../sg-view-mode';
import { NgrxEntities } from '../../shared/interfaces';

export class SecurityGroupListItemComponent implements OnChanges {
public item: SecurityGroup;
public searchQuery: () => string;
public onClick = new EventEmitter();
public matMenuTrigger: MatMenuTrigger;
public isSelected: (securityGroup) => boolean;
public vmList: Dictionary<VirtualMachine>;
public vmList: NgrxEntities<VirtualMachine>;

public query: string;

public get sgVmName() {
return this.vmList[this.item.virtualMachineIds[0]].name;
const vmId = this.item.virtualMachineIds[0];
const vm = this.vmList[vmId];

return vm ? vm.name : '';
}

public ngOnChanges(changes: SimpleChanges): void {
Expand Down

0 comments on commit 205aff2

Please sign in to comment.