NO TICKET: Fix alphabetical order of monitoring param titles
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
diff --git a/skyquake/plugins/launchpad/src/carousel/carousel-react.jsx b/skyquake/plugins/launchpad/src/carousel/carousel-react.jsx
index e3fd003..edc19f9 100644
--- a/skyquake/plugins/launchpad/src/carousel/carousel-react.jsx
+++ b/skyquake/plugins/launchpad/src/carousel/carousel-react.jsx
@@ -1,6 +1,6 @@
/*
- *
+ *
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -128,7 +128,6 @@
list.push(<div key={i} className={"component"}><h2 style={{flex: '0 1 auto', justifyContent: 'center', alignSelf: 'center', display: displayTitle, padding: '0.5rem'}}>{title}</h2><div className="componentWrapper">{this.props.component_list[i].component}</div></div>);
}
}
-
return (
<div className={list.length > 1 ? '' : 'hideButtons'}>
<Slider {...settings}>
diff --git a/skyquake/plugins/launchpad/src/monitoring_params/monitoringParamComponents.js b/skyquake/plugins/launchpad/src/monitoring_params/monitoringParamComponents.js
index 2990d18..ab12fcd 100644
--- a/skyquake/plugins/launchpad/src/monitoring_params/monitoringParamComponents.js
+++ b/skyquake/plugins/launchpad/src/monitoring_params/monitoringParamComponents.js
@@ -1,6 +1,6 @@
/*
- *
+ *
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -117,7 +117,9 @@
}
ret.push(html)
}
- return ret.sort(function(a, b){
- return (a.title > b.title) ? -1 : 1;
- });
+ return ret.sort(function(a,b) {
+ var titleA = a.title && a.title.toUpperCase();
+ var titleB = b.title && b.title.toUpperCase();
+ return (titleA < titleB) ? -1 : (titleA > titleB) ? 1 : 0;
+ });
}
diff --git a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx
index dc092bc..2b572e9 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");
@@ -207,7 +207,7 @@
let nfviMetrics = <LpCardNfviMetrics data={cardData["nfvi-metrics"]} />;
metricsAndParams.push(<div className="monitoringParams" key="mp">
- {components.sort().map(function(c, k) {
+ {components.map(function(c, k) {
return <div key={k} className="mpSlide">{c.title}{c.component}</div>
})}
</div>)
@@ -325,7 +325,7 @@
if (consoleUrlsComponent) {
let consoleUrlsTabTitle = '';
consoleUrlsTabTitle = 'VDU Console Links';
-
+
tabList.push(
<Tab key={cardData.id + '-cp'}>{consoleUrlsTabTitle}</Tab>
);