X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2FrecordViewer%2FrecordCard.jsx;h=c928ffd0c2224605b6326117116678f6186d73d3;hb=refs%2Fchanges%2F58%2F558%2F1;hp=e3c3dadceea8fe93e77b25f15d506dc531fe737a;hpb=e29efc315df33d546237e270470916e26df391d6;p=osm%2FUI.git
diff --git a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx
index e3c3dadce..c928ffd0c 100644
--- a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx
+++ b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx
@@ -1,6 +1,6 @@
/*
- *
+ *
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,6 +31,8 @@ import ParseMP from '../monitoring_params/monitoringParamComponents.js';
import PlacementGroupsInfo from './placementGroupsInfo.jsx';
import JobListCard from '../launchpad_card/jobListCard.jsx';
import NSVirtualLinks from '../virtual_links/nsVirtualLinks.jsx';
+import LaunchpadFleetStore from '../launchpadFleetStore.js';
+
export default class RecordCard extends React.Component {
constructor(props) {
super(props)
@@ -40,7 +42,13 @@ export default class RecordCard extends React.Component {
// console.log('Selected tab is', index, 'last index is', last);
}
+ openConsole = (url, event) => {
+ event.preventDefault();
+ LaunchpadFleetStore.getVDUConsoleLink(url);
+ }
+
render(){
+ let self = this;
let html;
let content;
let card;
@@ -62,6 +70,8 @@ export default class RecordCard extends React.Component {
let tabList = [];
let tabPanels = [];
+ let notice = null;
+
switch(this.props.type) {
case 'vnfr' :
cardData = this.props.data[0];
@@ -80,16 +90,18 @@ export default class RecordCard extends React.Component {
{
//Sort for recent on top
- this.props.jobData.sort(function(a,b){
+ this.props.jobData
+ .sort(function(a,b){
return parseInt(b['job-id']) - parseInt(a['job-id']);
- }).map(function(job){
+ })
+ .map(function(job){
//Return only vnfr configs
if(job["triggered-by"] == 'vnf-primitive') {
return job.vnfr.map(function(v){
//That match the currently selected job id
if(v.id == cardData.id) {
return v.primitive.map(function(p, i) {
- return
+ return
})
}
})
@@ -103,22 +115,24 @@ export default class RecordCard extends React.Component {
if (cardData['vdur']) {
cardData['vdur'].map((vdur, index) => {
- let consoleLink = vdur['console-url'] ? 'Open VM Console' : 'None';
+ let consoleLink = vdur['console-url'] ? 'Obtain Token And Open VM Console' : 'None';
consoleUrlsList.push(
{vdur['name'] + '-' + vdur.id.substr(0,4)}
-
- {consoleLink}
-
+
+ {consoleLink} *
+
)
+ notice =
* If a separate browser window does not open, please check if the popup was blocked and allow it.
});
consoleUrlsComponent = (
{consoleUrlsList}
+ {notice}
);
@@ -145,16 +159,16 @@ export default class RecordCard extends React.Component {
{sortedJobs.map(function(job, i){
if(job["triggered-by"] == 'ns-primitive') {
- return
+ return
}
})
.concat(sortedJobs.map(function(job) {
if(!job.hasOwnProperty('job-name') && (job["triggered-by"] == 'ns-primitive')) {
- return job.vnfr.map(function(v){
+ return job.vnfr.map(function(v, h){
//That match the currently selected job id
if(v.id == cardData.id) {
return v.primitive.map(function(p, i) {
- return
+ return
})
}
})
@@ -195,7 +209,7 @@ export default class RecordCard extends React.Component {
let nfviMetrics =
;
metricsAndParams.push(
- {components.sort().map(function(c, k) {
+ {components.map(function(c, k) {
return
{c.title}{c.component}
})}
)
@@ -313,7 +327,7 @@ export default class RecordCard extends React.Component {
if (consoleUrlsComponent) {
let consoleUrlsTabTitle = '';
consoleUrlsTabTitle = 'VDU Console Links';
-
+
tabList.push(
{consoleUrlsTabTitle}
);