Final
This commit is contained in:
@@ -16,6 +16,7 @@ import CredentialsIcon from "../icons/credentials";
|
|||||||
import AgentIcon from "../icons/agent";
|
import AgentIcon from "../icons/agent";
|
||||||
import DownloadIcon from "../icons/download";
|
import DownloadIcon from "../icons/download";
|
||||||
import useNavigations from "@/app/hooks/useNagivation";
|
import useNavigations from "@/app/hooks/useNagivation";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
const Navbar = () => {
|
const Navbar = () => {
|
||||||
const [triggerDropDown, setTriggerDropDown] = useState(false);
|
const [triggerDropDown, setTriggerDropDown] = useState(false);
|
||||||
@@ -27,11 +28,15 @@ const Navbar = () => {
|
|||||||
navToHome,
|
navToHome,
|
||||||
navToOrganization,
|
navToOrganization,
|
||||||
navToUsers,
|
navToUsers,
|
||||||
} = useNavigations();
|
} = useNavigations(setTriggerDropDown);
|
||||||
|
|
||||||
|
const pathname = usePathname();
|
||||||
|
|
||||||
const isMobile = useIsMobile();
|
const isMobile = useIsMobile();
|
||||||
return (
|
return (
|
||||||
<div className={styles.mainContainer}>
|
<div
|
||||||
|
className={`${styles.mainContainer} ${pathname.includes("/add") ? styles.onAdd : ""}`}
|
||||||
|
>
|
||||||
{/* Mobile Hamburger Button */}
|
{/* Mobile Hamburger Button */}
|
||||||
<div className={styles.mobileHamburger}>
|
<div className={styles.mobileHamburger}>
|
||||||
<div className={styles.hamburgerMenu}>
|
<div className={styles.hamburgerMenu}>
|
||||||
|
|||||||
@@ -168,4 +168,7 @@
|
|||||||
.hamburgerMenu {
|
.hamburgerMenu {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
.onAdd {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 25px;
|
bottom: 25px;
|
||||||
z-index: 11;
|
z-index: 11;
|
||||||
right: 20px;
|
right: 10px;
|
||||||
animation-name: showToast;
|
animation-name: showToast;
|
||||||
animation-duration: 0.15s;
|
animation-duration: 0.15s;
|
||||||
animation-timing-function: ease-in-out;
|
animation-timing-function: ease-in-out;
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
.messageContainer p {
|
.messageContainer p {
|
||||||
color: #006929;
|
color: #006929;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -47,8 +47,12 @@ const TopHeader = (props) => {
|
|||||||
editState={editState}
|
editState={editState}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className={styles.container}>
|
<div
|
||||||
<div className={styles.title}>
|
className={`${styles.container} ${pathName.includes("/add") ? styles.column : ""}`}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={`${styles.title} ${pathName.includes("/add") ? styles.fullWidth : ""}`}
|
||||||
|
>
|
||||||
{props.requiredButtons.includes("back") && (
|
{props.requiredButtons.includes("back") && (
|
||||||
<div onClick={() => router.back()}>
|
<div onClick={() => router.back()}>
|
||||||
<BackIcon />
|
<BackIcon />
|
||||||
@@ -56,7 +60,9 @@ const TopHeader = (props) => {
|
|||||||
)}
|
)}
|
||||||
<p>{props.topbarTitle}</p>
|
<p>{props.topbarTitle}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.actionBar}>
|
<div
|
||||||
|
className={`${styles.actionBar} ${pathName.includes("/add") ? styles.fullWidth : ""}`}
|
||||||
|
>
|
||||||
{props?.requiredButtons.includes("search") && (
|
{props?.requiredButtons.includes("search") && (
|
||||||
<div className={styles.searchBarContainer}>
|
<div className={styles.searchBarContainer}>
|
||||||
{!isMobile && <SearchBar />}
|
{!isMobile && <SearchBar />}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
padding: 24px;
|
padding: 24px;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
background: #21232f;
|
background: #21232f;
|
||||||
transition: all 0.15s;
|
transition: all 0.15s;
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
}
|
}
|
||||||
.searchBarContainer {
|
.searchBarContainer {
|
||||||
@@ -171,7 +173,19 @@
|
|||||||
}
|
}
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.container {
|
.container {
|
||||||
background: #21232f00;
|
background: linear-gradient(180deg, #1c1d2b 0%, #191a24 100%);
|
||||||
|
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
.column {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
.fullWidth {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
.fullWidth > button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +1,22 @@
|
|||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
const useNavigations = () => {
|
|
||||||
|
export default function useNavigations(setTriggerDropDown) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const navToHome = () => {
|
|
||||||
router.push("/home");
|
const handleNav = (path) => {
|
||||||
};
|
if (setTriggerDropDown) {
|
||||||
const navToOrganization = () => {
|
setTriggerDropDown(false);
|
||||||
router.push("/organization");
|
}
|
||||||
};
|
router.push(path);
|
||||||
const navToProject = () => {
|
|
||||||
router.push("/projects");
|
|
||||||
};
|
|
||||||
const navToUsers = () => {
|
|
||||||
router.push("/users");
|
|
||||||
};
|
|
||||||
const navToRoles = () => {
|
|
||||||
router.push("/roles");
|
|
||||||
};
|
|
||||||
const navToCredentials = () => {
|
|
||||||
router.push("/credentials");
|
|
||||||
};
|
|
||||||
const navToAgents = () => {
|
|
||||||
router.push("/agents");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
navToHome,
|
navToHome: () => handleNav("/home"),
|
||||||
navToAgents,
|
navToAgents: () => handleNav("/agents"),
|
||||||
navToCredentials,
|
navToCredentials: () => handleNav("/credentials"),
|
||||||
navToOrganization,
|
navToProject: () => handleNav("/projects"),
|
||||||
navToProject,
|
navToRoles: () => handleNav("/roles"),
|
||||||
navToRoles,
|
navToOrganization: () => handleNav("/organization"),
|
||||||
navToUsers,
|
navToUsers: () => handleNav("/users"),
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
export default useNavigations;
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import variableStyles from "./variableStyles.module.css";
|
import variableStyles from "./variableStyles.module.css";
|
||||||
|
import DeleteIcon from "@/app/components/icons/delete";
|
||||||
const Settings = ({
|
const Settings = ({
|
||||||
setTriggerAddVariable,
|
setTriggerAddVariable,
|
||||||
setTriggerAddVolume,
|
setTriggerAddVolume,
|
||||||
@@ -8,7 +9,29 @@ const Settings = ({
|
|||||||
...props
|
...props
|
||||||
}) => {
|
}) => {
|
||||||
const [triggerVariableDropDown, setTriggerVariableDropDown] = useState(false);
|
const [triggerVariableDropDown, setTriggerVariableDropDown] = useState(false);
|
||||||
|
const sampleData = [
|
||||||
|
{ id: 1, key: "REQUEST_SERVICE_GRPC", value: "request-service:50053" },
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
key: "DatabaseSettings:ConnectionString",
|
||||||
|
value:
|
||||||
|
"mongodb://databaseAdmin:d2OIxck4DHZgOJNuk1A@129.212.210.84:27017/?authSource=admin",
|
||||||
|
},
|
||||||
|
{ id: 1, key: "REQUEST_SERVICE_GRPC", value: "request-service:50053" },
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
key: "DatabaseSettings:ConnectionString",
|
||||||
|
value:
|
||||||
|
"mongodb://databaseAdmin:d2OIxck4DHZgOJNuk1A@129.212.210.84:27017/?authSource=admin",
|
||||||
|
},
|
||||||
|
{ id: 1, key: "REQUEST_SERVICE_GRPC", value: "request-service:50053" },
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
key: "DatabaseSettings:ConnectionString",
|
||||||
|
value:
|
||||||
|
"mongodb://databaseAdmin:d2OIxck4DHZgOJNuk1A@129.212.210.84:27017/?authSource=admin",
|
||||||
|
},
|
||||||
|
];
|
||||||
return (
|
return (
|
||||||
<div {...props}>
|
<div {...props}>
|
||||||
<div className={variableStyles.variablesHeader}>
|
<div className={variableStyles.variablesHeader}>
|
||||||
@@ -111,16 +134,19 @@ const Settings = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={variableStyles.variableList}>
|
<div className={variableStyles.variableList}>
|
||||||
<div className={variableStyles.emptyVariableList}>
|
{/* <div className={variableStyles.emptyVariableList}>
|
||||||
<div>
|
<div>
|
||||||
<p>No Environment Variables added</p>
|
<p>No Environment Variables added</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{/* <div className={variableStyles.variable}>
|
|
||||||
<p>REQUEST_SERVICE_GRPC</p>
|
|
||||||
<p>request-service:50053</p>
|
|
||||||
<DeleteIcon />
|
|
||||||
</div> */}
|
</div> */}
|
||||||
|
{sampleData.map((data, key) => {
|
||||||
|
return (
|
||||||
|
<div className={variableStyles.variable}>
|
||||||
|
<p>{data.key}</p>
|
||||||
|
<p>{data.value}</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -324,4 +324,10 @@
|
|||||||
.resourceFields .inputGroup div {
|
.resourceFields .inputGroup div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.projectDetailsHeader {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.fieldsContainerCreateNew {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,26 +151,7 @@
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: #1d1e2a;
|
background: #1d1e2a;
|
||||||
}
|
}
|
||||||
.variable {
|
|
||||||
display: flex;
|
|
||||||
padding: 8px 0;
|
|
||||||
align-items: center;
|
|
||||||
align-self: stretch;
|
|
||||||
border-bottom: 0.5px solid #2e3042;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.variable p {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
flex: 1 0 0;
|
|
||||||
align-self: stretch;
|
|
||||||
color: #d2d3e1;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: normal;
|
|
||||||
letter-spacing: 0.15px;
|
|
||||||
}
|
|
||||||
.environmentVariablesContainer {
|
.environmentVariablesContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
@@ -202,16 +183,18 @@
|
|||||||
}
|
}
|
||||||
.envVariablesHeader {
|
.envVariablesHeader {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
padding: 12px 24px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
width: 100%;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
flex-direction: column;
|
||||||
|
border-bottom: 1px solid #2c2e3f;
|
||||||
}
|
}
|
||||||
.envVariablesHeader > div {
|
.envVariablesHeader > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 12px 16px;
|
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
border-bottom: 1px solid #2c2e3f;
|
|
||||||
}
|
}
|
||||||
.envVariablesHeader > div p {
|
.envVariablesHeader > div p {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -226,16 +209,43 @@
|
|||||||
}
|
}
|
||||||
.variableList {
|
.variableList {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0 16px 16px 16px;
|
|
||||||
|
padding: 24px 24px 0 24px;
|
||||||
|
|
||||||
|
padding-bottom: 24px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
|
gap: 10px;
|
||||||
|
width: 100%;
|
||||||
|
flex: 1 0 0;
|
||||||
|
}
|
||||||
|
.variable {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 5px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.variable p {
|
||||||
|
display: flex;
|
||||||
|
align-items: start;
|
||||||
|
|
||||||
|
flex: 1 0 0;
|
||||||
|
align-self: stretch;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
color: #d2d3e1;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
letter-spacing: 0.15px;
|
||||||
}
|
}
|
||||||
.emptyVariableList {
|
.emptyVariableList {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 24px 16px 0 16px;
|
padding: 24px 16px 0 16px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
width: 100%;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
}
|
}
|
||||||
@@ -243,6 +253,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.emptyVariableList > div > div {
|
.emptyVariableList > div > div {
|
||||||
|
|||||||
@@ -332,4 +332,10 @@
|
|||||||
.resourceFields .inputGroup div {
|
.resourceFields .inputGroup div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.projectDetailsHeader {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.fieldsContainerCreateNew {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user