VNF info in project overview 29/6229/1 v4.0.1
authorlombardof <flombardo@cnit.it>
Mon, 28 May 2018 16:34:32 +0000 (18:34 +0200)
committerlombardof <flombardo@cnit.it>
Mon, 28 May 2018 16:34:32 +0000 (18:34 +0200)
Change-Id: Ia7512d0928372a447cc0ad43a2699cabb0e1baf6
Signed-off-by: lombardof <flombardo@cnit.it>
projecthandler/osm_model.py
projecthandler/template/project/osm/osm_project_details.html

index 4776010..f3daedf 100644 (file)
@@ -142,6 +142,7 @@ class OsmProject(ProjectStateless):
         nsd = client.nsd_list()
         vnfd = client.vnfd_list()
         ns = client.ns_list()
+        vnf = client.vnf_list()
         result = {
             'owner': self.owner.__str__(),
             'name': self.name,
@@ -151,7 +152,8 @@ class OsmProject(ProjectStateless):
             'nsd': len(nsd) if nsd else 0,
             'vnfd': len(vnfd) if vnfd else 0,
             'ns': len(ns) if ns else 0,
-            'validated': self.validated
+            'vnf': len(vnf) if vnf else 0,
+            #'validated': self.validated
         }
 
         return result
index 8c5f8fc..9462902 100644 (file)
                             class="fa fa-arrow-circle-right"></i></a></div>
             </div>
 
+            <div class="col-md-6 ">
+                <div class="small-box bg-maroon">
+                    <div class="inner"><h3>{{ project_overview.vnf }}</h3>
+                        <p>VNF Instances</p></div>
+                    <div class="icon"><i class="fa fa-list"></i></div>
+                    <a href='{% url "projects:instances:list" project_id=project_id type="vnf"  %}' class="small-box-footer">Open list <i
+                            class="fa fa-arrow-circle-right"></i></a></div>
+            </div>
+
         </div>
 
     </div>