This repository was archived by the owner on Sep 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -579,7 +579,7 @@ def monitor_training():
579579@login_required
580580@roles_accepted (roles .Role .GLOBAL_ADMIN , roles .Role .ML_DEVELOPER )
581581def admin ():
582- return flask .render_template ('admin.html' , config = config .config )
582+ return flask .render_template ('admin.html' , config = config .config , max_mins = team_info . TOTAL_TRAINING_MINUTES_PER_TEAM )
583583
584584
585585@app .route ('/refreshConfig' , methods = ['POST' ])
@@ -1507,7 +1507,7 @@ def resources():
15071507def reset_remaining_training_minutes ():
15081508 data = validate_keys (flask .request .form .to_dict (flat = True ),
15091509 ['reset_minutes' , 'date_time_string' ])
1510- reset_minutes = validate_int (data .get ('reset_minutes' ), min = 1 , max = 240 )
1510+ reset_minutes = validate_int (data .get ('reset_minutes' ), min = 1 , max = team_info . TOTAL_TRAINING_MINUTES_PER_TEAM )
15111511 action_parameters = action .create_action_parameters (
15121512 '' , action .ACTION_NAME_RESET_REMAINING_TRAINING_MINUTES )
15131513 action_parameters ['reset_minutes' ] = reset_minutes
Original file line number Diff line number Diff line change 2121 < div class ="container ">
2222 < h2 > Reset all teams' remaining_training_minutes</ h2 >
2323 < label for ="resetInput " class ="text-18 "> Reset to:</ label >
24- < input id ="resetInput " type ="number " class ="text-18 rightText " value ="240 "
25- min ="1 " max ="240 " style ="width: 7ch ">
24+ < input id ="resetInput " type ="number " class ="text-18 rightText " value ="{{max_mins}} "
25+ min ="1 " max ="{{max_mins}} " style ="width: 7ch ">
2626 < br >
2727 < button id ="resetButton " class ="btn btn-secondary "> Reset</ button >
2828 < div id ="resetResponse "> </ div >
@@ -42,7 +42,7 @@ <h2>Reset all teams' remaining_training_minutes</h2>
4242 < h2 > Increment all teams' remaining_training_minutes</ h2 >
4343 < label for ="incrementInput " class ="text-18 "> Increment by:</ label >
4444 < input id ="incrementInput " type ="number " class ="text-18 rightText " value ="60 "
45- min ="1 " max ="240 " style ="width: 7ch ">
45+ min ="1 " max ="{{max_mins}} " style ="width: 7ch ">
4646 < br >
4747 < button id ="incrementButton " class ="btn btn-secondary "> Increment</ button >
4848 < div id ="incrementResponse "> </ div >
You can’t perform that action at this time.
0 commit comments