X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2FnsListPanel%2FnsListPanel.jsx;h=c39139294cc7c811ac542a20c7c1c3673e5ed77c;hp=c8c8412395ad9fa78985519fba7f62be94237abf;hb=c65d33acee808925bf2a7e01c2ee17b939fbd24d;hpb=4f7855e76fe46d8678b178a341ac9e8cc9f27f8a diff --git a/skyquake/plugins/launchpad/src/nsListPanel/nsListPanel.jsx b/skyquake/plugins/launchpad/src/nsListPanel/nsListPanel.jsx index c8c841239..c39139294 100644 --- a/skyquake/plugins/launchpad/src/nsListPanel/nsListPanel.jsx +++ b/skyquake/plugins/launchpad/src/nsListPanel/nsListPanel.jsx @@ -326,10 +326,47 @@ export default class NsListPanel extends React.Component { const {nsrs, openedNsrIDs, emptyRows, isVisible, ...props} = this.props; const fieldKeys = FIELD_KEYS; let glyphValue = (isVisible) ? "chevron-left" : "chevron-right"; + + let totalNSRs = nsrs && nsrs.length; + let runningNSRs = 0; + let failedNSRs = 0; + let scalingOutNSRs = 0; + let scalingInNSRs = 0; + let initializingNSRs = 0; + + nsrs && nsrs.map((nsr) => { + nsr['operational-status'] == 'running' && runningNSRs++; + nsr['operational-status'] == 'failed' && failedNSRs++; + nsr['operational-status'] == 'scaling-out' && scalingOutNSRs++; + nsr['operational-status'] == 'scaling-in' && scalingInNSRs++; + ( + nsr['operational-status'] == 'init' || + nsr['operational-status'] == 'vl-init-phase' || + nsr['operational-status'] == 'vnf-init-phase' + ) && initializingNSRs++; + }); + + if (isVisible) { + + let title = ( +
+ NETWORK SERVICES +
+ Total: {totalNSRs} + Running: {runningNSRs} + Failed: {failedNSRs} + Scaling Out: {scalingOutNSRs} + Scaling In: {scalingInNSRs} + Initializing: {initializingNSRs} +
+
+ ); + + return ( + title={title}> {this.panelToolbar()}