Skip to content

Commit 380b413

Browse files
committed
feat: cross-job ("top") dashboard
update to ink4
1 parent 1e69a26 commit 380b413

File tree

26 files changed

+1236
-449
lines changed

26 files changed

+1236
-449
lines changed

Diff for: package-lock.json

+408-406
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: plugins/plugin-codeflare-dashboard/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030
"dependencies": {
3131
"@logdna/tail-file": "^3.0.1",
3232
"chokidar": "^3.5.3",
33-
"ink": "^3.2.0",
33+
"ink": "^4.1.0",
3434
"madwizard": "^9.0.3",
35+
"pretty-bytes": "^6.1.0",
3536
"pretty-ms": "^8.0.0",
3637
"strip-ansi": "^7.0.1"
3738
}

Diff for: plugins/plugin-codeflare-dashboard/src/components/Dashboard/Timeline.tsx renamed to plugins/plugin-codeflare-dashboard/src/components/Job/Timeline.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ type Props = {
2828

2929
export default class Timeline extends React.PureComponent<Props> {
3030
/** Text to use for one cell's worth of time */
31-
private readonly block = {
32-
historic: "■",
33-
latest: "▏",
34-
}
31+
private readonly block = "■"
3532

3633
/** This will help us compute whether we are about to overflow terminal width. */
3734
private get maxLabelLength() {
@@ -64,7 +61,7 @@ export default class Timeline extends React.PureComponent<Props> {
6461

6562
return (
6663
<Text {...style} key={timeIdx}>
67-
{this.block.historic}
64+
{this.block}
6865
</Text>
6966
)
7067
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright 2023 The Kubernetes Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import type { Resource } from "./types.js"
18+
19+
const defaultValueFor: Record<Resource, number> = {
20+
cpu: 50, // 50m
21+
mem: 64 * 1024 * 1024,
22+
gpu: 0,
23+
}
24+
25+
export default defaultValueFor

0 commit comments

Comments
 (0)