Skip to content

Commit

Permalink
Sorts api results in the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Cole authored and adriancole committed Jul 6, 2018
1 parent 35f23f3 commit de1c50d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zipkin-ui/js/component_data/dependency.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down
2 changes: 1 addition & 1 deletion zipkin-ui/js/component_data/serviceNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});
Expand Down
2 changes: 1 addition & 1 deletion zipkin-ui/js/component_data/spanNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});
Expand Down

0 comments on commit de1c50d

Please sign in to comment.