@backstage/plugin-scaffolder 1.9.0-next.0 → 1.9.0-next.1
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/CHANGELOG.md +21 -0
- package/alpha/package.json +1 -1
- package/dist/esm/{Router-c72ed8e0.esm.js → Router-95a01240.esm.js} +801 -897
- package/dist/esm/Router-95a01240.esm.js.map +1 -0
- package/dist/esm/{index-ed1a1fba.esm.js → index-102258f6.esm.js} +518 -423
- package/dist/esm/{index-ed1a1fba.esm.js.map → index-102258f6.esm.js.map} +1 -1
- package/dist/esm/{index-36d7755a.esm.js → index-cb47594c.esm.js} +228 -273
- package/dist/esm/{index-36d7755a.esm.js.map → index-cb47594c.esm.js.map} +1 -1
- package/dist/esm/{schema-b28a29ab.esm.js → schema-4db0f1ff.esm.js} +2 -2
- package/dist/esm/{schema-b28a29ab.esm.js.map → schema-4db0f1ff.esm.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/package.json +20 -20
- package/dist/esm/Router-c72ed8e0.esm.js.map +0 -1
|
@@ -298,30 +298,40 @@ const EntityPicker = (props) => {
|
|
|
298
298
|
onChange(entityRefs[0]);
|
|
299
299
|
}
|
|
300
300
|
}, [entityRefs, onChange]);
|
|
301
|
-
return /* @__PURE__ */ React.createElement(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}, /* @__PURE__ */ React.createElement(Autocomplete, {
|
|
306
|
-
disabled: (entityRefs == null ? void 0 : entityRefs.length) === 1,
|
|
307
|
-
id: idSchema == null ? void 0 : idSchema.$id,
|
|
308
|
-
value: formData || "",
|
|
309
|
-
loading,
|
|
310
|
-
onChange: onSelect,
|
|
311
|
-
options: entityRefs || [],
|
|
312
|
-
autoSelect: true,
|
|
313
|
-
freeSolo: (_e = (_d = uiSchema["ui:options"]) == null ? void 0 : _d.allowArbitraryValues) != null ? _e : true,
|
|
314
|
-
renderInput: (params) => /* @__PURE__ */ React.createElement(TextField, {
|
|
315
|
-
...params,
|
|
316
|
-
label: title,
|
|
317
|
-
margin: "dense",
|
|
318
|
-
helperText: description,
|
|
319
|
-
FormHelperTextProps: { margin: "dense", style: { marginLeft: 0 } },
|
|
320
|
-
variant: "outlined",
|
|
301
|
+
return /* @__PURE__ */ React.createElement(
|
|
302
|
+
FormControl,
|
|
303
|
+
{
|
|
304
|
+
margin: "normal",
|
|
321
305
|
required,
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
|
|
306
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !formData
|
|
307
|
+
},
|
|
308
|
+
/* @__PURE__ */ React.createElement(
|
|
309
|
+
Autocomplete,
|
|
310
|
+
{
|
|
311
|
+
disabled: (entityRefs == null ? void 0 : entityRefs.length) === 1,
|
|
312
|
+
id: idSchema == null ? void 0 : idSchema.$id,
|
|
313
|
+
value: formData || "",
|
|
314
|
+
loading,
|
|
315
|
+
onChange: onSelect,
|
|
316
|
+
options: entityRefs || [],
|
|
317
|
+
autoSelect: true,
|
|
318
|
+
freeSolo: (_e = (_d = uiSchema["ui:options"]) == null ? void 0 : _d.allowArbitraryValues) != null ? _e : true,
|
|
319
|
+
renderInput: (params) => /* @__PURE__ */ React.createElement(
|
|
320
|
+
TextField,
|
|
321
|
+
{
|
|
322
|
+
...params,
|
|
323
|
+
label: title,
|
|
324
|
+
margin: "dense",
|
|
325
|
+
helperText: description,
|
|
326
|
+
FormHelperTextProps: { margin: "dense", style: { marginLeft: 0 } },
|
|
327
|
+
variant: "outlined",
|
|
328
|
+
required,
|
|
329
|
+
InputProps: params.InputProps
|
|
330
|
+
}
|
|
331
|
+
)
|
|
332
|
+
}
|
|
333
|
+
)
|
|
334
|
+
);
|
|
325
335
|
};
|
|
326
336
|
|
|
327
337
|
const EntityNamePickerFieldSchema = makeFieldSchemaFromZod(z.string());
|
|
@@ -338,18 +348,21 @@ const EntityNamePicker = (props) => {
|
|
|
338
348
|
idSchema,
|
|
339
349
|
placeholder
|
|
340
350
|
} = props;
|
|
341
|
-
return /* @__PURE__ */ React.createElement(
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
351
|
+
return /* @__PURE__ */ React.createElement(
|
|
352
|
+
TextField,
|
|
353
|
+
{
|
|
354
|
+
id: idSchema == null ? void 0 : idSchema.$id,
|
|
355
|
+
label: title,
|
|
356
|
+
placeholder,
|
|
357
|
+
helperText: description,
|
|
358
|
+
required,
|
|
359
|
+
value: formData != null ? formData : "",
|
|
360
|
+
onChange: ({ target: { value } }) => onChange(value),
|
|
361
|
+
margin: "normal",
|
|
362
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !formData,
|
|
363
|
+
inputProps: { autoFocus }
|
|
364
|
+
}
|
|
365
|
+
);
|
|
353
366
|
};
|
|
354
367
|
|
|
355
368
|
const entityNamePickerValidation = (value, validation) => {
|
|
@@ -414,27 +427,31 @@ const EntityTagsPicker = (props) => {
|
|
|
414
427
|
}
|
|
415
428
|
};
|
|
416
429
|
useEffectOnce(() => onChange(formData || []));
|
|
417
|
-
return /* @__PURE__ */ React.createElement(FormControl$1, {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
430
|
+
return /* @__PURE__ */ React.createElement(FormControl$1, { margin: "normal" }, /* @__PURE__ */ React.createElement(
|
|
431
|
+
Autocomplete$1,
|
|
432
|
+
{
|
|
433
|
+
multiple: true,
|
|
434
|
+
freeSolo: true,
|
|
435
|
+
filterSelectedOptions: true,
|
|
436
|
+
onChange: setTags,
|
|
437
|
+
value: formData || [],
|
|
438
|
+
inputValue,
|
|
439
|
+
loading,
|
|
440
|
+
options: tagOptions,
|
|
441
|
+
ChipProps: { size: "small" },
|
|
442
|
+
renderOption: (option) => showCounts ? `${option} (${existingTags == null ? void 0 : existingTags[option]})` : option,
|
|
443
|
+
renderInput: (params) => /* @__PURE__ */ React.createElement(
|
|
444
|
+
TextField,
|
|
445
|
+
{
|
|
446
|
+
...params,
|
|
447
|
+
label: "Tags",
|
|
448
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
449
|
+
error: inputError,
|
|
450
|
+
helperText: helperText != null ? helperText : "Add any relevant tags, hit 'Enter' to add new tags. Valid format: [a-z0-9+#] separated by [-], at most 63 characters"
|
|
451
|
+
}
|
|
452
|
+
)
|
|
453
|
+
}
|
|
454
|
+
));
|
|
438
455
|
};
|
|
439
456
|
|
|
440
457
|
const OwnerPickerFieldSchema = makeFieldSchemaFromZod(
|
|
@@ -471,61 +488,82 @@ const OwnerPicker = (props) => {
|
|
|
471
488
|
...defaultNamespace !== void 0 ? { defaultNamespace } : {}
|
|
472
489
|
}
|
|
473
490
|
};
|
|
474
|
-
return /* @__PURE__ */ React.createElement(
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
491
|
+
return /* @__PURE__ */ React.createElement(
|
|
492
|
+
EntityPicker,
|
|
493
|
+
{
|
|
494
|
+
...restProps,
|
|
495
|
+
schema: { title, description },
|
|
496
|
+
uiSchema: ownerUiSchema
|
|
497
|
+
}
|
|
498
|
+
);
|
|
479
499
|
};
|
|
480
500
|
|
|
481
501
|
const GithubRepoPicker = (props) => {
|
|
482
502
|
const { allowedOwners = [], rawErrors, state, onChange } = props;
|
|
483
503
|
const ownerItems = allowedOwners ? allowedOwners.map((i) => ({ label: i, value: i })) : [{ label: "Loading...", value: "loading" }];
|
|
484
504
|
const { owner } = state;
|
|
485
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
505
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
506
|
+
FormControl,
|
|
507
|
+
{
|
|
508
|
+
margin: "normal",
|
|
509
|
+
required: true,
|
|
510
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !owner
|
|
511
|
+
},
|
|
512
|
+
(allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(
|
|
513
|
+
Select,
|
|
514
|
+
{
|
|
515
|
+
native: true,
|
|
516
|
+
label: "Owner Available",
|
|
517
|
+
onChange: (s) => onChange({ owner: String(Array.isArray(s) ? s[0] : s) }),
|
|
518
|
+
disabled: allowedOwners.length === 1,
|
|
519
|
+
selected: owner,
|
|
520
|
+
items: ownerItems
|
|
521
|
+
}
|
|
522
|
+
) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "ownerInput" }, "Owner"), /* @__PURE__ */ React.createElement(
|
|
523
|
+
Input,
|
|
524
|
+
{
|
|
525
|
+
id: "ownerInput",
|
|
526
|
+
onChange: (e) => onChange({ owner: e.target.value }),
|
|
527
|
+
value: owner
|
|
528
|
+
}
|
|
529
|
+
)),
|
|
530
|
+
/* @__PURE__ */ React.createElement(FormHelperText, null, "The organization, user or project that this repo will belong to")
|
|
531
|
+
));
|
|
503
532
|
};
|
|
504
533
|
|
|
505
534
|
const GitlabRepoPicker = (props) => {
|
|
506
535
|
const { allowedOwners = [], state, onChange, rawErrors } = props;
|
|
507
536
|
const ownerItems = allowedOwners ? allowedOwners.map((i) => ({ label: i, value: i })) : [{ label: "Loading...", value: "loading" }];
|
|
508
537
|
const { owner } = state;
|
|
509
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
538
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
539
|
+
FormControl,
|
|
540
|
+
{
|
|
541
|
+
margin: "normal",
|
|
542
|
+
required: true,
|
|
543
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !owner
|
|
544
|
+
},
|
|
545
|
+
(allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(
|
|
546
|
+
Select,
|
|
547
|
+
{
|
|
548
|
+
native: true,
|
|
549
|
+
label: "Owner Available",
|
|
550
|
+
onChange: (selected) => onChange({
|
|
551
|
+
owner: String(Array.isArray(selected) ? selected[0] : selected)
|
|
552
|
+
}),
|
|
553
|
+
disabled: allowedOwners.length === 1,
|
|
554
|
+
selected: owner,
|
|
555
|
+
items: ownerItems
|
|
556
|
+
}
|
|
557
|
+
) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "ownerInput" }, "Owner"), /* @__PURE__ */ React.createElement(
|
|
558
|
+
Input,
|
|
559
|
+
{
|
|
560
|
+
id: "ownerInput",
|
|
561
|
+
onChange: (e) => onChange({ owner: e.target.value }),
|
|
562
|
+
value: owner
|
|
563
|
+
}
|
|
564
|
+
)),
|
|
565
|
+
/* @__PURE__ */ React.createElement(FormHelperText, null, "GitLab namespace where this repository will belong to. It can be the name of organization, group, subgroup, user, or the project.")
|
|
566
|
+
));
|
|
529
567
|
};
|
|
530
568
|
|
|
531
569
|
const AzureRepoPicker = (props) => {
|
|
@@ -539,41 +577,59 @@ const AzureRepoPicker = (props) => {
|
|
|
539
577
|
const organizationItems = allowedOrganizations ? allowedOrganizations.map((i) => ({ label: i, value: i })) : [{ label: "Loading...", value: "loading" }];
|
|
540
578
|
const ownerItems = allowedOwners ? allowedOwners.map((i) => ({ label: i, value: i })) : [{ label: "Loading...", value: "loading" }];
|
|
541
579
|
const { organization, owner } = state;
|
|
542
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
580
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
581
|
+
FormControl,
|
|
582
|
+
{
|
|
583
|
+
margin: "normal",
|
|
584
|
+
required: true,
|
|
585
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !organization
|
|
586
|
+
},
|
|
587
|
+
(allowedOrganizations == null ? void 0 : allowedOrganizations.length) ? /* @__PURE__ */ React.createElement(
|
|
588
|
+
Select,
|
|
589
|
+
{
|
|
590
|
+
native: true,
|
|
591
|
+
label: "Organization",
|
|
592
|
+
onChange: (s) => onChange({ organization: String(Array.isArray(s) ? s[0] : s) }),
|
|
593
|
+
disabled: allowedOrganizations.length === 1,
|
|
594
|
+
selected: organization,
|
|
595
|
+
items: organizationItems
|
|
596
|
+
}
|
|
597
|
+
) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "orgInput" }, "Organization"), /* @__PURE__ */ React.createElement(
|
|
598
|
+
Input,
|
|
599
|
+
{
|
|
600
|
+
id: "orgInput",
|
|
601
|
+
onChange: (e) => onChange({ organization: e.target.value }),
|
|
602
|
+
value: organization
|
|
603
|
+
}
|
|
604
|
+
)),
|
|
605
|
+
/* @__PURE__ */ React.createElement(FormHelperText, null, "The Organization that this repo will belong to")
|
|
606
|
+
), /* @__PURE__ */ React.createElement(
|
|
607
|
+
FormControl,
|
|
608
|
+
{
|
|
609
|
+
margin: "normal",
|
|
610
|
+
required: true,
|
|
611
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !owner
|
|
612
|
+
},
|
|
613
|
+
(allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(
|
|
614
|
+
Select,
|
|
615
|
+
{
|
|
616
|
+
native: true,
|
|
617
|
+
label: "Owner",
|
|
618
|
+
onChange: (s) => onChange({ owner: String(Array.isArray(s) ? s[0] : s) }),
|
|
619
|
+
disabled: allowedOwners.length === 1,
|
|
620
|
+
selected: owner,
|
|
621
|
+
items: ownerItems
|
|
622
|
+
}
|
|
623
|
+
) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "ownerInput" }, "Project"), /* @__PURE__ */ React.createElement(
|
|
624
|
+
Input,
|
|
625
|
+
{
|
|
626
|
+
id: "ownerInput",
|
|
627
|
+
onChange: (e) => onChange({ owner: e.target.value }),
|
|
628
|
+
value: owner
|
|
629
|
+
}
|
|
630
|
+
)),
|
|
631
|
+
/* @__PURE__ */ React.createElement(FormHelperText, null, "The Project that this repo will belong to")
|
|
632
|
+
));
|
|
577
633
|
};
|
|
578
634
|
|
|
579
635
|
const BitbucketRepoPicker = (props) => {
|
|
@@ -585,59 +641,80 @@ const BitbucketRepoPicker = (props) => {
|
|
|
585
641
|
onChange({ workspace: allowedOwners[0] });
|
|
586
642
|
}
|
|
587
643
|
}, [allowedOwners, host, onChange]);
|
|
588
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, host === "bitbucket.org" && /* @__PURE__ */ React.createElement(
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
644
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, host === "bitbucket.org" && /* @__PURE__ */ React.createElement(
|
|
645
|
+
FormControl,
|
|
646
|
+
{
|
|
647
|
+
margin: "normal",
|
|
648
|
+
required: true,
|
|
649
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !workspace
|
|
650
|
+
},
|
|
651
|
+
(allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(
|
|
652
|
+
Select,
|
|
653
|
+
{
|
|
654
|
+
native: true,
|
|
655
|
+
label: "Allowed Workspaces",
|
|
656
|
+
onChange: (s) => onChange({ workspace: String(Array.isArray(s) ? s[0] : s) }),
|
|
657
|
+
disabled: allowedOwners.length === 1,
|
|
658
|
+
selected: workspace,
|
|
659
|
+
items: ownerItems
|
|
660
|
+
}
|
|
661
|
+
) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "workspaceInput" }, "Workspace"), /* @__PURE__ */ React.createElement(
|
|
662
|
+
Input,
|
|
663
|
+
{
|
|
664
|
+
id: "workspaceInput",
|
|
665
|
+
onChange: (e) => onChange({ workspace: e.target.value }),
|
|
666
|
+
value: workspace
|
|
667
|
+
}
|
|
668
|
+
)),
|
|
669
|
+
/* @__PURE__ */ React.createElement(FormHelperText, null, "The Organization that this repo will belong to")
|
|
670
|
+
), /* @__PURE__ */ React.createElement(
|
|
671
|
+
FormControl,
|
|
672
|
+
{
|
|
673
|
+
margin: "normal",
|
|
674
|
+
required: true,
|
|
675
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !project
|
|
676
|
+
},
|
|
677
|
+
/* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "projectInput" }, "Project"),
|
|
678
|
+
/* @__PURE__ */ React.createElement(
|
|
679
|
+
Input,
|
|
680
|
+
{
|
|
681
|
+
id: "projectInput",
|
|
682
|
+
onChange: (e) => onChange({ project: e.target.value }),
|
|
683
|
+
value: project
|
|
684
|
+
}
|
|
685
|
+
),
|
|
686
|
+
/* @__PURE__ */ React.createElement(FormHelperText, null, "The Project that this repo will belong to")
|
|
687
|
+
));
|
|
616
688
|
};
|
|
617
689
|
|
|
618
690
|
const GerritRepoPicker = (props) => {
|
|
619
691
|
const { onChange, rawErrors, state } = props;
|
|
620
692
|
const { workspace, owner } = state;
|
|
621
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(FormControl, {
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
htmlFor: "parentInput"
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
693
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(FormControl, { margin: "normal", error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !workspace }, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "ownerInput" }, "Owner"), /* @__PURE__ */ React.createElement(
|
|
694
|
+
Input,
|
|
695
|
+
{
|
|
696
|
+
id: "ownerInput",
|
|
697
|
+
onChange: (e) => onChange({ owner: e.target.value }),
|
|
698
|
+
value: owner
|
|
699
|
+
}
|
|
700
|
+
), /* @__PURE__ */ React.createElement(FormHelperText, null, "The owner of the project (optional)")), /* @__PURE__ */ React.createElement(
|
|
701
|
+
FormControl,
|
|
702
|
+
{
|
|
703
|
+
margin: "normal",
|
|
704
|
+
required: true,
|
|
705
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !workspace
|
|
706
|
+
},
|
|
707
|
+
/* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "parentInput" }, "Parent"),
|
|
708
|
+
/* @__PURE__ */ React.createElement(
|
|
709
|
+
Input,
|
|
710
|
+
{
|
|
711
|
+
id: "parentInput",
|
|
712
|
+
onChange: (e) => onChange({ workspace: e.target.value }),
|
|
713
|
+
value: workspace
|
|
714
|
+
}
|
|
715
|
+
),
|
|
716
|
+
/* @__PURE__ */ React.createElement(FormHelperText, null, "The project parent that the repo will belong to")
|
|
717
|
+
));
|
|
641
718
|
};
|
|
642
719
|
|
|
643
720
|
const RepoUrlPickerHost = (props) => {
|
|
@@ -663,19 +740,27 @@ const RepoUrlPickerHost = (props) => {
|
|
|
663
740
|
if (loading) {
|
|
664
741
|
return /* @__PURE__ */ React.createElement(Progress, null);
|
|
665
742
|
}
|
|
666
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
743
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
744
|
+
FormControl,
|
|
745
|
+
{
|
|
746
|
+
margin: "normal",
|
|
747
|
+
required: true,
|
|
748
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !host
|
|
749
|
+
},
|
|
750
|
+
/* @__PURE__ */ React.createElement(
|
|
751
|
+
Select,
|
|
752
|
+
{
|
|
753
|
+
native: true,
|
|
754
|
+
disabled: (hosts == null ? void 0 : hosts.length) === 1,
|
|
755
|
+
label: "Host",
|
|
756
|
+
onChange: (s) => onChange(String(Array.isArray(s) ? s[0] : s)),
|
|
757
|
+
selected: host,
|
|
758
|
+
items: hostsOptions,
|
|
759
|
+
"data-testid": "host-select"
|
|
760
|
+
}
|
|
761
|
+
),
|
|
762
|
+
/* @__PURE__ */ React.createElement(FormHelperText, null, "The host where the repository will be created")
|
|
763
|
+
));
|
|
679
764
|
};
|
|
680
765
|
|
|
681
766
|
const RepoUrlPickerRepoName = (props) => {
|
|
@@ -688,24 +773,33 @@ const RepoUrlPickerRepoName = (props) => {
|
|
|
688
773
|
}
|
|
689
774
|
}, [allowedRepos, repoName, onChange]);
|
|
690
775
|
const repoItems = allowedRepos ? allowedRepos.map((i) => ({ label: i, value: i })) : [{ label: "Loading...", value: "loading" }];
|
|
691
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
776
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
777
|
+
FormControl,
|
|
778
|
+
{
|
|
779
|
+
margin: "normal",
|
|
780
|
+
required: true,
|
|
781
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !repoName
|
|
782
|
+
},
|
|
783
|
+
(allowedRepos == null ? void 0 : allowedRepos.length) ? /* @__PURE__ */ React.createElement(
|
|
784
|
+
Select,
|
|
785
|
+
{
|
|
786
|
+
native: true,
|
|
787
|
+
label: "Repositories Available",
|
|
788
|
+
onChange: (selected) => String(Array.isArray(selected) ? selected[0] : selected),
|
|
789
|
+
disabled: allowedRepos.length === 1,
|
|
790
|
+
selected: repoName,
|
|
791
|
+
items: repoItems
|
|
792
|
+
}
|
|
793
|
+
) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "repoNameInput" }, "Repository"), /* @__PURE__ */ React.createElement(
|
|
794
|
+
Input,
|
|
795
|
+
{
|
|
796
|
+
id: "repoNameInput",
|
|
797
|
+
onChange: (e) => onChange(String(e.target.value)),
|
|
798
|
+
value: repoName
|
|
799
|
+
}
|
|
800
|
+
)),
|
|
801
|
+
/* @__PURE__ */ React.createElement(FormHelperText, null, "The name of the repository")
|
|
802
|
+
));
|
|
709
803
|
};
|
|
710
804
|
|
|
711
805
|
function serializeRepoPickerUrl(data) {
|
|
@@ -757,9 +851,7 @@ const SecretsContext = createContext(
|
|
|
757
851
|
);
|
|
758
852
|
const SecretsContextProvider = ({ children }) => {
|
|
759
853
|
const [secrets, setSecrets] = useState({});
|
|
760
|
-
return /* @__PURE__ */ React.createElement(SecretsContext.Provider, {
|
|
761
|
-
value: { secrets, setSecrets }
|
|
762
|
-
}, children);
|
|
854
|
+
return /* @__PURE__ */ React.createElement(SecretsContext.Provider, { value: { secrets, setSecrets } }, children);
|
|
763
855
|
};
|
|
764
856
|
const useTemplateSecrets = () => {
|
|
765
857
|
const value = useContext(SecretsContext);
|
|
@@ -896,42 +988,63 @@ const RepoUrlPicker = (props) => {
|
|
|
896
988
|
[state, uiSchema]
|
|
897
989
|
);
|
|
898
990
|
const hostType = (_b = state.host && ((_a = integrationApi.byHost(state.host)) == null ? void 0 : _a.type)) != null ? _b : null;
|
|
899
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
991
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
992
|
+
RepoUrlPickerHost,
|
|
993
|
+
{
|
|
994
|
+
host: state.host,
|
|
995
|
+
hosts: allowedHosts,
|
|
996
|
+
onChange: (host) => setState((prevState) => ({ ...prevState, host })),
|
|
997
|
+
rawErrors
|
|
998
|
+
}
|
|
999
|
+
), hostType === "github" && /* @__PURE__ */ React.createElement(
|
|
1000
|
+
GithubRepoPicker,
|
|
1001
|
+
{
|
|
1002
|
+
allowedOwners,
|
|
1003
|
+
onChange: updateLocalState,
|
|
1004
|
+
rawErrors,
|
|
1005
|
+
state
|
|
1006
|
+
}
|
|
1007
|
+
), hostType === "gitlab" && /* @__PURE__ */ React.createElement(
|
|
1008
|
+
GitlabRepoPicker,
|
|
1009
|
+
{
|
|
1010
|
+
allowedOwners,
|
|
1011
|
+
rawErrors,
|
|
1012
|
+
state,
|
|
1013
|
+
onChange: updateLocalState
|
|
1014
|
+
}
|
|
1015
|
+
), hostType === "bitbucket" && /* @__PURE__ */ React.createElement(
|
|
1016
|
+
BitbucketRepoPicker,
|
|
1017
|
+
{
|
|
1018
|
+
allowedOwners,
|
|
1019
|
+
rawErrors,
|
|
1020
|
+
state,
|
|
1021
|
+
onChange: updateLocalState
|
|
1022
|
+
}
|
|
1023
|
+
), hostType === "azure" && /* @__PURE__ */ React.createElement(
|
|
1024
|
+
AzureRepoPicker,
|
|
1025
|
+
{
|
|
1026
|
+
allowedOrganizations,
|
|
1027
|
+
allowedOwners,
|
|
1028
|
+
rawErrors,
|
|
1029
|
+
state,
|
|
1030
|
+
onChange: updateLocalState
|
|
1031
|
+
}
|
|
1032
|
+
), hostType === "gerrit" && /* @__PURE__ */ React.createElement(
|
|
1033
|
+
GerritRepoPicker,
|
|
1034
|
+
{
|
|
1035
|
+
rawErrors,
|
|
1036
|
+
state,
|
|
1037
|
+
onChange: updateLocalState
|
|
1038
|
+
}
|
|
1039
|
+
), /* @__PURE__ */ React.createElement(
|
|
1040
|
+
RepoUrlPickerRepoName,
|
|
1041
|
+
{
|
|
1042
|
+
repoName: state.repoName,
|
|
1043
|
+
allowedRepos,
|
|
1044
|
+
onChange: (repo) => setState((prevState) => ({ ...prevState, repoName: repo })),
|
|
1045
|
+
rawErrors
|
|
1046
|
+
}
|
|
1047
|
+
));
|
|
935
1048
|
};
|
|
936
1049
|
|
|
937
1050
|
const repoPickerValidation = (value, validation, context) => {
|
|
@@ -1008,28 +1121,38 @@ const OwnedEntityPicker = (props) => {
|
|
|
1008
1121
|
const onSelect = (_, value) => {
|
|
1009
1122
|
onChange(value || "");
|
|
1010
1123
|
};
|
|
1011
|
-
return /* @__PURE__ */ React.createElement(
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !formData
|
|
1015
|
-
}, /* @__PURE__ */ React.createElement(Autocomplete, {
|
|
1016
|
-
id: idSchema == null ? void 0 : idSchema.$id,
|
|
1017
|
-
value: formData || "",
|
|
1018
|
-
loading,
|
|
1019
|
-
onChange: onSelect,
|
|
1020
|
-
options: entityRefs || [],
|
|
1021
|
-
autoSelect: true,
|
|
1022
|
-
freeSolo: allowArbitraryValues,
|
|
1023
|
-
renderInput: (params) => /* @__PURE__ */ React.createElement(TextField, {
|
|
1024
|
-
...params,
|
|
1025
|
-
label: title,
|
|
1124
|
+
return /* @__PURE__ */ React.createElement(
|
|
1125
|
+
FormControl,
|
|
1126
|
+
{
|
|
1026
1127
|
margin: "normal",
|
|
1027
|
-
helperText: description,
|
|
1028
|
-
variant: "outlined",
|
|
1029
1128
|
required,
|
|
1030
|
-
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1129
|
+
error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !formData
|
|
1130
|
+
},
|
|
1131
|
+
/* @__PURE__ */ React.createElement(
|
|
1132
|
+
Autocomplete,
|
|
1133
|
+
{
|
|
1134
|
+
id: idSchema == null ? void 0 : idSchema.$id,
|
|
1135
|
+
value: formData || "",
|
|
1136
|
+
loading,
|
|
1137
|
+
onChange: onSelect,
|
|
1138
|
+
options: entityRefs || [],
|
|
1139
|
+
autoSelect: true,
|
|
1140
|
+
freeSolo: allowArbitraryValues,
|
|
1141
|
+
renderInput: (params) => /* @__PURE__ */ React.createElement(
|
|
1142
|
+
TextField,
|
|
1143
|
+
{
|
|
1144
|
+
...params,
|
|
1145
|
+
label: title,
|
|
1146
|
+
margin: "normal",
|
|
1147
|
+
helperText: description,
|
|
1148
|
+
variant: "outlined",
|
|
1149
|
+
required,
|
|
1150
|
+
InputProps: params.InputProps
|
|
1151
|
+
}
|
|
1152
|
+
)
|
|
1153
|
+
}
|
|
1154
|
+
)
|
|
1155
|
+
);
|
|
1033
1156
|
};
|
|
1034
1157
|
function useOwnedEntities(allowedKinds) {
|
|
1035
1158
|
const identityApi = useApi(identityApiRef);
|
|
@@ -1222,7 +1345,7 @@ const OwnerPickerFieldExtension = scaffolderPlugin.provide(
|
|
|
1222
1345
|
const ScaffolderPage = scaffolderPlugin.provide(
|
|
1223
1346
|
createRoutableExtension({
|
|
1224
1347
|
name: "ScaffolderPage",
|
|
1225
|
-
component: () => import('./Router-
|
|
1348
|
+
component: () => import('./Router-95a01240.esm.js').then((m) => m.Router),
|
|
1226
1349
|
mountPoint: rootRouteRef
|
|
1227
1350
|
})
|
|
1228
1351
|
);
|
|
@@ -1243,17 +1366,13 @@ const EntityTagsPickerFieldExtension = scaffolderPlugin.provide(
|
|
|
1243
1366
|
const NextScaffolderPage = scaffolderPlugin.provide(
|
|
1244
1367
|
createRoutableExtension({
|
|
1245
1368
|
name: "NextScaffolderPage",
|
|
1246
|
-
component: () => import('./index-
|
|
1369
|
+
component: () => import('./index-cb47594c.esm.js').then((m) => m.Router),
|
|
1247
1370
|
mountPoint: nextRouteRef
|
|
1248
1371
|
})
|
|
1249
1372
|
);
|
|
1250
1373
|
|
|
1251
|
-
const icon = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, {
|
|
1252
|
-
|
|
1253
|
-
});
|
|
1254
|
-
const checkedIcon = /* @__PURE__ */ React.createElement(CheckBoxIcon, {
|
|
1255
|
-
fontSize: "small"
|
|
1256
|
-
});
|
|
1374
|
+
const icon = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, { fontSize: "small" });
|
|
1375
|
+
const checkedIcon = /* @__PURE__ */ React.createElement(CheckBoxIcon, { fontSize: "small" });
|
|
1257
1376
|
const TemplateTypePicker = () => {
|
|
1258
1377
|
const alertApi = useApi(alertApiRef);
|
|
1259
1378
|
const { error, loading, availableTypes, selectedTypes, setSelectedTypes } = useEntityTypeFilter();
|
|
@@ -1268,34 +1387,33 @@ const TemplateTypePicker = () => {
|
|
|
1268
1387
|
});
|
|
1269
1388
|
return null;
|
|
1270
1389
|
}
|
|
1271
|
-
return /* @__PURE__ */ React.createElement(Box, {
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
...params,
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
}));
|
|
1390
|
+
return /* @__PURE__ */ React.createElement(Box, { pb: 1, pt: 1 }, /* @__PURE__ */ React.createElement(Typography, { variant: "button" }, "Categories"), /* @__PURE__ */ React.createElement(
|
|
1391
|
+
Autocomplete$1,
|
|
1392
|
+
{
|
|
1393
|
+
multiple: true,
|
|
1394
|
+
"aria-label": "Categories",
|
|
1395
|
+
options: availableTypes,
|
|
1396
|
+
value: selectedTypes,
|
|
1397
|
+
onChange: (_, value) => setSelectedTypes(value),
|
|
1398
|
+
renderOption: (option, { selected }) => /* @__PURE__ */ React.createElement(
|
|
1399
|
+
FormControlLabel,
|
|
1400
|
+
{
|
|
1401
|
+
control: /* @__PURE__ */ React.createElement(
|
|
1402
|
+
Checkbox,
|
|
1403
|
+
{
|
|
1404
|
+
icon,
|
|
1405
|
+
checkedIcon,
|
|
1406
|
+
checked: selected
|
|
1407
|
+
}
|
|
1408
|
+
),
|
|
1409
|
+
label: capitalize(option)
|
|
1410
|
+
}
|
|
1411
|
+
),
|
|
1412
|
+
size: "small",
|
|
1413
|
+
popupIcon: /* @__PURE__ */ React.createElement(ExpandMoreIcon, { "data-testid": "categories-picker-expand" }),
|
|
1414
|
+
renderInput: (params) => /* @__PURE__ */ React.createElement(TextField, { ...params, variant: "outlined" })
|
|
1415
|
+
}
|
|
1416
|
+
));
|
|
1299
1417
|
};
|
|
1300
1418
|
|
|
1301
1419
|
function reducer(draft, action) {
|
|
@@ -1429,11 +1547,14 @@ const TaskErrors = ({ error }) => {
|
|
|
1429
1547
|
useEffect(() => {
|
|
1430
1548
|
id.current = String(Math.random());
|
|
1431
1549
|
}, [error]);
|
|
1432
|
-
return error ? /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1550
|
+
return error ? /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(
|
|
1551
|
+
DismissableBanner,
|
|
1552
|
+
{
|
|
1553
|
+
id: id.current,
|
|
1554
|
+
variant: "warning",
|
|
1555
|
+
message: error.message
|
|
1556
|
+
}
|
|
1557
|
+
)) : null;
|
|
1437
1558
|
};
|
|
1438
1559
|
|
|
1439
1560
|
const useStyles$1 = makeStyles({
|
|
@@ -1449,21 +1570,7 @@ const useStyles$1 = makeStyles({
|
|
|
1449
1570
|
const IconLink = (props) => {
|
|
1450
1571
|
const { href, text, Icon, ...linkProps } = props;
|
|
1451
1572
|
const classes = useStyles$1();
|
|
1452
|
-
return /* @__PURE__ */ React.createElement(Grid, {
|
|
1453
|
-
container: true,
|
|
1454
|
-
direction: "row",
|
|
1455
|
-
spacing: 1
|
|
1456
|
-
}, /* @__PURE__ */ React.createElement(Grid, {
|
|
1457
|
-
item: true
|
|
1458
|
-
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
1459
|
-
component: "div",
|
|
1460
|
-
className: classes.svgIcon
|
|
1461
|
-
}, Icon ? /* @__PURE__ */ React.createElement(Icon, null) : /* @__PURE__ */ React.createElement(LanguageIcon, null))), /* @__PURE__ */ React.createElement(Grid, {
|
|
1462
|
-
item: true
|
|
1463
|
-
}, /* @__PURE__ */ React.createElement(Link, {
|
|
1464
|
-
to: href,
|
|
1465
|
-
...linkProps
|
|
1466
|
-
}, text || href)));
|
|
1573
|
+
return /* @__PURE__ */ React.createElement(Grid, { container: true, direction: "row", spacing: 1 }, /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(Typography, { component: "div", className: classes.svgIcon }, Icon ? /* @__PURE__ */ React.createElement(Icon, null) : /* @__PURE__ */ React.createElement(LanguageIcon, null))), /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(Link, { to: href, ...linkProps }, text || href)));
|
|
1467
1574
|
};
|
|
1468
1575
|
|
|
1469
1576
|
const TaskPageLinks = ({ output }) => {
|
|
@@ -1474,10 +1581,7 @@ const TaskPageLinks = ({ output }) => {
|
|
|
1474
1581
|
var _a;
|
|
1475
1582
|
return key ? (_a = app.getSystemIcon(key)) != null ? _a : LanguageIcon : LanguageIcon;
|
|
1476
1583
|
};
|
|
1477
|
-
return /* @__PURE__ */ React.createElement(Box, {
|
|
1478
|
-
px: 3,
|
|
1479
|
-
pb: 3
|
|
1480
|
-
}, links.filter(({ url, entityRef }) => url || entityRef).map(({ url, entityRef, title, icon }) => {
|
|
1584
|
+
return /* @__PURE__ */ React.createElement(Box, { px: 3, pb: 3 }, links.filter(({ url, entityRef }) => url || entityRef).map(({ url, entityRef, title, icon }) => {
|
|
1481
1585
|
if (entityRef) {
|
|
1482
1586
|
const entityName = parseEntityRef(entityRef, {
|
|
1483
1587
|
defaultKind: "<unknown>",
|
|
@@ -1487,13 +1591,16 @@ const TaskPageLinks = ({ output }) => {
|
|
|
1487
1591
|
return { title, icon, url: target };
|
|
1488
1592
|
}
|
|
1489
1593
|
return { title, icon, url };
|
|
1490
|
-
}).map(({ url, title, icon }, i) => /* @__PURE__ */ React.createElement(
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1594
|
+
}).map(({ url, title, icon }, i) => /* @__PURE__ */ React.createElement(
|
|
1595
|
+
IconLink,
|
|
1596
|
+
{
|
|
1597
|
+
key: `output-link-${i}`,
|
|
1598
|
+
href: url,
|
|
1599
|
+
text: title != null ? title : url,
|
|
1600
|
+
Icon: iconResolver(icon),
|
|
1601
|
+
target: "_blank"
|
|
1602
|
+
}
|
|
1603
|
+
)));
|
|
1497
1604
|
};
|
|
1498
1605
|
|
|
1499
1606
|
const humanizeDuration = require("humanize-duration");
|
|
@@ -1535,9 +1642,7 @@ const StepTimeTicker = ({ step }) => {
|
|
|
1535
1642
|
const formatted = Interval.fromDateTimes(startedAt, end).toDuration().valueOf();
|
|
1536
1643
|
setTime(humanizeDuration(formatted, { round: true }));
|
|
1537
1644
|
}, 1e3);
|
|
1538
|
-
return /* @__PURE__ */ React.createElement(Typography$1, {
|
|
1539
|
-
variant: "caption"
|
|
1540
|
-
}, time);
|
|
1645
|
+
return /* @__PURE__ */ React.createElement(Typography$1, { variant: "caption" }, time);
|
|
1541
1646
|
};
|
|
1542
1647
|
const useStepIconStyles = makeStyles$1(
|
|
1543
1648
|
(theme) => createStyles({
|
|
@@ -1560,9 +1665,7 @@ function TaskStepIconComponent(props) {
|
|
|
1560
1665
|
const { active, completed, error } = props;
|
|
1561
1666
|
const getMiddle = () => {
|
|
1562
1667
|
if (active) {
|
|
1563
|
-
return /* @__PURE__ */ React.createElement(CircularProgress, {
|
|
1564
|
-
size: "24px"
|
|
1565
|
-
});
|
|
1668
|
+
return /* @__PURE__ */ React.createElement(CircularProgress, { size: "24px" });
|
|
1566
1669
|
}
|
|
1567
1670
|
if (completed) {
|
|
1568
1671
|
return /* @__PURE__ */ React.createElement(Check, null);
|
|
@@ -1572,51 +1675,48 @@ function TaskStepIconComponent(props) {
|
|
|
1572
1675
|
}
|
|
1573
1676
|
return /* @__PURE__ */ React.createElement(FiberManualRecordIcon, null);
|
|
1574
1677
|
};
|
|
1575
|
-
return /* @__PURE__ */ React.createElement(
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1678
|
+
return /* @__PURE__ */ React.createElement(
|
|
1679
|
+
"div",
|
|
1680
|
+
{
|
|
1681
|
+
className: classNames(classes.root, {
|
|
1682
|
+
[classes.completed]: completed,
|
|
1683
|
+
[classes.error]: error
|
|
1684
|
+
})
|
|
1685
|
+
},
|
|
1686
|
+
getMiddle()
|
|
1687
|
+
);
|
|
1581
1688
|
}
|
|
1582
1689
|
const TaskStatusStepper = memo(
|
|
1583
1690
|
(props) => {
|
|
1584
1691
|
const { steps, currentStepId, onUserStepChange } = props;
|
|
1585
1692
|
const classes = useStyles(props);
|
|
1586
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
key: String(index),
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
variant: "subtitle2"
|
|
1614
|
-
}, step.name), isSkipped ? /* @__PURE__ */ React.createElement(Typography$1, {
|
|
1615
|
-
variant: "caption"
|
|
1616
|
-
}, "Skipped") : /* @__PURE__ */ React.createElement(StepTimeTicker, {
|
|
1617
|
-
step
|
|
1618
|
-
})))));
|
|
1619
|
-
})));
|
|
1693
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes.root }, /* @__PURE__ */ React.createElement(
|
|
1694
|
+
Stepper,
|
|
1695
|
+
{
|
|
1696
|
+
activeStep: steps.findIndex((s) => s.id === currentStepId),
|
|
1697
|
+
orientation: "vertical",
|
|
1698
|
+
nonLinear: true
|
|
1699
|
+
},
|
|
1700
|
+
steps.map((step, index) => {
|
|
1701
|
+
const isCompleted = step.status === "completed";
|
|
1702
|
+
const isFailed = step.status === "failed";
|
|
1703
|
+
const isActive = step.status === "processing";
|
|
1704
|
+
const isSkipped = step.status === "skipped";
|
|
1705
|
+
return /* @__PURE__ */ React.createElement(Step, { key: String(index), expanded: true }, /* @__PURE__ */ React.createElement(StepButton, { onClick: () => onUserStepChange(step.id) }, /* @__PURE__ */ React.createElement(
|
|
1706
|
+
StepLabel,
|
|
1707
|
+
{
|
|
1708
|
+
StepIconProps: {
|
|
1709
|
+
completed: isCompleted,
|
|
1710
|
+
error: isFailed,
|
|
1711
|
+
active: isActive
|
|
1712
|
+
},
|
|
1713
|
+
StepIconComponent: TaskStepIconComponent,
|
|
1714
|
+
className: classes.stepWrapper
|
|
1715
|
+
},
|
|
1716
|
+
/* @__PURE__ */ React.createElement("div", { className: classes.labelWrapper }, /* @__PURE__ */ React.createElement(Typography$1, { variant: "subtitle2" }, step.name), isSkipped ? /* @__PURE__ */ React.createElement(Typography$1, { variant: "caption" }, "Skipped") : /* @__PURE__ */ React.createElement(StepTimeTicker, { step }))
|
|
1717
|
+
)));
|
|
1718
|
+
})
|
|
1719
|
+
));
|
|
1620
1720
|
}
|
|
1621
1721
|
);
|
|
1622
1722
|
const hasLinks = ({ links = [] }) => links.length > 0;
|
|
@@ -1685,44 +1785,39 @@ const TaskPage = ({ loadingText }) => {
|
|
|
1685
1785
|
})}`
|
|
1686
1786
|
);
|
|
1687
1787
|
};
|
|
1688
|
-
return /* @__PURE__ */ React.createElement(Page, {
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
}, /* @__PURE__ */ React.createElement(TaskErrors, {
|
|
1721
|
-
error: taskStream.error
|
|
1722
|
-
}), /* @__PURE__ */ React.createElement(LogViewer, {
|
|
1723
|
-
text: logAsString
|
|
1724
|
-
})))))));
|
|
1788
|
+
return /* @__PURE__ */ React.createElement(Page, { themeId: "home" }, /* @__PURE__ */ React.createElement(
|
|
1789
|
+
Header,
|
|
1790
|
+
{
|
|
1791
|
+
pageTitleOverride: `Task ${taskId}`,
|
|
1792
|
+
title: "Task Activity",
|
|
1793
|
+
subtitle: `Activity for task: ${taskId}`
|
|
1794
|
+
}
|
|
1795
|
+
), /* @__PURE__ */ React.createElement(Content, null, taskNotFound ? /* @__PURE__ */ React.createElement(
|
|
1796
|
+
ErrorPage,
|
|
1797
|
+
{
|
|
1798
|
+
status: "404",
|
|
1799
|
+
statusMessage: "Task not found",
|
|
1800
|
+
additionalInfo: "No task found with this ID"
|
|
1801
|
+
}
|
|
1802
|
+
) : /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Grid$1, { container: true }, /* @__PURE__ */ React.createElement(Grid$1, { item: true, xs: 3 }, /* @__PURE__ */ React.createElement(Paper, null, /* @__PURE__ */ React.createElement(
|
|
1803
|
+
TaskStatusStepper,
|
|
1804
|
+
{
|
|
1805
|
+
steps,
|
|
1806
|
+
currentStepId,
|
|
1807
|
+
onUserStepChange: setUserSelectedStepId
|
|
1808
|
+
}
|
|
1809
|
+
), output && hasLinks(output) && /* @__PURE__ */ React.createElement(TaskPageLinks, { output }), /* @__PURE__ */ React.createElement(
|
|
1810
|
+
Button,
|
|
1811
|
+
{
|
|
1812
|
+
className: classes.button,
|
|
1813
|
+
onClick: handleStartOver,
|
|
1814
|
+
disabled: !completed,
|
|
1815
|
+
variant: "contained",
|
|
1816
|
+
color: "primary"
|
|
1817
|
+
},
|
|
1818
|
+
"Start Over"
|
|
1819
|
+
))), /* @__PURE__ */ React.createElement(Grid$1, { item: true, xs: 9 }, !currentStepId && /* @__PURE__ */ React.createElement(Progress, null), /* @__PURE__ */ React.createElement("div", { style: { height: "80vh" } }, /* @__PURE__ */ React.createElement(TaskErrors, { error: taskStream.error }), /* @__PURE__ */ React.createElement(LogViewer, { text: logAsString })))))));
|
|
1725
1820
|
};
|
|
1726
1821
|
|
|
1727
1822
|
export { OwnerPickerFieldSchema as $, OwnedEntityPickerSchema as A, nextSelectedTemplateRouteRef as B, nextRouteRef as C, ScaffolderClient as D, EntityPicker as E, FIELD_EXTENSION_WRAPPER_KEY as F, createScaffolderFieldExtension as G, ScaffolderFieldExtensions as H, createScaffolderLayout as I, ScaffolderLayouts as J, EntityPickerFieldExtension as K, LAYOUTS_WRAPPER_KEY as L, EntityNamePickerFieldExtension as M, EntityTagsPickerFieldExtension as N, OwnerPicker as O, OwnerPickerFieldExtension as P, OwnedEntityPickerFieldExtension as Q, RepoUrlPicker as R, SecretsContext as S, TemplateTypePicker as T, RepoUrlPickerFieldExtension as U, ScaffolderPage as V, scaffolderPlugin as W, NextScaffolderPage as X, createNextScaffolderFieldExtension as Y, makeFieldSchemaFromZod as Z, EntityPickerFieldSchema as _, actionsRouteRef as a, RepoUrlPickerFieldSchema as a0, OwnedEntityPickerFieldSchema as a1, EntityTagsPickerFieldSchema as a2, useTemplateSecrets as a3, scaffolderListTaskRouteRef as b, scaffolderApiRef as c, scaffolderTaskRouteRef as d, editRouteRef as e, rootRouteRef as f, TaskStatusStepper as g, TaskPageLinks as h, FIELD_EXTENSION_KEY as i, LAYOUTS_KEY as j, SecretsContextProvider as k, legacySelectedTemplateRouteRef as l, TaskPage as m, EntityPickerSchema as n, EntityNamePicker as o, entityNamePickerValidation as p, EntityNamePickerSchema as q, registerComponentRouteRef as r, selectedTemplateRouteRef as s, EntityTagsPicker as t, EntityTagsPickerSchema as u, viewTechDocRouteRef as v, repoPickerValidation as w, RepoUrlPickerSchema as x, OwnerPickerSchema as y, OwnedEntityPicker as z };
|
|
1728
|
-
//# sourceMappingURL=index-
|
|
1823
|
+
//# sourceMappingURL=index-102258f6.esm.js.map
|