Skip to content

Commit

Permalink
(feat) remove the controller selection
Browse files Browse the repository at this point in the history
  • Loading branch information
cardosofede committed Sep 21, 2023
1 parent 8b8e838 commit 92bf3b4
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions ui_components/launch_strategy_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,13 @@ def __call__(self):
onChange=lazy(self._set_image_name),
sx={"width": "100%"})
with mui.Grid(item=True, xs=4):
with mui.FormControl(variant="standard", sx={"width": "100%"}):
mui.FormHelperText("Controller")
with mui.Select(label="Controller", defaultValue=self._controller_selected,
variant="standard", onChange=lazy(self._set_controller)):
for controller in self._controllers_available:
mui.MenuItem(controller, value=controller)
with mui.Button(onClick=self.launch_new_bot,
variant="outlined",
color="success",
sx={"width": "100%", "height": "100%"}):
mui.icon.AddCircleOutline()
mui.Typography("Create")

with mui.Grid(item=True, xs=8):
try:
encoder_decoder = ConfigEncoderDecoder(TradeType, OrderType, PositionMode)
Expand All @@ -117,7 +118,7 @@ def __call__(self):

with mui.Paper(key=self._key,
sx={"display": "flex", "flexDirection": "column", "borderRadius": 3,
"overflow": "hidden", "height": 400},
"overflow": "hidden", "height": 1000},
elevation=1):
with self.title_bar(padding="10px 15px 10px 15px", dark_switcher=False):
mui.icon.ViewCompact()
Expand All @@ -127,16 +128,10 @@ def __call__(self):
mui.DataGrid(
columns=self.DEFAULT_COLUMNS,
rows=data,
pageSize=5,
rowsPerPageOptions=[5],
pageSize=15,
rowsPerPageOptions=[15],
checkboxSelection=True,
disableSelectionOnClick=True,
onSelectionModelChange=self._handle_row_selection,
)
with mui.Grid(item=True, xs=4):
with mui.Button(onClick=self.launch_new_bot,
variant="outlined",
color="success",
sx={"width": "100%", "height": "100%"}):
mui.icon.AddCircleOutline()
mui.Typography("Create")

0 comments on commit 92bf3b4

Please sign in to comment.