File tree Expand file tree Collapse file tree 4 files changed +24
-6
lines changed
components/history/run-comparison Expand file tree Collapse file tree 4 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 6666 > </ a >
6767 < a if.bind ="!methodHistory.methodRunId && !methodHistory.methodHistoryAvailable "
6868 innerhtml.bind ="methodHistory.methodIdentifier "> </ a >
69+ < div if.bind ="!methodHistory.currentStatus "> (${methodHistory.methodIdentifier})</ div >
6970 < div
7071 if.bind ="methodHistory.changedFailureAspect && methodHistory.pastStatus === methodHistory.currentStatus "
7172 class ="st1 "
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import {bindable} from "aurelia-templating";
2424import { bindingMode } from "aurelia-binding" ;
2525import "./method-table.scss" ;
2626import { IComparableMethod } from "./run-comparison" ;
27+ import { ClassName , ClassNameValueConverter } from "../../../value-converters/class-name-value-converter" ;
2728
2829@autoinject ( )
2930export class MethodTable {
@@ -37,4 +38,18 @@ export class MethodTable {
3738
3839 constructor ( ) {
3940 }
41+
42+ methodsChanged ( ) {
43+ if ( this . methods ) {
44+ let converter = new ClassNameValueConverter ( ) ;
45+ this . methods = this . methods . sort ( ( a , b ) => {
46+ const aClass = converter . toView ( a . classIdentifier , ClassName . simpleName ) ;
47+ const bClass = converter . toView ( b . classIdentifier , ClassName . simpleName ) ;
48+ if ( aClass < bClass ) return - 1 ;
49+ if ( aClass > bClass ) return 1 ;
50+ return 0 ;
51+ } ) ;
52+ }
53+
54+ }
4055}
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ export interface IComparableMethod {
3636 methodHistoryAvailable : boolean
3737}
3838
39+ interface IRunToCompare {
40+ historyIndex : number ,
41+ startTime : number
42+ }
43+
44+
3945@autoinject ( )
4046export class RunComparison extends AbstractViewModel {
4147 private _historyStatistics : HistoryStatistics ;
@@ -147,7 +153,3 @@ export class RunComparison extends AbstractViewModel {
147153 }
148154}
149155
150- interface IRunToCompare {
151- historyIndex : number ,
152- startTime : number
153- }
Original file line number Diff line number Diff line change @@ -28,13 +28,13 @@ export class ClassNameValueConverter {
2828 switch ( mode ) {
2929 case ClassName . package :
3030 if ( value . lastIndexOf ( '.' ) > 0 ) {
31- return value . substr ( 0 , value . lastIndexOf ( '.' ) ) ;
31+ return value . substring ( 0 , value . lastIndexOf ( '.' ) ) ;
3232 } else {
3333 return '' ;
3434 }
3535 case ClassName . simpleName :
3636 if ( value . lastIndexOf ( '.' ) > 0 ) {
37- return value . substr ( value . lastIndexOf ( '.' ) + 1 ) ;
37+ return value . substring ( value . lastIndexOf ( '.' ) + 1 ) ;
3838 }
3939 case ClassName . full :
4040 return value ;
You can’t perform that action at this time.
0 commit comments