Skip to content

Commit d02447a

Browse files
committed
fix: refinements to dashboard ui, including removal of Events pane
1 parent 973dd93 commit d02447a

File tree

5 files changed

+39
-28
lines changed

5 files changed

+39
-28
lines changed

Diff for: plugins/plugin-client-default/notebooks/dashboard.md

-14
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ layout:
1111
3:
1212
position: default
1313
maximized: true
14-
4:
15-
position: default
16-
maximized: true
1714
inverseColors: true
1815
---
1916

@@ -83,14 +80,3 @@ layout:
8380
---
8481
codeflare chart all "${LOGDIR}"
8582
```
86-
87-
---
88-
89-
=== "Events"
90-
```shell
91-
---
92-
execute: now
93-
outputOnly: true
94-
---
95-
codeflare chart events "${LOGDIR}"
96-
```

Diff for: plugins/plugin-codeflare/src/components/Chart.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ export default class BaseChart extends React.PureComponent<Props> {
366366
})
367367
}
368368

369-
private areaStyle(stroke: string, fill: string, strokeWidth = 2.5, fillOpacity = 0.1): ChartAreaProps["style"] {
369+
private areaStyle(stroke: string, fill: string, strokeWidth = 2.5, fillOpacity?: number): ChartAreaProps["style"] {
370370
return { data: { stroke, strokeWidth, fill, fillOpacity } }
371371
}
372372

@@ -375,7 +375,7 @@ export default class BaseChart extends React.PureComponent<Props> {
375375
}
376376

377377
private lineDashStyle(stroke: string): ChartLineProps["style"] {
378-
return this.lineStyle(stroke, "3,0.5", 3)
378+
return this.lineStyle(stroke, "3,0.5", 1.25)
379379
}
380380

381381
private title(chart: BaseChartProps) {

Diff for: plugins/plugin-codeflare/src/components/ComboChart.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export default class Combo extends React.PureComponent<Props, State> {
149149
private static noData(node: string, kind: "CPU Utilization" | "GPU Utilization", idx: number) {
150150
return (
151151
<div key={`nodata-${kind}-${idx}`} className="flex-layout" title={`No ${kind} for ${node}`}>
152-
<span className="flex-fill flex-layout flex-align-center">no data</span>
152+
<span className="flex-fill flex-layout flex-align-center">no {kind.replace(/ Utilization/, "")} data</span>
153153
</div>
154154
)
155155
}

Diff for: plugins/plugin-codeflare/src/components/VmstatChart.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default class VmstatChart extends React.PureComponent<Props, State> {
5757

5858
const series = [
5959
{ impl: "ChartArea" as const, stroke: BaseChart.colors[1], data: d1 },
60-
{ impl: "ChartLine" as const, stroke: BaseChart.colors[2], data: d2 },
60+
{ impl: "ChartDashedLine" as const, stroke: BaseChart.colors[2], data: d2 },
6161
]
6262

6363
const data = series.map((_, idx) => BaseChart.normalize(_, idx === 0 ? "percentage" : "memory"))

Diff for: plugins/plugin-codeflare/web/scss/components/Dashboard/_index.scss

+35-10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
@use "sass:color";
18+
@import "@kui-shell/plugin-client-common/web/scss/Themes/mixins.scss";
1719
@import "@kui-shell/plugin-client-common/web/scss/components/Card/mixins";
1820
@import "@kui-shell/plugin-client-common/web/scss/components/Editor/mixins";
1921
@import "@kui-shell/plugin-client-common/web/scss/components/Terminal/mixins";
@@ -28,6 +30,16 @@
2830
}*/
2931

3032
@include TopLevelTab {
33+
@include Split(3) {
34+
grid-template-rows: 100px 200px 1fr;
35+
grid-template-columns: repeat(13, 1fr);
36+
37+
grid-template-areas:
38+
"T1 T1 T1 T1 T2 T2 T2 T2 T2 T2 T2 T2 T2"
39+
"T1 T1 T1 T1 T2 T2 T2 T2 T2 T2 T2 T2 T2"
40+
"T3 T3 T3 T3 T2 T2 T2 T2 T2 T2 T2 T2 T2";
41+
}
42+
3143
@include Split(4) {
3244
grid-template-rows: 100px 200px 1fr;
3345
grid-template-columns: repeat(13, 1fr);
@@ -82,19 +94,32 @@
8294
}
8395
}
8496

85-
body.kui--patternfly4[kui-theme="PatternFly4 Light"][kui-theme-style] {
86-
@include Scrollback {
87-
--color-latency-0: #005f60;
88-
--color-latency-1: #009596;
89-
--color-latency-2: #c46100;
97+
@mixin LightColors {
98+
--color-latency-0: #005f60;
99+
--color-latency-1: #009596;
100+
--color-latency-2: #c46100;
101+
}
102+
103+
@mixin DarkColors {
104+
--color-latency-0: #a2d9d9;
105+
--color-latency-1: #{color.adjust(#f6d173, $alpha: -0.05, $lightness: +0.5)};
106+
--color-latency-2: #ef9234;
107+
}
108+
109+
body[kui-theme-style="light"] {
110+
@include ChartContainer {
111+
@include LightColors;
112+
}
113+
@include InvertedColors {
114+
@include ChartContainer {
115+
@include DarkColors;
116+
}
90117
}
91118
}
92119

93-
body.kui--patternfly4[kui-theme="PatternFly4 Dark"][kui-theme-style] {
94-
@include Scrollback {
95-
--color-latency-0: #73c5c5;
96-
--color-latency-1: #a2d9d9;
97-
--color-latency-2: #ef9234;
120+
body[kui-theme-style="dark"] {
121+
@include ChartContainer {
122+
@include DarkColors;
98123
}
99124
}
100125

0 commit comments

Comments
 (0)