{
- if (adapters?.length >= 3) {
+ if (onboardCompleted(adaptersList)) {
navigate(homePageUrl);
}
- }, []);
+ }, [adaptersList]);
const steps = [
{
@@ -62,7 +63,8 @@ function OnBoard() {
};
const addNewItem = (row, isEdit) => {
- navigate(0);
+ const newAdapter = row?.adapter_type.toLowerCase();
+ setAdaptersList([...adaptersList, newAdapter]);
};
return (
@@ -101,7 +103,7 @@ function OnBoard() {
- {adapters?.includes(step.type) ? (
+ {adaptersList?.includes(step.type) ? (
Configured
diff --git a/frontend/src/components/onboard/onBoard.css b/frontend/src/components/onboard/onBoard.css
index 1d96ca99f6..2944ac3d8b 100644
--- a/frontend/src/components/onboard/onBoard.css
+++ b/frontend/src/components/onboard/onBoard.css
@@ -4,6 +4,12 @@
margin-top: 50px;
}
+@media screen and (max-height: 900px) {
+ .onboard-content {
+ margin-top: 30px;
+ }
+}
+
.uppercase-text {
text-transform: uppercase;
color: #0C355A;
@@ -11,6 +17,18 @@
margin-bottom: 50px;
}
+@media screen and (max-height: 900px) {
+ .uppercase-text {
+ margin-bottom: 10px;
+ }
+}
+
+@media screen and (max-height: 900px) {
+ h1 {
+ font-size: 1.2rem;
+ }
+}
+
.text-title-style {
color: #0C355A;
font-family: 'SF Pro Text', sans-serif;
@@ -44,6 +62,13 @@
margin-bottom: 50px;
}
+@media screen and (max-height: 900px) {
+ .landing-logo {
+ height: 30px;
+ margin-bottom: 10px;
+ }
+}
+
.circle {
position: absolute;
left: 0%;
@@ -70,6 +95,12 @@
margin-top: 25px;
}
+@media screen and (max-height: 900px) {
+ .later-div-style {
+ margin-top: 10px;
+ }
+}
+
.svg-container {
position: relative;
width: 100px;
@@ -99,4 +130,37 @@
.configured-text {
margin-left: 8px;
vertical-align: middle;
+}
+
+@media screen and (max-height: 900px) {
+ .ant-space .ant-space-item .ant-card {
+ padding: 6px;
+ }
+}
+
+@media screen and (max-height: 900px) {
+ .card-style {
+ width: 940px;
+ margin-bottom: 5px;
+ }
+}
+
+@media screen and (max-height: 720px) and (max-width: 1280px){
+ .card-style {
+ width: 1200px;
+ margin-bottom: 5px;
+ }
+}
+
+@media screen and (max-height: 780px) and (max-width: 1024px){
+ .card-style {
+ width: 940px;
+ margin-bottom: 5px;
+ }
+}
+
+@media screen and (max-height: 800px) {
+ .ant-space .ant-space-item .ant-card .ant-card-body {
+ padding: 10px;
+ }
}
\ No newline at end of file
diff --git a/frontend/src/helpers/GetStaticData.js b/frontend/src/helpers/GetStaticData.js
index 7b683313b8..1ebea1065e 100644
--- a/frontend/src/helpers/GetStaticData.js
+++ b/frontend/src/helpers/GetStaticData.js
@@ -318,6 +318,18 @@ const displayPromptResult = (output) => {
}
};
+const onboardCompleted = (adaptersList) => {
+ if (!Array.isArray(adaptersList)) {
+ return false;
+ }
+ const MANDATORY_ADAPTERS = ["llm", "vector_db", "embedding"];
+ if (MANDATORY_ADAPTERS.length !== adaptersList.length) {
+ return false;
+ }
+ adaptersList = adaptersList.map((element) => element.toLowerCase());
+ return MANDATORY_ADAPTERS.every((value) => adaptersList.includes(value));
+};
+
export {
CONNECTOR_TYPE_MAP,
O_AUTH_PROVIDERS,
@@ -333,6 +345,7 @@ export {
getTimeForLogs,
handleException,
listOfAppDeployments,
+ onboardCompleted,
promptStudioUpdateStatus,
promptType,
publicRoutes,