summaryrefslogtreecommitdiffstats
path: root/src/app/shared/pipes
diff options
context:
space:
mode:
authorasgar <ma926a@us.att.com>2019-03-01 15:32:47 +0530
committerTakamune Cho <takamune.cho@att.com>2019-03-04 19:52:20 +0000
commit611c9da62c2e266f9facd97dc9f340ce311060a3 (patch)
treee471d6c851cefd46ed83380c6e41d20f54fe2666 /src/app/shared/pipes
parent9ccb0353f1c59bd7d49ff17c54e5d00c0960ea82 (diff)
multiple asible servers support
multiple asible servers support for CDT Issue-ID: APPC-1510 Change-Id: Id1b1b02274487cfbf6f108a57211a192924a6b08 Signed-off-by: Mohamed Asgar Samiulla <ma926a@us.att.com>
Diffstat (limited to 'src/app/shared/pipes')
-rw-r--r--src/app/shared/pipes/vm-filtering.pipe.ts24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/app/shared/pipes/vm-filtering.pipe.ts b/src/app/shared/pipes/vm-filtering.pipe.ts
index c20397b..a036799 100644
--- a/src/app/shared/pipes/vm-filtering.pipe.ts
+++ b/src/app/shared/pipes/vm-filtering.pipe.ts
@@ -19,19 +19,33 @@ limitations under the License.
ECOMP is a trademark and service mark of AT&T Intellectual Property.
============LICENSE_END============================================ */
-import {Pipe, PipeTransform} from '@angular/core';
+import { Pipe, PipeTransform } from '@angular/core';
-@Pipe({name: 'vmFiltering', pure: false})
+@Pipe({ name: 'vmFiltering', pure: false })
export class VmFilteringPipe implements PipeTransform {
- transform(value: any, action: any, templateId): any {
-
+ transform(value: any, action: any, templateId, newVnfc): any {
+ let filterValue
+ if(action == 'ConfigScaleOut'){
+ filterValue= templateId
+ } else if(action == 'Configure' || action == 'ConfigModify'){
+ filterValue= newVnfc
+ }
if (action == 'ConfigScaleOut') {
let x = value.filter(obj => {
//return value
- return obj['template-id'] == templateId;
+ return obj['template-id'] == filterValue;
});
+
+ return x;
+ } else if( action == 'Configure' || action == 'ConfigModify'){
+ let x = value.filter(obj => {
+ //return value
+ return ( obj['vnfcType-id'] == filterValue || obj['vnfcType-id'] == undefined);
+ });
+
+
return x;
} else {
return value;