@milabench/bujang 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api.d.ts +29 -1
- package/dist/components/LinkableCard.d.ts +27 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3813 -3006
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +8 -3
- package/dist/routes.d.ts +1 -1
- package/dist/types.d.ts +150 -0
- package/dist/views/JanitorView.d.ts +5 -0
- package/package.json +1 -1
- package/src/api.ts +70 -0
- package/src/components/LinkableCard.tsx +120 -0
- package/src/index.ts +2 -0
- package/src/paths.ts +13 -4
- package/src/routes.tsx +3 -1
- package/src/types.ts +158 -0
- package/src/views/JanitorView.tsx +690 -0
- package/src/views/JobLogs.tsx +2 -1
- package/src/views/JobSubmit.tsx +132 -11
- package/src/views/PipelineGraph.tsx +33 -3
- package/src/views/SettingsView.tsx +112 -48
package/README.md
CHANGED
|
@@ -106,5 +106,5 @@ use the provider's configuration, or `configureBujangApi({ apiBase, axios })` ou
|
|
|
106
106
|
|
|
107
107
|
`app/` is a minimal app built on the package.
|
|
108
108
|
|
|
109
|
-
- `npm run dev`: runs the app and proxies `/api` to `http://localhost:
|
|
109
|
+
- `npm run dev`: runs the app and proxies `/api` to `http://localhost:8765` (override it with `BUJANG_API`).
|
|
110
110
|
- `npm run build:app`: builds the app into `../bujang/cli/serve/static`, where the default Python server serves it.
|
package/dist/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SlurmJob, SlurmJobSubmitResponse, SlurmJobAccounting, SlurmJobDetail, SlurmClusterInfo, SlurmProfile, SlurmClusterStatus, PersitedJobInfo, SlurmJobStatusResponse, EarlySyncResponse, PipelineTemplatePayload, PipelineRunResponse, PipelineRunSummary, PipelineRunStatus, ScheduledJob, ScheduledJobRun, ScheduledJobTemplateDiff, AgentEvent, AgentSession, SettingsInfo, SettingsUpdateResponse, UpdateCheck, OrganizerGroups, SyncStatus, JobArtifacts, JobData, JobMarks, UpdateResult, SettingsSecrets, SshSettings, SshPlan, SshPlanRequest, SshTestResponse } from './types';
|
|
1
|
+
import type { SlurmJob, SlurmJobSubmitResponse, SlurmJobAccounting, SlurmJobDetail, SlurmClusterInfo, SlurmProfile, SlurmClusterStatus, PersitedJobInfo, SlurmJobStatusResponse, EarlySyncResponse, PipelineTemplatePayload, PipelineRunResponse, PipelineRunSummary, PipelineRunStatus, ScheduledJob, ScheduledJobRun, ScheduledJobTemplateDiff, AgentEvent, AgentSession, SettingsInfo, SettingsUpdateResponse, UpdateCheck, OrganizerGroups, SyncStatus, JobArtifacts, JobData, JobMarks, UpdateResult, SettingsSecrets, SshSettings, SshPlan, SshPlanRequest, SshTestResponse, JobAttachment, JanitorOverview, JanitorRun, JanitorCleanupInfo, JanitorArchiveResult, JanitorStaleResult } from './types';
|
|
2
2
|
export declare const DEFAULT_API_BASE = "/api/slurm";
|
|
3
3
|
/**
|
|
4
4
|
* What bujang needs from an axios instance. Typed structurally so the host's instance fits even
|
|
@@ -95,6 +95,8 @@ export declare const submitSlurmJob: (request: {
|
|
|
95
95
|
export?: string;
|
|
96
96
|
nodelist?: string;
|
|
97
97
|
dependency?: [string, string][];
|
|
98
|
+
/** Files for the job: <job folder>/input/<name> on the cluster before it starts ($JR_INPUT_DIR). */
|
|
99
|
+
files?: JobAttachment[];
|
|
98
100
|
}) => Promise<SlurmJobSubmitResponse>;
|
|
99
101
|
export declare const getSlurmJobCluster: (jrJobId: string) => Promise<{
|
|
100
102
|
cluster: string;
|
|
@@ -213,3 +215,29 @@ export declare const getAgentActivity: (params?: {
|
|
|
213
215
|
writes?: boolean;
|
|
214
216
|
limit?: number;
|
|
215
217
|
}) => Promise<AgentEvent[]>;
|
|
218
|
+
/** A browser File as a submission attachment (base64). */
|
|
219
|
+
export declare const fileToAttachment: (file: File, name?: string) => Promise<JobAttachment>;
|
|
220
|
+
export declare const getJanitor: () => Promise<JanitorOverview>;
|
|
221
|
+
export declare const getJanitorHistory: (params?: {
|
|
222
|
+
name?: string;
|
|
223
|
+
kind?: string;
|
|
224
|
+
cluster?: string;
|
|
225
|
+
status?: string;
|
|
226
|
+
since?: number;
|
|
227
|
+
limit?: number;
|
|
228
|
+
}) => Promise<{
|
|
229
|
+
runs: JanitorRun[];
|
|
230
|
+
}>;
|
|
231
|
+
export declare const getJanitorCleanup: () => Promise<JanitorCleanupInfo>;
|
|
232
|
+
export declare const janitorArchive: (body: {
|
|
233
|
+
organizer: string;
|
|
234
|
+
value?: string | null;
|
|
235
|
+
dry_run: boolean;
|
|
236
|
+
}) => Promise<JanitorArchiveResult>;
|
|
237
|
+
export declare const janitorRemoveStale: (body: {
|
|
238
|
+
older_than_days: number;
|
|
239
|
+
dry_run: boolean;
|
|
240
|
+
}) => Promise<JanitorStaleResult>;
|
|
241
|
+
export declare const janitorPrune: () => Promise<{
|
|
242
|
+
removed: number;
|
|
243
|
+
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Scroll to the card named by the URL hash (/settings#ssh) once the page has its content
|
|
4
|
+
* (`ready`), and again when the hash changes.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useHashScroll(ready?: boolean): void;
|
|
7
|
+
/**
|
|
8
|
+
* A card with an anchor: `id` is its URL hash (/settings#ssh). The link button next to the title
|
|
9
|
+
* goes there and copies the full link, to give someone the card itself. The card the URL names is
|
|
10
|
+
* outlined.
|
|
11
|
+
*/
|
|
12
|
+
export declare const LinkableCard: React.FC<{
|
|
13
|
+
id: string;
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
title: string;
|
|
16
|
+
subtitle?: React.ReactNode;
|
|
17
|
+
actions?: React.ReactNode;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}>;
|
|
20
|
+
/** Numbered steps of a how-to (a card that walks someone through a setup). */
|
|
21
|
+
export declare const Steps: React.FC<{
|
|
22
|
+
steps: {
|
|
23
|
+
title: React.ReactNode;
|
|
24
|
+
body?: React.ReactNode;
|
|
25
|
+
}[];
|
|
26
|
+
}>;
|
|
27
|
+
export default LinkableCard;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export type { GraphStep } from './views/PipelineGraph';
|
|
|
8
8
|
export { ScheduledJobsView } from './views/ScheduledJobsView';
|
|
9
9
|
export { AgentActivityView, AgentBadge, McpHelp } from './views/AgentActivityView';
|
|
10
10
|
export { SettingsView } from './views/SettingsView';
|
|
11
|
+
export { JanitorView } from './views/JanitorView';
|
|
12
|
+
export { LinkableCard, useHashScroll } from './components/LinkableCard';
|
|
11
13
|
export { JobSubmissionForm } from './views/JobSubmit';
|
|
12
14
|
export type { JobSubmissionInitialData } from './views/JobSubmit';
|
|
13
15
|
export { LogDisplay } from './views/LogDisplay';
|