@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
|
@@ -54,7 +54,7 @@ const isMissingPromotionStatus = (error) => {
|
|
|
54
54
|
return typeof error === "object" && error !== null && "response" in error && ((_a = error.response) == null ? void 0 : _a.status) === 404;
|
|
55
55
|
};
|
|
56
56
|
function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
57
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
57
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
58
58
|
const [openSections, setOpenSections] = useState({
|
|
59
59
|
overview: true
|
|
60
60
|
});
|
|
@@ -75,6 +75,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
75
75
|
const [isStatusPollingStopped, setIsStatusPollingStopped] = useState(false);
|
|
76
76
|
const [isInitialStatusLoading, setIsInitialStatusLoading] = useState(true);
|
|
77
77
|
const [isCheckingPreflight, setIsCheckingPreflight] = useState(false);
|
|
78
|
+
const [promotionStatusForActions, setPromotionStatusForActions] = useState(null);
|
|
78
79
|
const [preflightResult, setPreflightResult] = useState(null);
|
|
79
80
|
const sourceEnvironment = usePromoteFlowStore((state) => state.sourceEnvironment);
|
|
80
81
|
const destinationEnvironment = usePromoteFlowStore((state) => state.destinationEnvironment);
|
|
@@ -127,15 +128,33 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
127
128
|
);
|
|
128
129
|
const latestPromotionTaskId = useMemo(() => {
|
|
129
130
|
var _a2;
|
|
130
|
-
const
|
|
131
|
+
const latestPromotion2 = promotionHistory.reduce(
|
|
131
132
|
(latest, entry) => {
|
|
132
133
|
if (!latest) return entry;
|
|
133
134
|
return Date.parse(entry.updated_at) > Date.parse(latest.updated_at) ? entry : latest;
|
|
134
135
|
},
|
|
135
136
|
null
|
|
136
137
|
);
|
|
137
|
-
return (_a2 =
|
|
138
|
+
return (_a2 = latestPromotion2 == null ? void 0 : latestPromotion2.promotion_task_id) != null ? _a2 : null;
|
|
138
139
|
}, [promotionHistory]);
|
|
140
|
+
const latestPromotion = useMemo(
|
|
141
|
+
() => promotionHistory.reduce((latest, entry) => {
|
|
142
|
+
if (!latest) return entry;
|
|
143
|
+
return Date.parse(entry.updated_at) > Date.parse(latest.updated_at) ? entry : latest;
|
|
144
|
+
}, null),
|
|
145
|
+
[promotionHistory]
|
|
146
|
+
);
|
|
147
|
+
const isPromotionInProgress = ["MIGRATING", "ROLLBACK_IN_PROGRESS"].includes(
|
|
148
|
+
(_c = promotionStatusForActions == null ? void 0 : promotionStatusForActions.status) != null ? _c : ""
|
|
149
|
+
);
|
|
150
|
+
const latestHistoryIsScheduled = (latestPromotion == null ? void 0 : latestPromotion.status) === "SCHEDULED" || (promotionStatusForActions == null ? void 0 : promotionStatusForActions.status) === "SCHEDULED";
|
|
151
|
+
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;
|
|
152
|
+
const canCheckPromotionReadiness = canPromote && !promotionActionRestriction;
|
|
153
|
+
const canPromoteNow = canPromote && !promotionActionRestriction;
|
|
154
|
+
const canPromoteLater = canPromote && !isPromotionInProgress;
|
|
155
|
+
const environmentConfigurationTooltip = "Configure both source and destination environments first.";
|
|
156
|
+
const readinessAndNowTooltip = promotionActionRestriction != null ? promotionActionRestriction : environmentConfigurationTooltip;
|
|
157
|
+
const promoteLaterTooltip = isPromotionInProgress ? promotionActionRestriction : environmentConfigurationTooltip;
|
|
139
158
|
const promoteActionLabel = (latestPromotionForPair == null ? void 0 : latestPromotionForPair.status) === "SUCCESS" ? "Sync" : "Promote Now";
|
|
140
159
|
const toggleSection = (id) => {
|
|
141
160
|
setOpenSections((current) => ({ ...current, [id]: !current[id] }));
|
|
@@ -146,9 +165,11 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
146
165
|
setIsInitialStatusLoading(true);
|
|
147
166
|
setError(null);
|
|
148
167
|
setPromotionTask(null);
|
|
168
|
+
setPromotionStatusForActions(null);
|
|
149
169
|
const refreshInitialPromotionState = async () => {
|
|
150
170
|
try {
|
|
151
|
-
await getPromotionStatus(guidelineResourceId);
|
|
171
|
+
const status = await getPromotionStatus(guidelineResourceId);
|
|
172
|
+
if (isCurrent) setPromotionStatusForActions(status);
|
|
152
173
|
} catch (statusError) {
|
|
153
174
|
if (isCurrent && !isMissingPromotionStatus(statusError)) {
|
|
154
175
|
setError(
|
|
@@ -255,12 +276,15 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
255
276
|
};
|
|
256
277
|
}, [promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.created_by, promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.promotion_task_id]);
|
|
257
278
|
useEffect(() => {
|
|
258
|
-
|
|
279
|
+
const promotionStatusToPoll = promotionTaskForGuideline != null ? promotionTaskForGuideline : promotionStatusForActions;
|
|
280
|
+
if (!promotionStatusToPoll || isStatusPollingStopped || !["MIGRATING", "ROLLBACK_IN_PROGRESS"].includes(promotionStatusToPoll.status)) {
|
|
259
281
|
return;
|
|
260
282
|
}
|
|
261
283
|
const pollStatus = async () => {
|
|
262
284
|
try {
|
|
263
|
-
|
|
285
|
+
const status = await getPromotionStatus(guidelineResourceId);
|
|
286
|
+
if (promotionTaskForGuideline) setPromotionTask(status, guidelineResourceId);
|
|
287
|
+
setPromotionStatusForActions(status);
|
|
264
288
|
} catch (pollError) {
|
|
265
289
|
setIsStatusPollingStopped(true);
|
|
266
290
|
setError(
|
|
@@ -271,9 +295,16 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
271
295
|
};
|
|
272
296
|
const intervalId = window.setInterval(pollStatus, 3e4);
|
|
273
297
|
return () => window.clearInterval(intervalId);
|
|
274
|
-
}, [
|
|
298
|
+
}, [
|
|
299
|
+
guidelineResourceId,
|
|
300
|
+
isStatusPollingStopped,
|
|
301
|
+
promotionStatusForActions,
|
|
302
|
+
promotionTaskForGuideline,
|
|
303
|
+
setError,
|
|
304
|
+
setPromotionTask
|
|
305
|
+
]);
|
|
275
306
|
const handlePromoteNow = async () => {
|
|
276
|
-
if (!
|
|
307
|
+
if (!canPromoteNow || !sourceEnvironment || !destinationEnvironment) return;
|
|
277
308
|
setSubmitting(true);
|
|
278
309
|
setSubmittingAction("now");
|
|
279
310
|
setError(null);
|
|
@@ -291,8 +322,11 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
291
322
|
});
|
|
292
323
|
setIsStatusPollingStopped(false);
|
|
293
324
|
setPromotionTask(task, guidelineResourceId);
|
|
325
|
+
setPromotionStatusForActions(task);
|
|
294
326
|
try {
|
|
295
|
-
|
|
327
|
+
const status = await getPromotionStatus(guidelineResourceId);
|
|
328
|
+
setPromotionTask(status, guidelineResourceId);
|
|
329
|
+
setPromotionStatusForActions(status);
|
|
296
330
|
} catch (e) {
|
|
297
331
|
}
|
|
298
332
|
onPromote == null ? void 0 : onPromote(guideline);
|
|
@@ -307,7 +341,8 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
307
341
|
}
|
|
308
342
|
};
|
|
309
343
|
const handlePreflightCheck = async () => {
|
|
310
|
-
if (!sourceEnvironment || !destinationEnvironment || isCheckingPreflight)
|
|
344
|
+
if (!canCheckPromotionReadiness || !sourceEnvironment || !destinationEnvironment || isCheckingPreflight)
|
|
345
|
+
return;
|
|
311
346
|
setIsCheckingPreflight(true);
|
|
312
347
|
setPreflightResult(null);
|
|
313
348
|
setError(null);
|
|
@@ -358,7 +393,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
358
393
|
};
|
|
359
394
|
const handlePromoteLater = async () => {
|
|
360
395
|
var _a2, _b2;
|
|
361
|
-
if (!
|
|
396
|
+
if (!canPromoteLater || !sourceEnvironment || !destinationEnvironment) return;
|
|
362
397
|
setSubmitting(true);
|
|
363
398
|
setSubmittingAction("later");
|
|
364
399
|
setError(null);
|
|
@@ -388,6 +423,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
388
423
|
},
|
|
389
424
|
guidelineResourceId
|
|
390
425
|
);
|
|
426
|
+
setPromotionStatusForActions(scheduledPromotion);
|
|
391
427
|
onPromote == null ? void 0 : onPromote(guideline);
|
|
392
428
|
} catch (promotionError) {
|
|
393
429
|
setError(
|
|
@@ -409,8 +445,11 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
409
445
|
const task = await triggerScheduledPromotion(triggerUrl);
|
|
410
446
|
setIsStatusPollingStopped(false);
|
|
411
447
|
setPromotionTask(task, guidelineResourceId);
|
|
448
|
+
setPromotionStatusForActions(task);
|
|
412
449
|
try {
|
|
413
|
-
|
|
450
|
+
const status = await getPromotionStatus(guidelineResourceId);
|
|
451
|
+
setPromotionTask(status, guidelineResourceId);
|
|
452
|
+
setPromotionStatusForActions(status);
|
|
414
453
|
} catch (e) {
|
|
415
454
|
}
|
|
416
455
|
onPromote == null ? void 0 : onPromote(guideline);
|
|
@@ -455,9 +494,29 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
455
494
|
setHistoryActionTaskId(null);
|
|
456
495
|
}
|
|
457
496
|
};
|
|
458
|
-
const handleBack = () => {
|
|
497
|
+
const handleBack = async () => {
|
|
459
498
|
if (promotionTaskForGuideline) {
|
|
460
499
|
setPromotionTask(null);
|
|
500
|
+
setIsInitialStatusLoading(true);
|
|
501
|
+
setIsLoadingHistory(true);
|
|
502
|
+
try {
|
|
503
|
+
const [status, history] = await Promise.all([
|
|
504
|
+
getPromotionStatus(guidelineResourceId),
|
|
505
|
+
getPromotionHistory(guidelineResourceId)
|
|
506
|
+
]);
|
|
507
|
+
setPromotionStatusForActions(status);
|
|
508
|
+
setPromotionHistory(history);
|
|
509
|
+
} catch (refreshError) {
|
|
510
|
+
if (!isMissingPromotionStatus(refreshError)) {
|
|
511
|
+
setError(
|
|
512
|
+
refreshError instanceof Error ? refreshError.message : "Unable to refresh promotion details.",
|
|
513
|
+
guidelineResourceId
|
|
514
|
+
);
|
|
515
|
+
}
|
|
516
|
+
} finally {
|
|
517
|
+
setIsInitialStatusLoading(false);
|
|
518
|
+
setIsLoadingHistory(false);
|
|
519
|
+
}
|
|
461
520
|
return;
|
|
462
521
|
}
|
|
463
522
|
handleGoToMarketplace();
|
|
@@ -646,22 +705,23 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
646
705
|
/* @__PURE__ */ jsx(
|
|
647
706
|
StyledPromoteTooltip,
|
|
648
707
|
{
|
|
649
|
-
title:
|
|
708
|
+
title: canCheckPromotionReadiness ? "Optionally check that this migration is ready before promoting." : readinessAndNowTooltip,
|
|
709
|
+
disableHoverListener: canCheckPromotionReadiness,
|
|
650
710
|
placement: "top",
|
|
651
711
|
arrow: true,
|
|
652
|
-
children: /* @__PURE__ */ jsxs(
|
|
712
|
+
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsxs(
|
|
653
713
|
"button",
|
|
654
714
|
{
|
|
655
715
|
type: "button",
|
|
656
716
|
className: cssStyles.secondaryButton,
|
|
657
717
|
onClick: handlePreflightCheck,
|
|
658
|
-
disabled: !
|
|
718
|
+
disabled: !canCheckPromotionReadiness || isCheckingPreflight,
|
|
659
719
|
children: [
|
|
660
720
|
/* @__PURE__ */ jsx(CircleCheck, { className: cssStyles.buttonIcon, strokeWidth: 2.2 }),
|
|
661
721
|
isCheckingPreflight ? "Checking readiness\u2026" : "Check promotion readiness"
|
|
662
722
|
]
|
|
663
723
|
}
|
|
664
|
-
)
|
|
724
|
+
) })
|
|
665
725
|
}
|
|
666
726
|
),
|
|
667
727
|
/* @__PURE__ */ jsx(
|
|
@@ -681,7 +741,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
681
741
|
type: "button",
|
|
682
742
|
className: cssStyles.primaryButton,
|
|
683
743
|
onClick: handlePromoteNow,
|
|
684
|
-
disabled: !
|
|
744
|
+
disabled: !canPromoteNow,
|
|
685
745
|
children: [
|
|
686
746
|
/* @__PURE__ */ jsx(ArrowUpRight, { className: cssStyles.buttonIcon, strokeWidth: 2.2 }),
|
|
687
747
|
isSubmitting ? "Starting promotion\u2026" : promoteActionLabel
|
|
@@ -701,39 +761,48 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
701
761
|
}
|
|
702
762
|
)
|
|
703
763
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
704
|
-
submittingAction !== "now" && /* @__PURE__ */
|
|
705
|
-
|
|
764
|
+
submittingAction !== "now" && /* @__PURE__ */ jsx(
|
|
765
|
+
StyledPromoteTooltip,
|
|
706
766
|
{
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
children:
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
767
|
+
title: canPromoteLater ? "" : promoteLaterTooltip,
|
|
768
|
+
disableHoverListener: canPromoteLater,
|
|
769
|
+
placement: "top",
|
|
770
|
+
arrow: true,
|
|
771
|
+
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsxs(
|
|
772
|
+
"button",
|
|
773
|
+
{
|
|
774
|
+
type: "button",
|
|
775
|
+
className: cssStyles.secondaryButton,
|
|
776
|
+
onClick: handlePromoteLater,
|
|
777
|
+
disabled: !canPromoteLater,
|
|
778
|
+
children: [
|
|
779
|
+
/* @__PURE__ */ jsx(Calendar, { className: cssStyles.buttonIcon, strokeWidth: 2.2 }),
|
|
780
|
+
submittingAction === "later" ? "Scheduling\u2026" : "Promote later"
|
|
781
|
+
]
|
|
782
|
+
}
|
|
783
|
+
) })
|
|
715
784
|
}
|
|
716
785
|
),
|
|
717
786
|
submittingAction !== "later" && /* @__PURE__ */ jsx(
|
|
718
787
|
StyledPromoteTooltip,
|
|
719
788
|
{
|
|
720
|
-
title:
|
|
721
|
-
disableHoverListener:
|
|
789
|
+
title: canPromoteNow ? "" : readinessAndNowTooltip,
|
|
790
|
+
disableHoverListener: canPromoteNow,
|
|
722
791
|
placement: "top",
|
|
723
792
|
arrow: true,
|
|
724
|
-
children: /* @__PURE__ */ jsxs(
|
|
793
|
+
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsxs(
|
|
725
794
|
"button",
|
|
726
795
|
{
|
|
727
796
|
type: "button",
|
|
728
797
|
className: cssStyles.primaryButton,
|
|
729
798
|
onClick: handlePromoteNow,
|
|
730
|
-
disabled: !
|
|
799
|
+
disabled: !canPromoteNow,
|
|
731
800
|
children: [
|
|
732
801
|
/* @__PURE__ */ jsx(ArrowUpRight, { className: cssStyles.buttonIcon, strokeWidth: 2.2 }),
|
|
733
802
|
submittingAction === "now" ? "Starting promotion\u2026" : promoteActionLabel
|
|
734
803
|
]
|
|
735
804
|
}
|
|
736
|
-
)
|
|
805
|
+
) })
|
|
737
806
|
}
|
|
738
807
|
)
|
|
739
808
|
] })
|
|
@@ -749,7 +818,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
749
818
|
/* @__PURE__ */ jsxs("div", { className: cssStyles.promotionStatusField, children: [
|
|
750
819
|
/* @__PURE__ */ jsx("span", { className: cssStyles.metaLabel, children: "Promotion Status" }),
|
|
751
820
|
/* @__PURE__ */ jsxs("div", { className: cssStyles.statusWithPill, children: [
|
|
752
|
-
/* @__PURE__ */ jsx("span", { className: cssStyles.statusValue, children: (
|
|
821
|
+
/* @__PURE__ */ jsx("span", { className: cssStyles.statusValue, children: (_d = promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.status) != null ? _d : "In Progress" }),
|
|
753
822
|
(promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.status) === "MIGRATING" && /* @__PURE__ */ jsxs("span", { className: cssStyles.ingestingPill, children: [
|
|
754
823
|
/* @__PURE__ */ jsx(LoaderCircle, { className: cssStyles.migrationLoader, "aria-hidden": "true" }),
|
|
755
824
|
"Migration in progress"
|
|
@@ -906,7 +975,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
906
975
|
onSave: handleSaveEnvironment,
|
|
907
976
|
onSelectPreset: setEnvironment,
|
|
908
977
|
onPresetTierChange: setConfigSearchTier,
|
|
909
|
-
presetTier: configSearchTier != null ? configSearchTier : configuredEnvironment === "source" ? (
|
|
978
|
+
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],
|
|
910
979
|
onClose: () => {
|
|
911
980
|
setConfiguredEnvironment(null);
|
|
912
981
|
setConfigSearchTier(null);
|