Skip to content

Commit

Permalink
resize db placeholder (#4264)
Browse files Browse the repository at this point in the history
  • Loading branch information
jusrhee authored Feb 9, 2024
1 parent f4b0ad8 commit 8d63f46
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions dashboard/src/main/home/database-dashboard/DatabaseDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,48 +81,48 @@ const DatabaseDashboard: React.FC = () => {
return filteredByEngine;
}, [datastores, searchValue, typeFilter, engineFilter]);

if (currentProject?.sandbox_enabled) {
return (
<DashboardPlaceholder>
<Text size={16}>Databases are not enabled for sandbox users</Text>
<Spacer y={0.5} />
<Text color={"helper"}>
Eject to your own cloud account to enable managed databases.
</Text>
<Spacer y={1} />
<ShowIntercomButton
alt
message="I would like to eject to my own cloud account"
height="35px"
>
Request ejection
</ShowIntercomButton>
</DashboardPlaceholder>
);
}

if (!currentProject?.db_enabled) {
return (
<DashboardPlaceholder>
<Text size={16}>Datastores are not enabled for this project</Text>
<Spacer y={0.5} />
<Text color={"helper"}>
Reach out to the Porter team to enable managed datastores on your
project.
</Text>
<Spacer y={1} />
<ShowIntercomButton
alt
message="I would like to enable managed datastores on my project"
height="35px"
>
Request to enable
</ShowIntercomButton>
</DashboardPlaceholder>
);
}

const renderContents = (): JSX.Element => {
if (currentProject?.sandbox_enabled) {
return (
<DashboardPlaceholder>
<Text size={16}>Databases are not enabled for sandbox users</Text>
<Spacer y={0.5} />
<Text color={"helper"}>
Eject to your own cloud account to enable managed databases.
</Text>
<Spacer y={1} />
<ShowIntercomButton
alt
message="I would like to eject to my own cloud account"
height="35px"
>
Request ejection
</ShowIntercomButton>
</DashboardPlaceholder>
);
}

if (!currentProject?.db_enabled) {
return (
<DashboardPlaceholder>
<Text size={16}>Datastores are not enabled for this project</Text>
<Spacer y={0.5} />
<Text color={"helper"}>
Reach out to the Porter team to enable managed datastores on your
project.
</Text>
<Spacer y={1} />
<ShowIntercomButton
alt
message="I would like to enable managed datastores on my project"
height="35px"
>
Request to enable
</ShowIntercomButton>
</DashboardPlaceholder>
);
}

if (datastores === undefined || isLoading || isLoadingClusters) {
return <Loading offset="-150px" />;
}
Expand Down

0 comments on commit 8d63f46

Please sign in to comment.