diff --git a/zipkin-ui/js/component_data/dependency.js b/zipkin-ui/js/component_data/dependency.js index 7491f54d0c0..7f14aef946b 100644 --- a/zipkin-ui/js/component_data/dependency.js +++ b/zipkin-ui/js/component_data/dependency.js @@ -15,7 +15,7 @@ export default component(function dependency() { type: 'GET', dataType: 'json', success: links => { - this.links = links; + this.links = links.sort((a, b) => a.parent - b.parent || a.child - b.child); this.buildServiceData(links); this.trigger('dependencyDataReceived', links); }, diff --git a/zipkin-ui/js/component_data/serviceNames.js b/zipkin-ui/js/component_data/serviceNames.js index d313da69fd4..c02767cee3a 100644 --- a/zipkin-ui/js/component_data/serviceNames.js +++ b/zipkin-ui/js/component_data/serviceNames.js @@ -8,7 +8,7 @@ export default component(function serviceNames() { type: 'GET', dataType: 'json' }).done(names => { - this.trigger('dataServiceNames', {names, lastServiceName}); + this.trigger('dataServiceNames', {names: names.sort(), lastServiceName}); }).fail(e => { this.trigger('uiServerError', getError('cannot load service names', e)); }); diff --git a/zipkin-ui/js/component_data/spanNames.js b/zipkin-ui/js/component_data/spanNames.js index 2c70b56092a..8d9e554bb10 100644 --- a/zipkin-ui/js/component_data/spanNames.js +++ b/zipkin-ui/js/component_data/spanNames.js @@ -12,7 +12,7 @@ export default component(function spanNames() { type: 'GET', dataType: 'json' }).done(spans => { - this.trigger('dataSpanNames', {spans}); + this.trigger('dataSpanNames', {spans: spans.sort()}); }).fail(e => { this.trigger('uiServerError', getError('cannot load span names', e)); });