diff options
author | asgar <ma926a@us.att.com> | 2019-03-08 19:52:33 +0530 |
---|---|---|
committer | Asgar Samiulla <ma926a@us.att.com> | 2019-03-15 10:53:58 +0000 |
commit | af56b68e030085aa523152e83811705636ead79c (patch) | |
tree | 088c8faafb77a79a5fcc4001877dc13af4ffe936 /src/app/shared/pipes | |
parent | eedac3e312c66499ca5ff9d72388c31b25813225 (diff) |
added ansible server functionality
multiple ansible server for CDT
Issue-ID: APPC-1510
Change-Id: I383bc63705418654efb596c617309821ebbeb9b4
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.ts | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/app/shared/pipes/vm-filtering.pipe.ts b/src/app/shared/pipes/vm-filtering.pipe.ts index c20397b..eef39cf 100644 --- a/src/app/shared/pipes/vm-filtering.pipe.ts +++ b/src/app/shared/pipes/vm-filtering.pipe.ts @@ -17,21 +17,34 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and 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; |