X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2FrecordViewer%2FrecordNavigator.jsx;h=95107ca9864cebcca9588b75e02cd2765d7e5094;hb=4942bd7d5bb83c05b66c0876d2e020041b4c1b63;hp=d7a86d492a198340a67d20f8867f55b1c11e59b9;hpb=e29efc315df33d546237e270470916e26df391d6;p=osm%2FUI.git diff --git a/skyquake/plugins/launchpad/src/recordViewer/recordNavigator.jsx b/skyquake/plugins/launchpad/src/recordViewer/recordNavigator.jsx index d7a86d492..95107ca98 100644 --- a/skyquake/plugins/launchpad/src/recordViewer/recordNavigator.jsx +++ b/skyquake/plugins/launchpad/src/recordViewer/recordNavigator.jsx @@ -20,13 +20,29 @@ import React from 'react'; import RecordViewActions from './recordViewActions.js'; import LoadingIndicator from 'widgets/loading-indicator/loadingIndicator.jsx'; import DashboardCard from 'widgets/dashboard_card/dashboard_card.jsx'; +import Utils from 'utils/utils.js'; + import './recordNavigator.scss'; -import nsdImg from 'style/img/catalog-default.svg'; export default class RecordNavigator extends React.Component{ constructor(props) { super(props) } + handleImageError = (e) => { + console.log('Bad logo path, using default'); + e.target.src = require('style/img/catalog-default.svg'); + } + + getDescriptorTypeFromRecordType = (recordType) => { + if (recordType == 'nsr') { + return 'nsd'; + } else if (recordType == 'vnfr') { + return 'vnfd'; + } + + return null; + } + render(){ let navClass = 'catalogItems'; @@ -53,7 +69,10 @@ export default class RecordNavigator extends React.Component{ } navObj.push(