Skip to content

Commit 293aede

Browse files
authored
Fix style of several components (#69)
This commit fixes the style of several components: - Do not hide the select box for containers in the resources logs view. - Enable scrolling for the variables toolbar in the Prometheus plugin toolbar. - Fix rendering of indentations in the Jaeger compare traces view.
1 parent 0093d49 commit 293aede

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

app/src/components/resources/ResourceLogs.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const ResourceLogs: React.FunctionComponent<IResourceLogsProps> = ({
117117
<p>{data.error}</p>
118118
</Alert>
119119
) : data.logs && data.logs.length > 0 ? (
120-
<Card style={{ maxWidth: '100%', overflowX: 'scroll', padding: '16px' }}>
120+
<Card style={{ maxWidth: '100%', padding: '16px' }}>
121121
<Checkbox
122122
label="No wrap"
123123
isChecked={noWrap}
@@ -126,12 +126,16 @@ const ResourceLogs: React.FunctionComponent<IResourceLogsProps> = ({
126126
id="logs-no-wrap"
127127
name="logs-no-wrap"
128128
/>
129+
129130
<p>&nbsp;</p>
130-
{data.logs.map((line, index) => (
131-
<div key={index} className={noWrap ? 'pf-u-text-nowrap' : ''}>
132-
{line}
133-
</div>
134-
))}
131+
132+
<div style={{ overflow: noWrap ? 'auto' : 'hidden' }}>
133+
{data.logs.map((line, index) => (
134+
<div key={index} className={noWrap ? 'pf-u-text-nowrap' : 'pf-u-text-break-word'}>
135+
{line}
136+
</div>
137+
))}
138+
</div>
135139
</Card>
136140
) : (
137141
<Alert variant={AlertVariant.info} title="Usage">

app/src/plugins/jaeger/JaegerPageCompareTrace.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ const JaegerPageCompareTrace: React.FunctionComponent<IJaegerPageCompareTracePro
134134

135135
<GridItem sm={12} md={12} lg={12} xl={12} xl2={12}>
136136
<PageSection variant={PageSectionVariants.default}>
137-
<JaegerSpans name={name} trace={data.trace} />
137+
<div style={{ position: 'relative' }}>
138+
<JaegerSpans name={name} trace={data.trace} />
139+
</div>
138140
</PageSection>
139141
</GridItem>
140142
</Grid>

app/src/plugins/prometheus/PrometheusPluginToolbar.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,20 @@ const PrometheusPluginToolbar: React.FunctionComponent<IPrometheusPluginToolbarP
3535
};
3636

3737
return (
38-
<Card>
38+
<Card style={{ maxWidth: '100%', overflow: 'auto' }}>
3939
<Toolbar id="prometheus-toolbar">
4040
<ToolbarContent>
4141
<ToolbarToggleGroup style={{ width: '100%' }} toggleIcon={<FilterIcon />} breakpoint="lg">
4242
{variables ? (
4343
<ToolbarGroup>
44-
<ToolbarItem>
45-
{variables.map((variable, index) => (
46-
<ToolbarItem key={index}>
47-
<PrometheusVariable
48-
variable={variable}
49-
selectValue={(value: string): void => onSelectVariableValue(value, index)}
50-
/>
51-
</ToolbarItem>
52-
))}
53-
</ToolbarItem>
44+
{variables.map((variable, index) => (
45+
<ToolbarItem key={index}>
46+
<PrometheusVariable
47+
variable={variable}
48+
selectValue={(value: string): void => onSelectVariableValue(value, index)}
49+
/>
50+
</ToolbarItem>
51+
))}
5452
</ToolbarGroup>
5553
) : null}
5654
<ToolbarGroup style={{ width: '100%' }}>

0 commit comments

Comments
 (0)