77from ..dialogs import TestJobsDialog
88from ..log import log
99from ..state import Attr , State
10- from ..widgets import MSelect , ShortcutButton , MInput
10+ from ..widgets import MSelect , ShortcutButton
1111
1212from textual import on
1313from textual .app import ComposeResult
@@ -246,20 +246,20 @@ def _build_widgets(self) -> Widget:
246246 ),
247247 Vertical (
248248 Label ('Account/project:' , classes = 'form-label' ),
249- MInput (id = 'account-input' ),
249+ Input (id = 'account-input' ),
250250 classes = 'bs-col-2 form-row batch-valid'
251251 ),
252252 classes = 'w-100 form-row' , id = 'batch-system-group-1'
253253 ),
254254 Horizontal (
255255 Vertical (
256256 Label ('Queue:' , classes = 'form-label' ),
257- MInput (id = 'queue-input' ),
257+ Input (id = 'queue-input' ),
258258 classes = 'bs-col-1 form-row batch-valid'
259259 ),
260260 Vertical (
261261 Label ('Multi-node queue:' , classes = 'form-label' ),
262- MInput (id = 'mqueue-input' ),
262+ Input (id = 'mqueue-input' ),
263263 classes = 'bs-col-2 form-row batch-valid'
264264 ),
265265 Checkbox ('Run [b bright_yellow]t[/b bright_yellow]est job' , value = False ,
@@ -286,11 +286,20 @@ async def validate(self) -> bool:
286286 assert isinstance (run_test_job , Checkbox )
287287 scheduler = self ._get_scheduler ()
288288
289+ self .state .update_conf ('account' , self ._get_input ('account-input' ))
290+ self .state .update_conf ('queue_name' , self ._get_input ('queue-input' ))
291+ self .state .update_conf ('multi_node_queue_name' , self ._get_input ('mqueue-input' ))
292+
289293 if run_test_job .value and scheduler != 'none' and scheduler != 'local' :
290294 return await self .run_test_jobs ()
291295 else :
292296 return True
293297
298+ def _get_input (self , id : str ) -> str :
299+ input = self .get_widget_by_id (id )
300+ assert isinstance (input , Input )
301+ return input .value
302+
294303 @property
295304 def label (self ) -> str :
296305 return 'Scheduler'
0 commit comments