@milabench/bujang 0.1.3 → 0.1.5
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/dist/api.d.ts +24 -1
- package/dist/context.d.ts +1 -12
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3364 -2835
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +45 -1
- package/dist/views/JobDataOverview.d.ts +9 -0
- package/dist/views/JobMarks.d.ts +17 -0
- package/package.json +5 -2
- package/src/api.ts +59 -0
- package/src/context.tsx +1 -15
- package/src/index.ts +2 -1
- package/src/types.ts +43 -1
- package/src/views/JobDataOverview.tsx +594 -0
- package/src/views/JobLogs.tsx +47 -162
- package/src/views/JobMarks.tsx +233 -0
- package/src/views/JobsView.tsx +36 -35
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, 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 } 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
|
|
@@ -110,6 +110,14 @@ export declare const getSlurmJobScript: (jrJobId: string) => Promise<{
|
|
|
110
110
|
error?: string;
|
|
111
111
|
}>;
|
|
112
112
|
export declare const rerunSlurmJob: (jrJobId: string) => Promise<SlurmJobSubmitResponse>;
|
|
113
|
+
/** Whether a job is important, its groups, every group known, and whether it can be committed. */
|
|
114
|
+
export declare const getJobMarks: (jrJobId: string) => Promise<JobMarks>;
|
|
115
|
+
/** Mark a job important, set its groups (existing or new names); a field left out is kept. */
|
|
116
|
+
export declare const setJobMarks: (jrJobId: string, marks: {
|
|
117
|
+
important?: boolean;
|
|
118
|
+
groups?: string[];
|
|
119
|
+
}) => Promise<JobMarks>;
|
|
120
|
+
/** Commit the job folder to the git repository of the local cache (only when there is one). */
|
|
113
121
|
export declare const saveSlurmJob: (jrJobId: string, message: string) => Promise<{
|
|
114
122
|
success?: boolean;
|
|
115
123
|
error?: string;
|
|
@@ -135,6 +143,21 @@ export declare const updateSettings: (values: Partial<Record<"local_cache" | "wo
|
|
|
135
143
|
export declare const getJobArtifacts: (jrJobId: string) => Promise<JobArtifacts>;
|
|
136
144
|
/** URL of an artifact, to open in a tab: its relative links (images, scripts) resolve next to it. */
|
|
137
145
|
export declare const jobArtifactUrl: (jrJobId: string, path: string) => string;
|
|
146
|
+
/** The JSONL files of the artifact folders of a job, with their events and fields (cached server side). */
|
|
147
|
+
export declare const getJobData: (jrJobId: string) => Promise<JobData>;
|
|
148
|
+
/** Query of GET /jobs/<jr>/data/rows: comma separated files (or globs), events, dotted fields. */
|
|
149
|
+
export interface JobDataRowsQuery {
|
|
150
|
+
files?: string[];
|
|
151
|
+
events?: string[];
|
|
152
|
+
fields?: string[];
|
|
153
|
+
/** only the rows having these fields */
|
|
154
|
+
require?: string[];
|
|
155
|
+
limit?: number;
|
|
156
|
+
}
|
|
157
|
+
/** The rows of the JSONL files of a job (each with `_file` and `_name`), for plots. */
|
|
158
|
+
export declare const getJobDataRows: (jrJobId: string, query: JobDataRowsQuery) => Promise<Record<string, unknown>[]>;
|
|
159
|
+
/** URL of the rows of a job: a Vega-Lite / Altair data url (relative to the page when apiBase is). */
|
|
160
|
+
export declare const jobDataRowsUrl: (jrJobId: string, query: JobDataRowsQuery) => string;
|
|
138
161
|
/** When the job index was last synced with the clusters. */
|
|
139
162
|
export declare const getSyncStatus: () => Promise<SyncStatus>;
|
|
140
163
|
/** rsync the clusters with active jobs now and index what changed (can take a few seconds). */
|
package/dist/context.d.ts
CHANGED
|
@@ -2,11 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import type { BujangHttpClient } from './api';
|
|
3
3
|
import type { BujangPaths } from './paths';
|
|
4
4
|
import type { BujangToastHandler } from './toast';
|
|
5
|
-
/** Result of the optional host "push job data" action shown on the job logs page. */
|
|
6
|
-
export interface PushJobDataResult {
|
|
7
|
-
status: string;
|
|
8
|
-
[key: string]: unknown;
|
|
9
|
-
}
|
|
10
5
|
export interface BujangProviderProps {
|
|
11
6
|
/** Prefix of the bujang HTTP routes. Default "/api/slurm". */
|
|
12
7
|
apiBase?: string;
|
|
@@ -24,11 +19,6 @@ export interface BujangProviderProps {
|
|
|
24
19
|
titleSuffix?: string;
|
|
25
20
|
/** Force the Monaco editor theme. Default follows the `dark` class / data-theme on <html>. */
|
|
26
21
|
colorMode?: 'light' | 'dark';
|
|
27
|
-
/**
|
|
28
|
-
* Optional host action rendered as a "Push Data" button on the job logs page
|
|
29
|
-
* (e.g. to push job results to a database).
|
|
30
|
-
*/
|
|
31
|
-
pushJobData?: (jrJobId: string) => Promise<PushJobDataResult>;
|
|
32
22
|
/**
|
|
33
23
|
* URL of the MCP endpoint shown on the Agent Activity page (e.g. when the host serves it on
|
|
34
24
|
* its own port). Default: what the server reports, else `<origin>/mcp` when it mounts it.
|
|
@@ -42,9 +32,8 @@ export interface BujangContextValue {
|
|
|
42
32
|
usePageTitle?: (title: string) => void;
|
|
43
33
|
titleSuffix: string;
|
|
44
34
|
colorMode?: 'light' | 'dark';
|
|
45
|
-
pushJobData?: (jrJobId: string) => Promise<PushJobDataResult>;
|
|
46
35
|
mcpUrl?: string;
|
|
47
36
|
}
|
|
48
|
-
export declare function BujangProvider({ apiBase, axios, basePath, paths, toast, usePageTitle, titleSuffix, colorMode,
|
|
37
|
+
export declare function BujangProvider({ apiBase, axios, basePath, paths, toast, usePageTitle, titleSuffix, colorMode, mcpUrl, children, }: BujangProviderProps): React.ReactElement;
|
|
49
38
|
export declare function useBujang(): BujangContextValue;
|
|
50
39
|
export declare function useBujangPaths(): BujangPaths;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,8 +12,9 @@ export { JobSubmissionForm } from './views/JobSubmit';
|
|
|
12
12
|
export type { JobSubmissionInitialData } from './views/JobSubmit';
|
|
13
13
|
export { LogDisplay } from './views/LogDisplay';
|
|
14
14
|
export { JobArtifactsCard } from './views/JobArtifacts';
|
|
15
|
+
export { JobImportantButton, JobGroupsButton, JobImportantStar } from './views/JobMarks';
|
|
15
16
|
export { BujangProvider, useBujang, useBujangPaths } from './context';
|
|
16
|
-
export type { BujangProviderProps, BujangContextValue
|
|
17
|
+
export type { BujangProviderProps, BujangContextValue } from './context';
|
|
17
18
|
export { createBujangPaths, defaultRoutePatterns, normalizeBasePath, bujangNavItems } from './paths';
|
|
18
19
|
export type { BujangPaths, BujangView, BujangNavItem } from './paths';
|
|
19
20
|
export { bujangRoutes, bujangRouteElements } from './routes';
|