RIFT-15032: launchpad UI - RIFT.ware DEB install - Viewport - icons for nsr (this...
[osm/UI.git] / skyquake / plugins / launchpad / src / recordViewer / recordViewStore.js
index b9fded5..b9f7499 100644 (file)
@@ -407,7 +407,9 @@ function connectionManager(type, connection) {
                 name: nsrs.name,
                 id: nsrs.id,
                 nsd_name: nsrs.nsd_name,
-                type: 'nsr'
+                type: 'nsr',
+                logo: nsrs.nsd && nsrs.nsd.logo,
+                logoId: nsrs.nsd && nsrs.nsd && nsrs.nsd.id
             });
 
             // Scaled VNFRs
@@ -424,10 +426,13 @@ function connectionManager(type, connection) {
 
                     sgInstance['vnfrs'] && sgInstance['vnfrs'].map((vnfr, vnfrIndex) => {
                         scaledVnfrs.push(vnfr);
+                        let vnfrObj = _.findWhere(nsrs.vnfrs, {id: vnfr});
                         scaledVnfNav.vnfr.push({
-                            name: _.findWhere(nsrs.vnfrs, {id: vnfr})['short-name'],
+                            name: vnfrObj['short-name'],
                             id: vnfr,
-                            type: 'vnfr'
+                            type: 'vnfr',
+                            logo: vnfrObj['vnfd'] && vnfrObj['vnfd']['logo'],
+                            logoId: vnfrObj['vnfd'] && vnfrObj['vnfd']['id']
                         });
                     });
                     nav.push(scaledVnfNav);
@@ -440,7 +445,9 @@ function connectionManager(type, connection) {
                     nav.push({
                         name: vnfr["short-name"],
                         id: vnfr.id,
-                        type: 'vnfr'
+                        type: 'vnfr',
+                        logo: vnfr['vnfd'] && vnfr['vnfd']['logo'],
+                        logoId: vnfr['vnfd'] && vnfr['vnfd']['id']
                     });
                 }
             });