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

Commit

Permalink
fix(vm-creation): fix selection of installation sources in vm creation (
Browse files Browse the repository at this point in the history
#1240)

PR Close #1238
  • Loading branch information
HeyRoach authored Aug 29, 2018
1 parent 96559d9 commit af511f8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';

import { BaseTemplateModel } from '../../../template/shared';
import { BaseTemplateModel, resourceType } from '../../../template/shared';
import { TemplateFilterListComponent } from '../../../template/template-filter-list/template-filter-list.component';
import { AuthService } from '../../../shared/services/auth.service';
import { OsFamily } from '../../../shared/models';
Expand Down Expand Up @@ -51,7 +51,7 @@ export class VmTemplateDialogComponent extends TemplateFilterListComponent imple
const isTemplateNotSelected = !this.selectedTemplate;
const isNoTemplatesInCurrentViewMode = !this.templates.length;
const isSelectedTemplateFromDifferentViewMode = this.selectedTemplate
&& this.selectedTemplate.resourceType.toUpperCase() !== this.viewMode.toUpperCase();
&& resourceType(this.selectedTemplate) !== this.viewMode;
return isTemplateNotSelected || isNoTemplatesInCurrentViewMode || isSelectedTemplateFromDifferentViewMode;
}
}

0 comments on commit af511f8

Please sign in to comment.