Extend Modern UI for pnf usecase
[vid.git] / vid-webpack-master / src / app / shared / models / pnfModel.ts
index 14e6588..8f9e0d1 100644 (file)
@@ -3,6 +3,8 @@ import {
   Level1ModelProperties,
   Level1ModelResponseInterface
 } from "./nodeModel";
+import {VNFModelResponseInterface} from "./vnfModel";
+import {Utils} from "../utils/utils";
 
 
 
@@ -18,10 +20,11 @@ export class PNFModel extends Level1Model{
   roles: string[] = [];
   properties: PnfProperties;
 
-  constructor(pnfJson?: PNFModelResponseInterface) {
+  constructor(pnfJson?: PNFModelResponseInterface, flags?: { [key: string]: boolean }) {
     super(pnfJson);
     if (pnfJson && pnfJson.properties) {
       this.properties = pnfJson.properties;
+      this.max = Utils.getMaxFirstLevel(this.properties, flags);
     }
   }