Skip to content

Commit

Permalink
Address UX changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DaoDaoNoCode committed Feb 28, 2025
1 parent 50cf6f7 commit bf9c4e3
Showing 1 changed file with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,17 @@ const ManageSamplePipelinesModal: React.FC<ManageSamplePipelinesModalProps> = ({
)
.then((dspa) => {
const isEnabled = dspa.spec.apiServer?.managedPipelines?.instructLab?.state === 'Managed';
notification.info(
isEnabled ? 'InstructLab pipeline enabled' : 'InstructLab pipeline disabled',
isEnabled ? 'The server will restart for this process.' : '',
);
if (isEnabled) {
notification.info(

Check warning on line 58 in frontend/src/concepts/pipelines/content/ManageSamplePipelinesModal.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/concepts/pipelines/content/ManageSamplePipelinesModal.tsx#L55-L58

Added lines #L55 - L58 were not covered by tests
'InstructLab pipeline enabled',
'The server will restart for this process.',
);
} else {
notification.success(

Check warning on line 63 in frontend/src/concepts/pipelines/content/ManageSamplePipelinesModal.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/concepts/pipelines/content/ManageSamplePipelinesModal.tsx#L63

Added line #L63 was not covered by tests
'Automatic updates for InstructLab pipeline disabled',
'Your InstructLab pipeline will no longer receive automatic updates.',
);
}
unregisterNotification(ilabPipelineNotificationWatcher);
if (isEnabled && !notificationWatcherRef.current) {
notificationWatcherRef.current = true;
Expand Down Expand Up @@ -144,6 +151,15 @@ const ManageSamplePipelinesModal: React.FC<ManageSamplePipelinesModalProps> = ({
/>
</StackItem>
) : null}
{isInstructLabEnabled && !checked ? (
<StackItem>

Check warning on line 155 in frontend/src/concepts/pipelines/content/ManageSamplePipelinesModal.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/concepts/pipelines/content/ManageSamplePipelinesModal.tsx#L153-L155

Added lines #L153 - L155 were not covered by tests
<Alert
isInline
variant="warning"
title="If you wish to no longer have the InstructLab pipeline, you must manually delete it."
/>
</StackItem>
) : null}

Check warning on line 162 in frontend/src/concepts/pipelines/content/ManageSamplePipelinesModal.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/concepts/pipelines/content/ManageSamplePipelinesModal.tsx#L162

Added line #L162 was not covered by tests
</Stack>
</Modal>
);
Expand Down

0 comments on commit bf9c4e3

Please sign in to comment.