From ad321ed2e73c48cd35812dfd4c64d54e84704e30 Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Fri, 7 Oct 2016 07:36:56 -0400 Subject: [PATCH] NO TICKET: Fix alphabetical order of monitoring param titles Signed-off-by: Laurence Maultsby --- .../plugins/launchpad/src/carousel/carousel-react.jsx | 3 +-- .../src/monitoring_params/monitoringParamComponents.js | 10 ++++++---- .../plugins/launchpad/src/recordViewer/recordCard.jsx | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/skyquake/plugins/launchpad/src/carousel/carousel-react.jsx b/skyquake/plugins/launchpad/src/carousel/carousel-react.jsx index e3fd00308..edc19f96c 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 @@ var SimpleSlider = React.createClass({ list.push(

{title}

{this.props.component_list[i].component}
); } } - return (
1 ? '' : 'hideButtons'}> diff --git a/skyquake/plugins/launchpad/src/monitoring_params/monitoringParamComponents.js b/skyquake/plugins/launchpad/src/monitoring_params/monitoringParamComponents.js index 2990d18a4..ab12fcde6 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 @@ export default function parseCardObj(obj_list, type) { } 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 dc092bc9d..2b572e932 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 @@ 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}
})}
) @@ -325,7 +325,7 @@ export default class RecordCard extends React.Component { if (consoleUrlsComponent) { let consoleUrlsTabTitle = ''; consoleUrlsTabTitle = 'VDU Console Links'; - + tabList.push( {consoleUrlsTabTitle} ); -- 2.25.1