diff options
author | Stone, Avi (as206k) <as206k@att.com> | 2018-06-03 13:12:12 +0300 |
---|---|---|
committer | Avi Stone <as206k@att.com> | 2018-06-03 11:56:49 +0000 |
commit | 548c5a220333c7cd666b861e737bff0b45461f18 (patch) | |
tree | 13c60b67291bd8bada498ad73c02a9e35afb5c9e /public/src/app/rule-engine/version-type-select/version-type-select.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/rule-engine/version-type-select/version-type-select.component.ts')
-rw-r--r-- | public/src/app/rule-engine/version-type-select/version-type-select.component.ts | 63 |
1 files changed, 48 insertions, 15 deletions
diff --git a/public/src/app/rule-engine/version-type-select/version-type-select.component.ts b/public/src/app/rule-engine/version-type-select/version-type-select.component.ts index b4170a5..ff229cd 100644 --- a/public/src/app/rule-engine/version-type-select/version-type-select.component.ts +++ b/public/src/app/rule-engine/version-type-select/version-type-select.component.ts @@ -1,6 +1,6 @@ -import { Component, Output, EventEmitter, Input } from '@angular/core'; -import { RuleEngineApiService } from '../api/rule-engine-api.service'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Store } from '../../store/store'; +import { RuleEngineApiService } from '../api/rule-engine-api.service'; @Component({ selector: 'app-version-type-select', @@ -19,25 +19,60 @@ export class VersionTypeSelectComponent { @Input() metaData; @Output() nodesUpdated = new EventEmitter(); @Output() refrashRuleList = new EventEmitter(); - advancedSetting; + advancedSetting: Array<any>; + notifyIdCheckbox = false; constructor(private _ruleApi: RuleEngineApiService, public store: Store) { this.selectedVersion = null; this.selectedEvent = null; // set ddl with the first option value. - this.mappingTarget = this.store.configurationForm[0].name; - this.advancedSetting = this.store.configurationForm.filter(item => { - if ( - !( - item.hasOwnProperty('constraints') && - !item.assignment.value.includes('get_input') - ) - ) { - return item; + + this._ruleApi.tabIndex.subscribe(index => { + console.log('rule index:', index); + + const tabName = this.store.cdump.nodes[index].name; + console.log('tab name:', tabName); + + if (tabName.toLowerCase().includes('map')) { + this.mappingTarget = this.store.tabsProperties[index][0].name; + this.advancedSetting = this.store.tabsProperties[index].filter(item => { + if ( + !( + item.hasOwnProperty('constraints') && + !item.value.includes('get_input') + ) + ) { + return item; + } + }); + + this._ruleApi + .generateMappingRulesFileName( + this.store.ruleListExistParams.nodeName, + this.store.ruleListExistParams.nodeId, + this.store.ruleListExistParams.vfcmtUuid + ) + .subscribe(response => { + console.log('generateMappingRulesFileName response: ', response); + this.advancedSetting.forEach(element => { + if (response.includes(element.name)) { + element.isExist = true; + } else { + element.isExist = false; + } + }); + }); } }); } + changeNotifyId() { + if (!this.notifyIdCheckbox) { + this.store.notifyIdValue = ''; + } + return (this.notifyIdCheckbox = !this.notifyIdCheckbox); + } + onChangeMapping(configurationKey) { console.log('changing propertiy key:', configurationKey); this._ruleApi.setFieldName(configurationKey); @@ -78,9 +113,7 @@ export class VersionTypeSelectComponent { .subscribe(tree => { console.log('tree: ', tree); this.loader = false; - this.nodesUpdated.emit({ - nodes: tree - }); + this.nodesUpdated.emit({ nodes: tree }); }); } } |