Skip to content

Commit 2ca946e

Browse files
committed
fix: restore codeflare db -a`
1 parent 8079ed3 commit 2ca946e

File tree

7 files changed

+37
-29
lines changed

7 files changed

+37
-29
lines changed

Diff for: package-lock.json

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

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
"@types/split2": "^3.2.1"
3131
},
3232
"dependencies": {
33-
"@guidebooks/store": "^2.3.1",
33+
"@guidebooks/store": "^2.3.2",
3434
"@logdna/tail-file": "^3.0.1",
3535
"@patternfly/react-charts": "^6.94.18",
3636
"@patternfly/react-core": "^4.276.6",
3737
"asciinema-player": "^3.0.1",
3838
"chokidar": "^3.5.3",
39-
"madwizard": "^5.2.6",
39+
"madwizard": "^5.2.7",
4040
"needle": "^3.2.0",
4141
"open": "^8.4.0",
4242
"pretty-bytes": "^6.0.0",

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const Description = (props: Props) => {
3535
const { summaryData } = props
3636

3737
return (
38-
<DescriptionList isAutoColumnWidths isFluid>
38+
<DescriptionList>
3939
{summaryData.map(({ label, value }, index) => (
4040
<DescriptionListGroup key={index}>
4141
<DescriptionListTerm>{label}</DescriptionListTerm>

Diff for: plugins/plugin-codeflare/src/controller/attach.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ export async function attach(
5656
process.env.JOB_ID = jobId
5757
}
5858

59+
const appName = "codeflare"
5960
const options: MadWizardOptions = Object.assign(
6061
{
62+
appName,
6163
profile,
6264
interactive: false,
6365
verbose: true,
64-
store: process.env.GUIDEBOOK_STORE,
6566
},
6667
opts
6768
)
@@ -74,7 +75,7 @@ export async function attach(
7475
const deployOptions = Object.assign({}, options, { name: "log-aggregator-deploy" })
7576
debug("Deploying log aggregator", deployGuidebook, deployOptions)
7677
stderr("Deploying log aggregator...\n")
77-
await guide(["codeflare", "guide", deployGuidebook], undefined, deployOptions)
78+
await guide([appName, "guide", deployGuidebook], undefined, deployOptions)
7879
debug("deploying log aggregator: done")
7980
} catch (err) {
8081
console.error("Error attaching", err)
@@ -84,7 +85,7 @@ export async function attach(
8485
debug("attaching to", jobId)
8586
stderr("Attaching to job...\n")
8687
const resp = await guide(
87-
["codeflare", "guide", startGuidebook],
88+
[appName, "guide", startGuidebook],
8889
undefined,
8990
Object.assign({}, options, { name: "log-aggregator-start", clean: false })
9091
)
@@ -111,13 +112,12 @@ export async function attach(
111112
* @return the local logdir for the run
112113
*/
113114
export default async function attachCommand(args: Arguments<Options>) {
114-
const Profiles = await import("madwizard").then((_) => _.Profiles)
115-
116115
const jobId = args.parsedOptions.a
117-
const profile = args.parsedOptions.p || (await Profiles.lastUsed())
116+
const store = args.parsedOptions.s || process.env.GUIDEBOOK_STORE
117+
const profile = args.parsedOptions.p || (await import("madwizard").then((_) => _.Profiles.lastUsed()))
118118

119119
const stderr = await args.createErrorStream()
120-
const { logdir, cleanExit } = await attach(profile, jobId, { verbose: args.parsedOptions.V }, stderr)
120+
const { logdir, cleanExit } = await attach(profile, jobId, { store, verbose: args.parsedOptions.V }, stderr)
121121

122122
if (logdir) {
123123
if (cleanExit) {

Diff for: plugins/plugin-codeflare/src/controller/dashboard.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ export type DashboardOptions = FollowOptions & {
3131

3232
p: string
3333
profile: string
34+
35+
s: string
36+
store: string
3437
}
3538

3639
export const followFlags: CommandOptions["flags"] = {
3740
boolean: ["f", "follow", "i", "y", "V"],
38-
alias: { follow: ["f"], attach: ["a"], profile: ["p"] },
41+
alias: { follow: ["f"], attach: ["a"], profile: ["p"], store: ["s"] },
3942
}
4043

4144
async function dashboardcli(args: Arguments<DashboardOptions>) {

Diff for: plugins/plugin-codeflare/src/controller/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function registerCodeflareCommands(registrar: Registrar) {
4545
registrar.listen<KResponse, AttachOptions>(
4646
"/codeflare/attach",
4747
(args) => import("./attach").then((_) => _.default(args)),
48-
{ flags: { boolean: ["wait"] } }
48+
{ flags: Object.assign({}, flags, { boolean: ["wait"].concat(flags.boolean) }) }
4949
)
5050

5151
registrar.listen("/codeflare/version", (args) =>

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

+5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@
1717
@import "@kui-shell/plugin-client-common/web/scss/components/Terminal/mixins";
1818

1919
@include Scrollback {
20+
.pf-c-content dl {
21+
grid-template: unset;
22+
grid-template-columns: 1fr;
23+
}
2024
dd {
2125
margin: 0;
26+
grid-column: unset;
2227
}
2328
.pf-c-description-list__description {
2429
font-weight: 300;

0 commit comments

Comments
 (0)