Skip to content

Commit 375da0e

Browse files
committed
feat: more dashboard tweaks, including using Patternfly4 Dark as default theme
- changes aspect ratio of charts - improve patternfly chart colors
1 parent 5f0a5f1 commit 375da0e

File tree

4 files changed

+28
-20
lines changed

4 files changed

+28
-20
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"defaultTheme": "PatternFly4 Light"
2+
"defaultTheme": "PatternFly4 Dark"
33
}

plugins/plugin-client-default/notebooks/dashboard.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ layout:
99
3:
1010
position: default
1111
maximized: true
12-
inverseColors: true
1312
---
1413

1514
--8<-- "./dashboard-summary.md"
16-
--8<-- "./dashboard-envvars.md"
17-
--8<-- "./dashboard-dependencies.md"
1815

1916
---
2017

@@ -25,6 +22,8 @@ layout:
2522
```
2623

2724
--8<-- "./dashboard-source.md"
25+
--8<-- "./dashboard-envvars.md"
26+
--8<-- "./dashboard-dependencies.md"
2827

2928
=== "Advanced"
3029
=== "Node Utilization"

plugins/plugin-codeflare/src/components/Chart.tsx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ interface Props {
5555
}
5656

5757
export default class BaseChart extends React.PureComponent<Props> {
58-
private readonly dimensions = {
59-
width: 400,
60-
height: 90,
58+
private static readonly dimensions = {
59+
width: 320,
60+
height: 160,
6161
}
6262

6363
public static readonly padding = {
6464
bottom: 25,
65-
left: 60,
66-
right: 25,
65+
left: 55,
66+
right: 45,
6767
top: 10,
6868
}
6969

@@ -84,14 +84,9 @@ export default class BaseChart extends React.PureComponent<Props> {
8484

8585
public static readonly twoAxisStyle: ChartAxisProps["style"][] = [
8686
Object.assign({}, BaseChart.axisStyle || {}, {
87-
axisLabel: Object.assign({}, (BaseChart.axisStyle || {}).axisLabel, {
88-
fill: BaseChart.colors[1],
89-
fontWeight: "bold",
90-
}),
9187
tickLabels: Object.assign({}, (BaseChart.axisStyle || {}).tickLabels, { fill: BaseChart.colors[1] }),
9288
}),
9389
Object.assign({}, BaseChart.axisStyle, {
94-
axisLabel: Object.assign({}, (BaseChart.axisStyle || {}).axisLabel, { fill: BaseChart.colors[2] }),
9590
tickLabels: Object.assign({}, (BaseChart.axisStyle || {}).tickLabels, { fill: BaseChart.colors[2] }),
9691
}),
9792
]
@@ -122,7 +117,7 @@ export default class BaseChart extends React.PureComponent<Props> {
122117

123118
private xAxis() {
124119
return (
125-
<ChartAxis scale="time" style={BaseChart.axisStyle} tickFormat={BaseChart.formatters.timestamp} tickCount={5} />
120+
<ChartAxis scale="time" style={BaseChart.axisStyle} tickFormat={BaseChart.formatters.timestamp} tickCount={2} />
126121
)
127122
}
128123

@@ -163,8 +158,8 @@ export default class BaseChart extends React.PureComponent<Props> {
163158
ariaTitle={chart.title}
164159
ariaDesc={chart.desc}
165160
padding={chart.padding || BaseChart.padding}
166-
width={this.dimensions.width}
167-
height={this.dimensions.height}
161+
width={BaseChart.dimensions.width}
162+
height={BaseChart.dimensions.height}
168163
domain={chart.domain}
169164
>
170165
{this.xAxis()}

plugins/plugin-codeflare/web/scss/components/Dashboard/_index.scss

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
@include Split(3) {
2525
@include Rows(9);
2626
@include Columns(13);
27-
grid-template-areas: "T1 T1 T1 T1 T1 T1 T2 T2 T2 T2 T2 T2 T2" "T1 T1 T1 T1 T1 T1 T2 T2 T2 T2 T2 T2 T2" "T1 T1 T1 T1 T1 T1 T2 T2 T2 T2 T2 T2 T2" "T1 T1 T1 T1 T1 T1 T2 T2 T2 T2 T2 T2 T2" "T1 T1 T1 T1 T1 T1 T2 T2 T2 T2 T2 T2 T2" "T3 T3 T3 T3 T3 T3 T2 T2 T2 T2 T2 T2 T2" "T3 T3 T3 T3 T3 T3 T2 T2 T2 T2 T2 T2 T2" "T3 T3 T3 T3 T3 T3 T2 T2 T2 T2 T2 T2 T2" "T3 T3 T3 T3 T3 T3 T2 T2 T2 T2 T2 T2 T2";
27+
grid-template-areas: "T1 T1 T1 T1 T1 T1 T2 T2 T2 T2 T2 T2 T2" "T1 T1 T1 T1 T1 T1 T2 T2 T2 T2 T2 T2 T2" "T1 T1 T1 T1 T1 T1 T2 T2 T2 T2 T2 T2 T2" "T1 T1 T1 T1 T1 T1 T2 T2 T2 T2 T2 T2 T2" "T3 T3 T3 T3 T3 T3 T2 T2 T2 T2 T2 T2 T2" "T3 T3 T3 T3 T3 T3 T2 T2 T2 T2 T2 T2 T2" "T3 T3 T3 T3 T3 T3 T2 T2 T2 T2 T2 T2 T2" "T3 T3 T3 T3 T3 T3 T2 T2 T2 T2 T2 T2 T2" "T3 T3 T3 T3 T3 T3 T2 T2 T2 T2 T2 T2 T2";
2828
}
2929
}
3030

@@ -34,11 +34,25 @@
3434
flex: 1;
3535
}
3636

37-
@include SplitContainer {
38-
grid-gap: 3px;
37+
body.kui--patternfly4[kui-theme="PatternFly4 Light"][kui-theme-style] {
38+
@include Scrollback {
39+
--color-latency-1: #009596;
40+
--color-latency-3: #c58c00;
41+
}
42+
}
43+
44+
body.kui--patternfly4[kui-theme="PatternFly4 Dark"][kui-theme-style] {
45+
@include Scrollback {
46+
--color-latency-1: #73c5c5;
47+
--color-latency-3: #f9e0a2;
48+
}
3949
}
4050

4151
@include Scrollback {
52+
.pf-c-tabs__link::after {
53+
border-color: var(--color-base06);
54+
}
55+
4256
&:not(.kui--inverted-color-context) {
4357
/* TODO MISSING SASS MIXIN in KUI CORE */
4458
@include Block {

0 commit comments

Comments
 (0)