Skip to content

Commit c55e2b2

Browse files
committed
fix: another tweak to try to address ink loading bugs
1 parent b5d59ed commit c55e2b2

File tree

2 files changed

+3
-5
lines changed
  • plugins/plugin-codeflare-dashboard/src/controller/dashboard

2 files changed

+3
-5
lines changed

plugins/plugin-codeflare-dashboard/src/controller/dashboard/job/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ import { SupportedGrid, isSupportedGrid } from "./grids.js"
3131
import type HistoryConfig from "./history.js"
3232
import type { GridSpec } from "../../../components/Job/types.js"
3333

34+
import render from "../../../components/Job/index.js"
35+
3436
/** @return grid model for the given `kind` for `jobId` in `profile` */
3537
async function gridFor(
3638
kind: SupportedGrid,
@@ -116,8 +118,6 @@ export default async function dashboard(args: Arguments<Options>) {
116118
if (grids === null || (Array.isArray(grids) && grids.length === 0)) {
117119
throw new Error(usage("top job"))
118120
} else {
119-
const [{ default: render }] = await Promise.all([import("../../../components/Job/index.js")])
120-
121121
if (process.env.ALT !== "false" && !debug.enabled) {
122122
enterAltBufferMode()
123123
}

plugins/plugin-codeflare-dashboard/src/controller/dashboard/top/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { enterAltBufferMode } from "../term.js"
2323
import { getCurrentContext, getCurrentCluster, getCurrentNamespace, changeContext } from "../../kubernetes.js"
2424

2525
import initWatcher from "./watcher.js"
26+
import render from "../../../components/Top/index.js"
2627

2728
export async function getNamespaceFromArgsOrCurrent(args: Arguments<TopOptions>) {
2829
return /*args.parsedOptions.A ? "All Namespaces" :*/ args.parsedOptions.n || (await getCurrentNamespace())
@@ -45,9 +46,6 @@ export default async function jobsController(args: Arguments<TopOptions>) {
4546
debug("cluster", cluster)
4647
debug("namespace", ns || "using namespace from user current context")
4748

48-
debug("loading UI dependencies")
49-
const [{ default: render }] = await Promise.all([import("../../../components/Top/index.js")])
50-
5149
debug("rendering")
5250
await render({
5351
context,

0 commit comments

Comments
 (0)