@e-llm-studio/instant-learning 1.3.5 → 1.3.6
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/CommonConstants/CommonConstants.js +10 -0
- package/dist/CommonConstants/CommonConstants.js.map +1 -0
- package/dist/ComponentRegistry.js +1 -0
- package/dist/ComponentRegistry.js.map +1 -1
- package/dist/ILMarketplaceWrapper.js.map +1 -1
- package/dist/cjs/CommonConstants/CommonConstants.js +15 -0
- package/dist/cjs/CommonConstants/CommonConstants.js.map +1 -0
- package/dist/cjs/ComponentRegistry.js +1 -0
- package/dist/cjs/ComponentRegistry.js.map +1 -1
- package/dist/cjs/ILMarketplaceWrapper.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +3 -10
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js +3 -11
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js.map +1 -1
- package/dist/cjs/features/IL-marketplace/PromoteFlow/PromoteFlow.js +104 -35
- package/dist/cjs/features/IL-marketplace/PromoteFlow/PromoteFlow.js.map +1 -1
- package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.api.js +52 -12
- package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.api.js.map +1 -1
- package/dist/cjs/features/LearningManagement/LearningTemplateLayout.js +25 -2
- package/dist/cjs/features/LearningManagement/LearningTemplateLayout.js.map +1 -1
- package/dist/cjs/features/LearningManagement/Sidebar.js +25 -9
- package/dist/cjs/features/LearningManagement/Sidebar.js.map +1 -1
- package/dist/cjs/features/LearningManagement/SidebarWrapper.js +6 -2
- package/dist/cjs/features/LearningManagement/SidebarWrapper.js.map +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js +15 -2
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
- package/dist/cjs/features/LearningManagement/store/useLMSConfigStore.js +1 -0
- package/dist/cjs/features/LearningManagement/store/useLMSConfigStore.js.map +1 -1
- package/dist/cjs/features/LearningManagement/styles/LearningTemplateLayout.module.css.js +2 -2
- package/dist/cjs/features/LearningManagement/styles/Sidebar.module.css.js +2 -2
- package/dist/cjs/schema-driven/components/DropdownSectionField.js +26 -2
- package/dist/cjs/schema-driven/components/DropdownSectionField.js.map +1 -1
- package/dist/cjs/schema-driven/components/GroupEditRow.js +11 -5
- package/dist/cjs/schema-driven/components/GroupEditRow.js.map +1 -1
- package/dist/cjs/schema-driven/components/PageRangeInputField.js +91 -0
- package/dist/cjs/schema-driven/components/PageRangeInputField.js.map +1 -0
- package/dist/cjs/schema-driven/components/TableComponent.js +63 -51
- package/dist/cjs/schema-driven/components/TableComponent.js.map +1 -1
- package/dist/cjs/schema-driven/helper.js +69 -3
- package/dist/cjs/schema-driven/helper.js.map +1 -1
- package/dist/cjs/schema-driven/hooks/useSectionEditSession.js +5 -1
- package/dist/cjs/schema-driven/hooks/useSectionEditSession.js.map +1 -1
- package/dist/cjs/schema-driven/types.js.map +1 -1
- package/dist/cjs/schema-driven/utils/PayloadUtils.js +4 -2
- package/dist/cjs/schema-driven/utils/PayloadUtils.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +3 -10
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js +3 -11
- package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js.map +1 -1
- package/dist/features/IL-marketplace/PromoteFlow/PromoteFlow.js +104 -35
- package/dist/features/IL-marketplace/PromoteFlow/PromoteFlow.js.map +1 -1
- package/dist/features/IL-marketplace/PromoteFlow/promote-flow.api.js +52 -12
- package/dist/features/IL-marketplace/PromoteFlow/promote-flow.api.js.map +1 -1
- package/dist/features/LearningManagement/LearningTemplateLayout.js +27 -4
- package/dist/features/LearningManagement/LearningTemplateLayout.js.map +1 -1
- package/dist/features/LearningManagement/Sidebar.js +25 -9
- package/dist/features/LearningManagement/Sidebar.js.map +1 -1
- package/dist/features/LearningManagement/SidebarWrapper.js +6 -2
- package/dist/features/LearningManagement/SidebarWrapper.js.map +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js +15 -2
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
- package/dist/features/LearningManagement/store/useLMSConfigStore.js +1 -0
- package/dist/features/LearningManagement/store/useLMSConfigStore.js.map +1 -1
- package/dist/features/LearningManagement/styles/LearningTemplateLayout.module.css.js +2 -2
- package/dist/features/LearningManagement/styles/Sidebar.module.css.js +2 -2
- package/dist/schema-driven/components/DropdownSectionField.js +26 -2
- package/dist/schema-driven/components/DropdownSectionField.js.map +1 -1
- package/dist/schema-driven/components/GroupEditRow.js +11 -5
- package/dist/schema-driven/components/GroupEditRow.js.map +1 -1
- package/dist/schema-driven/components/PageRangeInputField.js +87 -0
- package/dist/schema-driven/components/PageRangeInputField.js.map +1 -0
- package/dist/schema-driven/components/TableComponent.js +64 -52
- package/dist/schema-driven/components/TableComponent.js.map +1 -1
- package/dist/schema-driven/helper.js +65 -4
- package/dist/schema-driven/helper.js.map +1 -1
- package/dist/schema-driven/hooks/useSectionEditSession.js +5 -1
- package/dist/schema-driven/hooks/useSectionEditSession.js.map +1 -1
- package/dist/schema-driven/types.js.map +1 -1
- package/dist/schema-driven/utils/PayloadUtils.js +4 -2
- package/dist/schema-driven/utils/PayloadUtils.js.map +1 -1
- package/dist/types/src/CommonConstants/CommonConstants.d.ts +7 -0
- package/dist/types/src/CommonConstants/CommonConstants.d.ts.map +1 -1
- package/dist/types/src/ComponentRegistry.d.ts.map +1 -1
- package/dist/types/src/ILMarketplaceWrapper.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/NormalChat.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/PromoteFlow.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.api.d.ts +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.api.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/Sidebar.d.ts +3 -0
- package/dist/types/src/features/LearningManagement/Sidebar.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/SidebarWrapper.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/SidebarWrapper.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts +14 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/DropdownSectionField.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/GroupEditRow.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/PageRangeInputField.d.ts +8 -0
- package/dist/types/src/schema-driven/components/PageRangeInputField.d.ts.map +1 -0
- package/dist/types/src/schema-driven/components/TableComponent.d.ts.map +1 -1
- package/dist/types/src/schema-driven/helper.d.ts +13 -1
- package/dist/types/src/schema-driven/helper.d.ts.map +1 -1
- package/dist/types/src/schema-driven/hooks/useSectionEditSession.d.ts.map +1 -1
- package/dist/types/src/schema-driven/types.d.ts +11 -0
- package/dist/types/src/schema-driven/types.d.ts.map +1 -1
- package/dist/types/src/schema-driven/utils/PayloadUtils.d.ts.map +1 -1
- package/package.json +6 -5
|
@@ -62,7 +62,7 @@ const isMissingPromotionStatus = (error) => {
|
|
|
62
62
|
return typeof error === "object" && error !== null && "response" in error && ((_a = error.response) == null ? void 0 : _a.status) === 404;
|
|
63
63
|
};
|
|
64
64
|
function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
65
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
65
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
66
66
|
const [openSections, setOpenSections] = React.useState({
|
|
67
67
|
overview: true
|
|
68
68
|
});
|
|
@@ -83,6 +83,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
83
83
|
const [isStatusPollingStopped, setIsStatusPollingStopped] = React.useState(false);
|
|
84
84
|
const [isInitialStatusLoading, setIsInitialStatusLoading] = React.useState(true);
|
|
85
85
|
const [isCheckingPreflight, setIsCheckingPreflight] = React.useState(false);
|
|
86
|
+
const [promotionStatusForActions, setPromotionStatusForActions] = React.useState(null);
|
|
86
87
|
const [preflightResult, setPreflightResult] = React.useState(null);
|
|
87
88
|
const sourceEnvironment = promoteFlow_store.usePromoteFlowStore((state) => state.sourceEnvironment);
|
|
88
89
|
const destinationEnvironment = promoteFlow_store.usePromoteFlowStore((state) => state.destinationEnvironment);
|
|
@@ -135,15 +136,33 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
135
136
|
);
|
|
136
137
|
const latestPromotionTaskId = React.useMemo(() => {
|
|
137
138
|
var _a2;
|
|
138
|
-
const
|
|
139
|
+
const latestPromotion2 = promotionHistory.reduce(
|
|
139
140
|
(latest, entry) => {
|
|
140
141
|
if (!latest) return entry;
|
|
141
142
|
return Date.parse(entry.updated_at) > Date.parse(latest.updated_at) ? entry : latest;
|
|
142
143
|
},
|
|
143
144
|
null
|
|
144
145
|
);
|
|
145
|
-
return (_a2 =
|
|
146
|
+
return (_a2 = latestPromotion2 == null ? void 0 : latestPromotion2.promotion_task_id) != null ? _a2 : null;
|
|
146
147
|
}, [promotionHistory]);
|
|
148
|
+
const latestPromotion = React.useMemo(
|
|
149
|
+
() => promotionHistory.reduce((latest, entry) => {
|
|
150
|
+
if (!latest) return entry;
|
|
151
|
+
return Date.parse(entry.updated_at) > Date.parse(latest.updated_at) ? entry : latest;
|
|
152
|
+
}, null),
|
|
153
|
+
[promotionHistory]
|
|
154
|
+
);
|
|
155
|
+
const isPromotionInProgress = ["MIGRATING", "ROLLBACK_IN_PROGRESS"].includes(
|
|
156
|
+
(_c = promotionStatusForActions == null ? void 0 : promotionStatusForActions.status) != null ? _c : ""
|
|
157
|
+
);
|
|
158
|
+
const latestHistoryIsScheduled = (latestPromotion == null ? void 0 : latestPromotion.status) === "SCHEDULED" || (promotionStatusForActions == null ? void 0 : promotionStatusForActions.status) === "SCHEDULED";
|
|
159
|
+
const promotionActionRestriction = isPromotionInProgress ? "A promotion is currently in progress. Wait for it to complete before taking another promotion action." : latestHistoryIsScheduled ? "The latest promotion is scheduled. You may schedule another promotion, but cannot check readiness or promote now." : null;
|
|
160
|
+
const canCheckPromotionReadiness = canPromote && !promotionActionRestriction;
|
|
161
|
+
const canPromoteNow = canPromote && !promotionActionRestriction;
|
|
162
|
+
const canPromoteLater = canPromote && !isPromotionInProgress;
|
|
163
|
+
const environmentConfigurationTooltip = "Configure both source and destination environments first.";
|
|
164
|
+
const readinessAndNowTooltip = promotionActionRestriction != null ? promotionActionRestriction : environmentConfigurationTooltip;
|
|
165
|
+
const promoteLaterTooltip = isPromotionInProgress ? promotionActionRestriction : environmentConfigurationTooltip;
|
|
147
166
|
const promoteActionLabel = (latestPromotionForPair == null ? void 0 : latestPromotionForPair.status) === "SUCCESS" ? "Sync" : "Promote Now";
|
|
148
167
|
const toggleSection = (id) => {
|
|
149
168
|
setOpenSections((current) => ({ ...current, [id]: !current[id] }));
|
|
@@ -154,9 +173,11 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
154
173
|
setIsInitialStatusLoading(true);
|
|
155
174
|
setError(null);
|
|
156
175
|
setPromotionTask(null);
|
|
176
|
+
setPromotionStatusForActions(null);
|
|
157
177
|
const refreshInitialPromotionState = async () => {
|
|
158
178
|
try {
|
|
159
|
-
await promoteFlow_api.getPromotionStatus(guidelineResourceId);
|
|
179
|
+
const status = await promoteFlow_api.getPromotionStatus(guidelineResourceId);
|
|
180
|
+
if (isCurrent) setPromotionStatusForActions(status);
|
|
160
181
|
} catch (statusError) {
|
|
161
182
|
if (isCurrent && !isMissingPromotionStatus(statusError)) {
|
|
162
183
|
setError(
|
|
@@ -263,12 +284,15 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
263
284
|
};
|
|
264
285
|
}, [promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.created_by, promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.promotion_task_id]);
|
|
265
286
|
React.useEffect(() => {
|
|
266
|
-
|
|
287
|
+
const promotionStatusToPoll = promotionTaskForGuideline != null ? promotionTaskForGuideline : promotionStatusForActions;
|
|
288
|
+
if (!promotionStatusToPoll || isStatusPollingStopped || !["MIGRATING", "ROLLBACK_IN_PROGRESS"].includes(promotionStatusToPoll.status)) {
|
|
267
289
|
return;
|
|
268
290
|
}
|
|
269
291
|
const pollStatus = async () => {
|
|
270
292
|
try {
|
|
271
|
-
|
|
293
|
+
const status = await promoteFlow_api.getPromotionStatus(guidelineResourceId);
|
|
294
|
+
if (promotionTaskForGuideline) setPromotionTask(status, guidelineResourceId);
|
|
295
|
+
setPromotionStatusForActions(status);
|
|
272
296
|
} catch (pollError) {
|
|
273
297
|
setIsStatusPollingStopped(true);
|
|
274
298
|
setError(
|
|
@@ -279,9 +303,16 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
279
303
|
};
|
|
280
304
|
const intervalId = window.setInterval(pollStatus, 3e4);
|
|
281
305
|
return () => window.clearInterval(intervalId);
|
|
282
|
-
}, [
|
|
306
|
+
}, [
|
|
307
|
+
guidelineResourceId,
|
|
308
|
+
isStatusPollingStopped,
|
|
309
|
+
promotionStatusForActions,
|
|
310
|
+
promotionTaskForGuideline,
|
|
311
|
+
setError,
|
|
312
|
+
setPromotionTask
|
|
313
|
+
]);
|
|
283
314
|
const handlePromoteNow = async () => {
|
|
284
|
-
if (!
|
|
315
|
+
if (!canPromoteNow || !sourceEnvironment || !destinationEnvironment) return;
|
|
285
316
|
setSubmitting(true);
|
|
286
317
|
setSubmittingAction("now");
|
|
287
318
|
setError(null);
|
|
@@ -299,8 +330,11 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
299
330
|
});
|
|
300
331
|
setIsStatusPollingStopped(false);
|
|
301
332
|
setPromotionTask(task, guidelineResourceId);
|
|
333
|
+
setPromotionStatusForActions(task);
|
|
302
334
|
try {
|
|
303
|
-
|
|
335
|
+
const status = await promoteFlow_api.getPromotionStatus(guidelineResourceId);
|
|
336
|
+
setPromotionTask(status, guidelineResourceId);
|
|
337
|
+
setPromotionStatusForActions(status);
|
|
304
338
|
} catch (e) {
|
|
305
339
|
}
|
|
306
340
|
onPromote == null ? void 0 : onPromote(guideline);
|
|
@@ -315,7 +349,8 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
315
349
|
}
|
|
316
350
|
};
|
|
317
351
|
const handlePreflightCheck = async () => {
|
|
318
|
-
if (!sourceEnvironment || !destinationEnvironment || isCheckingPreflight)
|
|
352
|
+
if (!canCheckPromotionReadiness || !sourceEnvironment || !destinationEnvironment || isCheckingPreflight)
|
|
353
|
+
return;
|
|
319
354
|
setIsCheckingPreflight(true);
|
|
320
355
|
setPreflightResult(null);
|
|
321
356
|
setError(null);
|
|
@@ -366,7 +401,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
366
401
|
};
|
|
367
402
|
const handlePromoteLater = async () => {
|
|
368
403
|
var _a2, _b2;
|
|
369
|
-
if (!
|
|
404
|
+
if (!canPromoteLater || !sourceEnvironment || !destinationEnvironment) return;
|
|
370
405
|
setSubmitting(true);
|
|
371
406
|
setSubmittingAction("later");
|
|
372
407
|
setError(null);
|
|
@@ -396,6 +431,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
396
431
|
},
|
|
397
432
|
guidelineResourceId
|
|
398
433
|
);
|
|
434
|
+
setPromotionStatusForActions(scheduledPromotion);
|
|
399
435
|
onPromote == null ? void 0 : onPromote(guideline);
|
|
400
436
|
} catch (promotionError) {
|
|
401
437
|
setError(
|
|
@@ -417,8 +453,11 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
417
453
|
const task = await promoteFlow_api.triggerScheduledPromotion(triggerUrl);
|
|
418
454
|
setIsStatusPollingStopped(false);
|
|
419
455
|
setPromotionTask(task, guidelineResourceId);
|
|
456
|
+
setPromotionStatusForActions(task);
|
|
420
457
|
try {
|
|
421
|
-
|
|
458
|
+
const status = await promoteFlow_api.getPromotionStatus(guidelineResourceId);
|
|
459
|
+
setPromotionTask(status, guidelineResourceId);
|
|
460
|
+
setPromotionStatusForActions(status);
|
|
422
461
|
} catch (e) {
|
|
423
462
|
}
|
|
424
463
|
onPromote == null ? void 0 : onPromote(guideline);
|
|
@@ -463,9 +502,29 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
463
502
|
setHistoryActionTaskId(null);
|
|
464
503
|
}
|
|
465
504
|
};
|
|
466
|
-
const handleBack = () => {
|
|
505
|
+
const handleBack = async () => {
|
|
467
506
|
if (promotionTaskForGuideline) {
|
|
468
507
|
setPromotionTask(null);
|
|
508
|
+
setIsInitialStatusLoading(true);
|
|
509
|
+
setIsLoadingHistory(true);
|
|
510
|
+
try {
|
|
511
|
+
const [status, history] = await Promise.all([
|
|
512
|
+
promoteFlow_api.getPromotionStatus(guidelineResourceId),
|
|
513
|
+
promoteFlow_api.getPromotionHistory(guidelineResourceId)
|
|
514
|
+
]);
|
|
515
|
+
setPromotionStatusForActions(status);
|
|
516
|
+
setPromotionHistory(history);
|
|
517
|
+
} catch (refreshError) {
|
|
518
|
+
if (!isMissingPromotionStatus(refreshError)) {
|
|
519
|
+
setError(
|
|
520
|
+
refreshError instanceof Error ? refreshError.message : "Unable to refresh promotion details.",
|
|
521
|
+
guidelineResourceId
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
} finally {
|
|
525
|
+
setIsInitialStatusLoading(false);
|
|
526
|
+
setIsLoadingHistory(false);
|
|
527
|
+
}
|
|
469
528
|
return;
|
|
470
529
|
}
|
|
471
530
|
handleGoToMarketplace();
|
|
@@ -654,22 +713,23 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
654
713
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
655
714
|
StyledPromoteTooltip,
|
|
656
715
|
{
|
|
657
|
-
title:
|
|
716
|
+
title: canCheckPromotionReadiness ? "Optionally check that this migration is ready before promoting." : readinessAndNowTooltip,
|
|
717
|
+
disableHoverListener: canCheckPromotionReadiness,
|
|
658
718
|
placement: "top",
|
|
659
719
|
arrow: true,
|
|
660
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
720
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
661
721
|
"button",
|
|
662
722
|
{
|
|
663
723
|
type: "button",
|
|
664
724
|
className: PromoteFlow_module["default"].secondaryButton,
|
|
665
725
|
onClick: handlePreflightCheck,
|
|
666
|
-
disabled: !
|
|
726
|
+
disabled: !canCheckPromotionReadiness || isCheckingPreflight,
|
|
667
727
|
children: [
|
|
668
728
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheck, { className: PromoteFlow_module["default"].buttonIcon, strokeWidth: 2.2 }),
|
|
669
729
|
isCheckingPreflight ? "Checking readiness\u2026" : "Check promotion readiness"
|
|
670
730
|
]
|
|
671
731
|
}
|
|
672
|
-
)
|
|
732
|
+
) })
|
|
673
733
|
}
|
|
674
734
|
),
|
|
675
735
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -689,7 +749,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
689
749
|
type: "button",
|
|
690
750
|
className: PromoteFlow_module["default"].primaryButton,
|
|
691
751
|
onClick: handlePromoteNow,
|
|
692
|
-
disabled: !
|
|
752
|
+
disabled: !canPromoteNow,
|
|
693
753
|
children: [
|
|
694
754
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpRight, { className: PromoteFlow_module["default"].buttonIcon, strokeWidth: 2.2 }),
|
|
695
755
|
isSubmitting ? "Starting promotion\u2026" : promoteActionLabel
|
|
@@ -709,39 +769,48 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
709
769
|
}
|
|
710
770
|
)
|
|
711
771
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
712
|
-
submittingAction !== "now" && /* @__PURE__ */ jsxRuntime.
|
|
713
|
-
|
|
772
|
+
submittingAction !== "now" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
773
|
+
StyledPromoteTooltip,
|
|
714
774
|
{
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
children:
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
775
|
+
title: canPromoteLater ? "" : promoteLaterTooltip,
|
|
776
|
+
disableHoverListener: canPromoteLater,
|
|
777
|
+
placement: "top",
|
|
778
|
+
arrow: true,
|
|
779
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
780
|
+
"button",
|
|
781
|
+
{
|
|
782
|
+
type: "button",
|
|
783
|
+
className: PromoteFlow_module["default"].secondaryButton,
|
|
784
|
+
onClick: handlePromoteLater,
|
|
785
|
+
disabled: !canPromoteLater,
|
|
786
|
+
children: [
|
|
787
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: PromoteFlow_module["default"].buttonIcon, strokeWidth: 2.2 }),
|
|
788
|
+
submittingAction === "later" ? "Scheduling\u2026" : "Promote later"
|
|
789
|
+
]
|
|
790
|
+
}
|
|
791
|
+
) })
|
|
723
792
|
}
|
|
724
793
|
),
|
|
725
794
|
submittingAction !== "later" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
726
795
|
StyledPromoteTooltip,
|
|
727
796
|
{
|
|
728
|
-
title:
|
|
729
|
-
disableHoverListener:
|
|
797
|
+
title: canPromoteNow ? "" : readinessAndNowTooltip,
|
|
798
|
+
disableHoverListener: canPromoteNow,
|
|
730
799
|
placement: "top",
|
|
731
800
|
arrow: true,
|
|
732
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
801
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
733
802
|
"button",
|
|
734
803
|
{
|
|
735
804
|
type: "button",
|
|
736
805
|
className: PromoteFlow_module["default"].primaryButton,
|
|
737
806
|
onClick: handlePromoteNow,
|
|
738
|
-
disabled: !
|
|
807
|
+
disabled: !canPromoteNow,
|
|
739
808
|
children: [
|
|
740
809
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpRight, { className: PromoteFlow_module["default"].buttonIcon, strokeWidth: 2.2 }),
|
|
741
810
|
submittingAction === "now" ? "Starting promotion\u2026" : promoteActionLabel
|
|
742
811
|
]
|
|
743
812
|
}
|
|
744
|
-
)
|
|
813
|
+
) })
|
|
745
814
|
}
|
|
746
815
|
)
|
|
747
816
|
] })
|
|
@@ -757,7 +826,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
757
826
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: PromoteFlow_module["default"].promotionStatusField, children: [
|
|
758
827
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: PromoteFlow_module["default"].metaLabel, children: "Promotion Status" }),
|
|
759
828
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: PromoteFlow_module["default"].statusWithPill, children: [
|
|
760
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: PromoteFlow_module["default"].statusValue, children: (
|
|
829
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: PromoteFlow_module["default"].statusValue, children: (_d = promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.status) != null ? _d : "In Progress" }),
|
|
761
830
|
(promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.status) === "MIGRATING" && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: PromoteFlow_module["default"].ingestingPill, children: [
|
|
762
831
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.LoaderCircle, { className: PromoteFlow_module["default"].migrationLoader, "aria-hidden": "true" }),
|
|
763
832
|
"Migration in progress"
|
|
@@ -914,7 +983,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
914
983
|
onSave: handleSaveEnvironment,
|
|
915
984
|
onSelectPreset: setEnvironment,
|
|
916
985
|
onPresetTierChange: setConfigSearchTier,
|
|
917
|
-
presetTier: configSearchTier != null ? configSearchTier : configuredEnvironment === "source" ? (
|
|
986
|
+
presetTier: configSearchTier != null ? configSearchTier : configuredEnvironment === "source" ? (_e = sourceEnvironment == null ? void 0 : sourceEnvironment.env_tier) != null ? _e : "dev" : configuredEnvironment === "destination" ? (_f = destinationEnvironment == null ? void 0 : destinationEnvironment.env_tier) != null ? _f : permittedDestinationTiers[0] : configuredEnvironment === "tenantSource" ? (_g = tenantSourceEnvironment == null ? void 0 : tenantSourceEnvironment.env_tier) != null ? _g : "dev" : (_h = tenantDestinationEnvironment == null ? void 0 : tenantDestinationEnvironment.env_tier) != null ? _h : permittedDestinationTiers[0],
|
|
918
987
|
onClose: () => {
|
|
919
988
|
setConfiguredEnvironment(null);
|
|
920
989
|
setConfigSearchTier(null);
|