X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=csit.infra.dash%2Fapp%2Fpal%2Fnews%2Flayout.py;h=e9ff4dc334cb01d8484f7eb3699953e6c9529832;hp=cd1618d719313b3c54c362740cdbe7246563c695;hb=c6bfe865e4a62dda2c5e635df53083e909a6558b;hpb=3b57cc60251300ad79b42ec52cc2f6cc1e950165 diff --git a/csit.infra.dash/app/pal/news/layout.py b/csit.infra.dash/app/pal/news/layout.py index cd1618d719..e9ff4dc334 100644 --- a/csit.infra.dash/app/pal/news/layout.py +++ b/csit.infra.dash/app/pal/news/layout.py @@ -331,7 +331,7 @@ class Layout: ) ) ], - brand="Dashboard", + brand=C.BRAND, brand_href="/", brand_external_link=True, class_name="p-2", @@ -344,13 +344,12 @@ class Layout: :returns: Column with the control panel. :rtype: dbc.Col """ - - return dbc.Col( - id="col-controls", - children=[ - self._add_ctrl_panel(), - ], - ) + return dbc.Col([ + html.Div( + children=self._add_ctrl_panel(), + className="sticky-top" + ) + ]) def _add_plotting_col(self) -> dbc.Col: """Add column with tables. It is placed on the right side. @@ -408,58 +407,45 @@ class Layout: :returns: Control panel. :rtype: dbc.Row """ - return dbc.Row( - id="row-ctrl-panel", - class_name="g-0", - children=[ - dbc.Row( - class_name="g-0 p-2", - children=[ - dbc.Row( - class_name="g-0", - children=[ - dbc.Label( - class_name="g-0", - children=show_tooltip(self._tooltips, - "help-summary-period", "Window") - ), - dbc.Row( - dbc.ButtonGroup( - id="bg-time-period", - class_name="g-0", - children=[ - dbc.Button( - id="period-last", - children="Last Run", - className="me-1", - outline=True, - color="info" - ), - dbc.Button( - id="period-short", - children=\ - f"Last {C.NEWS_SHORT} Runs", - className="me-1", - outline=True, - active=True, - color="info" - ), - dbc.Button( - id="period-long", - children="All Runs", - className="me-1", - outline=True, - color="info" - ) - ] - ) - ) - ] - ) - ] - ) - ] - ) + return [ + dbc.Label( + class_name="g-0 p-1", + children=show_tooltip(self._tooltips, + "help-summary-period", "Window") + ), + dbc.Row( + class_name="g-0 p-1", + children=[ + dbc.ButtonGroup( + id="bg-time-period", + children=[ + dbc.Button( + id="period-last", + children="Last Run", + className="me-1", + outline=True, + color="info" + ), + dbc.Button( + id="period-short", + children=f"Last {C.NEWS_SHORT} Runs", + className="me-1", + outline=True, + active=True, + color="info" + ), + dbc.Button( + id="period-long", + children="All Runs", + className="me-1", + outline=True, + color="info" + ) + ] + ) + ] + ) + ] def callbacks(self, app): """Callbacks for the whole application.