@@ -12,8 +12,8 @@ $(document).ready(function() {
1212 } ) ;
1313
1414 $ ( "#algorithm" ) . change ( function ( ) {
15- if ( $ ( this ) . val ( ) === ' johnson' ) {
16- $ ( "#nb_machines" ) . val ( 2 ) ;
15+ if ( $ ( this ) . val ( ) === " johnson" ) {
16+ $ ( "#nb_machines" ) . val ( 2 ) ;
1717 }
1818 } ) ;
1919
@@ -34,6 +34,8 @@ $(document).ready(function() {
3434 Plotly . newPlot ( "gantt" , JSON . parse ( data [ "graph" ] ) , { } ) ;
3535 $ ( "#sequence" ) . text ( data [ "opt_seq" ] ) ;
3636 $ ( "#opt_makespan" ) . text ( data [ "optim_makespan" ] ) ;
37+ var time_str = data [ "t_time" ] . toString ( ) + " " + data [ "tt" ] . toString ( ) ;
38+ $ ( "#time" ) . text ( time_str ) ;
3739 } ,
3840 error : function ( jQxhr , textStatus , errorThrow ) {
3941 console . log ( textStatus ) ;
@@ -42,10 +44,10 @@ $(document).ready(function() {
4244 } ) ;
4345 $ ( "#gen_random" ) . on ( "click" , function ( ) {
4446 $ . ajax ( {
45- url : ' /random' ,
46- dataType : ' text' ,
47- type : ' post' ,
48- contentType : ' application/json' ,
47+ url : " /random" ,
48+ dataType : " text" ,
49+ type : " post" ,
50+ contentType : " application/json" ,
4951 data : JSON . stringify ( {
5052 nb_machines : $ ( "#nb_machines" ) . val ( ) ,
5153 nb_jobs : $ ( "#nb_jobs" ) . val ( )
@@ -57,13 +59,10 @@ $(document).ready(function() {
5759 error : function ( jQxhr , textStatus , errorThrow ) {
5860 alert ( "AJAX ERROR" ) ;
5961 }
60- } ) ;
62+ } ) ;
6163 } ) ;
6264
63- 64- 6565 $ ( "#gantt_toggle" ) . click ( function ( ) {
6666 $ ( "#gantt" ) . fadeToggle ( ) ;
67- } )
68- 67+ } ) ;
6968} ) ;
0 commit comments