aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/vnfs/build-artifacts/build-artifacts.component.ts
diff options
context:
space:
mode:
authorod7427 <od7427@att.com>2018-08-23 11:49:12 -0400
committerTakamune Cho <tc012c@att.com>2018-08-28 12:59:43 +0000
commitb1ce3d40b0f056a6275ab9ecb48fd0b16b9bb394 (patch)
tree6ba16bbaa02a24a8bc28612ab51c37d5f193066b /src/app/vnfs/build-artifacts/build-artifacts.component.ts
parent90018a9d2bb344fa103b123b5f9facc0d3738255 (diff)
APPC CDT to Support Multiple Templates for VNFCs
APPC CDT Should Support Multiple Templates For Configure and ConfigModify for VNFs with VNFC level templates. CDT would be used to create a single reference artifact for a VNF. For the Configure related actions (Configure and ConfigModify) vnfc-type to be shown at the top. The user would have a new link below it, to be able to add each vnfc-type. For each vnfc-type, the user would create the associated template and PD file as usual. The fix required to modify several visual elements and variables related to VNFC Types on MyVNFS page, ReferenceData page, Template page and Parameters page. Also a number of supporting services were modified. New Modal window type is now used for VNFC-related dialogs. Change-Id: Ibbbb50e2ff6f96783c0aea89a6870d7c28021ba0 Issue-ID: APPC-1010 Signed-off-by: od7427 <od7427@att.com>
Diffstat (limited to 'src/app/vnfs/build-artifacts/build-artifacts.component.ts')
-rw-r--r--src/app/vnfs/build-artifacts/build-artifacts.component.ts31
1 files changed, 24 insertions, 7 deletions
diff --git a/src/app/vnfs/build-artifacts/build-artifacts.component.ts b/src/app/vnfs/build-artifacts/build-artifacts.component.ts
index ca45e61..095c239 100644
--- a/src/app/vnfs/build-artifacts/build-artifacts.component.ts
+++ b/src/app/vnfs/build-artifacts/build-artifacts.component.ts
@@ -28,6 +28,7 @@ import * as _ from 'underscore';
import { NotificationsService } from 'angular2-notifications';
import { appConstants } from '../../../constants/app-constants';
+export const ACTIONS_REQUIRED_DROPDOWN = ['Configure', 'ConfigModify', 'ConfigScaleOut'];
@Component({ selector: 'app-build-design', templateUrl: './build-artifacts.component.html', styleUrls: ['./build-artifacts.component.css'] })
export class BuildDesignComponent implements OnInit {
@@ -69,17 +70,33 @@ export class BuildDesignComponent implements OnInit {
}
}
- public getRefData(referenceList) {
+ public getRefData( referenceList, reqObj?) {
+ console.log( "getRefData: start: referenceList.action:["+
+ referenceList.action+"]");
this.refList = referenceList;
- if (referenceList.action !== appConstants.Actions.blank && referenceList.scope['vnf-type'] !== '' && referenceList['device-protocol'] !== appConstants.DeviceProtocols.blank) {
- if (referenceList.action === appConstants.Actions.configScaleOut) {
- if (referenceList.hasOwnProperty('template-id') && referenceList['template-id'] !== undefined && referenceList['template-id'] != '')
- this.refDataRequiredFiels = true;
+ if( referenceList.action !== '' &&
+ referenceList.scope['vnf-type'] !== '' &&
+ referenceList['device-protocol'] !== '' )
+ {
+ if( ACTIONS_REQUIRED_DROPDOWN.indexOf(referenceList.action) > -1)
+ {
+ if( referenceList.action == 'ConfigScaleOut')
+ {
+ if( reqObj != undefined && reqObj.hasOwnProperty('reqField') &&
+ reqObj.reqField != ''
+ )
+ this.refDataRequiredFiels = true;
+ else
+ this.refDataRequiredFiels = false;
}
- else this.refDataRequiredFiels = true;
+ else
+ this.refDataRequiredFiels = true;
+ }
+ else
+ this.refDataRequiredFiels = true;
}
else {
- this.refDataRequiredFiels = false;
+ this.refDataRequiredFiels = false;
}
}