@worca/ui 0.3.1-rc.4 → 0.4.0
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/app/main.bundle.js +356 -348
- package/app/main.bundle.js.map +3 -3
- package/app/styles.css +36 -0
- package/package.json +1 -1
- package/server/project-routes.js +11 -0
- package/server/watcher.js +8 -3
package/app/styles.css
CHANGED
|
@@ -2265,6 +2265,27 @@ sl-details.live-output-panel::part(content) {
|
|
|
2265
2265
|
font-weight: 500;
|
|
2266
2266
|
}
|
|
2267
2267
|
|
|
2268
|
+
.new-run-info {
|
|
2269
|
+
background: var(--surface-raised, #1e293b);
|
|
2270
|
+
border: 1px solid var(--border, #334155);
|
|
2271
|
+
border-radius: 8px;
|
|
2272
|
+
padding: 16px 20px;
|
|
2273
|
+
margin-bottom: 20px;
|
|
2274
|
+
font-size: 13px;
|
|
2275
|
+
color: var(--muted, #94a3b8);
|
|
2276
|
+
}
|
|
2277
|
+
.new-run-info strong {
|
|
2278
|
+
color: var(--text, #e2e8f0);
|
|
2279
|
+
display: block;
|
|
2280
|
+
margin-bottom: 6px;
|
|
2281
|
+
}
|
|
2282
|
+
.new-run-info p { margin: 0; line-height: 1.5; }
|
|
2283
|
+
|
|
2284
|
+
.new-run-form-disabled {
|
|
2285
|
+
opacity: 0.5;
|
|
2286
|
+
pointer-events: none;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2268
2289
|
.new-run-section sl-select {
|
|
2269
2290
|
width: 100%;
|
|
2270
2291
|
}
|
|
@@ -2302,6 +2323,21 @@ sl-option.template-grouped::part(suffix) {
|
|
|
2302
2323
|
padding: 0 0 4px;
|
|
2303
2324
|
}
|
|
2304
2325
|
|
|
2326
|
+
/* Fix contrast on selected/current option description */
|
|
2327
|
+
sl-option.template-grouped[aria-selected="true"]::part(suffix),
|
|
2328
|
+
sl-option.template-grouped:focus::part(suffix) {
|
|
2329
|
+
color: inherit;
|
|
2330
|
+
opacity: 0.85;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
/* Selected template description below dropdown */
|
|
2334
|
+
.template-description {
|
|
2335
|
+
font-size: 12px;
|
|
2336
|
+
color: var(--muted);
|
|
2337
|
+
margin-top: 6px;
|
|
2338
|
+
line-height: 1.5;
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2305
2341
|
/* Plan file autocomplete */
|
|
2306
2342
|
.plan-autocomplete {
|
|
2307
2343
|
position: relative;
|
package/package.json
CHANGED
package/server/project-routes.js
CHANGED
|
@@ -473,6 +473,17 @@ export function createProjectScopedRoutes() {
|
|
|
473
473
|
|
|
474
474
|
// POST /api/projects/:projectId/runs — start a new pipeline
|
|
475
475
|
router.post('/runs', requireWorcaDir, async (req, res) => {
|
|
476
|
+
// Block parallel pipelines on the same project (GH #82)
|
|
477
|
+
const running = req.project.pm.getRunningPid();
|
|
478
|
+
if (running) {
|
|
479
|
+
return res.status(409).json({
|
|
480
|
+
ok: false,
|
|
481
|
+
error:
|
|
482
|
+
'A pipeline is already running on this project. Parallel pipelines on the same project are not yet supported.',
|
|
483
|
+
code: 'already_running',
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
|
|
476
487
|
const body = req.body || {};
|
|
477
488
|
|
|
478
489
|
let {
|
package/server/watcher.js
CHANGED
|
@@ -100,7 +100,9 @@ export function discoverRuns(worcaDir) {
|
|
|
100
100
|
const id = createRunId(data);
|
|
101
101
|
if (!seenIds.has(id)) {
|
|
102
102
|
seenIds.add(id);
|
|
103
|
-
|
|
103
|
+
const active =
|
|
104
|
+
!isTerminal(data) && data.pipeline_status === 'running';
|
|
105
|
+
runs.push({ id, active, ...data });
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
} else if (entry.isDirectory()) {
|
|
@@ -111,7 +113,9 @@ export function discoverRuns(worcaDir) {
|
|
|
111
113
|
const id = createRunId(data);
|
|
112
114
|
if (!seenIds.has(id)) {
|
|
113
115
|
seenIds.add(id);
|
|
114
|
-
|
|
116
|
+
const active =
|
|
117
|
+
!isTerminal(data) && data.pipeline_status === 'running';
|
|
118
|
+
runs.push({ id, active, ...data });
|
|
115
119
|
}
|
|
116
120
|
}
|
|
117
121
|
}
|
|
@@ -213,7 +217,8 @@ export async function discoverRunsAsync(worcaDir) {
|
|
|
213
217
|
const id = createRunId(data);
|
|
214
218
|
if (!seenIds.has(id)) {
|
|
215
219
|
seenIds.add(id);
|
|
216
|
-
|
|
220
|
+
const active = !isTerminal(data) && data.pipeline_status === 'running';
|
|
221
|
+
runs.push({ id, active, ...data });
|
|
217
222
|
}
|
|
218
223
|
}
|
|
219
224
|
} catch {
|