Fix for a Warning Panel

Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
This commit is contained in:
Bogdan Nechyporenko
2023-10-03 14:36:28 +02:00
parent bf8352d08a
commit eff293b415
7 changed files with 10 additions and 17 deletions
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder': patch
---
Added a possibility to open logs view in a scaffolder execution panel automatically
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Fix for a Warning Panel. For certain error messages the content of it doesn't fit inside the div container.
-1
View File
@@ -241,7 +241,6 @@ const routes = (
path="/create"
element={
<NextScaffolderPage
logs={{ autoOpen: true }}
groups={[
{
title: 'Recommended',
@@ -69,6 +69,9 @@ export type WarningPanelClassKey =
const useStyles = makeStyles<BackstageTheme>(
theme => ({
content: {
// overflow: 'hidden',
},
panel: {
backgroundColor: ({ severity }: WarningProps) =>
getWarningBackgroundColor(
@@ -168,6 +171,7 @@ export function WarningPanel(props: WarningProps) {
>
<AccordionSummary
expandIcon={<ExpandMoreIconStyled severity={severity} />}
classes={{ content: classes.content }}
className={classes.summary}
>
<ErrorOutlineStyled severity={severity} />
-3
View File
@@ -35,9 +35,6 @@ export type NextRouterProps = {
TemplateListPageComponent?: React_2.ComponentType<TemplateListPageProps>;
TemplateWizardPageComponent?: React_2.ComponentType<TemplateWizardPageProps>;
};
logs?: {
autoOpen?: boolean;
};
groups?: TemplateGroupFilter[];
templateFilter?: (entity: TemplateEntityV1beta3) => boolean;
FormProps?: FormProps_2;
@@ -52,9 +52,6 @@ export const OngoingTask = (props: {
TemplateOutputsComponent?: React.ComponentType<{
output?: ScaffolderTaskOutput;
}>;
logs?: {
autoOpen?: boolean;
};
}) => {
// todo(blam): check that task Id actually exists, and that it's valid. otherwise redirect to something more useful.
const { taskId } = useParams();
@@ -72,7 +69,7 @@ export const OngoingTask = (props: {
[taskStream],
);
const [logsVisible, setLogVisibleState] = useState(props.logs?.autoOpen ?? false);
const [logsVisible, setLogVisibleState] = useState(false);
const [buttonBarVisible, setButtonBarVisibleState] = useState(true);
useEffect(() => {
@@ -65,9 +65,6 @@ export type NextRouterProps = {
TemplateListPageComponent?: React.ComponentType<TemplateListPageProps>;
TemplateWizardPageComponent?: React.ComponentType<TemplateWizardPageProps>;
};
logs?: {
autoOpen?: boolean;
};
groups?: TemplateGroupFilter[];
templateFilter?: (entity: TemplateEntityV1beta3) => boolean;
// todo(blam): rename this to formProps
@@ -142,7 +139,6 @@ export const Router = (props: PropsWithChildren<NextRouterProps>) => {
path={scaffolderTaskRouteRef.path}
element={
<TaskPageComponent
logs={props.logs}
TemplateOutputsComponent={TemplateOutputsComponent}
/>
}