diff options
author | 2018-06-03 13:12:12 +0300 | |
---|---|---|
committer | 2018-06-03 11:56:49 +0000 | |
commit | 548c5a220333c7cd666b861e737bff0b45461f18 (patch) | |
tree | 13c60b67291bd8bada498ad73c02a9e35afb5c9e /public/src/app/bar-icons/bar-icons.component.ts | |
parent | 193095b01daf094c78f7fafacdf1c1cc31f290fe (diff) |
Update FE project
Update FE to latest version so that fe can run on docker
Change-Id: I9c5dee756b567dbe64fac6d3d6fd89362813bdcc
Issue-ID: SDC-1359
Signed-off-by: Stone, Avi (as206k) <as206k@att.com>
Diffstat (limited to 'public/src/app/bar-icons/bar-icons.component.ts')
-rw-r--r-- | public/src/app/bar-icons/bar-icons.component.ts | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/public/src/app/bar-icons/bar-icons.component.ts b/public/src/app/bar-icons/bar-icons.component.ts index adf4b88..bf930f3 100644 --- a/public/src/app/bar-icons/bar-icons.component.ts +++ b/public/src/app/bar-icons/bar-icons.component.ts @@ -1,7 +1,7 @@ import { Component, Input, ViewChild } from '@angular/core'; -import { Store } from '../store/store'; -import { includes } from 'lodash'; import { NgForm } from '@angular/forms'; +import { includes } from 'lodash'; +import { Store } from '../store/store'; @Component({ selector: 'app-bar-icons', @@ -12,6 +12,11 @@ export class BarIconsComponent { configuration; @Input() tabName: string; @ViewChild('cdumpConfForm') cdumpConfForm: NgForm; + dropDownTypes = { + none: 1, + regularDDL: 2, + booleanDDL: 3 + }; constructor(public store: Store) {} @@ -21,19 +26,19 @@ export class BarIconsComponent { isPropertyDdl(property) { if (property.hasOwnProperty('constraints')) { - if ( - includes( - property.constraints[0].valid_values, - property.assignment.value - ) + if (includes(property.constraints[0].valid_values, property.value)) { + return this.dropDownTypes.regularDDL; + } else if ( + property.hasOwnProperty('type') && + property.type === 'boolean' ) { - return true; - } else { - return false; + if (!(property.value === 'false')) { + property.value = true; + } + return this.dropDownTypes.booleanDDL; } - } else { - return false; } + return this.dropDownTypes.none; } genrateBarTestId() { |