aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/pipes/vm-filtering.pipe.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/pipes/vm-filtering.pipe.ts')
-rw-r--r--src/app/pipes/vm-filtering.pipe.ts25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/app/pipes/vm-filtering.pipe.ts b/src/app/pipes/vm-filtering.pipe.ts
index a036799..fdeb272 100644
--- a/src/app/pipes/vm-filtering.pipe.ts
+++ b/src/app/pipes/vm-filtering.pipe.ts
@@ -19,33 +19,20 @@ 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, 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'] == filterValue;
- });
+ transform(value: any, action: any, templateId): any {
-
- return x;
- } else if( action == 'Configure' || action == 'ConfigModify'){
+ if (action == 'ConfigScaleOut') {
let x = value.filter(obj => {
//return value
- return ( obj['vnfcType-id'] == filterValue || obj['vnfcType-id'] == undefined);
+ return obj['template-id'] == templateId;
});
-
+ console.log(x);
return x;
} else {
return value;