mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-08 05:29:40 +00:00
cd0da558c3
Initial version of the Control Board UI (#687)
25 lines
871 B
Python
25 lines
871 B
Python
"""Module providing the profile cycler class for the RaSCSI Control Board UI"""
|
|
from ctrlboard_menu_builder import CtrlBoardMenuBuilder
|
|
from menu.cycler import Cycler
|
|
|
|
|
|
class RascsiProfileCycler(Cycler):
|
|
"""Class implementing the profile cycler for the RaSCSI Control Baord UI"""
|
|
|
|
def populate_cycle_entries(self):
|
|
cycle_entries = self.file_cmd.list_config_files()
|
|
|
|
return cycle_entries
|
|
|
|
def perform_selected_entry_action(self, selected_entry):
|
|
result = self.file_cmd.read_config(selected_entry)
|
|
self._menu_controller.show_timed_mini_message("")
|
|
if result["status"] is True:
|
|
return CtrlBoardMenuBuilder.SCSI_ID_MENU
|
|
|
|
self._menu_controller.show_message("Failed!")
|
|
return CtrlBoardMenuBuilder.SCSI_ID_MENU
|
|
|
|
def perform_return_action(self):
|
|
return CtrlBoardMenuBuilder.SCSI_ID_MENU
|